After a long pause in plugin development I have begun to catch up with some coding work. As first step I have decided to remove the chCounter bundle from the Plugin due to installation and permission problems. Version 2.8 is now almost the same as the 2.6 versions except that the checkbox to make the counter invisible is part of the widget control panel and not general options.
Before installing the plugin you have to download chCounter and install it in any directory on your server. Next unzip the plugin files into the Wordpress plugin directory and activate it through the administration webinterface. Go to the settings page and insert the path to the directory where you have installed chCounter previously and add counter parameters to your list. You are now set to add the widget to a sidebar.
In this way chCounter can be installed and upgraded separately. In the end having it bundled with the plugin didn’t give that much advantage, but only several problems with file permissions and bug fixes.
Kolja Schleich Plugins chcounter, statistics, visitor counter
I just recognized a flaw in upgrading to the new chCounter Widget 2.7 from a previous version. The counter url will point to a wrong location, namely where chcounter was installed before. This does not affect the counter display, but navigation in the chcounter administration interface will not be possible. Either you could try to re-install chCounter, but I don’t know if it lets you. Alternatively open up phpMyadmin and select the table chc_config. Change the setting default_counter_url to the new location http://your_domain/path/to/plugins/dir/chcounter-widget/chcounter. The table may be called differently, depending on what prefix is used.
Kolja Schleich Plugins chcounter, statistics, visitor counter
I finally decided to include chCounter directly into the plugin software, because several users had problems installing the counter and the chCounter website is in german unfortunately. Unless any bugs appear this will be the final version of the plugin since it does what it’s supposed to do. To configure chcounter via the webinterface the following two directories need to be writable by the server
chcounter/
chcounter/includes/
If you upgrade from a previous plugin version you simply need to configure the included chCounter to reflect your old database settings.
I think this change makes installations easier and faster.
Kolja Schleich Plugins chcounter, statistics, visitor counter, widget
I have decided to add another feature, which I think is really cool. It is now possible to add dynamically statistics, similar to FormFields in ProjectManager. Available fields are “text” and “roster”, which adds a popup box if there is a Team Roster active. The statistics are automatically displayed in the single match view and also added to ProjectManager FormFields. However the hook into ProjectManager only counts occurences of a value for given user, so this will work for goals, but not if you want to insert points and display the summary of these. This could be achieved by setting up a customized function.
Here’s a short description of the structure. This is only important if you want to programme custom templates or functions for ProjectManager FormFields. The statistics are merge with the $match object whereas the key is the sanitized name of the stat. Suppose you add statistics called Goals, they can be access by
$match->goals
This is an assoziative array which stores the name and fields of this statistic. You can see the contents of the variable by doing
var_dump($match->goals);
Anybody interested can also have a look at view/match.php
Kolja Schleich Plugins leaguemanager, statistics
The 2.5 series of the widget comes with support for all 20 output values chCounter is capable to display. Version 2.5.1 has only some small changes in the settings styling.
You can download the newest version at Wordpress.org.
Kolja Schleich General chcounter, integration, statistics, visitor counter