WP OnlineCounter

Thanks for your interest in WP OnlineCounter, a plugin for WordPress which counts the number of currently online visitors, the highest number of visitors online at the same time, and the total count of visitors. You can configure what should be displayed and how it should look like through its own options page in your WordPress dashboard. It also offers some very basic statistics regarding the most recent visitors to your site (only available if you are running on a server with at least MySQL 4.1).

Installation

Download the plugin and drop it into your WordPress’ plugins directory, usually “wp-content/plugins” (DON’T put it into a subdirectory). Enable it on the Plugins page in your WordPress dashboard. Paste the following code in your template where you want the counter to show up, or use either the Widget for WordPress Widgets or the Sidebar Module for the K2 theme.

<?php if(function_exists('wp_onlinecounter')) wp_onlinecounter(); ?>

Upgrade

If you are already using an older version of this plugin, please disable it on the Plugins page, overwrite the old file in your plugins directory with the new one you downloaded, and re-enable it again. This is necessary to perform an upgrade to the table structure in your database.

Download

Notes

The Statistics page under Manage in your WordPress dashboard only works if your are using at least MySQL 4.1, this is because older versions of MySQL are missing some features used in the database queries to get the results. This is not my fault, and there is NO way around it. Stop complainig about it to me and contact your hosting company to upgrade their outdated software.

