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
  #51  
Old 07-13-2007, 10:38 PM
 
anandat anandat is offline
 

X-Adept
  
Join Date: Jan 2004
Posts: 914
 

Thumbs up Re: IP Addresses in Users Online for all users

Quote:
Originally Posted by Paul H
I have this mod working on my site but it just displays the persons first name twice
and it would be better having the user name displayed-did i do something wrong here?

in stats.tpl file

find

<TD bgcolor="#FFFFFF" nowrap valign="top">{if $v.userinfo ne ''}{$v.userinfo.firstname} {$v.userinfo.firstname}{if $v.userinfo.status eq 'A'}
({$lng.lbl_anonymous_customer}){/if}{else}{$lng.lbl_unregistered_customer}{/if}</TD>

And replace it with:

<TD bgcolor="#FFFFFF" nowrap valign="top">{if $v.userinfo ne ''}{$v.userinfo.firstname} {$v.userinfo.lastname}{if $v.userinfo.status eq 'A'}
({$lng.lbl_anonymous_customer}){/if}{else}{$lng.lbl_unregistered_customer}{/if}</TD>


I guess above should resolve this problem.
__________________
X-Cart: 4.7.7 LIVE
Skin:Ultra by xcartmods.co.uk
X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9)
---------------
Server: Linux
php: 5.3
mysql: 5.0.89
----------------
Reply With Quote
  #52  
Old 07-15-2007, 01:25 AM
 
Paul H Paul H is offline
 

eXpert
  
Join Date: Sep 2005
Posts: 246
 

Default Re: IP Addresses in Users Online for all users

Yes that worked !

and for a shot in the dark I also tried adding
{$v.userinfo.username}

but that didn't work
__________________
Xcart Gold 4.1.11-Gone
= 4.7.11-Live
Reply With Quote
  #53  
Old 03-22-2008, 06:16 PM
  MythNReality's Avatar 
MythNReality MythNReality is offline
 

X-Adept
  
Join Date: Mar 2005
Location: S. Cali
Posts: 403
 

Default Re: IP Addresses in Users Online for all users

post#1 works with XCart 4-1-9! Sweet~
__________________
_____________
Capture Your Mini-Me Look!

- X-CART Gold (Current Version) V4.6
- Reboot
- CDSEO
Reply With Quote
  #54  
Old 05-09-2008, 11:12 PM
  MythNReality's Avatar 
MythNReality MythNReality is offline
 

X-Adept
  
Join Date: Mar 2005
Location: S. Cali
Posts: 403
 

Default Re: IP Addresses in Users Online for all users

Quote:
To MythNReality: the code in auth.php is there in v4.0.9, so it should be there in 4.0.12 as well. Just search for 'Users_online' in your copy of auth.php - there is only one instance of it in the whole of the file, so the code you are looking for should be right there (unless you've modified your auth.php and somehow gotten rid of it - if you have an unmodified copy of auth.php do a search in that and see if it's there).

I hope this helps!
Thank you. Hamid. I found it and got it works now.
__________________
_____________
Capture Your Mini-Me Look!

- X-CART Gold (Current Version) V4.6
- Reboot
- CDSEO
Reply With Quote
  #55  
Old 06-06-2008, 01:34 AM
 
circleofatlantis circleofatlantis is offline
 

Member
  
Join Date: May 2008
Location: Gold Coast, Australia
Posts: 21
 

Default Re: IP Addresses in Users Online for all users

I've made the changes to the php's ok.

But in the tpl, the line of code is completely different from the one quoted in the OP to look for.

Quote:
<td bgcolor="#FFFFFF" nowrap="nowrap" valign="top">{if $v.userinfo ne ''}<a href="user_modify.php?user={$v.userinfo.login|esca pe:"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>


Has there been an update that this mod has not taken into account since the last post on this thread ?

Suggestions ? I dont like the idea of just replacing it, without knowing why the code is different.
__________________
http://CircleofAtlantis.com/marketplace/
Xcart Version 4.1.9
Please bare with me. Ex-Analyst, ex-cobol, still teaching myself html, let alone anything else.
Reply With Quote
  #56  
Old 06-07-2008, 12:52 AM
 
circleofatlantis circleofatlantis is offline
 

Member
  
Join Date: May 2008
Location: Gold Coast, Australia
Posts: 21
 

Default Re: IP Addresses in Users Online for all users

Ok, took the plunge and just added the IP bit to the existing line.

Seems to work fine. And I added the line break as well

Next question :

How does one modify this to only display 1 line per IP ?

Edit : I got the click on IP working to, thanks whoever suggested the 2 add-ons.

