Modify

Opened 7 years ago

Closed 7 weeks 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)

changeset_1698.diff (10.7 KB) - added by rlrj60 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 in reply to:  description Changed 7 years ago by Ryan J Ollos

Replying to rlrj60:

Is it possible to integrate VisitCounterMacro with this plugin? This way we don't need to modify the page.

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.

comment:2 Changed 7 years ago by 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.

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 7 years ago by rlrj60

Attachment: changeset_1698.diff added

comment:3 in reply to:  2 Changed 5 years ago by Steffen Hoffmann

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 weeks ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Closing as out-of-scope for this plugin. If there are more requests for the feature we can revisit.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.