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

Re: [Matthias70] [NEW PLUGTIN] RateStats v1

Quote Reply
Re: [Matthias70] [NEW PLUGTIN] RateStats v1 In reply to
Matthias70 wrote:
Hi Andy,
it's a nice plugin.
I think there is no way to include the old ratings?

Afraid not.

This is from /Links/Users/Rate.pm:

Code:
$clicktrack->insert({ LinkID => $id, IP => $ENV{REMOTE_ADDR}, ClickType => 'Rate', Created => \'NOW()' });

$rec->{Rating} = ($rec->{Rating} * $rec->{Votes} + $rating) / ++$rec->{Votes};
$links->update({ Rating => $rec->{Rating}, Votes => $rec->{Votes} }, { ID => $rec->{ID} });

All that does - is put an entry into the ClickTrack table - but this doesn't actually store the rating, so *impossible* to get previous ratings I'm afraid Frown

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Subject Author Views Date
Thread [NEW PLUGTIN] RateStats v1 Andy 3727 Mar 4, 2008, 5:06 AM
Thread Re: [Andy] [NEW PLUGTIN] RateStats v1
Matthias70 3539 Mar 4, 2008, 8:19 AM
Post Re: [Matthias70] [NEW PLUGTIN] RateStats v1
Andy 3541 Mar 5, 2008, 12:14 AM
Post Re: [Andy] [NEW PLUGTIN] RateStats v1
Jonze 3551 Mar 4, 2008, 9:23 AM