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
- WP Onlinecounter v0.14
- Sidebar Module (for K2 theme, not tested anymore)
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.
The Widget doesn’t display the Title and I can’t figure out why. I’ve tryed to change the Title with the Widget Options, but nothing happens. Still no Title.
Using WordPress 2.9.2
Are you using the most recent version of the plugin and the widget? I updated it a couple of weeks ago, specifically because of the title issue – but maybe 2.9.2 broke it again.
Yes, I’m using 0.14 and the WordPress Widget Engine (Not K2), so the Widget is included in wp-onlinecounter.php.
Could you please post your Entry of the Cell “widget_wpoc”? I think this one is for the Widget Options and it’s empty in my Database.
that may be a reason, the migration from external widget-plugin to internal code…
here’s the contents of the field with the option_name ‘widget_wpoc’:
a:1:{s:5:”title”;s:7:”Counter”;}
Does not work with this Entry. Sorry. 🙁
Thanks wp 2.9.2 test ok
wp-onlinecounter.php manual edit
line 384….392
http://shorttext.com/2hu3uso1y
all code
http://shorttext.com/50msk74437
Thanks, i’ll have a look and update my code
hi, Jan
I’m using wp 2.9 and I’ve installed this plugin, but right after I activated wp-onlinecounter I got this message on the top of my dashboard.
“Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘widget_wpoc_init’ was given in D:PHPmysitewp-includesplugin.php on line 339”.
what should I do?
thank you,
Thank you for your helping…
Hi,
hab den Counter installiert und nach Stunden unnützer Mühen zählt er immer noch nicht. In der Sidebar ist nur dieses eingefroren: * currently online
* maximum concurrent
* 1 total visitors
wenn ich den php.code wo anderst einfüge als in die sidebar.php z.B footer.php, dann bekomme ich diese Meldung:
Fatal error: Cannot redeclare get_user_ipaddr() (previously declared in /home/hkndhr/public_html/wp-content/plugins/wp-onlinecounter.php:100) in /home/hkndhr/public_html/wp-content/plugins/wp-onlinecounter.php on line 99
Wäre um jeden Rat dankbar
Keine Idee was falsch läuft?
Schade….
Sorry, mein Comment kam irgendwie nicht durch… Da sollte eigentlich stehen: Sieht so aus als ob da noch ein anderes Plugin eine Funktion mit dem gleichen Namen deklariert, deaktiviere mal alle potentiellen Konkurrenten und schau was passiert?
So, habe alles was irgendwie stören könnte (Google Analytics und andere Plugins) gelöscht. Habe auch den WP-Onlinecounter gelöscht und neu installiert. In den Ordner
/public_html/wp-content/plugins gestellt jedoch alles blieb beim alten auch die gleiche Fehlermeldung. Die php-Dateien kontrollierte ich noch aber ohne irgendetwas verdächtiges gefunden zu haben…,,,,
Ich habe mir die Fehlermeldung grade nochmal genau angeschaut, was mich etwas verwundert: die Funktion wird in der gleichen Datei in 2 aufeinander folgenden Zeilen deklariert – hast du da irgendwas dran geändert? Downloade sicherheitshalber nochmal das Original von hier, und probier’s damit.
Hi Jan,
hab noch einmal alles gelöscht und wieder im Orginal installiert. Doch kein Erfolg, hat sich nichts verändert….
Wenn’s immer noch der gleiche Fehler ist kann ich dir leider auch nicht helfen, im Code ist die Deklaration der Funktion ja definitiv nur in einer der beiden Zeilen?! Sorry…
Danke trotzdem
Gruß
Hi, after 2 weeks of trying to get this plugin to work on new installs of WordPress, the problem is in the SQL. The table names are wrong. If you can get the widget to show but not work, and you cant update settings like TOTAL HITS… check your database. it should have a table called wrd_onlinecounter if it doesnt insert this sql
CREATE TABLE IF NOT EXISTS `wrd_onlinecounter` (
`timestamp` int(15) NOT NULL DEFAULT ‘0’,
`ip` varchar(15) NOT NULL DEFAULT ”,
`count` int(15) NOT NULL DEFAULT ‘0’,
`maxon` int(6) NOT NULL DEFAULT ‘0’,
`maxontime` int(15) NOT NULL DEFAULT ‘0’,
`uri` text NOT NULL,
PRIMARY KEY (`timestamp`,`ip`)
)