|
|
#1 |
|
Senior Member
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 475
Rep Power: 25 ![]() |
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.
|
|
|
|
|
#2 |
|
Staff
Join Date: Mar 2006
Posts: 443
Rep Power: 23 ![]() |
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']));
Code:
$class_tpl->assign('Show_IP', $_SERVER['REMOTE_ADDR']);
Code:
<tr>
<td align="center">Your IP: {$Show_IP}<br />Tracked for abuse
</td>
</tr>
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 475
Rep Power: 25 ![]() |
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.
|
|
|
|
|
#4 |
|
Coder
Join Date: Mar 2006
Posts: 4,743
Rep Power: 115 ![]() ![]() ![]() |
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. |
|
|
|
|
#5 |
|
Senior Member
Join Date: Mar 2006
Location: Best city in the World � Calgary, Canada
Posts: 475
Rep Power: 25 ![]() |
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.
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Apr 2006
Posts: 13
Rep Power: 15 ![]() |
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 |
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
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 |