Jump to content

Gob

Members
  • Content count

    294
  • Joined

  • Last visited

Everything posted by Gob

  1. Gob

    SiteMonitor

    Hi Jack I love this contrib. A very excellent idea. I was running version 1.4 up until a few days ago and upgraded to 1.6 because my server was upgrade PHP 4 to PHP 5. Since then I have been having problems with the Exclude list adding back slashes galore when ever I update the config file or added a directory to be excluded. Anyway since the upgrade I am also having the same problems as a couple of others. Fixed the "From:". The line entries that need to be adjusted are Lines 61 and 155. However I can not find the reason for the missing Directory array entries. I will add the code (below here) that is actually displayed for the array so you can get a clear idea of what is being pulled up. I have tried your suggestion as above and some variations of that, to no avail. Also on line 13 of "sitemonitor_functions.php" there appears to be an extra bit, "&", just before $curList. Tried removing this and this seems to have made no difference in anyway. Can you confirm if this should be there or not? Apart from that I'm stuffed if can find any logical reason for the problem, except it's probably to do with PHP version. Can you advise further please? Also something that may be relevant. My cart is in subdirectory to the root directory. Just one directory down. Also a by the way. I would like to actually monitor my whole site the same way. So I would like to be able to select, Up one directory, but the start directory despite showing the ability to adjust, does not allow me to change it from the Configure area/page. It has to be changed in the "sitemonitor_configure.php" file then uploaded, loosing any settings I may have set via the Configure web page. Also to note. When I make this change to the root directory, in the selection array I can now see more of the directory tree names, will add example below. Hope we can get to the root of this problem. <select name="exclude_selector" onChange="this.form.submit();"><option value="0" SELECTED>Make Selection</option><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option><option value="7"></option><option value="8"></option><option value="9"></option><option value="10"></option><option value="11"></option><option value="12">fyCal</option><option value="13">fyCal/images</option><option value="14"></option><option value="15">sh</option><option value="16">sh/images</option><option value="17">sh/images/buttons</option><option value="18">sh/modules</option><option value="19">sh/modules/newsletters</option><option value="20"></option><option value="21"></option><option value="22">ters</option><option value="23"></option><option value="24"></option><option value="25"></option><option value="26"></option><option value="27"></option><option value="28">ns</option><option value="29">ges</option><option value="30"></option><option value="31"></option><option value="32">ing</option><option value="33"></option><option value="34"></option><option value="35"></option><option value="36"></option><option value="37"></option><option value="38"></option><option value="39"></option><option value="40"></option><option value="41">eformated_item descriptions</option><option value="42">eformated_newsletters</option><option value="43"></option><option value="44"></option><option value="45"></option><option value="46"></option><option value="47"></option><option value="48"></option><option value="49"></option><option value="50"></option><option value="51"></option><option value="52"></option><option value="53"></option><option value="54"></option><option value="55"></option><option value="56"></option><option value="57"></option><option value="58"></option><option value="59"></option><option value="60"></option><option value="61"></option><option value="62"></option><option value="63"></option><option value="64"></option><option value="65"></option><option value="66"></option><option value="67"></option><option value="68"></option><option value="69"></option><option value="70"></option><option value="71"></option><option value="72"></option><option value="73"></option><option value="74">ters</option><option value="75">ters/epson</option><option value="76">ters/generic</option><option value="77">ers</option><option value="78">ers/epson</option><option value="79"></option><option value="80"></option><option value="81"></option><option value="82"></option><option value="83"></option><option value="84"></option><option value="85"></option><option value="86"></option><option value="87"></option><option value="88"></option><option value="89"></option><option value="90"></option><option value="91"></option><option value="92"></option><option value="93"></option><option value="94"></option><option value="95"></option><option value="96"></option><option value="97"></option><option value="98"></option><option value="99"></option><option value="100"></option><option value="101"></option><option value="102"></option><option value="103"></option><option value="104"></option><option value="105"></option><option value="106"></option><option value="107"></option><option value="108"></option><option value="109"></option><option value="110"></option><option value="111"></option><option value="112"></option><option value="113"></option><option value="114"></option><option value="115"></option><option value="116"></option><option value="117">s</option><option value="118">tors</option><option value="119">ty</option><option value="120">ters</option><option value="121">ases</option><option value="122"></option><option value="123">cons</option><option value="124"></option><option value="125"></option><option value="126"></option><option value="127"></option><option value="128"></option><option value="129"></option><option value="130"></option><option value="131"></option><option value="132"></option><option value="133"></option><option value="134"></option><option value="135"></option><option value="136"></option><option value="137"></option><option value="138"></option><option value="139">tors</option><option value="140"></option><option value="141"></option><option value="142"></option><option value="143"></option><option value="144"></option><option value="145"></option><option value="146"></option><option value="147"></option><option value="148"></option><option value="149"></option><option value="150"></option><option value="151"></option><option value="152"></option><option value="153">rs</option><option value="154"></option><option value="155"></option><option value="156"></option><option value="157"></option><option value="158"></option><option value="159"></option><option value="160"></option><option value="161"></option><option value="162"></option><option value="163">ges</option><option value="164">ges/buttons</option><option value="165">ules</option><option value="166">ules/order_total</option><option value="167">ules/payment</option><option value="168">ules/shipping</option><option value="169"></option><option value="170"></option><option value="171"></option><option value="172"></option><option value="173"></option><option value="174"></option><option value="175">/templates</option><option value="176"></option><option value="177"></option><option value="178"></option><option value="179"></option><option value="180">ap-Feed</option><option value="181"></option><option value="182"></option><option value="183"></option><option value="184"></option><option value="185">e</option><option value="186">e2003</option></select> After specifying the root directory in the "sitemonitor_configure.php" file. <option value="0" SELECTED>Make Selection</option><option value="1"></option><option value="2"></option><option value="3"></option><option value="4"></option><option value="5"></option><option value="6"></option><option value="7"></option><option value="8"></option><option value="9"></option><option value="10"></option><option value="11"></option><option value="12">/spiffyCal</option><option value="13">/spiffyCal/images</option><option value="14"></option><option value="15">english</option><option value="16">english/images</option><option value="17">english/images/buttons</option><option value="18">english/modules</option><option value="19">english/modules/newsletters</option><option value="20"></option>
  2. Gob

    SiteMonitor

    Sorry for not responding to your prompt reply. I got tied up and then forgot about it. Any the sitemonitor_config.php file is working fine. EG: this is the array that is currently in it. array("home/trublue/public_html/shop/admin/includes/graphs", "home/trublue/public_html/shop/admin/backups","home/trublue/public_html/shop/admin/preformat", "home/trublue/public_html/shop/temp","home/trublue/public_html/shop/images/imagecache", "home/trublue/public_html/shop/cache"); This is the report via email from a script run I just did. As you can see it's just ignoring the ignore array. I am wondering if there is something in the directory tree however. The array in the script is showing "home/trublue/public_html/" but the email does not show the home URL at all.
  3. Gob

    SiteMonitor

    I think this is a great contrib and I thank very much the developer. I have installed the latest version from January 7. But I think there must be some bug introduced with the exclude list. Now it does not exclude anything at all, put into list. Any help please?
  4. Thanks Amanda. Your right about the static pages, I had not thought about that. The all_products.php rename, I'm not shore exactly what you mean with this but I don't think in heinsight it is really worth worry about that much. So I'll just leave wee enough alone. Everything else on this contrib is working perfectly straight out of the box for me. I fail to understand all the problems all the others are having. My store is also very very heavily modified by myself, and apart from forgetting to upload the modified includes/application_top.php file, I had no problems what so ever. I am quite staggered at the amount of people on this forum complaining of problems with the install. The instructions are the best I have ever seen of any intructions from other contribs. Chemo has done a superb job of it. I really think more people need to read the instructions very carefully, First before jumping and doing a thing. The best way to modify your files, if your are already modified from other contribs is to use a file compare program like "Beyond Compare" along side a with a HTML editor so you can see all the code easily and work out what each bit of code is actually doing before just overwrite the code that was there, and work though it slowly. Don't be in a rush because that's when it gets F*ck it up. If you have no idea at all what the code is doing you should perhaps train yourself with simpler contribs first and work your way up so as you start to get an idea of the codes, and it all starts to come together and make sense to you. If you don't have time to do this you should seriously consider paying someone to do it for you. You will save yourself a lot of headache and time and everyone else the same. In so saying all of this as stated ealier, this contrib is very well documented so if you have trouble with this you should be taking a step backwards and finding some easier contribs to install first. Always keep backups of your files even if, when you upload you Don't automatically overwrite but automatically rename as you upload. The you can easily start over. (Just my 2 cents worth). So thanks for your thoughts etc, Amanda and good luck to everyone else, I hope the words above will help some of you in how to go about things. (please don't respond with attacks at me on what I have said I am not trying to have ago at anyone, just adding my thoughts in the hope for smoother sailing for some of you at least.)
  5. Does anyone know how to add additional SEO.HTML pages to the stardard configuration apart from the ones already supported? 1) Product Pages 2) Category Pages 3) Article Topics 4) Article Info 5) Information Pages 6) Product Reviews 7) Product Review Info 8) Popup Images I have for example: extra_info_pages.php faq.php specials.php all_products.php etc that I would also like to include. Thanks
  6. Gob

    Who's Online Enhancement 1.4

    It's clear you've been of great help and have not even posted a question before! :thumbsup: There is essentially nothing wrong with this contrib but they way people install it of have their shop incorrectly configure in the first place. No one can help you if you won't help your self to the vast array of information already available.
  7. Gob

    Who's Online Enhancement 1.4

    Dan No I haven't had a chance just yet, but thank you very much for the info. I had hoped to have a go at it today but it didn't happen, sometime this week I hope. I see what you mean about all of it but I'm sure it can be intergrated with the options to add in if required. As you also mentioned there may be a way to simplify it a bit, so I want to have a good look at this also. Thanks again Dan John
  8. Gob

    Who's Online Enhancement 1.4

    Dan I and everyone else on this have not been able to get past the the Products section working as per very recent posts. What you have given us above is exactly the same as what we already have. Is there a problem with sharing what you have been able to do, in it's entirety? I realise you probably have spent sometime on getting it right but so have many people on the whole oscommerce project, (including Ed and I inparticular in this thread trying to support and help others for this contrib alone) and most are willing to share without question, you seem extremely reluctant for some reason. If this is not the case by all means please correct me. John
  9. Gob

    Who's Online Enhancement 1.4

    Dan your back. Thought we'd lost you. Yes you have been busy with your WSO. Looks really great. Any chance you can either post or send me your file? So I can intergrate and post new version etc? John
  10. Gob

    Who's Online Enhancement 1.4

    Thanks very much "wheeloftime". The counting feature for me is now fixed it appears. I still have the issue of the actual category not showing, however. Is anyone else also having this issue?
  11. Gob

    Who's Online Enhancement 1.4

    Yes part of this problem I noticed this morning. If the Admin is online, this counted as a duplicate no matter what, I had not noticed the ip as such that you have now just pointed out. I also have to bots online at present with 2 different IP's but only just 68.142.250.16 and 68.142.250.13 and this is registering as a duplicate. This should not be happening and I analised this in great frustrating depth all morning before finally asking Ed if he could take a look, because I can't see what in the add in section I did has caused it. It's not making a whole lot of sense to me. I also noticed that for some reason my categories stopped displaying their name. Has anyone else found this issue? But Ed the real brains behind a lot of this is on the case, but we probably will not see a result for 24 to 48 hours at leasr, cause he has to earn a living also. :) Anyway sorry to all about this little hicup but I think we'll get it sorted.
  12. Gob

    Who's Online Enhancement 1.4

    I'd answer your question here, but I have no idea what you are talking about. Would like to elaborate please.
  13. Gob

    Who's Online Enhancement 1.4

    Have you been replacing the file catalog/whos_online.php as well? Are receiving any error message when the page loads? Have your tried emptying your browsers cache, (Temp files)? In particular if using IE, I recommend setting the temp setting to max of 300MB temp file storage. I also set mine to Refresh, "Every time I open IE". Also where are you storing your session data? Mysql or Files. Make sure you have both configure files set the same catalog/includes/configure.php and catalog/admin/includes/configure.php If set to Files have you got your session directory properly set in Admin -> Configuration -> Sessions Should be something like this: /home/yourusername/sessions Have you also got the other session information settings set correctly, also posted previously, (by me. Search my posts in in this thread). john
  14. Gob

    Who's Online Enhancement 1.4

    Go back to version 1.8 (or 1.8a) and see if your getting the same problem. Version 1.9 etc are not necessary updates as such. John
  15. Gob

    Who's Online Enhancement 1.4

    Ed Sorry for no response for a while. kids keeping me flat out during the school holidays. In response, Yes I kind of thought the same thing, I just watch it for a while longer and see how it goes. Thanks Ed John
  16. Gob

    Who's Online Enhancement 1.4

    I finally got around to having another look at making the last URL Show the product name and I got it to work as Dan had posted it back in August 2005. Thank you very much Dan for your work on this. The reason it would not work for me before was because in the Admin -> Configuration I had this "Use Search-Engine Safe URLs (still in development)" set to TRUE. Now after finding this setting was also affecting other things and turning it OFF some time ago, this addon also works great and so far can not fault it. ONE warning however. If you have the MOD "Previous - Next" (contrib No. 1164) installed on your product_info.php pages, the latest version currently listed has an error in the button code, reversing the url product coding. This still works, but WOE will not display the correct product, in fact something quiet bogus if someone uses these buttons while viewing. I will post an update to this MOD shortly. Back to WOE and this little GREAT addon. To make this easy for any that may be interested in adding this onto their WOE I am posting the whole catalog/admin/whos_online.php file here. NOTE, this is based on my last Contrib posting of version 1.8 (Haven't felt the desire to upgrade any further as yet). You should be able to Copy and Paste this to your catalog/admin/whos_online.php file. (Don't forget to backup your original file, as usual no guarantees offerred or implied, but should be a simple drop in.) Will post this file in Contrib section also, later. <?php /* $Id: whos_online.php,v 1.32 2003/06/29 22:50:52 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_CLASSES . 'currencies.php'); $currencies = new currencies(); /* Configuration Values Set these to easily personalize your Whos Online */ // Seconds that a visitor is considered "active" $active_time = 300; // Seconds before visitor is removed from display $track_time = 900; // Automatic refresh times in seconds and display names // Time and Display Text order must match between the arrays // "None" is handled separately in the code $refresh_time = array( 30, 60, 120, 300, 600 ); $refresh_display = array( '0:30', '1:00', '2:00', '5:00', '10:00' ); // Images used for status lights $status_active_cart = 'icon_status_green.gif'; $status_inactive_cart = 'icon_status_red.gif'; $status_active_nocart = 'icon_status_green_light.gif'; $status_inactive_nocart = 'icon_status_red_light.gif'; $status_active_bot = 'icon_status_green_border_light.gif'; $status_inactive_bot = 'icon_status_red_border_light.gif'; // Text color used for table entries // Different colored text for different users // Named colors and Hex values should work fine here $fg_color_bot = 'maroon'; $fg_color_admin = 'darkblue'; $fg_color_guest = 'green'; $fg_color_account = 'blue'; // '#000000'; // Black /* Determines status and cart of visitor and displays appropriate icon. */ function tep_check_cart($which, $customer_id, $session_id) { global $cart, $status_active_cart, $status_inactive_cart, $status_active_nocart, $status_inactive_nocart, $status_inactive_bot, $status_active_bot, $active_time; // Pull Session data from the correct source. if (STORE_SESSIONS == 'mysql') { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $session_id . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } else { if ( (file_exists(tep_session_save_path() . '/sess_' . $session_id)) && (filesize(tep_session_save_path() . '/sess_' . $session_id) > 0) ) { $session_data = file(tep_session_save_path() . '/sess_' . $session_id); $session_data = trim(implode('', $session_data)); } } if ($length = strlen($session_data)) { if (PHP_VERSION < 4) { $start_id = strpos($session_data, 'customer_id[==]s'); $start_cart = strpos($session_data, 'cart[==]o'); $start_currency = strpos($session_data, 'currency[==]s'); $start_country = strpos($session_data, 'customer_country_id[==]s'); $start_zone = strpos($session_data, 'customer_zone_id[==]s'); } else { $start_id = strpos($session_data, 'customer_id|s'); $start_cart = strpos($session_data, 'cart|O'); $start_currency = strpos($session_data, 'currency|s'); $start_country = strpos($session_data, 'customer_country_id|s'); $start_zone = strpos($session_data, 'customer_zone_id|s'); } for ($i=$start_cart; $i<$length; $i++) { if ($session_data[$i] == '{') { if (isset($tag)) { $tag++; } else { $tag = 1; } } elseif ($session_data[$i] == '}') { $tag--; } elseif ( (isset($tag)) && ($tag < 1) ) { break; } } $session_data_id = substr($session_data, $start_id, (strpos($session_data, ';', $start_id) - $start_id + 1)); $session_data_cart = substr($session_data, $start_cart, $i); $session_data_currency = substr($session_data, $start_currency, (strpos($session_data, ';', $start_currency) - $start_currency + 1)); $session_data_country = substr($session_data, $start_country, (strpos($session_data, ';', $start_country) - $start_country + 1)); $session_data_zone = substr($session_data, $start_zone, (strpos($session_data, ';', $start_zone) - $start_zone + 1)); session_decode($session_data_id); session_decode($session_data_currency); session_decode($session_data_country); session_decode($session_data_zone); session_decode($session_data_cart); if (PHP_VERSION < 4) { $broken_cart = $cart; $cart = new shoppingCart; $cart->unserialize($broken_cart); } if (is_object($cart)) { $products = $cart->get_products(); } } $which_query = $session_data; $who_data = tep_db_query("select time_entry, time_last_click from " . TABLE_WHOS_ONLINE . " where session_id='" . $session_id . "'"); $who_query = tep_db_fetch_array($who_data); // Determine if visitor active/inactive $xx_mins_ago_long = (time() - $active_time); // Determine Bot active/inactive if( $customer_id < 0 ) { // inactive if ($who_query['time_last_click'] < $xx_mins_ago_long) { return tep_image(DIR_WS_IMAGES . $status_inactive_bot, TEXT_STATUS_INACTIVE_BOT); // active } else { return tep_image(DIR_WS_IMAGES . $status_active_bot, TEXT_STATUS_ACTIVE_BOT); } } // Determine active/inactive and cart/no cart status // no cart if ( sizeof($products) == 0 ) { // inactive if ($who_query['time_last_click'] < $xx_mins_ago_long) { return tep_image(DIR_WS_IMAGES . $status_inactive_nocart, TEXT_STATUS_INACTIVE_NOCART); // active } else { return tep_image(DIR_WS_IMAGES . $status_active_nocart, TEXT_STATUS_ACTIVE_NOCART); } // cart } else { // inactive if ($who_query['time_last_click'] < $xx_mins_ago_long) { return tep_image(DIR_WS_IMAGES . $status_inactive_cart, TEXT_STATUS_INACTIVE_CART); // active } else { return tep_image(DIR_WS_IMAGES . $status_active_cart, TEXT_STATUS_ACTIVE_CART); } } } // WOL 1.5 EOF /* Display the details about a visitor */ function display_details() { global $whos_online, $is_bot, $is_admin, $is_guest, $is_account; // Display Name echo '<b>' . TABLE_HEADING_FULL_NAME . ':</b> ' . $whos_online['full_name']; echo '<br clear="all">' . tep_draw_separator('pixel_trans.gif', '10', '4') . '<br clear="all">'; // Display Customer ID for non-bots if ( !$is_bot ){ echo '<b>' . TABLE_HEADING_CUSTOMER_ID . ':</b> ' . $whos_online['customer_id']; echo '<br clear="all">' . tep_draw_separator('pixel_trans.gif', '10', '4') . '<br clear="all">'; } // Display IP Address echo '<b>' . TABLE_HEADING_IP_ADDRESS . ':</b> ' . $whos_online['ip_address']; echo '<br clear="all">' . tep_draw_separator('pixel_trans.gif', '10', '4') . '<br clear="all">'; // Display User Agent echo '<b>' . TEXT_USER_AGENT . ':</b> ' . $whos_online['user_agent']; echo '<br clear="all">' . tep_draw_separator('pixel_trans.gif', '10', '4') . '<br clear="all">'; // Display Session ID. Bots with no Session ID, have it set to their IP address. Don't display these. if ( $whos_online['session_id'] != $whos_online['ip_address'] ) { echo '<b>' . TEXT_OSCID . ':</b> ' . $whos_online['session_id']; echo '<br clear="all">' . tep_draw_separator('pixel_trans.gif', '10', '4') . '<br clear="all">'; } // Display Referer if available if($whos_online['http_referer'] != "" ) { echo '<b>' . TABLE_HEADING_HTTP_REFERER . ':</b> ' . $whos_online['http_referer']; echo '<br clear="all">' . tep_draw_separator('pixel_trans.gif', '10', '4') . '<br clear="all">'; } } // Time to remove old entries $xx_mins_ago = (time() - $track_time); // remove entries that have expired tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where time_last_click < '" . $xx_mins_ago . "'"); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <!-- WOL 1.6 - Cleaned up refresh --> <?php if( $_SERVER["QUERY_STRING"] > 0 ){ ?> <meta http-equiv="refresh" content="<?php echo $_SERVER["QUERY_STRING"];?>;URL=whos_online.php?<?php echo $_SERVER["QUERY_STRING"];?>"> <?php } ?> <!-- WOL 1.6 EOF --> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="bottom" class="pageHeading"> <?php echo HEADING_TITLE; ?> <br clear="all"><br><span class="smallText" style="color:#909090"><? echo TEXT_SET_REFRESH_RATE; ?>:?</span> <span style="font-size: 10px; color:#0000CC"> <!-- For loop displays refresh time links --> <?php echo '<a class="menuBoxContentLink" href="whos_online.php"><b> ' . TEXT_NONE_ . ' </b></a>'; foreach ($refresh_time as $key => $value) { echo ' ? <a class="menuBoxContentLink" href="whos_online.php?' . $value . '"><b>' . $refresh_display[$key] . '</b></a>'; } ?> </span> <!-- Display Profile links --> <br clear="all"> <span class="smallText" style="color:#909090"><?php echo TEXT_PROFILE_DISPLAY; ?>:?????? <span style="font-size: 10px; color:#0000CC"> <a href="whos_online.php" class="menuBoxContentLink"><b><?php echo TEXT_NONE_; ?></b></a> ? <a href="whos_online.php?showAll" class="menuBoxContentLink"><b><? echo TEXT_ALL; ?></b></a> ? <a href="whos_online.php?showBots" class="menuBoxContentLink"><b><? echo TEXT_BOTS; ?></b></a> ? <a href="whos_online.php?showCust" class="menuBoxContentLink"><b><? echo TEXT_CUSTOMERS; ?></b></a> </span></span> </td> <!-- Status Legend - Uses variables for image names --> <td align="right" class="smallText" valign="bottom"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="smallText"><?php echo tep_image(DIR_WS_IMAGES . $status_active_cart, TEXT_STATUS_ACTIVE_CART) . '?' . TEXT_STATUS_ACTIVE_CART . '??'; ?></td> <td class="smallText"><?php echo tep_image(DIR_WS_IMAGES . $status_inactive_cart, TEXT_STATUS_INACTIVE_CART) . '?' . TEXT_STATUS_INACTIVE_CART . '??'; ?></td> </tr> <tr> <td class="smallText"><?php echo tep_image(DIR_WS_IMAGES . $status_active_nocart, TEXT_STATUS_ACTIVE_NOCART) . '?' . TEXT_STATUS_ACTIVE_NOCART .'??'; ?></td> <td class="smallText"><?php echo tep_image(DIR_WS_IMAGES . $status_inactive_nocart, TEXT_STATUS_INACTIVE_NOCART) . '?' . TEXT_STATUS_INACTIVE_NOCART . '??'; ?></td> </tr> <tr> <td class="smallText"><?php echo tep_image(DIR_WS_IMAGES . $status_active_bot, TEXT_STATUS_ACTIVE_BOT) . '?' . TEXT_STATUS_ACTIVE_BOT . '??'; ?></td> <td class="smallText"><?php echo tep_image(DIR_WS_IMAGES . $status_inactive_bot, TEXT_STATUS_INACTIVE_BOT) . '?' . TEXT_STATUS_INACTIVE_BOT . '??'; ?></td> </tr> </table> </td> </tr> </table></td> </tr> <tr> <td class="pageHeading" align="center"><script language="JavaScript"> <!-- Begin Stamp = new Date(); document.write('<font size="2" face="Arial" color="blue">Last Refresh: '); var Hours; var Mins; var Time; Hours = Stamp.getHours(); if (Hours >= 12) { Time = " p.m."; } else { Time = " a.m."; } if (Hours > 12) { Hours -= 12; } if (Hours == 0) { Hours = 12; } Mins = Stamp.getMinutes(); if (Mins < 10) { Mins = "0" + Mins; } document.write('?' + Hours + ":" + Mins + Time + '</font>'); // End --> </script> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" colspan="2" nowrap align="center"><?php echo TABLE_HEADING_ONLINE; ?></td> <td class="dataTableHeadingContent" nowrap><?php echo TABLE_HEADING_FULL_NAME; ?></td> <td class="dataTableHeadingContent" nowrap><?php echo TABLE_HEADING_IP_ADDRESS; ?></td> <td class="dataTableHeadingContent" nowrap><?php echo TABLE_HEADING_ENTRY_TIME; ?></td> <td class="dataTableHeadingContent" nowrap><?php echo TABLE_HEADING_LAST_CLICK; ?></td> <td class="dataTableHeadingContent" width="200"><?php echo TABLE_HEADING_LAST_PAGE_URL; ?>?</td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_USER_SESSION; ?>?</td> <td class="dataTableHeadingContent" align="center" nowrap><?php echo TABLE_HEADING_HTTP_REFERER; ?>?</td> </tr> <?php // Order by is on Last Click. Also initialize total_bots and total_admin counts $whos_online_query = tep_db_query("select customer_id, full_name, ip_address, time_entry, time_last_click, last_page_url, http_referer, user_agent, session_id from " . TABLE_WHOS_ONLINE . ' order by time_last_click DESC'); $total_bots=0; $total_admin=0; $total_guests=0; $total_loggedon=0; while ($whos_online = tep_db_fetch_array($whos_online_query)) { $time_online = ($whos_online['time_last_click'] - $whos_online['time_entry']); if ((!isset($HTTP_GET_VARS['info']) || (isset($HTTP_GET_VARS['info']) && ($HTTP_GET_VARS['info'] == $whos_online['session_id']))) && !isset($info)) { $info = $whos_online['session_id']; } /* BEGIN COUNT MOD */ if ($old_array['ip_address'] == $whos_online['ip_address']) { $i++; } /* END COUNT MOD */ if ($whos_online['session_id'] == $info) { if($whos_online['http_referer'] != "") { $http_referer_url = $whos_online['http_referer']; } echo '<tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n"; } else { echo '<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_WHOS_ONLINE, tep_get_all_get_params(array('info', 'action')) . 'info=' . $whos_online['session_id'], 'NONSSL') . '\'">' . "\n"; } // Display Status // Check who it is and set values $is_bot = $is_admin = $is_guest = $is_account = false; // Bot detection if ($whos_online['customer_id'] < 0) { $total_bots++; $fg_color = $fg_color_bot; $is_bot = true; // Admin detection } elseif ($whos_online['ip_address'] == tep_get_ip_address() ) { //$_SERVER["REMOTE_ADDR"]) { $total_admin++; $fg_color = $fg_color_admin; $is_admin = true; // Guest detection (may include Bots not detected by Prevent Spider Sessions/spiders.txt) } elseif ($whos_online['customer_id'] == 0) { $fg_color = $fg_color_guest; $is_guest = true; $total_guests++; // Everyone else (should only be account holders) } else { $fg_color = $fg_color_account; $is_account = true; $total_loggedon++; } ?> <!-- Status Light Column --> <td class="dataTableContent" align="left" valign="top"> <?php echo '?' . tep_check_cart($whos_online['session_id'], $whos_online['customer_id'], $whos_online['session_id']); ?> </td> <!-- Time Online Column --> <td class="dataTableContent" valign="top"><font color="<?php echo $fg_color; ?>"> <?php echo gmdate('H:i:s', $time_online); ?> </font>?</td> <!-- Name Column --> <td class="dataTableContent" valign="top"><font color="<?php echo $fg_color; ?>"> <?php // WOL 1.6 Restructured to Check for Guest or Admin if ( $is_guest || $is_admin ) { echo $whos_online['full_name'] . '?'; // Check for Bot } elseif ( $is_bot ) { // Tokenize UserAgent and try to find Bots name $tok = strtok($whos_online['full_name']," ();/"); while ($tok) { if ( strlen($tok) > 3 ) if ( !strstr($tok, "mozilla") && !strstr($tok, "compatible") && !strstr($tok, "msie") && !strstr($tok, "windows") ) { echo "$tok"; break; } $tok = strtok(" ();/"); } // Check for Account } elseif ( $is_account ) { // echo '<a HREF="customers.php?selected_box=customers&cID=' . $whos_online['customer_id'] . '&action=edit">' . $whos_online['full_name'] . '</a>'; ?> <a HREF="<?php ('customers.php?selected_box=customers&cID=' . $whos_online['customer_id'] . '&action=edit"');?>"> <font color="<?php echo $fg_color; ?>"> <?php echo $whos_online['full_name']; ?> </font></a> <?php } else { echo TEXT_ERROR; } ?> </font>?</td> <!-- IP Address Column --> <td class="dataTableContent" valign="top"> <?php // Show 'Admin' instead of IP for Admin if ( $is_admin ) echo TEXT_ADMIN; else { // Show IP with link to IP checker // echo '<a HREF="http://www.showmyip.com/?ip=' . $whos_online['ip_address'] . '" target="_blank"> ?> <a HREF="<?php echo ('http://www.showmyip.com/?ip=' . $whos_online['ip_address']);?>" target="_blank"> <font color="<?php echo $fg_color; ?>"> <?php echo $whos_online['ip_address']; } ?> </font></a> ?</td> <!-- Time Entry Column --> <td class="dataTableContent" valign="top"><font color="<?php echo $fg_color; ?>"> <?php echo date('H:i:s', $whos_online['time_entry']); ?> </font></td> <!-- Last Click Column --> <td class="dataTableContent" align="center" valign="top"><font color="<?php echo $fg_color; ?>"> <?php echo date('H:i:s', $whos_online['time_last_click']); ?> </font>?</td> <!-- Last URL Column --> <td class="dataTableContent" valign="top"> <?php $temp_url_link = $whos_online['last_page_url']; if (eregi('^(.*)' . tep_session_name() . '=[a-f,0-9]+[&]*(.*)', $whos_online['last_page_url'], $array)) { $temp_url_display = $array[1] . $array[2]; } else { $temp_url_display = $whos_online['last_page_url']; } // WOL 1.6 - Removes osCid from the Last Click URL and the link if ( $osCsid_position = strpos($temp_url_display, "osCsid") ) $temp_url_display = substr_replace($temp_url_display, "", $osCsid_position - 1 ); if ( $osCsid_position = strpos($temp_url_link, "osCsid") ) $temp_url_link = substr_replace($temp_url_link, "", $osCsid_position - 1 ); // alteration for last url product name eof if (strpos($temp_url_link,'product_info.php')) { $temp=str_replace('product_info.php','',$temp_url_link); $temp=str_replace('/?','',$temp); $temp=str_replace('?','',$temp); $parameters=split("&",$temp); $i=0; while($i < count($parameters)) { $a=split("=",$parameters[$i]); if ($a[0]="products_id") { $products_id=$a[1]; } $i++; } $product_query=tep_db_query("select products_name from products_description where products_id='" . $products_id . "' and language_id = '" . $languages_id . "'"); $product = tep_db_fetch_array($product_query); $display_link = $product['products_name'].' <I>(Product)</I>'; }elseif (strpos($temp_url_link,'?cPath=')) { $temp=str_replace('index.php?','',$temp_url_link); $temp=str_replace('?','',$temp); $temp=str_replace('/','',$temp); $parameters=split("&",$temp); $i=0; while($i < count($parameters)) { $a=split("=",$parameters[$i]); if ($a[0]=="cPath") { $cat=$a[1]; } $i++; } $parameters=split("_",$cat); //$cat_list=''; $i=0; while($i < count($parameters)) { $category_query=tep_db_query("select categories_name from categories_description where categories_id='" . $parameters[$i] . "' and language_id = '" . $languages_id . "'"); $category = tep_db_fetch_array($category_query); if ($i>0) { $cat_list.=' / '.$category['categories_name']; } else { $cat_list=$category['categories_name']; } $i++; } $display_link = $cat_list.' <I>(Category)</I>'; } else { $display_link = $temp_url_display; } // alteration for last url product name eof ?> <a HREF="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . $temp_url_link; ?>" target=\"_blank\"> <font color="<?php echo $fg_color; ?>"> <?php // echo $temp_url_display; echo $display_link; // alteration for last url product name ?> </font> </a> </td> <!-- osCsid? Column --> <td class="dataTableContent" align="center" valign="top"><font color="<?php echo $fg_color; ?>"> <?php if($whos_online['session_id'] != $whos_online['ip_address']) { echo TEXT_IN_SESSION; } else { echo TEXT_NO_SESSION; } ?> </font></td> <!-- Referer? Column --> <td class="dataTableContent" align="center" valign="top"><font color="<?php echo $fg_color; ?>"> <?php if($whos_online['http_referer'] == "") { echo TEXT_HTTP_REFERER_NOT_FOUND; } else { echo TEXT_HTTP_REFERER_FOUND; } ?> </font></td> </tr> <tr class="dataTableRow"> <td class="dataTableContent" colspan="3"></td> <td class="dataTableContent" colspan="6"><font color="<?php echo $fg_color; ?>"> <?php // Display Details for All if ( $_SERVER["QUERY_STRING"] == showAll ) { display_details(); } // Display Details for Bots else if( $_SERVER["QUERY_STRING"] == showBots ){ if ( $is_bot ) { display_details(); } } // Display Details for Customers else if( $_SERVER["QUERY_STRING"] == showCust ){ if ( $is_guest || $is_account || $is_admin ) { display_details(); } } ?> </font></td> </tr> <?php $old_array = $whos_online; } if (!$i) { $i=0; } $total_dupes = $i; $total_sess = tep_db_num_rows($whos_online_query); // WOL 1.4 - Subtract Bots and Me from Real Customers. Only subtract me once as Dupes will remove others $total_cust = $total_sess - $total_dupes - $total_bots - ($total_admin > 1? 1 : $total_admin); // WOL 1.4 eof ?> <?php if(isset($http_referer_url)) { ?> <tr> <td class="smallText" colspan="9"><?php echo '<strong>' . TEXT_HTTP_REFERER_URL . ':</strong> <a href='. $http_referer_url.' target=_blank>' . $http_referer_url.'</a>'; ?></td> </tr> <?php } ?> <tr> <!-- WOL 1.4 - Added Bot and Me counts --> <td class="smallText" colspan="9"><br><table border="0" cellpadding="0" cellspacing="0" width="600"> <tr> <td class="smallText" align="left" colspan="2">??????<?php echo sprintf(TEXT_NUMBER_OF_CUSTOMERS, $total_sess);?></td> </tr> <tr> <td class="smallText" align="right" width="30"><?php print "$total_dupes" ?></td> <td class="smallText" align="left" width="570">??<?php echo TEXT_DUPLICATE_IP; ?></td> </tr> <tr> <td class="smallText" align="right" width="30"><?php print "$total_bots" ?></td> <td class="smallText" width="570">??<?php echo TEXT_BOTS; ?></td> </tr> <tr> <td class="smallText" align="right" width="30"><?php print "$total_admin" ?></td> <td class="smallText" width="570">??<?php echo TEXT_ME; ?></td> </tr> <tr> <td class="smallText" align="right" width="30"><?php print "$total_cust" ?></td> <td class="smallText" width="570">??<?php echo TEXT_REAL_CUSTOMERS; ?></td> </tr> </table><br> <?php print "<b>" . TEXT_MY_IP_ADDRESS . ":</b>?".tep_get_ip_address(); ?><br><br><b>Note.</b> "N/A". Not Available</td> <!-- WOL 1.4 eof --> </tr> </table></td> <?php $heading = array(); $contents = array(); $heading[] = array('text' => '<b>' . TABLE_HEADING_SHOPPING_CART . '</b>'); if (isset($info)) { if (STORE_SESSIONS == 'mysql') { $session_data = tep_db_query("select value from " . TABLE_SESSIONS . " WHERE sesskey = '" . $info . "'"); $session_data = tep_db_fetch_array($session_data); $session_data = trim($session_data['value']); } else { if ( (file_exists(tep_session_save_path() . '/sess_' . $info)) && (filesize(tep_session_save_path() . '/sess_' . $info) > 0) ) { $session_data = file(tep_session_save_path() . '/sess_' . $info); $session_data = trim(implode('', $session_data)); } } if ($length = strlen($session_data)) { if (PHP_VERSION < 4) { $start_id = strpos($session_data, 'customer_id[==]s'); $start_cart = strpos($session_data, 'cart[==]o'); $start_currency = strpos($session_data, 'currency[==]s'); $start_country = strpos($session_data, 'customer_country_id[==]s'); $start_zone = strpos($session_data, 'customer_zone_id[==]s'); } else { $start_id = strpos($session_data, 'customer_id|s'); $start_cart = strpos($session_data, 'cart|O'); $start_currency = strpos($session_data, 'currency|s'); $start_country = strpos($session_data, 'customer_country_id|s'); $start_zone = strpos($session_data, 'customer_zone_id|s'); } for ($i=$start_cart; $i<$length; $i++) { if ($session_data[$i] == '{') { if (isset($tag)) { $tag++; } else { $tag = 1; } } elseif ($session_data[$i] == '}') { $tag--; } elseif ( (isset($tag)) && ($tag < 1) ) { break; } } $session_data_id = substr($session_data, $start_id, (strpos($session_data, ';', $start_id) - $start_id + 1)); $session_data_cart = substr($session_data, $start_cart, $i); $session_data_currency = substr($session_data, $start_currency, (strpos($session_data, ';', $start_currency) - $start_currency + 1)); $session_data_country = substr($session_data, $start_country, (strpos($session_data, ';', $start_country) - $start_country + 1)); $session_data_zone = substr($session_data, $start_zone, (strpos($session_data, ';', $start_zone) - $start_zone + 1)); session_decode($session_data_id); session_decode($session_data_currency); session_decode($session_data_country); session_decode($session_data_zone); session_decode($session_data_cart); if (PHP_VERSION < 4) { $broken_cart = $cart; $cart = new shoppingCart; $cart->unserialize($broken_cart); } if (is_object($cart)) { $products = $cart->get_products(); for ($i = 0, $n = sizeof($products); $i < $n; $i++) { $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . $products[$i]['name']); } if (sizeof($products) > 0) { $contents[] = array('text' => tep_draw_separator('pixel_black.gif', '100%', '1')); $contents[] = array('align' => 'right', 'text' => TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($cart->show_total(), true, $currency)); } else { $contents[] = array('text' => 'Empty'); } } } } // Show shopping cart contents for selected entry echo ' <td valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo '</td>' . "\n"; ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  17. Gob

    Who's Online Enhancement 1.4

    Ed Sorry that was one bit of info I missed including. No I don't have it turned on, but did a few months ago until I found it was causing problems with the page displays on the new server I went to. Am looking into the ultimate SEO URLs John
  18. Gob

    Who's Online Enhancement 1.4

    Ed Quick question for you. (hah hah) I have just click on a link in the admin whos online. The link is displayed like this: http://www.trublue.net.au/shop/product_info.php/cPath/58/products_id/519 When actually clicked on it says no product found. The actual link for the same product "519" is: http://www.trublue.net.au/shop/product_info.php?cPath=115_58&products_id=519 Looking a little further I notice that 7 online right at this moment the Last URL varies with these two different types of URL's. A classic at the moment is a bot Yahoo, 3 being on line at the moment in 3 different locations, all with different last URL's eg: http://www.trublue.net.au/shop/ask_a_question.php?products_id=582 http://www.trublue.net.au/shop/index.php?cPath=116_37_73/page/1/sort/6a http://www.trublue.net.au/shop/product_info.php?products_id=288 I beleive this is partialy tied up with the options in the Configuration of My Store in Admin: Use Search-Engine Safe URLs (still in development) What concerns me some what is whether people are going to this weird URL and finding no such product, or whether it's some error in the display of the LAST URL. Hope this makes sense. What your thoughts?
  19. Gob

    Who's Online Enhancement 1.4

    The only way this can happen is if you have missed uploading ALL the images or your configure.php file is not setup correctly. More likely the first option.
  20. Gob

    Who's Online Enhancement 1.4

    Denice Have you uploaded the images, and to the correct directory. catalog/admin/images/*.*
  21. Just found the answer here: http://forums.oscommerce.com/index.php?showtopic=167121&hl= Replace this, as per this particular contribution. <?php echo HEADING_TITLE . '\'' . ($tree[$current_category_id]['name']) . '\''; ?> With this <?php echo HEADING_TITLE . '\'' . $category['categories_name'] . '\''; ?> And add this just above. (See more detail below) $category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); What you need to end up with is this. } } $category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $category = tep_db_fetch_array($category_query); ?> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE . '\'' . $category['categories_name'] . '\''; ?></td> I've actually tweeked mine a little further so the catagory name stands out better and it can be done to your desire but you should get the idea from the example below. <?php echo '<font size="2">' . HEADING_TITLE . '</font>\'' . $category['categories_name'] . '\''; ?> I had a hunch this sort of query would be required, I'm glad someone else was able to get a working function for this. Thanks very much go to the author this.
  22. I have had this contrib installed for some time and noticed soon after installing that all I got most of the time was blank where the tree name was supposed to be. I'm just now revisiting it and am finding that it seems no one else has a solution either. If anyone has a solution it would be great to hear from you. I beleive it's just not the right call function, but not being a php'er only hacker at best I don't know what to do with it.
  23. Gob

    Who's Online Enhancement 1.4

    I don't really know what else to suggest to you, but I'll bet the STS is the cause of the problem. EG: There has been a number people installing this MOD that actually have CRE loaded installed, which also uses the STS MOD or something very similar and they have complained of a variety of problems. I don't recall this type of problem specifically but I'll bet someone did at least. The only thing I could suggest from here (and I know your going to love this) is to go back over each page in this thread and see if you can find a similar error from another user. Unfortunatley a lot do not post how they fixed the problem, if they did, so you may have to try to send them a message or email and ask them. Sorry but I don't know any other way. I have not installed the STS MOD myself but understand of sorts of problem/s it could cause. John
  24. Gob

    Who's Online Enhancement 1.4

    Suggestions 1. Are you sure you have the correct version of whos_online.php in catalog\includes\functions ? 2. Have you had a look in the database to see what, if anything is being stored in the last url field? 3. Have you got the correct version of whos_online in the admin directory?
  25. Gob

    Who's Online Enhancement 1.4

    For those of you interested I have just uploaded an update to 1.7, now 1.8. http://www.oscommerce.com/community/contributions,824 As explained on the update info. The update cleans up a few layout issues I didn't like, fixes the redundant information of the refresh Time, namely the year info etc. Also cleans up the colour coding of clients, bots and IP's etc. Have updated all Language files with required defines and have attempted to update the actual Languages as much as possible, but have only used logic to do this, I only speak one language so it may (probably) not be exactly correct. So don't shoot me please. :ph34r: Cheers Gob
×