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
  #91  
Old 07-12-2010, 12:22 AM
 
accesspos accesspos is offline
 

Advanced Member
  
Join Date: Nov 2009
Posts: 52
 

Default Re: IP Addresses in Users Online for all users

Quote:
Originally Posted by hoosierglass
The portion of users online mentioned here is in regards to the admin side. If you want to remove it from the customer side you will need to comment it out from the home.tpl file in the footer div.

I tried doing the following:

<div id="footer">
{*
{if $active_modules.Users_online}
{include file="modules/Users_online/menu_users_online.tpl"}
{/if}
*}
{include file="customer/bottom.tpl"}
</div>

Which removes the users online information on the customer side but the space available for users online info still remained. the info within bottom.tpl moved up leaving a "blank" area at the bottom of the page.

I was hoping to remove the users online info from the customer side as if it were not selected within admin,,,including the space for it.

any ideas
__________________
X-Cart 4.3.2 (Gold)
X-Special Offers
X-Comparison
X-Magnifier
BCSE - Simple Password Recovery
BCSE - Wholesale Pricing on Category Pages
BCSE - Category Headings
WebsiteCM - Prev / Next
WebsiteCM - EzUpsell
WebsiteCM - Dynamic Product Tabs
WebsiteCM - xCMS
WebsiteCM - CDSEO
Xcart Mods - Recently Viewed
SafetyNetWeb - Vistor Sitemap PRO
Altered Cart - On Sale
---------------------
Server: Linux Apache: 2.2.6 (Unix) PHP: 5.2.5 MySQL: 4.1.22 standard
Reply With Quote
  #92  
Old 08-04-2010, 08:35 PM
 
SID357 SID357 is offline
 

eXpert
  
Join Date: May 2010
Posts: 205
 

Default Re: IP Addresses in Users Online for all users

Quote:
Originally Posted by hoosierglass
Has anyone got this to work in 4.3 yet?

That's what I'm lookin for too.
Reply With Quote
  #93  
Old 08-04-2010, 11:02 PM
 
accesspos accesspos is offline
 

Advanced Member
  
Join Date: Nov 2009
Posts: 52
 

Wink Re: IP Addresses in Users Online for all users

IN SKIN1/CUSTOMER/HOME.TPL

