Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[idea] Plugin or Mod: Reset_Hit_Count

Quote Reply
[idea] Plugin or Mod: Reset_Hit_Count
Not a Perl-ist, so don't feel confident about doing this myself, though it is probably very simple ... maybe somebody else could pick it up?

Background
The 'Cool' page is meaningless as a measure of link popularity, or user activity. In practice, it is a list of links that have been in the database a long time, or which begin with the first few letters of the alphabet. A meaningful Hit Count should be based on a sensible time scale set by admin, eg: daily, weekly, monthly.

Idea
1. Create a new column in the link table named OldHits.
2. Then in a plugin or code mod, do something like this ...
Code:
For each link {
$diff = 'Hits' - 'OldHits';
'Hits' = $diff;
'OldHits' = $diff;
}
Result: 'Hits' holds the count since the last reset, so newly built Cool pages reflect recent activity rather than cumulative activity since day zero.

Ideally, the plugin/mod could be run both from the admin control panel and as a monthly or weekly cron job.
Subject Author Views Date
Thread [idea] Plugin or Mod: Reset_Hit_Count YoYoYoYo 3628 Aug 29, 2002, 1:23 AM
Post Re: [YoYoYoYo] [idea] Plugin or Mod: Reset_Hit_Count
Andy 3605 Aug 29, 2002, 1:26 AM
Thread Re: [YoYoYoYo] [idea] Plugin or Mod: Reset_Hit_Count
Teambldr 3573 Aug 29, 2002, 7:07 AM
Thread Re: [Teambldr] [idea] Plugin or Mod: Reset_Hit_Count
YoYoYoYo 3555 Aug 30, 2002, 1:45 AM
Thread Re: [YoYoYoYo] [idea] Plugin or Mod: Reset_Hit_Count
Paul 3534 Aug 30, 2002, 2:20 AM
Post Re: [Paul] [idea] Plugin or Mod: Reset_Hit_Count
YoYoYoYo 3543 Aug 30, 2002, 4:07 AM
Post Meaningful Hits Mod
YoYoYoYo 3506 Aug 30, 2002, 8:19 AM