#1 (permalink)  
Old 03-07-2008, 02:20 PM
esm's Avatar
esm esm is offline
Active Member
 
Join Date: Apr 2003
Location: Atlanta GA
Posts: 3,411
esm is on a distinguished road
Default Free MOD for IP address

here is a free MOD for the monthly contest. It adds the IP address as a custom field and captures the ip address of whoever is submitting the link during the add link process by a user

Go to the Admin Control Panel and click the Custom Field hyperlink in the Links section.

For the Field name, enter ip_address

For the Text field, enter IP Address

For the Type field, select the Text option from the drop down list

for the Required and Searchable options, click No for both. Actually, you can select whatever suits you needs for either of these. You could select Yes for the Required field but it really should make no difference for a user submitting a link. If you add the link as the admin, then you would need to add an IP during the add process.

For the Permission field, select the Admin only option from the drop down list

Click the Add Field button to save the custom field



Edit the add_form.html file.

You do not need to change which option (Show or Hide) you are using for <%$custom_field_form%>.

at the bottom of the page, enter the following just above the </form> tag
Code:
Content visible to License Owner only.
it should look like the following
Code:
Content visible to License Owner only.
Edit the add.php file.
Change the call to DisplayTemplate at about line 160 in the function ShowFormAddUrl as follows:

Code:
Content visible to License Owner only.
Save your changes.

All done.



.
__________________
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

.

Last edited by esm; 03-08-2008 at 09:05 AM.
Reply With Quote
  #2 (permalink)  
Old 03-07-2008, 03:15 PM
echo@'s Avatar
Active Member
 
Join Date: Oct 2007
Location: UK Essex
Posts: 473
echo@ is on a distinguished road
Default

Love it, nice one
Reply With Quote
  #3 (permalink)  
Old 03-07-2008, 11:19 PM
esm's Avatar
esm esm is offline
Active Member
 
Join Date: Apr 2003
Location: Atlanta GA
Posts: 3,411
esm is on a distinguished road
Default

or you could add something like the following after the </form>

Code:
Content visible to License Owner only.

.
__________________
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

.
Reply With Quote
  #4 (permalink)  
Old 03-08-2008, 07:53 AM
echo@'s Avatar
Active Member
 
Join Date: Oct 2007
Location: UK Essex
Posts: 473
echo@ is on a distinguished road
Default

once again thanks, nice and easy explaination .

I did notice a typo "add_form.php" should be "add_form.html"

Works great, will probally add the field to the detail_link.html as "Submitted by IP" etc.

Thanks!
Reply With Quote
  #5 (permalink)  
Old 03-10-2008, 01:25 AM
Registered User
 
Join Date: Feb 2008
Posts: 22
seveneth is on a distinguished road
Default

To make it better, perhaps we'll need to exclude this custom field in "block_sort_links" so it doesn't show in browse listing page.
Reply With Quote
  #6 (permalink)  
Old 03-10-2008, 01:39 AM
esm's Avatar
esm esm is offline
Active Member
 
Join Date: Apr 2003
Location: Atlanta GA
Posts: 3,411
esm is on a distinguished road
Default

Code:
Content visible to License Owner only.
I didn't look at it what you were referring to but the problem I have is that the field is designated as "Admin only" so that means that it should not appear anywhere except to the admin and probably only in the admin area screens.

If it appears elsewhere, maybe a fix by the developer...



.
__________________
esm
"The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

.
Reply With Quote
  #7 (permalink)  
Old 03-10-2008, 02:31 AM
Registered User
 
Join Date: Feb 2008
Posts: 22
seveneth is on a distinguished road
Default

Well, I have to agree on this one
I think it can be considered as a bug.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ip address tane v5.x 0 06-30-2006 01:29 PM
Address, Zip Code, etc?? RIChristianscom Blocks and Modification 6 03-27-2006 11:48 AM
Email Address sofiah v5.x 1 10-31-2003 06:14 PM
No IP address in Who's Online craven v5.x 0 08-28-2003 03:45 PM

HACKER SAFE certified sites prevent over 99.9% of hacker crime.

All times are GMT -5. The time now is 03:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
SSL Certificate