Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Ratings question

Quote Reply
Ratings question
I used the tags <%Rating%> and <%Votes%> in the rate_success template to show users the current results after they vote. However the rating value is not shown with standard two decimals as in the link template but as the real number after the calculation (with all the decimals or just plain integer). Has anyone more information on this to keep the standard two decimals appearance?

Quote Reply
Re: Ratings question In reply to
The database should store only 2 decimals, but if you are printing out the raw calculation, before it's inserted into the database, you might come up with more.

If you are talking about any numbers to the right of the decimal point, that would lead to grossly in accurate ratings, more so than what the program currently does.

I'm about ready to release an upgraded ratings mod, sort of a part of the review system, that will allow only one vote per link per member, and the ability to change it (similar to amazon if you need an example). It will also track all user votes, and provide a much more accurate rating (as well as a distribution), for each link and each user.

Unfortunately, it works in "real time" or during a build, and won't work both ways, so it won't do intermediate builds at least at this time.

I had initially thought to allow both logged-in ratings and unlogged in ratings, but realized the current ratings system is really only good for "Previous ratings were xx Votes xx.xx score" type system, since it's not well caculated. This will replace the current rating system, either keeping your old rating/votes for historical purposes, or dumping them. There is no way to include them in any of the distribution graphs, so there is no point trying. Best to just start over (or fresh if a new install).

I think I have the code finished, but I'm trying to get the templates and value passing working in a releasable form.

Also, it will allow ratings on a scale of 1-5, or 1-10, as about the only other installation option.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: Ratings question In reply to
Hi Pugdog,
A rating system with incorporated reviews (ala amazon.com) would be very nice. Actually I thought a review system was going to be released as a plugin from GT shorthly after the first release of LinksSQL2.0

In Reply To:
The database should store only 2 decimals, but if you are printing out the raw calculation, before it's inserted into the database, you might come up with more.
How can I tell this? It seems that when adding <%Votes%> and <%Rating%> tags in the rate_success template I get the results (rating in raw number, example:7,45678372) including last users vote, but I suppose they are read from the database. The same tags in link.html template (in dynamic mode) would show in the proper two decimals format. I cannot understand the difference.


Quote Reply
Re: Ratings question In reply to
edit your rate.cgi

at the very bottom, above the

return $rec;

line, add

$rec=$db->get($id);

See if that fixes it.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: Ratings question In reply to
It worked!
Thanks a lot

Quote Reply
Re: [pugdog] Ratings question In reply to
Your suggestion worked very well for me with version 2.0.3, but in v.2.0.5 rate.cgi is not the same.
Any ideas how I can implement the same in this version?

Thanks in advance for any suggestions
Quote Reply
Re: [Taki] Ratings question In reply to
Hi,

You should be able to do the same changes in admin/Links/User/Rate.pm.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Ratings question In reply to
Thanks Alex, it worked.
Quote Reply
Re: [Alex] Ratings question In reply to
Version 2.1.2 and this "problem" is still here.

Is there a way to fix this with a global, without modifying the code?

Thanks!