Sha256: 10def46cd81b251262cf202cbee8efd2baebfc0fae3ba446bcd4cd97a7094f0e

Contents?: true

Size: 863 Bytes

Versions: 4

Compression:

Stored size: 863 Bytes

Contents

h1. Automatic Counters

There are three automatic counter classes:
# ViewCountHelper - Counts what is looked on the page 'Popular Pages'
# ViewerCountHelper - Counts who looks on the page 'Prolific Viewers'
# AuthorCountHelper - Counts who edits on the page 'Principal Authors'

By default the results tables are updated once an hour, and show the top 20.

The simplest way to use them is to put the following in your start.rb file:
<pre>
<code>
require 'counter-helpers'
ViewCountHelper.new( wiki ) # Counts which are the most popular pages
ViewerCountHelper.new( wiki ) # Counts who visits the wiki most
AuthorCountHelper.new(wiki)
</code>
</pre>

They can take extra arguments to adjust their settings: @new( page_name = 'Principal Authors', update_page_every = :hour,  show_top = 20,  cache_name = 'authorcount' )@

Tag: Include this page in the distribution

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
gf-Soks-1.0.4 templates/default/content/Automatic%20counters.textile
Soks-1.0.2 templates/default/content/Automatic%20counters.textile
Soks-1.0.3 templates/default/content/Automatic%20counters.textile
Soks-1.0.1 templates/default/content/Automatic%20counters.textile