<div id="footer">
{* remove users online info on customer side - start
{if $active_modules.Users_online}
{include file="modules/Users_online/menu_users_online.tpl"}
{/if}
# remove users online info on customer side - end *}
{include file="customer/bottom.tpl"}
</div>

IN MAIN.CSS

/*
users online module
*/
/* users statistics box */
/* remove users online from customer start
.uo-box {
width: 100%;
border-top: 1px solid #acb7c7;
background-color: #e8edf4;
padding: 10px 0px 10px 13px;
}
remove users online from customer end */

AND

/*
users online sublayout
*/
/* remove users online from customer start
.uo-container #content-container {
padding-bottom: 104px;
}
.uo-container #footer {
height: 94px;
}

.normal {
font-weight: normal;
}
remove users online from customer end */


The above will remove users online from customer side
__________________
X-Cart 4.3.2 (Gold)
X-Special Offers
X-Comparison
X-Magnifier
BCSE - Simple Password Recovery
BCSE - Wholesale Pricing on Category Pages
BCSE - Category Headings
WebsiteCM - Prev / Next
WebsiteCM - EzUpsell
WebsiteCM - Dynamic Product Tabs
WebsiteCM - xCMS
WebsiteCM - CDSEO
Xcart Mods - Recently Viewed
SafetyNetWeb - Vistor Sitemap PRO
Altered Cart - On Sale
---------------------
Server: Linux Apache: 2.2.6 (Unix) PHP: 5.2.5 MySQL: 4.1.22 standard
Reply With Quote
  #94  
Old 08-10-2010, 07:19 PM
 
SID357 SID357 is offline
 

eXpert
  
Join Date: May 2010
Posts: 205
 

Default Re: IP Addresses in Users Online for all users

Haven't been able to get this to work on 4.3.2. Basically trying to get the IP listed of who's on the customer site via admin panel, but so far no luck.
Reply With Quote
  #95  
Old 06-16-2011, 12:06 AM
  Mish's Avatar 
Mish Mish is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 92
 

Exclamation Re: IP Addresses in Users Online for all users

G'day,

I modified the code to resolve the hostname (from the IP address) instead of having a hyperlink to resolve it. Give it a try:

Follow the steps previously provided.

Then do the following:

Then on or around line 94 in xcart>modules>Users_online>stats.php look for you recently changed code:




Code:

***********************************************

$rec['session_create_date'] = $data['session_create_date']+$config["General"]["timezone_offset"];
$rec['session_ip'] = $data['session_ip'];
$statistics[] = $rec;

***********************************************

and change it to

***********************************************
$rec['session_create_date'] = $data['session_create_date']+$config["General"]["timezone_offset"];
if (!empty($data['session_ip']))
{
if ($HTTP_SERVER_VARS['REMOTE_ADDR'] != $data['session_ip'])
$rec['session_ip'] = gethostbyaddr($data['session_ip']);
else
$rec['session_ip'] = "Admin";
}
else
$rec['session_ip'] = $data['session_ip'];
$statistics[] = $rec;
***********************************************

This will:
If it can resolve the IP Address, it will and replace the IP address with the hostname.
If it was from your IP address it will replace it with ADMIN.
If it cannot resolve, it will leave the IP address there.


Here is an example from my site:

Unregistered customer IP: Admin
Unregistered customer IP: static-208-80-194-33.as13448.com

Please note if your first line in that code looks like:

$rec['session_create_date'] = $data['session_create_date']+$config["Appearance"]["timezone_offset"];

then keep it that way!
__________________
X-Cart Gold 4.6.1
Reply With Quote
  #96  
Old 07-20-2011, 08:31 AM
  mizNRG's Avatar 
mizNRG mizNRG is offline
 

Senior Member
  
Join Date: Jun 2010
Posts: 157
 

Default Re: IP Addresses in Users Online for all users

I used this mod and it works fine. My only issue is that it lists everyone as "Unregistered" even though some are registered. Is this an issue with the mod or with XCart in general?
__________________
X-Cart 4.4.4 Gold
Reply With Quote
  #97  
Old 07-29-2011, 10:46 PM
  Mish's Avatar 
Mish Mish is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 92
 

Default Re: IP Addresses in Users Online for all users

G'day mate,

Sorry but I don't have the same problem. .

Double check what you did in xcart>skin1>modules>Users_online>stats.tpl

You may have made an error there.
__________________
X-Cart Gold 4.6.1
Reply With Quote
  #98  
Old 08-29-2011, 06:49 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

Anyone know of a working MOD for 4.4?
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #99  
Old 09-05-2011, 02:22 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: IP Addresses in Users Online for all users

I've attached the "IP Addresses in Users Online for all users" mod patch for 4.4.x.

It can be applied via the Patch/Upgrade section.
Attached Files
File Type: txt DIFF.patch.txt (2.2 KB, 228 views)
__________________
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
Reply With Quote

The following 2 users thank qualiteam for this useful post:
clik (04-22-2012), JWait (10-22-2011)
  #100  
Old 10-19-2011, 09:45 AM
 
klinetim klinetim is offline
 

Advanced Member
  
Join Date: Oct 2011
Posts: 58
 

Default Re: IP Addresses in Users Online for all users

Hello,

We're using the Users_Online Module in version 4.4.1, and all of our online customers are listed as "Unregistered Customer", even though they are logged in. I'm still fairly new to the code, but I think I tracked it down to here:

>skin>common_files>modules>Users_online>stats.tp l

starting at my line 21
Code:
{foreach from=$statistics item=v} <tr> <td bgcolor="#FFFFFF" nowrap="nowrap" valign="top">{if $v.userinfo ne ''}<a href="user_modify.php?user={$v.userinfo.id}&amp;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>


For some reason, our $v.userinfo array is always empty, so the {if} statement always defaults to the $lng.lbl_unregistered_customer value. Any ideas on what we could have wrong that would cause that array to have no values? Thank you!
__________________
Tim @ K-Line
X-Cart Version 4.4.5
http://klineind.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 04:20 AM.

   

 
X-Cart forums © 2001-2020