Hit Count Plugin

By Matt Whitehall

The Hit Count plugin is a simple plugin which generates hit count statistics for any page in which the plugin is inserted. The plugin updates a page called 'HitCountStatistics' which can be viewed to see hit statistics for all pages on which the plugin is inserted. The plugin also optionally returns the hit count for the page. If 'styleClass' is specified, the count will be returned within a <span> tag with the specified style applied. An alternative to this plugin is the database-based Hit Counter Plugin.

Installation

Copy hitcount.jar into your wiki's WEB-INF/lib, or include HitCounter.java in your jspwiki project's source.

Usage

[{org.goodjava.plugin.hitcounter.HitCounter}]
[{org.goodjava.plugin.hitcounter.HitCounter updateOnly='true'}]
[{org.goodjava.plugin.hitcounter.HitCounter styleClass='myStyle'}]

Parameters

updateOnly
  • (optional) when set to true/yes/on (case-insensitive), will cause the plugin to only update the count for the page in 'HitCountStatistics', and will not return any HTML to display
styleClass
  • (optional) applies a css style to the <span> element surrounding the returned count

PLEASE NOTE

  • The 'HitCountStatistics' page can also be edited like any other wiki page, but doing so manually may cause problems with the hitcount, so don't do it unless you absolutely know what you are doing.
  • The hitcount is incremented once for each instance of the plugin-insertion on a given page. For example, if you insert the plugin twice on the same page, the hitcount for that page will be incremented twice each time that page is accessed.

Problem

I putted these declarations in the 'HitCountStatistics' page:
[{org.goodjava.plugin.hitcounter.HitCounter}]
[{org.goodjava.plugin.hitcounter.HitCounter updateOnly='true'}]
Now I want to remove the declaration about updateOnly in that page but I don't see way how to do that. Any help? Regards--vlatko


its there the possibility to show the "HitCounter" on the bottom of every page in the Wiki?

Thanks for AnswerMe!

--MartinU, 02-Apr-2007


I have installed the plugin but follow Error Message will come, when I go on the Plugin Site:

<< Plugin insertion failed: Error writing counts to file >>

>> Use this ugly hack: add a directory called null to the root of your (tomcat?) installation. The code needs adaption for the recent code base. --Al

--ErichE, 08. Aug. 2008

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
jar
hitcount-src.jar 2.6 kB 2 16-Jul-2005 18:24 12.223.148.22
jar
hitcount.jar 3.2 kB 2 16-Jul-2005 18:24 12.223.148.22
« This page (revision-17) was last changed on 20-Feb-2008 11:37 by 195.140.184.10 [RSS]