Support Forums

Old 05-06-2006, 09:00 PM   #1
Senior Member
 
SkGold's Avatar
 
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 475
Rep Power: 25
SkGold has a spectacular aura about
Default IP Address in Contact form

I saw on www.chevytrader.com that it is possible to track and display users IP Address under contact form. I think it is a great and can scary away some spamers. I will appreciate it, if somebody could tell me how to do it.
I am using V3.0.15
__________________
Thanks,
Sergey

Bargain Finder in Calgary, Alberta, Canada.
Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev

A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
SkGold is offline  
Old 05-06-2006, 09:35 PM   #2
Staff
 
Join Date: Mar 2006
Posts: 443
Rep Power: 23
Blair will become famous soon enough
Default

Hi Sergey-

First, we'll need to assign the IP address to a variable in the contactus.php file. Open contactus.php and look down around line 59:
Code:
$class_tpl->assign('title', safeStripSlashes($rs['pPageTitle']));
Create a new line and add:
Code:
$class_tpl->assign('Show_IP', $_SERVER['REMOTE_ADDR']);
Then, open contactus.tpl.php and add a new row at the bottom of the table:
Code:
	<tr>
		<td align="center">Your IP: {$Show_IP}<br />Tracked for abuse
		</td>
	</tr>
That should do it. I've modified the example site to do this: http://www.68classifieds.com/example/contactus.php
__________________
Blair
68C Staff

68C Downloads | Report a Bug | Knowledge Base
Blair is offline  
Old 05-06-2006, 10:23 PM   #3
Senior Member
 
SkGold's Avatar
 
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 475
Rep Power: 25
SkGold has a spectacular aura about
Default

Thanks Blair. It is working fine.

Now I want to do the same with contact the owner.
I guess I need to do the same things with contact.php and contactowner.tpl.php files.
I just don�t know where to put in contact.php line:
Code:
$class_tpl->assign('Show_IP', $_SERVER['REMOTE_ADDR']);
__________________
Thanks,
Sergey

Bargain Finder in Calgary, Alberta, Canada.
Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev

A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
SkGold is offline  
Old 05-07-2006, 08:23 AM   #4
Coder
 
Join Date: Mar 2006
Posts: 4,743
Rep Power: 115
Lhotch is a glorious beacon of lightLhotch is a glorious beacon of lightLhotch is a glorious beacon of light
Default

For those who dont have access to the script files it can also be done at the template level by dropping the following in your template where you would like it displayed.

{$smarty.server.REMOTE_ADDR}

While it certainly wouldnt hurt to show the IP, keep in mind that some large ISP's like AOL go through large groups of proxie servers so a given users IP will actually be from one of the proxie servers and not the users actual system.
__________________
Larry

What I post here should be used only as a guide to point you in the right direction. If the code I post doesnt make any sense or work as posted then you should spend more time reading the various manuals and tutorials so it does make sense and you can tweak it to work. A sure fire way to get yourself in trouble is to implement changes you dont have an intimate understanding of. Im happy to help, but I am not here to teach you to code or create your site for you.
Lhotch is offline  
Old 05-07-2006, 02:14 PM   #5
Senior Member
 
SkGold's Avatar
 
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 475
Rep Power: 25
SkGold has a spectacular aura about
Default

Thanks Larry. Working great at the template level as well.
__________________
Thanks,
Sergey

Bargain Finder in Calgary, Alberta, Canada.
Calgary Business Directory V3.1.10 Dev - Calgary Classifieds V3.1.10 Dev - Calgary Real Estate V3.1.10 Dev - Calgary Used Cars V3.1.10 Dev - Calgary Rent V3.1.10 Dev - Calgary Dating V3.1.5 Dev

A website without well-done Internet Marketing and Search Engine Optimization is as good as non-existent.
SkGold is offline  
Old 05-07-2006, 07:35 PM   #6
Junior Member
 
 
Join Date: Apr 2006
Posts: 13
Rep Power: 15
NJHomeGuide is on a distinguished road
Default

Thanks! I added it to my site too. It works great.
__________________
Maria Sherow
http://www.NJHomeGuide.com
NJ's Ultimate Home Resource!
-----------------------------------
Current Version: V3.0.15 Developer
NJHomeGuide is offline  
 

Bookmarks

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
Contact Owner Form SteM v3.1 Questions & Support 2 01-02-2007 09:47 AM
3.1.5a seller contact form broken civ v3.1 Questions & Support 16 11-26-2006 11:16 PM
maybe a new issue in 'contact us' form frommarcq v3.1 Questions & Support 2 06-27-2006 10:15 AM
Contact Us form not sending e-mail after 3.1.1 upgrade fjarabeck v3.1 Questions & Support 4 05-24-2006 08:29 PM
Contact the Owner - make form optional fjarabeck v3.1 Modules & Modifications 2 05-14-2006 10:17 PM


All times are GMT -4. The time now is 02:29 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0