Community Add-Ons
Who's Online Enhancement
for osCommerce Online Merchant v2.2
This contribution adds a few enhancements to the admin's Who's Online page.
I needed the ability to get a full detail information about the user_agent of all clients, so I've added the ability to click this user_agent and get an answer to what kind of system the clients are using.
Full package
Swedish translation of the admin area
After you install or upgrade to 3.6.5 overwrite the catalog/admin/whos_online.php to correct the shown version and also because I have cleared the double <body> tag
contributed by: www.ellinas.org
Added a missing file from previous full package and made some file and sql fixes for the user agent to work (or to work properly)
I used the full package 3.6.3 from Vag and also included the bugfix 3.6.4 from AndreD
contributed by: www.ellinas.org
bugfix;
The link on IP address was incorrect.
-thanks to user Nathali who notified me.
package contains only the fixed php file.
Added a space after "HTTP Referer URL:"
Google Maps Key is now stored in the database and you can add/change it from the Admin area
Changed domain strings with constants to make updates of new versions easier to install
Country flag is shown only when its image exists
2-3 ISP icons are added
Full package.
Added DHTML tooltip. (additional file boxover.js added to /admin)
Hover the country flag with your mouse to see full location information and User Agent.
If you have v3.61 installed just overwrite /admin/whos_online.php and copy boxover.js to /admin
Then edit the whos_online.php according to the install.txt instructions and you're done.
Enjoy!
English
- fixed <td> in visitor map and fixed contribution version number (3.6.1)
Regards!!
Español
- Corregido un <td> que descuadraba toda la página y corregido el número de la versión de la contribución (3.6.1)
Salu2!!
Added mysql_real_escape_string before inserting geolocation and stripslashes when reading from DB for country name, region name and city
Full package
Changes in v.3.6:
You see a flag of the country and the logo of the ISP (only certain ISPs are included, mostly greek ones) before the IP.
You see images of the browser and the OS before the User Agent string (almost all are included).
You see the logo of the referer (ony some major ones and some greek ones are included) before the formatted referer string.
The referer URL is formatted, so for certain search engines you only see the search keyphrases instead.
"ID: 0" and "Name: Guest" are not displayed anymore - Except from the green color, you see the 'Guest' string anyway.
The strings in the report at the end are different for singular and plural.
Added the file admin/includes/functions/whos_online.php with functions for most of the above.
The language files are updated.
Notes:
IP Address geolocation and Visitors World Map are included.
I added a screenshot in the zip file.
This is a full package.
Language files are updated (TEXT_SHOW_MAP is added and some words are translated from english).
The bug that was showing everyone as a bot on the map is fixed (I apologize for that, it was in v.3.5.8).
The Google maps bots that go to "/visitors_georss.php" are not shown (they were becoming too many if Refresh rate was less than 2 minutes).
IP Address geolocation and Visitors World Map are included.
Full package.
1. The names in the map are:
Bot#1, Bot#2, etc. for bots,
Guest #1, Guest #2, etc for guests
and the full names of the logged-in customers.
2. The change in v.3.5.8 is an option to show the map or not. (Visitors World Map should be installed, please see 3 versions below).
3. Greek language is added.
If you already have Who's online Enhacement AND Visitors World Map installed, just copy the new files over them.
If you want to install them for the first time, please install "Who's Online Enhancement 3.5.5 Full + IP Address geolocation + Visitors World Map" first (3 versions below).
Replaced the insecure "file_get_contents" with CURL.
-(only the updated php file in package)
Added 15 seconds refresh interval.
Fixed/Removed the requirement for matching STORE_SESSION in order to see the carts.
Now you can see the carts even if STORE_SESSION does not match.
Added a realtime visitors map to 3.5.5 version. The visitors map will not work with previous version.
Basically, a php script creates a GeoRSS of visitors and Google Map API is used to display visitors location in realtime.
For a demo, visit http://ipinfodb.com/visitors_map.php
File include full 3.5.5 package with additionnal file to install the visitors map
Added IP address geolocation directly in the admin using IPInfoDB XML API to get IP geolocation.
Full package
All credit goes to Steve Dallas.
All I did was replaced the IP Trace provider from dnsstuff.com to ip-adress.com because dnsstuff.com no longer worked and is becoming a pay-per-use site.
Only change is in the catalog/admin/whos_online.php file. You can just over write your existing file if you wish.
Sorry about this, but there was a code error in the previous post. Also, it is fair to mention the Ip Tracer I added allows for up to 5 traces per day at no charge, more tracer requires an account.
Added Turkish Language. Full package..
Türkçe dil versiyonu eklendi...
persian Farsi translation + Other Language
language included : english , farsi , italian , spanish , german , french , dutch , danish
****Full package upload****
Deutsche Übersetzung
Full package upload
danish translation
Full package upload
v3.5.4
Changed "onChange" action to "onclick" on the Show Bots checkbox to fix MSIE problem. Thanks to Scott McFadden (Bushmaster)
Time display format can be either 12 hr or 24 hr clock. Based on post by Claudio di Francesco (cdfcool) and v3.5.3 contribution by CWS (theintoy)
Set $time_format variable in whos_online.php to control
Added Dutch language file, courtesy of jan64
Formatting change to align total visitors number with others
Miscellaneous formatting changes
Workaround for timeout that occurs when suhosin session data encryption is used
Carts not viewable when suhosin installed
Updated troubeshooting instructions to describe problem that occurs when FORCE_COOKIE_USE is true
There is a minor change to the lanugage files. Upgraders from v3.5 should replace both admin/whos_online.php and admin/includes/languages/xxx/whos_online.php
Support thread at: http://forums.oscommerce.com/index.php?showtopic=124853
Anyone upgrading from 3.5 can simply replace the whos_online.php in admin and copy the languages files over.
v3.5.3
Fixed the checkbox issue for both IE and Firefox/Opera
Formatted a the options into a table
Added a new option to see last refresh time in AM/PM or 24hour
Added some hyperlinks into the user fields
Added a hidden field for the oscAdminId
Changed all references to HTTP_GET_VARS to $_GET
Who's Online Enhancement v3.5.2
only dutch translation!!
I found some translation faults, sorry.
This is the corrected file.
Who's Online Enhancement v3.5.2
Only dutch translation file!
Fix IE Bug that would not refresh the page when clicking on Show Bot checkbox
Changes for this version:
Two fixes for register_globals=off compatibility:
Drop-down menus retain their values (problem in MS2; global fix exists in RC1)
Carts display correct contents when selected
Known issue:
MS Internet Explorer users: After clicking on the "Show Bots" check box, you must change the cursor focus; either by pressing Tab, or by clicking somewhere else on the page, for the setting to take effect. This appears to be an Internet Explorer bug.
Full package upload; upgraders from v3.5 need install only admin/whos_online.php
Support thread at: http://forums.oscommerce.com/index.php?showtopic=124853
Changes for this version:
Moved hostname resolution to tep_update_whos_online() in catalog/includes/whos_online.php
added 'hostname' field to whos_online table in DB
Added wordwrap to referer URL, courtesy of Mike Challis (CRUZN8R)
Added active customer count, courtesy of Mike Challis (CRUZN8R)
Removed "manual bot detection" code. See troubleshooting step 2.
Moved version number out of language files; it is now a defined value in admin/whos_online.php
New icons, courtesy of jan64
Italian language file, courtesy of nextink
Refresh time and profile display selections are now drop-down menus
Added "Show Bots" selection
Fixed SQL table name bug, courtesy of lynkit
Changed all references to "whos_online.php" to FILENAME_WHOS_ONLINE
Support thread at: http://forums.oscommerce.com/index.php?showtopic=124853
Bug fixes:
1. Bot Icons other than google not working in List
2. Shopping cart not working
3. Added SQL prefix fix
3. English Language file updated to 3.4b
4. Fixed error introduced by 3.4a (re shop classes)
Pete and Ben from Helpwise.com.au
Bug fixes:
1. Bot Icons other than google not working in List
2. Shopping cart not working
3. Added SQL prefix fix
3. English Language file updated to 3.4
Pete and Ben from Helpwise.com.au
Some users may experience this error recently.
The error occurs because session values are encrypted due to subosin patch of PHP on your server (your host may upgrade php and add the patch). Who's online script enters into an infinite loop because $start_cart is undefined.
Two solutions.
1. Modify your whos_online.php file as fszone posted (#1192). Fatal error will disappear but you can't see what your customers have added to their shopping cart.
2. Remove subosin patch of your PHP or configure suhosin.ini file by adding one line "suhosin.session.encrypt=0". This can solve the problem thoroughly and you don't need to modify the whos_online.php file. Fatal error won't happen again and shopping cart works fine.
No file attached.
This fixes a bug in the SQL that only occurs with non-standard table names, such as with a table prefix.
Idioma en español para poner en la carpeta.
adminincludeslanguagesespanol
Ahi metemos el archivo whos_online.php.
Espero que les guste.
Hi,
this file contains the italian language translation for who's online enhancemente 3.4.
Backup the old file version of whos_online.php and simply put this file into:
catalog/admin/includes/languages/italian/
Bye
Hey everybody,
I just rolled up the fixes and changes below, including the icon update and gave it an new version number to avoid confusion. Thanks to everybody for your work and updates.
Full Package
THIS is the right version
forgot something in // Images used for status lights
Download this one!
This is only a small adjustment to the icons.
I was sometimes a little confused because the icons seems so simular.
So i have changed them and one made one new icon.
Screenshot included!
changes:
a green cart, that is blinking when you have a guest/customer with a cart.
the green cart on the Status Legend is NOT blinking.
and some new icons
NOT a full package
I didn't like seeing negative numbers when looking at the total number of online customers. Made a few very minor changes to properly show the number of real customers online. Use the installation instructions in the file.
Thank for yet another great contribution!
This is NOT a complete package. Just a small fix.
[Previous upload had a small error]
Fixes a bug introduced in v2.0ec that prevented carts from appearing if STORE_SESSIONS was set to use the file system (STORE_SESSIONS='')
Added troubleshooting information.
Included French translation provided by delete13
Full package
Support topic at http://forums.oscommerce.com/index.php?showtopic=124853
Fixes a bug introduced in v2.0ec that prevented carts from appearing if STORE_SESSIONS was set to use the file system (STORE_SESSIONS='')
Added troubleshooting information.
Included French translation provided by delete13
Full package
Support topic at http://forums.oscommerce.com/index.php?showtopic=124853
Français
This version corrects a small error in v3.3. The link to the IP lookup site was incorrectly formatted.
Full package upload.
Support topic at http://forums.oscommerce.com/index.php?showtopic=124853
Who's Online 3.3 by SteveDallas
Includes the following changes:
Many fixes for HTML 4.01 DTD conformance
Rewrote product/category name display for robustness
Added product/category name display for Ultimate SEO URLs
Fixed gethostbyname errors
Rewrote duplicate counting code
Support topic at http://forums.oscommerce.com/index.php?showtopic=124853
I've been working on a project, and it's currently working, but looking to see if I can get some inhancement on it.
I didn't like the Current version of Who's on line, and it's Bot Checking, and at times it was very slow if the Remote computer did not have a reverse dns entry.
What I wanted was a new MYSQL Table that stored IP, ReverseDNS, and BotStatus.
I wanted to open up Who's been here / Who's online and see all the Unique visitors that occured from the last time I managed the list.
I also wanted to be able to mark the IP as Bot or Hide from list as customer if it was not a bot, and the ability to change the record back if I made an error.
Once I had this daily list of who was here, on the same page I wanted to see who IS here now, and I wanted to pull the Reverse info and bot status from my table rather than checking the internet.
The Result is coming to gether very nicely, I'd like to keep cleaning it up, If there is allready such a thing then please dirrect me, otherwise submited for your approval: Who's been here? V.0
You need to Create a new Table in your database called ip_visit
Then create three rows: ip, isbot, reverse_IP
Note: Some of the code at the beggining of this file is from the who's online, however most of it is not used, I need the code to include my page within the admin page.
Place the file in the Admin folder and call it using the /admin/ip_visit.php
And I choose to have each visitor added to the ip_visit when they opened my index.php by placing the following code into either a left or right box that runs when they open the site.
$bot_name = array('googlebot','inktomisearch','crawl','bot');
$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');
$whos_online = tep_db_fetch_array($whos_online_query);
$ec=0;
while($ec < count($bot_name)) {
if (strstr(gethostbyaddr($whos_online['ip_address']),$bot_name[$ec])) {
$ecbot = true;
}
$currentip = tep_db_query("select reverse_IP,ip from ip_visit where ip = '" . ($whos_online['ip_address']) . "'");
if ($row = tep_db_fetch_array($currentip)) {$test='true';
} else { $test='false';
tep_db_query("insert into ip_visit (isbot, ip, reverse_IP) values ('" . $ecbot . "' ,'" . ($whos_online['ip_address']) . "','" . gethostbyaddr($whos_online['ip_address']) . "')");
}
$ec++;
}
I'm interested in feedback on this, drop me a note if you use this or try it.
Ken
contribution for french users. Full package.
All credit goes to the original authors.
**********************************
Package complet à l'attention des admin français.
Tout le mérite revient aux auteurs des scripts.
Syntax fix on line 20 of ..../admin/whos_online.php
Very minor fix. All credit goes to the original authors.
Full Package
Includes last gethostbyaddr fix July 17th.
Plus, better layout of basket items to the right which is much needed if you have many visitors.
No cellspacing, makes less scrolling necessary :-)
Plus I've included a new icon for active carts, much easier to see shoppers than a green box. IMHO
All credits to the Authors.
This is a bug fix for those were getting "gethostbyaddr warnings" Also improves performance of the page significantly.
All credits to creator/s
Basically I just found the working files and put them all in one package and then included some installation instructions since people have been updating this and not providing any instructions.
Updated version to 3.2
Included latest whos_online.php files (the latest I could find)
Included instruction for installation (including backups and db modification).
If you want to contact me about this or display your displeasure, you can email me using my contact form: http://www.nbshosting.info/problem_report.php
In total 247 different country flag icons (both GIF and PNG)
put them in "catalog/admin/images/flags" to get nice country flags in visitors.php
To avoid more conflicts with the FUNTION ALREADY DEFINED for old users, I have made a simply modification:
From:
[CODE]
// Added by Erick Cedano aka Graphicore.
function tep_get_ip_address() {
if (isset($_SERVER)) {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
} else {
if (getenv('HTTP_X_FORWARDED_FOR')) {
$ip = getenv('HTTP_X_FORWARDED_FOR');
} elseif (getenv('HTTP_CLIENT_IP')) {
$ip = getenv('HTTP_CLIENT_IP');
} else {
$ip = getenv('REMOTE_ADDR');
}
}
}
[/code]
to:
[CODE]
// Added by Erick Cedano aka Graphicore.
if (function_exists('tep_get_ip_address')) {
// Funtion already exist
} else {
function tep_get_ip_address() {
if (isset($_SERVER)) {
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
} elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
} else {
if (getenv('HTTP_X_FORWARDED_FOR')) {
$ip = getenv('HTTP_X_FORWARDED_FOR');
} elseif (getenv('HTTP_CLIENT_IP')) {
$ip = getenv('HTTP_CLIENT_IP');
} else {
$ip = getenv('REMOTE_ADDR');
}
}
}
}
[/code]
Now I hope this keep everyone (old and New users) happy.
marcinmf noted that other contributions might use that functions in admin/includes/functions/general.php so changed instructions to remove it from admin/whos_online.php
when installed i got a fatal error message saying that the function can not be declared again.
i dont not if its just a problem i was facing but in case it isnt here is the fix - very simple.
just comment the function in admin/functions/general.php
I don't want to see all active/inactive bots but just real visitors. Therefore i removed them and instead added the ability to see the referer direct at the selected entry.
This is just a replacement for your
admin/whos_online.php
Nothing else changed!
--------------------
Ich brauche keine Übersicht über die ständig (in)aktiven Bots & Sumas. Daher habe ich diese aus der Übersicht entfernt und nur die Kunden drin gelassen. Ausserdem zeigt es mir den jeweiligen Referer nun direkt beim ausgewählten Eintrag an.
Es ist nur die Datei
admin/whos_online.php
eingefügt. Einfach ersetzen.
This is not a full package, just French language add-on
Modified-up-to-date.
Included a few extras as requested. Contains all previous modifications.
Enjoy!
Long Live OSCommerce and PHP coding.
Major Modifications to the admin/whos_online.php file.
- Lot of bugs fixed.
- Added missing function.
- Included variable to manually identify Bots.
- Updated User Classification.
- Fixed shopping cart.
- & More.
This contribution only has one file. Please download the full version 2.0 and replace the attached file or wait until I upload a FULL PACKAGE in the next few days.
Failure: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address
Die IP Adresse hat ein , am Ende (z.B. 180.180.10.20,)
Dieses Komma führt zum Fehler
Vor der Zeile
echo gethostbyaddr($whos_online['ip_address']);
diesen Code einsetzen
if (strstr($whos_online['ip_address'], ',')) {
$ips = explode(',', $whos_online['ip_address']);
$whos_online['ip_address'] = $ips[0];
}
und dann geht es weiter mit ..........
echo gethostbyaddr($whos_online['ip_address']);
Wünsche allen damit viel Erfolg
Klaus
Juste change in whos_online.php at ligne ~452
echo $whos_online['ip_address'];
at
echo gethostbyaddr($whos_online['ip_address']);
It's not the complete archive but just the french part.
This is a tiny fix. Sometimes in the list of the URL it only displayed "(Product)" without showing the name of it. If you wanted to see the name you had to click and open new page.
I dont know why it behaved like that, because the product_id was just there.
So i added 1 line, in the case that previous lines couldnt extract the product_id.
Just a little file to save a 30 seconds work ;-)
ONLY whos_online.php in archive!
fix: wrong counting 'real customers' (remove 'duplicates' from formula);
fix: error in 'Products' identify:
if ($a[0]="products_id") { $products_id=$a[1]; }
must: if ($a[0]=="products_id") { $products_id=$a[1]; }
added: correct parsing URLs with parameters as '/?paramter=xx¶meter=yy' and '/parameter/xx/parameter/yy'
Full package added Dutch translation
Who's Online Enhancement 2.00 full package by Webschiff
This is a full Package:
Languages: german, espanol and english
Change in german language file
Who's Online Enhancement 2.00 - FULL package...
Now with the Swedish language added.
Deutsche Sprachdatei. Einige Begriffe (BOT,Session,..) wurden nicht übersetzt.
who_online czech language file / who_online počeštěný soubor.
Insert into / vložte do /catalog/admin/includes/languages/czech
The Full Pack, Now With Danish To
- i make few changes to the last 1.9 version
and also , put again the variable instead of hard coded language , please don't be selfish , if you release a contribution, respect the multilanguage, even if you think the code is "cleaner" when only in english !!!
Also, for the align right or left, renmber than english is not the only language used , so chose your alignement thinking for all languages
- clicking the visitor maybe won't work , the code has to be checked
Full package of Who's Online Enhancement 1.9b + added polish language file
polish language file to version 1.9b
The file was getting bit messy so I did some code cleaning. Version number changed in the file, I have rearranged last refresh and bottom table a little bit. All these fixes are included and tested:
Clicking customer in the whos online will open the customer details.
IP and last page clickable
Last page display product name - tested with Ultimate SEO URLs
Referer URL clickable
The below fix for Search Engine Friendly URL not included due to the fact that you should use Ultimate SEO URLs anyway.
Full package.
In order to get listed Product name and Category name(s) when Search Engine Friendly URL system is ON, you must replace;
"// alteration for last url product name" block with following;
Code has been simplified to find product_id and category numbers, as well.
(Same info in attached file)
======================================================================
// alteration for last url product name eof
if (strpos($temp_url_link,'product_info.php')) {
$products_id = substr(strstr($temp_url_link, '_id'), 4);
$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')) {
$cat = substr(strstr($temp_url_link, 'cPath'), 6);
$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
Sorry this appears to be a bit of a backward step here, but have little need myself for the 1.9 updates as yet.
Please refer to post 778 in forum for full details of this update addon.
Essentially what it does is now display the Product or Category name in place of the Last URL.
I have only intergrated this addon to WOE the credit for this belongs Dan. Thanks once again Dan for this.
This zip only contains the catalog/admin/whos_online.php file
Fixed customer clickable link in admin/whos_online.php
Just replace file.
Clicking customer in the whos online will open the customer details now.
Full package
Who'sOnlineEnhancement1.9+ 1.9a + add italian languages
One of the links to "showing ip address was not working. Changed 1 line to make it work correctly.
in admin/whos_online.php
Find
// whois url with variable :
echo '<b>' . TABLE_HEADING_IP_ADDRESS . ':</b> ' . "<a href=' " . AZER_WHOSONLINE_WHOIS_URL ." '$whos_online[ip_address]' target='_new'>" . $whos_online['ip_address'] . "</a>";
replace with
// whois url with variable :
echo '<b>' . TABLE_HEADING_IP_ADDRESS . ':</b> ' . "<a href='" . AZER_WHOSONLINE_WHOIS_URL . $whos_online['ip_address'] . "' target='_new'>" . $whos_online['ip_address'] . "</a>";
This package is incomplete, please download full package v1.9
here is the change :
1. there where still some hard coded descritpion so i added new define in the language
2. added whois on ip with a variable, but to be tested if it doesnt work comment the ligne using variable and uncomment the whois url hardcoded ligne
[code]
4. attention , i added the define in english in all language file , they have to be translated in the proper language
5. i'd like to add the flags like the contribution who's online + flag if someone want to help me implement it
http://www.oscommerce.com/community/contributions,1096
The update tidies up a number of layout issues I didn't like, as well as fixes the displaying of the last refresh Time info, namely removes the date and year settings which were not applicable anyway.
Also cleans up the colour coding of Clients, Bots, IP etc.
Has been working very nicely for me for about 6 months now.
This version also includes all Language files currently added plus the French one below.
However I have only used logic to update the languages all based on the information already supplied. So if it's not right please don't shoot me :) (I only speak English).
I have not changed any other basic functions of this Mod and most of the credit to this MOD working belongs to Ed. He did a terrific job re writting it some time ago.
Thanks Ed.
Just added French language.
Complete package.
Ajout du français.
Paquetage complet.
Luthimate
V1.7 contained an incorrect file. This package corrects that. Sorry for the inconvenience.
This is a complete package. Forum discussion here: http://forums.oscommerce.com/index.php?showtopic=124853.
Who's Online Enhancement v1.7
---------------------
- Another fix for Sessions stored in files. Thanks Gob!
- A fix for showing more than one Bot at a time.
- A fix for showing Empty in the cart column. Another Gob fix!
- A refresh time stamp. Gob again!
- Customer profile now includes User Agent. BoulderDash's idea.
- Language updates - Includes updates from Expert (Turkish), Tor Austheim (Norwegian), and Calbasi (Catalana) for the language files.
This is a complete package. Forum discussion here: http://forums.oscommerce.com/index.php?showtopic=124853
Només hi ha la traducció al català. Cal baixar-se la resta dels fitxers.
Salut!
Calbasi garrofa:-) pangea punt org
Nothing to download.
it is just a code if you want to have the possibility to click on the reffer instead of just seeing its URL
find this in admin/whos_online.php:
<tr>
<td class="smallText" colspan="8"><?php echo '<strong>' . TEXT_HTTP_REFERER_URL . ':</strong> ' . $http_referer_url; ?></td>
</tr>
and change to this:
<tr>
<td class="smallText" colspan="8"><?php echo '<strong>' . TEXT_HTTP_REFERER_URL . ':</strong> <a href='. $http_referer_url.' target=_blank>' . $http_referer_url.'</a>'; ?></td>
</tr>
Just added Norwegian language.
Thanks for a great contrib! :)
Tor
Removed static English texts to language file.
Only English language was updated and added Turkish.
Also small cosmetic changes made in whois_online.php
For other languages you have to copy/paste English text definitions
The previous version is missing two lines of code in the catalog/admin/includes/languages/english/whos_online.php file
This is the corrected file. Only one file in this package, please download previous version.
All credit to those who wrote the original, this is just a little fix.
This adds the ReadMe from v1.6.1 Beta to the full package.
I left out step 3 from the install instructions. Download and install v1.6 Beta. Then, download the readme here and just apply step 3 as directed.
This is a BETA! Please report any problems found in the support forum: http://forums.oscommerce.com/index.php?showtopic=124853
Updates in v1.6 Beta include:
- Fix for Sessions stored in files
- Detection of Bots based on Prevent Spider Sessions - i.e. No more hardcoded IP addresses
- Stripping of osCsid from Last URL - cleaner look
- New "Session?" column
- New Profile data for Bots, Customers, All, None - i.e. lists additional info like User Agent, osCsid, Referrer, etc. under each entry in WOL. All Kudos to BoulderDash for this!
- Bot status lights for Bot/Active and Bot/Inactive
- Color coded entries - i.e. set text color for Bots, Admin, Customers. More kudos to BoulderDash for this idea
- Now using tep_get_ip_address() instead of $_SERVER["REMOTE_ADDR"] or getenv('remote_addr') - Some people complained they got no IP address data
- Customization variables moved to the top for easy editing - i.e. inactive time, status light images, refresh rates
What it still needs:
- Visitors are not being counted correctly
- Display osCsid in Bot Profile for Bots that don't listen to Prevent Spider Sessions
- Display User Agent for Guests to determine if they are really an unknown Bot!
Same file, but mistake on Line 368 corrected. Threw out a mistake if an item was placed in the Shopping cart.
Also includes an SQL Database file for the lazy :-)
Full package! Not just update!
All credits to the original Authors!
Have fun!
A few small changes to admin/whos_online.php.
- the refresh for 3 minutes was missing from the code: added
- the information for the status lights was lined out incorrectly: fixed (different from the previous post as I saw that only later but the idea is the same)
Complete package.
I have a version that I am working with, but it doesn't include any of the features from the previous file and gets rid of HTTP_REFERER and allows you to ban visitors on-the-fly. Mine uses the spiders.txt file (updated) too. Individual visitors page visits are stored and displayed elsewhere. This is just a page layout improvement for the images included in a previous update. Copy and paste... if you want:
<!-- WOL 1.5 - Status Legend -->
<td rowspan="2" align="right"valign="top"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<?php echo
'<td class="dataTableContent" nowrap>' . tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', TEXT_STATUS_ACTIVE_CART) . ' ' . TEXT_STATUS_ACTIVE_CART . '</td>' .
'<td class="dataTableContent" nowrap>' . tep_image(DIR_WS_IMAGES . 'icon_status_blue.gif', TEXT_STATUS_ACTIVE_NOCART) . ' ' . TEXT_STATUS_ACTIVE_NOCART . '</td>' .
'</tr><tr>' .
'<td class="dataTableContent" nowrap>' . tep_image(DIR_WS_IMAGES . 'icon_status_yellow.gif', TEXT_STATUS_INACTIVE_CART) . ' ' . TEXT_STATUS_INACTIVE_CART . '</td>' .
'<td class="dataTableContent" nowrap>' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', TEXT_STATUS_INACTIVE_NOCART) . ' ' . TEXT_STATUS_INACTIVE_NOCART . '</td>' .
'</tr><tr>' .
'<td colspan="2" class="dataTableContent" nowrap>' . tep_image(DIR_WS_IMAGES . 'icon_status_white.gif', TEXT_STATUS_NO_SESSION_BOT) . ' ' . TEXT_STATUS_NO_SESSION_BOT . '</td>';
?>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
<!-- WOL 1.5 EOF -->
This is v1.5 with the addition of MSN's new bot (for MSN's soon to be released search engine which can be tested at: http://beta.search.msn.com), and an additional IP for googlebot.
Who's Online Enhancement 1.5
-------------------
- Added color coded status lights
- - Active vs. Inactive
- - Items in Cart vs. No Items in Cart
- - No Session, suspected Bot
- Added Spanish language file
- (English, German, and Dutch language files updated)
- Added commented code for integrating whos online with country flags contrib
- Updated Inktomi/Yahoo Bot IP Address list
- Added Screenshot
Who's Online Enhancement 1.4
-------------------
- Removed Whos Online column and made IP Address linkable instead
- Ordered entry by Last Click time instead of IP Address
- Changed so that Guest (customer id = 0) displays flat (caused error as link) but customer name is link to customer edit screen under Admin
- Changed IP address column:
- Displays "Me" if IP address is yours
- Displays Bot name if IP address is a Bot
- Displays IP address, linked to ShowMyIP.com, for anyone else
- Subtracts Bots and Me from Real customer counts
- Always show Shopping Cart column
- Currently recognizes:
- GoogleBot,
- Inktomi/YahooBot,
- MSNBot,
- eXavaBot.
This is the German Lanquage File for this Contribution
This is the tranlated version of this cool contrib.
Credits: Calvin K
Translation: J.J. Draijer
Who's Online Enhancement 1.3
Released By: Calvin K
------------------------
Date: July 27, 2004
Description: The Who's Online Enhancement adds refresh rate options, checks for duplicate IPs, calculates the "true" number of customers, and now includes referrer information.
Please Note: This update combines the Who's Online HTTP Referrer Contribution with the existing Who's Online Enhancement.
Fixed the clickable url link problem that would give page not found if trying to click on link to see what customer is looking at.
Based on 29th May revision, there are bugs which caused the whos_online.php not able to refresh page when timing set is up. It was pointing to a wrong url, eg. www.abc.com/admin/www.abc.com/admin/whos_online.php?300
The problem is with the following codes:
<?php if( $_SERVER["QUERY_STRING"] == 600 ){ ?>
<meta http-equiv="refresh" content="600;URL=whos_online.php?600">
<?php }elseif ($_SERVER["QUERY_STRING"] == 300){ ?>
<meta http-equiv="refresh" content="300;URL=whos_online.php?300">
<?php }elseif ($_SERVER["QUERY_STRING"] == 60){ ?>
<meta http-equiv="refresh" content="60;URL=whos_online.php?60">
<?php }elseif ($_SERVER["QUERY_STRING"] == 30){ ?>
<meta http-equiv="refresh" content="30;URL=whos_online.php?30">
<?php } else { ?>
<input type='button' value='None' onClick="location.href='whos_online.php'">
<input type='button' value='10 min' onClick="location.href='whos_online.php?600'">
<input type='button' value='5 min' onClick="location.href='whos_online.php?300'">
<input type='button' value='60 sec' onClick="location.href='whos_online.php?60'">
<input type='button' value='30 sec' onClick="location.href='whos_online.php?30'">
Now, removed the redundant <www.domain.com>/admin/ which was the cause of refresh problem.
I fixed the url refresh and i changed this "substr(DIR_WS_CATALOG,0,strlen(DIR_WS_CATALOG)-9)" (2 to 9) now it works if u use the catalog folder.
Oops. I forgot to take our my own URL, sorry.
I updated the install.txt file too.
I thought that if I was going to change it, should at least tell you. I did some reaserch for the best IP look site, and this one seemed like the best.
It is easy to change if you don't like it. Ideally, a drop down list that allows you to make a default one would be cool. wink, wink, wink.
Same as before, but I fixed teh "Your IP Address" to be the REMOTE_ADDR instead of the SERVER_ADDR.
Its all good now.
Joey
Based on the 9 May 2004 version, I added a refresh rate so you can set this rate and sit and watch your customers come and go. I also added "Your IP Address" because I wasn't sure if I was counted in one of the "Real Customers" count. I hope I used the correct PHP Server variable for the "Your IP Address", if not it is an easy change.
Enjoy
With previous version of this mod you couldn't get
real "duplicate customers" value, because sessions were not sorted properly :( and count mod sometimes worked ok, sometimes didn't.
It's better not to use constant url address in the php code, but get http address from server and catalog name from variable. I do it that way:
<td class="dataTableContent"><a HREF="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . substr(DIR_WS_CATALOG,0,strlen(DIR_WS_CATALOG)-2) . $whos_online['last_page_url']; ?>" target="_blank"><?php if (eregi('^(.*)' . tep_session_name() . '=[a-f,0-9]+[&]*(.*)', $whos_online['last_page_url'], $array)) { echo $array[1] . $array[2]; } else { echo $whos_online['last_page_url']; } ?></a> </td>
The last link visited is already there so don't be fooled. Search for a better mod
<td class="dataTableContent" align="center"><a HREF="http://www.ttoc.co.uk<?php echo $whos_online['last_page_url']; ?>" target="_blank">Last page viewed</A></td>
Modified the whois.php from this contribution to create a url from the last page viewed.
There was a wicked link in there ;pkab.com?? I just fixed this because i don't like strange links in my site code.
<td class="dataTableContent"><?php echo gmdate('H:i:s', $time_online); ?></td>
<td class="dataTableContent" align="center"><a HREF="http://pkab.com.pl/sklepik/admin/customers.php?selected_box=customers&cID=<?php echo $whos_online['customer_id']; ?>&action=edit"><?php echo $whos_online['customer_id']; ?></A></td>
<td class="dataTableContent"><?php echo $whos_online['full_name']; ?></td>
add link to RIPE.NET
This contribution adds a few enhancements to the admin's Who's Online page. One thing I noticed when I would check the Who's Online page is that it lists existing sessions, not individual users. For example, I would have, say, 30 listings,
but only 14 individual IP addresses. I would have to figure out how many individual users were on by counting the unique IP's. What a headache.
So I tweaked the whos_online.php page to do the math for me. While I was at it, I
also decided to make the IP address clickable to open a new window and do a WHOIS on that IP. That way I could tell approximately where the user was coming from.
Then I also made the URL clickable so I could go to the same page the user was at on my own site.
