|
SimplePageCounterNote: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
For the equivalent recipe for PmWiki 2, see Cookbook.SimplePageCounter GoalKeep track of page visits. SolutionThis is a very simple page counter. For every page visited, it will increment a counter, sets a global variable DiscussionAs usual, add
If you want to use it in a template file, simply use the The counter will updated only when action=browse (or empty). So only visitors will increment the counters. If you want to get an overview about the activity on your site, run the program See AlsoIt's used in my my homepage. Comments & BugsI'd love have a counter for my Wiki :-) Currently, I get the following error message though:
Any ideas? --Henning Check line 7 in the script - there you define the counter filename:
Looks as if you're using
to
This will replace all slashes in --Ben The fix worked great, thanks a lot! :-) --Henning 7 July 2004: modified counter.php with the 'Henning' fix and added clickable page links to showcount.php Hey, I like this counter:) But after installing it, i found out people can use reload to change the counter, which is not the way i like. So i add a cookie support. Hope u enjoy it:-) And the modified file is here --Keith Hi Keith, Great idea, thanks! Is it based on the version with the 'Henning' fix? Then I'd like to install it, though I'm not sure now how it's done. Does it require the basic script to remain installed? --Henning Hi all, You might want to use pphlogger for more sophisticated stats. It's main feature is that is allows to easily see which page trail a user followed. It requires php ( which shouldn't be a problem for PmWiki users ;-) and MySQL. --Paul Hello, shouldn't it say include_once instead of install_once? --Steffen Duh! Of course! Thanks for spotting it. Corrected. --Ben pmwiki-2.2.38 -- Last modified by {{Henning}}
|