wiki:VisitCounterMacro

Version 2 (modified by Ryan J Ollos, 14 years ago) (diff)

Fixed a typo.

Display number of page visits

Notice: This plugin is unmaintained and available for adoption.

Description

Macro displays how many times was wiki page displayed.

This macro accepts from one to three parameters. First parameter is wiki page name which visit count you want to display. Other parameters are optional. Second parameter determines if displaying of macro should update specified page visit count. Accepted values of this parameter are: True, False, true, false, 1, 0. Default value is true. Third parameter specifies number of digits for visit count display. If its value is 0 then visit count is displayed as simple text. Default value is 4.

In trac.ini configuration file you can specify time after what cookie used to store information about visited pages on client expires in seconds (0 means as long as session lasts):

[visitcounter]
expires = 0

Bugs/Feature Requests

Existing bugs and feature requests for VisitCounterMacro are here.

If you have any issues, create a new ticket but read BugReporting page first, please.

Download

Download the zipped source from [download:visitcountermacro here].

Source

You can check out VisitCounterMacro from here using Subversion, or browse the source with Trac.

Installation

After installing plugin's egg enable it in environment's trac.ini configuration file or use WebAdminPlugin to do it for you:

[components]
visitcounter.core.* = enabled
visitcounter.init.* = enabled

Then updage your environment using:

# trac-admin <path_to_environment> upgrade

Example

[[VisitCounter(WikiStart)]]
[[VisitCounter(WikiStart, false)]]
[[VisitCounter(WikiStart, True, 3)]]

Screenshot

Feedback

Poll(Are you using the VisitCounterMacro?; Yes, it's useful.; No, it's useless.; No, I don't need it.)?

Change Log

12139 by rjollos on 2012-10-10 01:54:13
Fixed incorrect source code encoding (http://www.python.org/dev/peps/pep-0263/).
8503 by rjollos on 2010-08-29 07:31:32
Renamed visitcoutermacro -> visitcountermacro to fix a typo. Refs #7573.
7931 by Blackhex on 2010-05-04 14:13:41

VisitCounterMacro:

  • Created 0.10 and 0.11 branches.
  • Ported to Trac 0.11, it should work also with Trac 0.12.
1219 by Blackhex on 2006-08-31 15:48:58
VisitCouterMacro:

Bug in session expiration date fix.

1087 by Blackhex on 2006-08-06 13:27:12

VisitCouterMacro:

  • Cookie 'expires' value was not setted.
  • Macro now can be used without argumets when current wiki page visit count is displayed.
  • Cookie name has changed from 'visited' to 'visited-pages' to prevent name collistion.
(more)

Author/Contributors

Author: Blackhex
Maintainer: Blackhex
Contributors:

Attachments (1)

Download all attachments as: .zip