Re: IP Addresses in Users Online for all users
Quote:
I've applied this patch to a clean unmodified 4.4.2 installation. I get the following error: Quote:
|
Re: IP Addresses in Users Online for all users
This is not an error. It means XC cannot auto patch the files, you need to do this manually
|
Re: IP Addresses in Users Online for all users
But this was on a clean, unmodified 4.4.2 install. If the patch won't apply, there's a problem with the patch or the patch software.
Edit: I did a manual patch. There was no reason that the patch should have failed on the first and third file and the patch was incorrectly applied on the second file. Manually patched it now works ok. |
Re: IP Addresses in Users Online for all users
In 4.4.4 the patch is applied without any problems.
Probably there were some updates in the patching system since 4.4.2... |
Re: IP Addresses in Users Online for all users
Hi Folks,
I've manually changed Version 4.4.5 to display IP Addresses / domain lookup for users online:
Code:
if (!empty($active_modules['Users_online'])) { to Code:
if (!empty($active_modules['Users_online'])) { Open Xcart -> Modules -> Users_online->stats.php Edit line 104 and change Code:
$rec['session_create_date'] = $data['session_create_date'] + $config["Appearance"]["timezone_offset"]; to Code:
$rec['session_create_date'] = $data['session_create_date'] + $config["Appearance"]["timezone_offset"]; Open x-cart -> skin1 -> Modules -> Users_online->stats.tpl (Note, on my site I had to use X-cart ->Skin instead of skin1) Edit line 23 Change it from Code:
<td bgcolor="#FFFFFF" nowrap="nowrap" valign="top">{if $v.userinfo ne ''}<a href="{$catalogs.admin}/user_modify.php?user={$v.userinfo.id}&usertype=C">{$v.userinfo.firstname} {$v.userinfo.lastname}</a>{if $v.userinfo.status eq 'A'}<br /><i>({$lng.lbl_anonymous_customer})</i>{/if}{else}{$lng.lbl_unregistered_customer}{/if}</td> Code:
<td bgcolor="#FFFFFF" nowrap="nowrap" valign="top">{if $v.userinfo ne ''}<a href="{$catalogs.admin}/user_modify.php?user={$v.userinfo.id}&usertype=C">{$v.userinfo.firstname} {$v.userinfo.lastname}</a>{if $v.userinfo.status eq 'A'}<br /><i>({$lng.lbl_anonymous_customer})</i>{/if}{else}{$lng.lbl_unregistered_customer}{/if} IP: {$v.session_ip} <a href="http://cqcounter.com/whois/?query={$v.session_ip}" target="_blank">Trace Location</a> </td> Here is a screen shot: http://mojoimage.com/free-image-hosting-11/3523Screen-Shot-2012-08-06-at-3-26-39-PM.pngFree Image Hosting |
Re: IP Addresses in Users Online for all users
I just installed this update 4.5.2 and it works there also.
The only difference is the section below is in a slightly different location and can be found in: X-Cart/skin/common_files/modules/Users_online/stats.tpl Quote:
I also edited the change to the following: Code:
This cleans it up a bit and puts the "IP: " on it's own line, and the Trace Location link is dropped and the IP is clickable instead. http://backwoodstattoos.com/images/P/ip.png |
Re: IP Addresses in Users Online for all users
Will this still work on 4.5.4? Do I just need to do what is in posts 105 and 106? Sometimes these old threads where people add on to and modify the code are tough to stumble upon later because you don't know how far back you have to start reading.
|
Re: IP Addresses in Users Online for all users
It's not working on my 4.5.5 dev site. {$v.session_ip} does not have a value. It's on my list to look at but may be above my pay grade :-)
|
Re: IP Addresses in Users Online for all users
For 4.5.5 (not tested in other versions)
I used the Smarty function {$smarty.server.REMOTE_ADDR} so I don't need to make any changes to postauth.php or stats.php anymore. In store/skin/common_files/modules/Users_online/stats.tpl Change From: Quote:
Quote:
|
Re: IP Addresses in Users Online for all users
I use IP2Location service, and when I make the change suggested,
Code:
IP: <a href="http://www.ip2location.com/{$v.session_ip}" target="_blank">{$v.session_ip}</a></td> changed to Code:
IP: <a href="http://www.ip2location.com/{$smarty.server.REMOTE_ADDR}" target="_blank">{$smarty.server.REMOTE_ADDR}</a></td> it always shows MY ip address, instead of the user's IP address. Am I missing something? |
All times are GMT -8. The time now is 09:40 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.