| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
IP Addresses in Users Online for all users | ||||
|
|
Thread Tools | Search this Thread |
#111
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
Quote:
__________________
_____________ Capture Your Mini-Me Look! - X-CART Gold (Current Version) V4.6 - Reboot - CDSEO |
|||||||||
#112
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
Quote:
I have the same issue that it shows my IP address and not that of the person or machine browsing. Does anyone have and thoughts of work arounds for this? |
|||||||||
#113
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
Quote:
Works fine on my live 4.45 site but on my 4.6.0 dev site I have the same problem of all IPs showing as mine. It's on my list to look at before I go live with 4.6.x but it will most likely be a couple of months.
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best |
|||||||
#114
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
Hi everyone - you may want to check out this thread on making the Users Online table sortable and look good
__________________
X-Cart Gold 4.6.1 |
|||||||||
#115
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
So has anyone been able to figure out why {$smarty.server.REMOTE_ADDR} shows your IP and not that of the people browsing the site?
|
|||||||||
#116
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
{$smarty.server.REMOTE_ADDR} shows IP of the user viewing the template. Since you are the user viewing the page (and template), it displays yours IP.
So, instead of retrieving the address when the template is rendered, you should collect it in a php script and store in the user's session (so every user will have its IP in his session data). And, when displaying the template listing online users, show addresses stored in users' sessions. Unfortunately, I can't post code that will work for all XC versions, but the logic will be as I've described.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#117
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
Hi Alex,
Thank you for the information. Can you let us know why it worked in 4.4.5? Thank you! Paul
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best |
|||||||
#118
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
Everyone wants this small feature in admin so I request QT that it should be added by default since it's very small but useful feature.
Infact I have got more custom coded by using country IP detection functionality of module multi currency module & now I can see visitor's country also next to the IP address.
__________________
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 ---------------- |
|||||||
|
#119
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
Quote:
Black magic, I guess Using {$smarty.server.REMOTE_ADDR} in the template listing online users will display your IP address for each user in the list, not IPs of these users. However, code from earlier posts in this thread should work - I see it stores REMOTE_ADDR in the user session. Quote:
I've added your request to the wish list, but can't say when developers can start working on it - there is a lot of work in the list.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#120
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
I have it working now in 4.6.1 using an edited version of post 105 by Mish and the edit done by denlem in 106. Below is the code that I'm using.
In postauth.php PHP Code:
In modules/Users_online/stats.php PHP Code:
In skin/common_files/modules/Users_online/stats.tpl (denlem edit) Replace Code:
With Code:
The only change I made was to comment out some of the added PHP code in stats.php. With that change it's working fine for me. Somebody else can play with the other PHP code if they want.
__________________
X-Cart GoldPlus v4.7.12 | reBOOT (reDUX) Template v4.7.12.9 | Always The Best |
|||||||
|
|||
X-Cart forums © 2001-2020
|