Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

IP Addresses in Users Online for all users

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #61  
Old 03-16-2009, 09:07 AM
 
neroag neroag is offline
 

Senior Member
  
Join Date: May 2005
Location: UK
Posts: 171
 

Default Re: IP Addresses in Users Online for all users

For 4.2.0 i use the following ..

In postauth.php find ..
Code:
if (!empty($active_modules['Users_online'])) { x_session_register("current_url_page"); x_session_register("current_date"); x_session_register("session_create_date"); $current_url_page = $php_url['url'].($php_url['query_string']?"?".$php_url['query_string']:""); if (empty($session_create_date)) $session_create_date = time(); $session_ip = getenv('REMOTE_ADDR'); }

change to ..
Code:
if (!empty($active_modules['Users_online'])) { x_session_register("session_ip"); x_session_register("current_url_page"); x_session_register("current_date"); x_session_register("session_create_date"); $current_url_page = $php_url['url'].($php_url['query_string']?"?".$php_url['query_string']:""); if (empty($session_create_date)) $session_create_date = time(); $current_date = time(); $session_ip = getenv('REMOTE_ADDR'); }

in modules/Users_online/stats.php find ...
Code:
$rec['session_create_date'] = $data['session_create_date']+$config["Appearance"]["timezone_offset"]; $statistics[] = $rec;

change to ..
Code:
$rec['session_create_date'] = $data['session_create_date']+$config["Appearance"]["timezone_offset"]; $rec['session_ip'] = $data['session_ip']; $statistics[] = $rec;

in skin1/modules/Users_online/stats.tpl find ..
Code:
<td bgcolor="#FFFFFF" nowrap="nowrap" valign="top">{if $v.userinfo ne ''}<a href="user_modify.php?user={$v.userinfo.login|escape:"url"}&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>

change to ..

Code:
<td bgcolor="#FFFFFF" nowrap="nowrap" valign="top">{if $v.userinfo ne ''}<a href="user_modify.php?user={$v.userinfo.login|escape:"url"}&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}<br />IP: <a href="http://private.dnsstuff.com/tools/whois.ch?ip={$v.session_ip}&cache=on" target="_blank">{$v.session_ip}</a></td>
__________________
X-cart Gold - 4.0.18 - 4.1.9 - 4.1.10 - 4.3.0
Reply With Quote

The following user thanks neroag for this useful post:
Yalokin (03-17-2010)
  #62  
Old 05-27-2009, 04:55 AM
 
Stizerg Stizerg is offline
 

Senior Member
  
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 195
 

Default Re: IP Addresses in Users Online for all users

Works without modifications.
Thanks.
__________________
X-Cart Gold Plus 4.6.6
A lot of custom mods
Reply With Quote
  #63  
Old 06-10-2009, 09:13 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: IP Addresses in Users Online for all users

Is there a way in the stats.tpl to get it to order the list of users online by time of last activity?
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #64  
Old 06-14-2009, 06:21 AM
 
gary02140 gary02140 is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 58
 

Default Re: IP Addresses in Users Online for all users

Quote:
Originally Posted by Stizerg
Works without modifications.
Thanks.


Stizerg,

Do you mean the mod works with your v4.1.12?

I am using V4.1.12 crystal blue. Does anyone here have successful experience in integrating this mod into the crystal blue?

In addition, I tried to show users online in admin side only by following a code modification from elsewhere, like

{if $active_modules.Users_online && $usertype ne "C"}
{include file="modules/Users_online/menu_users_online.tpl"}
{/if}

But the above code is the same to the original. And the users online is still shown on the customer side. Very frustrated. Why the v4.1.12 crystal blue is different from other skins?

Can anyone help me out? Many thanks in advance.
__________________
Version 4.1.12
Reply With Quote
  #65  
Old 06-14-2009, 06:13 PM
 
Stizerg Stizerg is offline
 

Senior Member
  
Join Date: Apr 2008
Location: Sydney, Australia
Posts: 195
 

Default Re: IP Addresses in Users Online for all users

gary02140
Yes. version 4.1.12

If you want to remove users online from customer side you need to edit customer/home.tpl
__________________
X-Cart Gold Plus 4.6.6
A lot of custom mods
Reply With Quote
  #66  
Old 06-14-2009, 07:38 PM
 
gary02140 gary02140 is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 58
 

Default Re: IP Addresses in Users Online for all users

Quote:
Originally Posted by Stizerg
gary02140
Yes. version 4.1.12

If you want to remove users online from customer side you need to edit customer/home.tpl

Stizerg,

Thanks! I comment it out and users online is removed from store front. Is this what you did?

Gary
__________________
Version 4.1.12
Reply With Quote
  #67  
Old 06-16-2009, 09:23 PM
 
donmck donmck is offline
 

Senior Member
  
Join Date: Dec 2005
Location: Australia
Posts: 137
 

Default Re: IP Addresses in Users Online for all users

I notice dnsstuff just locked out non-members in the last few days.
Anyone come across another dns lookup engine that can be integrated into this mod?

thanks in advance,

Cheers Don...
__________________
Don McKenzie

http://www.dontronics-shop.com/
X-Cart 4.0.17 [Unix]

█ Hosting by www.totalserversolutions.com The very best home for your X-Cart. (was ewdhosting.com)
Reply With Quote
  #68  
Old 06-17-2009, 05:59 AM
  denlem's Avatar 
denlem denlem is offline
 

Senior Member
  
Join Date: Apr 2004
Location: MA / CT / RI Border
Posts: 117
 

Default Re: IP Addresses in Users Online for all users

Quote:
Originally Posted by donmck
I notice dnsstuff just locked out non-members in the last few days.
Anyone come across another dns lookup engine that can be integrated into this mod?

thanks in advance,

Cheers Don...

Find this in your stats.tpl

Code:
http://www.dnsstuff.com/tools/whois.ch?ip=

and change it to:

Code:
http://www.dnsstuff.com/tools/ipall/?tool_id=67&token=&toolhandler_redirect=0&ip=

It's working for me so far and it also gives you a google map with the location!
__________________
X-Cart Gold Plus 4.7.10
Reply With Quote
  #69  
Old 06-17-2009, 11:47 AM
 
donmck donmck is offline
 

Senior Member
  
Join Date: Dec 2005
Location: Australia
Posts: 137
 

Default Re: IP Addresses in Users Online for all users

as advertised. very nice.
where do I sent the check

Cheers Don...
__________________
Don McKenzie

http://www.dontronics-shop.com/
X-Cart 4.0.17 [Unix]

█ Hosting by www.totalserversolutions.com The very best home for your X-Cart. (was ewdhosting.com)
Reply With Quote
  #70  
Old 06-19-2009, 04:08 PM
 
gary02140 gary02140 is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 58
 

Default Re: IP Addresses in Users Online for all users

Quote:
Originally Posted by donmck
I notice dnsstuff just locked out non-members in the last few days.
Anyone come across another dns lookup engine that can be integrated into this mod?

thanks in advance,

Cheers Don...

In case that this dnsstuff is not available in the future, http://www.netip.de/ can be a good option. But I just don't know how to code it into the mod. Can someone here figure it out?
__________________
Version 4.1.12
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:16 AM.

   

 
X-Cart forums © 2001-2020