Opened 14 years ago
Closed 7 years ago
#8434 closed enhancement (wontfix)
Support Hit and Visit Counters
Reported by: | rlrj60 | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | FiveStarVotePlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Just got some requests from several coworkers for Page Hit and Visit counters. So when hovering over the stars, a pop-up will display current vote and page hit/visit counts:
Current vote: 4 users voted for a total of 17. Page hit count: 12345, Visit count: 112.
Is it possible to integrate VisitCounterMacro with this plugin? This way we don't need to modify the page.
Attachments (1)
Change History (5)
comment:1 Changed 14 years ago by
comment:2 follow-up: 3 Changed 14 years ago by
It's cold, raining and boring outside today so I play around with the plugin. Turned out it has almost everything there already. I just need to add one more "hit" counter to the table and we have the feature. Though, it requires a database upgrade which will DESTROY current vote information and start every counter at 0.
Basically, on every visit I increment the "hit" counter. This means sum of votes must qualify with "vote != 0" since non-voting user always has the default value of 0. Attached here is the patch. Please review and possible accept it as an enhancement.
Changed 14 years ago by
Attachment: | changeset_1698.diff added |
---|
comment:3 Changed 12 years ago by
Replying to rlrj60:
It's cold, raining and boring outside today so I play around with the plugin. Turned out it has almost everything there already. I just need to add one more "hit" counter to the table and we have the feature. Though, it requires a database upgrade which will DESTROY current vote information and start every counter at 0.
There are known-good ways to preserve information by using little more elaborated SQL foo, i.e. see [13079]. Still we'll review your patch for other valuable enhancements. Thanks for taking your time to contribute.
Basically, on every visit I increment the "hit" counter. This means sum of votes must qualify with "vote != 0" since non-voting user always has the default value of 0. Attached here is the patch. Please review and possible accept it as an enhancement.
Changing VisitCounterMacro into a plugin is what we should do, sure. I'm not sure, if/how it fits into current code if VotePlugin, that probably is a preview to the future of this plugin too.
comment:4 Changed 7 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Closing as out-of-scope for this plugin. If there are more requests for the feature we can revisit.
Replying to rlrj60:
It seems like a reasonable enhancement. We'd have to look at the license and should talk to the macro author, but if there are no hold-ups there, then the code could either be directly integrated, or we could extend the VisitCounterMacro to a plugin an API (assuming this hasn't already been done).
See also #7615.