| ||||||||||
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 |
#71
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
Quote:
A little different change for this one... Find: Code:
And change to: Code:
__________________
X-Cart Gold Plus 4.7.10 |
|||||||||
#72
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
thanks, that link looks a much better proposition.
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) |
|||||||
#73
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
I like that one better myself, but don't know how accurate it will be. I just checked one that should be from Florida (USA), but it shows it's location as in the water, on the equator, off the coast of Africa.
__________________
X-Cart Gold Plus 4.7.10 |
|||||||||
#74
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
Quote:
http://phpweby.com/services/iplocation?ip={$v.session_ip}" target=_blank">{$v.session_ip}</a> This one is more accurate and free.
__________________
Version 4.1.12 |
|||||||
#75
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
I have run into that problem when I worked with the Google Maps API, that location is 0,0. Basically, it couldn't locate it.
__________________
x-cart 4.2.0 | centos 5.2 | php 5.2.6 | mysqld 5.0.45-log |
|||||||||
#76
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
Quote:
I haven't got the same problem yet after switch. And the new one works well for me.
__________________
Version 4.1.12 |
|||||||
#77
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
Neorag,
I followed your exact steps, all seems ok, but the IP address is not showing up. Im using 4.2.2
__________________
William Lam X-Cart Gold 4.1.9 - Upgraded X-Cart Gold 4.2.2 - Upgraded X-Cart Gold 4.3.2 - Live Smart Search - 7Dana Colour Skin - CDSEO PRO - Ultimate Mini Cart - |
|||||||
#78
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
I see some are using this with 4.2, but when I look for auth.php I only see auth.tpl and I don't see the users online code.
This is what I have: Code:
__________________
X-Cart Pro 4.2.2 |
|||||||
#79
|
|||||||
|
|||||||
Re: IP Addresses in Users Online for all users
I know this is an old thread but I have 4.2.2 and my postauth.php is different than the example given on any page. My postauth.php looks like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <?php
/************************************************** ***************************\ # # $Id: postauth.php,v 1.6.2.2 2009/06/18 07:34:23 aim Exp $ # if ( !defined('XCART_START') ) { header("Location: home.php"); die("Access denied"); } # Prevent double inclusion. if (defined('INCLUDED_POSTAUTH_PHP')) { return; } define('INCLUDED_POSTAUTH_PHP', 1); x_session_register("logout_user"); x_session_register("session_failed_transaction"); x_session_register("add_to_cart_time"); x_session_register("always_allow_shop"); x_session_register("search_data"); if (!empty($_GET["shopkey"])) $always_allow_shop = (!empty($config["General"]["shop_closed_key"]) && $_GET["shopkey"] == $config["General"]["shop_closed_key"]); if ($config["General"]["shop_closed"] == "Y" && !$always_allow_shop){ # # Close store front # Thanks to rubyaryat for the Shop Closed mod # if (!func_readfile($xcart_dir.DIRECTORY_SEPARATOR.$sh op_closed_file, true)) echo func_get_langvar_by_name("txt_shop_temporarily_una ccessible",false,false,true); exit(); } require $xcart_dir."/include/nocookie_warning.php"; if (!defined('HTTPS_CHECK_SKIP')) { @include $xcart_dir.DIR_CUSTOMER."/https.php"; } if (!empty($active_modules['Users_online']) || !empty($active_modules["Greet_Visitor"])) { x_session_register("session_create_date"); if (empty($session_create_date)) $session_create_date = time(); } if (!empty($active_modules['Users_online'])) { x_session_register("current_url_page"); x_session_register("current_date"); $current_url_page = $php_url['url'].($php_url['query_string']?"?".$php_url['query_string']:""); $current_date = time(); } # # Display # x_session_register("wlid"); if (isset($_GET["wlid"]) and $_GET["wlid"]) $wlid = $_GET["wlid"]; $smarty->assign("wlid", $wlid); # # Browser have disabled/enabled javasript switching # x_session_register("js_enabled", "Y"); if (!isset($js_enabled)) $js_enabled="Y"; if (isset($_GET["js"])) { if ($_GET["js"]=="y") { $js_enabled = "Y"; $config['Adaptives']['isJS'] = "Y"; $adaptives['isJS'] = "Y"; } elseif ($_GET["js"]=="n") { $js_enabled = ""; } } $qry_string = func_qs_remove($php_url['query_string'], 'js'); $js_update_link = $php_url['url'].'?'.(!empty($qry_string) ? $qry_string."&" : ""); if ($js_enabled == "Y") { $js_update_link .= "js=n"; } else { $js_update_link .= "js=y"; } unset($qry_string); $smarty->assign("js_update_link", $js_update_link); $smarty->assign("js_enabled", $js_enabled); x_session_register("top_message"); if (!empty($top_message)) { $top_message['type'] = !empty($top_message['type']) ? $top_message['type'] : "I"; switch ($top_message['type']) { case "E": $top_message['title'] = func_get_langvar_by_name("lbl_error", array(), false, true); break; case "W": $top_message['title'] = func_get_langvar_by_name("lbl_warning", array(), false, true); break; default: $top_message['title'] = func_get_langvar_by_name("lbl_information", array(), false, true); } $smarty->assign("top_message", $top_message); if ($config['Adaptives']['is_first_start'] != 'Y') $top_message = ""; x_session_save("top_message"); } $cat = intval(@$cat); $page = intval(@$page); if (!empty($active_modules['XAffiliate'])) { include $xcart_dir."/include/partner_info.php"; include $xcart_dir."/include/adv_info.php"; } include $xcart_dir.DIR_CUSTOMER."/referer.php"; include $xcart_dir."/include/check_useraccount.php"; include $xcart_dir."/include/get_language.php"; $lbl_site_name = strip_tags(func_get_langvar_by_name("lbl_site_titl e", "", false, true)); $location = array(); $location[] = array((!empty($lbl_site_name) ? $lbl_site_name : $config["Company"]["company_name"]), "home.php"); include $xcart_dir.DIR_CUSTOMER."/minicart.php"; if (!empty($active_modules["Interneka"])) { include $xcart_dir."/modules/Interneka/interneka.php"; } if (!empty($active_modules["Subscriptions"])) { if ($login) { include $xcart_dir."/modules/Subscriptions/get_subscription_info.php"; $smarty->assign("user_subscription", is_user_subscribed($login)); } } $pages_menu = func_query("SELECT * FROM $sql_tbl[pages] WHERE language='$store_language' AND active='Y' AND level='E' AND show_in_menu='Y' ORDER BY orderby, title"); $smarty->assign("pages_menu", $pages_menu); $speed_bar = unserialize($config["speed_bar"]); if (!empty($speed_bar)) { $tmp_labels = array(); foreach ($speed_bar as $k => $v) { if ($v["active"] != "Y") { unset($speed_bar[$k]); continue; } $speed_bar[$k] = func_array_map("stripslashes", $v); $tmp_labels[] = "speed_bar_".$v['id']; } if (!empty($speed_bar)) { $tmp = func_get_languages_alt($tmp_labels); foreach ($speed_bar as $k => $v) { if (isset($tmp['speed_bar_'.$v['id']])) $speed_bar[$k]['title'] = $tmp['speed_bar_'.$v['id']]; } $smarty->assign("speed_bar", array_reverse($speed_bar)); } } unset($speed_bar); $smarty->assign("redirect", "customer"); if (!empty($active_modules["News_Management"])) include $xcart_dir."/modules/News_Management/news_last.php"; if (!empty($active_modules["Feature_Comparison"])) { include $xcart_dir."/modules/Feature_Comparison/comparison_products.php"; if ($config['Feature_Comparison']['fcomparison_show_product_list'] == 'Y') { $comparison_list = func_get_comparison_list(); $smarty->assign("comparison_list",$comparison_list); } } if (!empty($active_modules["Survey"])) { include_once $xcart_dir."/modules/Survey/surveys_list.php"; } if (!empty($active_modules['Special_Offers'])) { include_once $xcart_dir."/modules/Special_Offers/check_new_offers.php"; } if (isset($printable)) $smarty->assign("printable", $printable); $smarty->assign("logout_user", $logout_user); ?> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I hate to just assume I can change anything even if it doesn't like the examples given. Anyone able to help?? Thank you! A1Gifts www.A1DiscountGifts.com
__________________
4.2.2 Currently using Template: Fashion Mosaic- Pink |
|||||||
#80
|
|||||||||
|
|||||||||
Re: IP Addresses in Users Online for all users
Works perfect for me in 4.1! I just added a <br/> before the "IP:" as I prefer the IP to display underneath customer in admin. Thanks for sharing!
Not sure if this already shows up in your admin area but it does not in mine and it was a bit frustrating for me as I also wanted to be able to see from my admin "users online" the actual amount of users on my site as well as the amount of adminastrators that is logged into admin so this is what I did In xcart>skin1>modules>Users_online>stats.tpl at the top line 2 right underneath {* $Id: stats.tpl............ I placed the following code {if $users_online} <div class="BottomDialogBox"> {$lng.lbl_users_online}: {foreach from=$users_online item=v name="_users"} <font class="VertMenuItems" style="WHITE-SPACE: nowrap;">{$v.count} {strip} {if $v.usertype eq 'A' || ($v.usertype eq 'P' && $active_modules.Simple_Mode)} {$lng.lbl_admin_s} {elseif $v.usertype eq 'P'} {$lng.lbl_provider_s} {elseif $v.usertype eq 'B'} {$lng.lbl_partner_s} {elseif $v.usertype eq 'C' && $v.is_registered eq 'Y'} {$lng.lbl_registered_customer_s} {elseif $v.usertype eq 'C' && $v.is_registered eq 'A'} {$lng.lbl_anonymous_customer_s} {elseif $v.usertype eq 'C' && $v.is_registered eq ''} {$lng.lbl_unregistered_customer_s} {/if} {if not $smarty.foreach._users.last} {/if} {/strip} </font> {/foreach} </div> {/if} I also placed the same code right at the bottom of stats.tpl underneath all code as it makes that bit of a difference to me Quote:
|
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|