1,718 thoughts on “WP OnlineCounter”

  1. Pingback: hirtengasse.de
  2. Pingback: Bubbles
  3. Pingback: Sistem Bilgisi
  4. Pingback: Phastidio.net
  5. Pingback: Epistemes.org
  6. Pingback: GuiStyles
  7. hey i just update from wp-online counter 0.1 version to newest one and everything crashed on counts

    on admin panel i got:

    WordPress database error: [Unknown column ‘maxon’ in ‘field list’]
    SELECT maxon FROM wp_onlinecounter ORDER BY maxon DESC LIMIT 1

    on the blog i got:

    WordPress database error: [Unknown column ‘maxon’ in ‘field list’]
    SELECT maxon FROM wp_onlinecounter ORDER BY maxon DESC LIMIT 1

    WordPress database error: [Unknown column ‘maxontime’ in ‘field list’]
    SELECT maxontime FROM wp_onlinecounter ORDER BY maxon DESC LIMIT 1

    WordPress database error: [Column count doesn’t match value count at row 1]
    INSERT INTO wp_onlinecounter VALUES (’1159214195′, ‘85.222.20.82′, ‘1′, ‘0′, ‘0′, ‘/index.php’)

    WordPress database error: [Unknown column ‘maxon’ in ‘field list’]
    UPDATE wp_onlinecounter SET maxon=’’, maxontime=’’ WHERE timestamp=’1159214195′

  8. [quote comment=”160″]Nevermind i clear the table.[/quote]

    it would have been sufficient to deactivate and reactivate the plugin …

  9. Hello

    I tried installing your WP Online Counter. It Appears on the sidebar but the details in the manage admin section of WP under WP Online Counter says:

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROU]
    SELECT t1.ip,t1.uri,t1.timestamp FROM wp_onlinecounter t1 JOIN (SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROUP BY ip ) v1 ON t1.ip=v1.ip AND t1.timestamp=v1.timestamp

    What is wrong?
    Cheers

  10. Pingback: admartinator.de
  11. Pingback: MacMouse
  12. Pingback: Miller Krzysztof
  13. Pingback: knobalchemist
  14. Pingback: GoodykZ
  15. Pingback: Akademie
  16. Pingback: * mocamoca.net *
  17. Okay, your online counter is an excellent plugin. Now, I’ve been using it for a couple months on my blog with no problems at all, but today as I was poking around my admin panel, I noticed a page (that was added by the plugin) that had a nasty error on it. O_o

    What BennyMC said:

    Hello

    I tried installing your WP Online Counter. It Appears on the sidebar but the details in the manage admin section of WP under WP Online Counter says:

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROU]
    SELECT t1.ip,t1.uri,t1.timestamp FROM wp_onlinecounter t1 JOIN (SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROUP BY ip ) v1 ON t1.ip=v1.ip AND t1.timestamp=v1.timestamp

    What is wrong?
    Cheers

    I too, was experiencing this problem, which for some unknown reason, the query itself worked fine on localhost, but it didn’t work on my actual host, where my blog is installed and public..

    However, I did manage to figure out a temporary fix. (I’m using OnlineCounter version 0.11, php 4.3.11, mysql 4.0.27)

    in wp-onlinecounter.php I changed

    $counts = $wpdb->get_results(“SELECT t1.ip,t1.uri,t1.timestamp FROM wp_onlinecounter t1 JOIN (SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROUP BY ip ) v1 ON t1.ip=v1.ip AND t1.timestamp=v1.timestamp”);

    to:

    $counts = $wpdb->get_results(“SELECT ip,uri,timestamp FROM “.$table_prefix.$wpoc_tablename.” GROUP BY ip”);

    and that works for me. :p All-in-all, the plugin works great. ^_^

  18. [quote comment=”205″]$counts = $wpdb->get_results(“SELECT ip,uri,timestamp FROM “.$table_prefix.$wpoc_tablename.” GROUP BY ip”);[/quote]yes, that query works, but the resulting data is not quite what i wanted – if you can upgrade to at least MySQL 4.1 or even better to 5.0, the original query will work as intended!

  19. Pingback: Kitapblog.com
  20. Like others, I wasn’t getting a “total” count either. I changed this:

    [quote] //increase count only if visitor is under $ignore_level
    //get_currentuserinfo();
    if(($visitor

  21. Oops..my comment got eaten by bad formatting. Should it happen again, I basically removed bit which checks user level vs ignore level for increasing the count.

    I changed this:

    //increase count only if visitor is under $ignore_level
    //get_currentuserinfo();
    if(($visitor

    To this:
    //increase count only if visitor is under $ignore_level
    //get_currentuserinfo();
    if($visitor

  22. i have installed the plugin but the my wp-admin>manage>WP- OnlineCounter returned this:

    Time IP URI
    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROU]
    SELECT t1.ip,t1.uri,t1.timestamp FROM alex_onlinecounter t1 JOIN (SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROUP BY ip ) v1 ON t1.ip=v1.ip AND t1.timestamp=v1.timestamp

    I am pretty ignorant about MySQL and the like.

    Help!

  23. Pingback: LIFE, SO FAR.
  24. Pingback: dimedrol.org.ua
  25. Jan Writes [“yes, that query works, but the resulting data is not quite what i wanted – if you can upgrade to at least MySQL 4.1 or even better to 5.0, the original query will work as intended!”]

    The only problem is that i do not have access to the MySQL database since the website is being hosted on free webspace, which i have no control over.

    Cheers

  26. Sephiroth writes [” However, I did manage to figure out a temporary fix. (I’m using OnlineCounter version 0.11, php 4.3.11, mysql 4.0.27)

    in wp-onlinecounter.php I changed

    $counts = $wpdb->get_results(”SELECT t1.ip,t1.uri,t1.timestamp FROM wp_onlinecounter t1 JOIN (SELECT ip, MAX(timestamp) timestamp FROM wp_onlinecounter GROUP BY ip ) v1 ON t1.ip=v1.ip AND t1.timestamp=v1.timestamp”);

    to:

    $counts = $wpdb->get_results(”SELECT ip,uri,timestamp FROM “.$table_prefix.$wpoc_tablename.” GROUP BY ip”);”]

    I tried that but my whole website went down and wouldn’t load. The webpages couldn’t be viewed so i changed it back to the original and now everything is OK.

    Cheers

    P.S. How do you quote??

  27. [quote comment=”232″]P.S. How do you quote??[/quote]

    you can quote by clicking the link “Zitat” above a comment, that’s german for “quote”.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

falls ich mal was zu sagen habe…