I'm finding the results a bit odd.

All the IP's are the same, and yet the user environments are all different. If it was the same IP address, why isnt the environment list showing all the same ?

Personally, I dont want to know that 1 user is on and has visited 61 pages in the last however long. I want to know how many genuine users are online now and where they actually are now.

Can anyone suggest some modifications to achieve this ?
__________________
http://CircleofAtlantis.com/marketplace/
Xcart Version 4.1.9
Please bare with me. Ex-Analyst, ex-cobol, still teaching myself html, let alone anything else.
Reply With Quote
  #57  
Old 06-18-2008, 02:46 AM
 
hamid hamid is offline
 

Senior Member
  
Join Date: Apr 2004
Posts: 107
 

Default Re: IP Addresses in Users Online for all users

hi circleofatlantis

Each time a user opens a new window, they will be assigned a new sessionid.

So, say a user is on your home page and clicks one of your categories to open in a new window - they will now appear twice in your Users Online. So the more windows they open, the more times they will appear in your Users Online.

Each session remains active for 1 hour by default.

Obviously different people surf in different ways - some people always open up links in new windows - but you will find that most people keep to one session.

In my experience, I have found that if you see many many instances of the same IP appearing multiple times, it's usually a spider (or other automated bot creature) indexing your site - but its badly written - ie. it hasn't been configured to keep the same session.

I usually watch out for these as they can open hundreds of connections in a short amount of time which leads to an unneccesary heavy load on the server.

When I spot these, I run a quick check to see where the ip originates from and then add a 'deny from xxx.xxx.xxx.xxx' in my .htaccess file to stop it in its tracks.

There probably is a way of modifying the code to filter multiple instances of each ip address, but I have found that the original code is just too useful in its present form.
__________________
X-Cart Gold v4.6.5
Reply With Quote
  #58  
Old 06-18-2008, 02:59 AM
 
circleofatlantis circleofatlantis is offline
 

Member
  
Join Date: May 2008
Location: Gold Coast, Australia
Posts: 21
 

Default Re: IP Addresses in Users Online for all users

Thanks for that info. Makes things make sense now

I've had one persistent robot in, which I traced to a site that says its an experimental robot. I asked for some details and they said it was for a yet to be announced search engine. No follow up details.

I banned it from the site. My stats show its using more bandwidth than Google. And since its been there, my junk mail has gone up about 500%.

Since then, the traffic is actually disapointing, but accurately displayed.

But considering that Google hasnt found that part of my site yet, its not surprising.
__________________
http://CircleofAtlantis.com/marketplace/
Xcart Version 4.1.9
Please bare with me. Ex-Analyst, ex-cobol, still teaching myself html, let alone anything else.
Reply With Quote
  #59  
Old 07-12-2008, 10:40 PM
 
elmirage001 elmirage001 is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,964
 

Default Re: IP Addresses in Users Online for all users

This is a great mod! Thanks all of you.

For 4.1.10 - I followed Post #1 with the following:

auth.php
- no changes to Post #1


modules>Users_online>stats.php

Instead of this change
Quote:
$rec['session_create_date'] = $data['session_create_date']+$config["General"]["timezone_offset"];
$rec['session_ip'] = $data['session_ip'];
$statistics[] = $rec;

I did this
Quote:
$rec['session_create_date'] = $data['session_create_date']+$config["Appearance"]["timezone_offset"];
$rec['session_ip'] = $data['session_ip'];
$statistics[] = $rec;


skin1>modules>Users_online>stats.tpl

Instead of this change
Quote:
<TD bgcolor="#FFFFFF" nowrap valign="top">{if $v.userinfo ne ''}{$v.userinfo.firstname} {$v.userinfo.firstname}{if $v.userinfo.status eq 'A'}({$lng.lbl_anonymous_customer}){/if}{else}{$lng.lbl_unregistered_customer}{/if}
IP: {$v.session_ip}</TD>


I did this
Quote:
<td bgcolor="#FFFFFF" nowrap="nowrap" valign="top">{if $v.userinfo ne ''}<a href="user_modify.php?user={$v.userinfo.login|esca pe:"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>

Thank you Hamid very much!

Paul
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best
Reply With Quote
  #60  
Old 07-13-2008, 04:10 PM
 
hamid hamid is offline
 

Senior Member
  
Join Date: Apr 2004
Posts: 107
 

Default Re: IP Addresses in Users Online for all users

Hi Paul

Glad you like it - I can't imagine living without it now

Hamid
__________________
X-Cart Gold v4.6.5
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 02:22 AM.

   

 
X-Cart forums © 2001-2020