| 1 | [[PageOutline(2-5,Contents,pullout)]] |
| 2 | = Display number of page visits = |
| 3 | |
| 4 | == Description == |
| 5 | |
| 6 | Macro displays how many times was wiki page displayed. |
| 7 | |
| 8 | This macro accepts from one to three parameters. First parameter is wiki page |
| 9 | name which visit count you want to display. Other parameters are optional. |
| 10 | Second parameter determines if displaying of macro should update specified page |
| 11 | visit count. Accepted values of this parameter are: True, False, true, false, |
| 12 | 1, 0. Default value is true. Third parameter specifies number of digits for |
| 13 | visit count display. If its value is 0 then visit count is displayed as simple |
| 14 | text. Default value is 4. |
| 15 | |
| 16 | In trac.ini configuration file you can specify time after what cookie used to |
| 17 | store information about visited pages on client expires in seconds (0 means |
| 18 | as long as session lasts): |
| 19 | |
| 20 | {{{ |
| 21 | [visitcounter] |
| 22 | expires = 0 |
| 23 | }}} |
| 24 | |
| 25 | == Bugs/Feature Requests == |
| 26 | |
| 27 | Existing bugs and feature requests for VisitCounterMacro are |
| 28 | [report:9?COMPONENT=VisitCounterMacro here]. |
| 29 | |
| 30 | If you have any issues, create a |
| 31 | [http://trac-hacks.org/newticket?component=VisitCounterMacro&owner=Blackhex new ticket] but read BugReporting page first, please. |
| 32 | |
| 33 | == Download == |
| 34 | |
| 35 | Download the zipped source from [download:visitcountermacro here]. |
| 36 | |
| 37 | == Source == |
| 38 | |
| 39 | You can check out VisitCounterMacro from [http://trac-hacks.org/svn/visitcountermacro here] using Subversion, or [source:visitcountermacro browse the source] with Trac. |
| 40 | |
| 41 | == Installation == |
| 42 | |
| 43 | After installing plugin's egg enable it in environment's trac.ini configuration file or use WebAdminPlugin to do it for you: |
| 44 | |
| 45 | {{{ |
| 46 | [components] |
| 47 | visitcounter.core.* = enabled |
| 48 | visitcounter.init.* = enabled |
| 49 | }}} |
| 50 | |
| 51 | Then updage your environment using: |
| 52 | |
| 53 | {{{ |
| 54 | # trac-admin <path_to_environment> upgrade |
| 55 | }}} |
| 56 | |
| 57 | == Example == |
| 58 | |
| 59 | {{{ |
| 60 | [[VisitCounter(WikiStart)]] |
| 61 | [[VisitCounter(WikiStart, false)]] |
| 62 | [[VisitCounter(WikiStart, True, 3)]] |
| 63 | }}} |
| 64 | |
| 65 | == Screenshot == |
| 66 | |
| 67 | [[Image(visit_counter_screenshot.png)]] |
| 68 | |
| 69 | == Feedback == |
| 70 | |
| 71 | [[Poll(Are you using the VisitCounterMacro?; Yes, it's usefull.; No, it's useless.; No, I don't need it.)]] |
| 72 | |
| 73 | == Change Log == |
| 74 | |
| 75 | [[ChangeLog(/visitcountermacro, 5)]] |
| 76 | |
| 77 | == Author/Contributors == |
| 78 | |
| 79 | '''Author:''' [wiki:Blackhex] [[BR]] |
| 80 | '''Maintainer:''' [wiki:Blackhex] [[BR]] |
| 81 | '''Contributors:''' |