Visitcounter for WordPress v2.0++ (english)

Description
Visitcounter is a small WordPress 2++ plugin which counts the visits of your weblog on a daily base. There a several functions which can show different stats: all visits, currently online, daily visits… You can find an example of the different outputs here.

Download
Visitcounter 0.62

Older versions
Visitcounter 0.61
Visitcounter 0.6
Visitcounter 0.5
Visitcounter 0.4
Visitcounter 0.3

Changelog: (download)
Version 0.62:
* fixed activation bug for WordPress 2.5
* added showPeak() function

Version 0.61:
* admin panel with detailed information about the visits
* number of days for showLastDays and showAverage must be set via define in visitcounter.php (default setting is 10)

Version 0.6:
* visitcounter only uses the db now (visitcounter.txt can be deleted)
* counting every day => daily stats possible
* new functions: showToday(), showYesterday(), showLastDates(days), showAverage(days)

Version 0.5:
* fixed a bug which does a wrong count

Version 0.4:
* changed the tableprefix
* added showOnline(); function.

How do I install the plugin?
You can find the install instructions in the visitcounter.php or here:
1. Just copy the “visitcounter.php” to your plugins directory (normally …/wordpress/wp-content/plugins).
2. Activate the Visitcounter on the plugins menu of your siteadmin.
3. Go to your Dashboard and enter the “Visitcounter Stats” menu to create the needed tables
4. Put this code (without the .) where ever you want the counter to be displayed:

– <.?php showVisits(); ?.> shows all visits
- <.?php showOnline(); ?.> shows how many users are currently online
- <.?php showToday(); ?.> shows how many users visited the page today
- <.?php showYesterday(); ?.> shows how many users visited the page yesterday
- <.?php showLastDays(X); ?.> shows the last X days (default 10)
- <.?php showAverage(X); ?.> shows the average visits of the last X days (default 10)
- <.?php showPeak(); ?.> shows the most frequent day
5. That’s all )

Upgrade:
Before you upgrade you should backup your database!

0.5 to 0.6x:
I didn’t try the upgrade function yet. The best would be, if you backup your database and when it doesn’t work, just edit the first entry and add the visits the old version counted.

0.4 to 0.5:
Normally you can upgrade with just overwriting the visitcounter.php. If your visits are lost after the update, take a look at the FAQ!

FAQ
Q: I updated my 0.5 to 0.6 and now my visits are lost!
A: I hope you made an update of your count. You should now update the new table manually with your database management tool. Just edit the first entry and edit the value and add the visits the old version counted.

If you have any problems or questions, you can post here or send me an email to moritz (at) kolix (dot) de.

  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MisterWong
  • StumbleUpon
  • Technorati
  • LinkedIn
  • Twitter