Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 01-02-2006, 12:39 PM Rating System
IslandNE's Avatar
Average Talker

Posts: 29
Location: Los Angeles,CA
Trades: 0
I want to set up a rating system, but I can't find any decent scripts for free. I looked all over including Google, HotScripts, and Php Resources.

Does anyone know where I can get a decent rating script? I want my users to be able to rate files. One that includes the ability to sort rated files from highest rating to lowest would be good. Sort of like how HotScripts does it. You can sort the page by ratings and hits, ect.

Thanks for your help!
IslandNE is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-03-2006, 08:36 AM
Skilled Talker

Posts: 70
Trades: 0
You could probably set one up yourself using MySQL to store file information. Just have a field in the table called "Rating" and get your users to rate the file on the webpage, and it updates the database and then redirects the user to another page, displaying the file information (if that makes sense).
cerebro89 is offline
Reply With Quote
View Public Profile
 
Old 01-03-2006, 10:10 AM
ibbo's Avatar
Super Spam Talker

Posts: 880
Location: Leeds UK
Trades: 0
Its not that hard to do at all.

If you can store your users ratings then something like below should get you going for a visual rating of your file.

Code:
<?php

// display results for this entity.
// you will have to sort your own sql out for it.
/*
$sql = "select * from scores where file_id={$entity_id}";
$result = Execute($sql);

$row=$result->Fetch_data();

$score1 = $row['score1'];
$score2 = $row['score2'];
$score3 = $row['score3'];
$score4 = $row['score4'];
$score5 = $row['score5'];
*/

$score1 = 10;
$score2 = 90;
$score3 = 4;
$score4 = 22;
$score5 = 76;


?>


<table border="0" width="30%">
<tr><th></th><th>Rating system</th></tr>
<tr><td>Spot on</td><td><div style="background:red;height:10px;width:<?php echo $score1; ?>%"></div></td></tr>
<tr><td>Not bad</td><td><div style="background:green;height:10px;width:<?php echo $score2; ?>%"></div></td></tr>
<tr><td>OK</td><td><div style="background:blue;height:10px;width:<?php echo $score3; ?>%"></div></td></tr>
<tr><td>Poor</td><td><div style="background:orange;height:10px;width:<?php echo $score4; ?>%"></div></td></tr>
<tr><td>Very poor</td><td><div style="background:yellow;height:10px;width:<?php echo $score5; ?>%"></div></td></tr>

</table>
What more can I add, you dont need any images but just a llittle imagination to tailor it and you will be away.

I use this system on site polls but it can easily be adapted to be used for any kind of rating system.

Ibbo
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Linux user #349545 :
(GNU/Linux)iD8DBQBAzWjX+MZAIjBWXGURAmflAKCntuBbuKCWenpm XoA7LNydllVQOwCf

Last edited by ibbo; 01-03-2006 at 10:14 AM..
ibbo is offline
Reply With Quote
View Public Profile Visit ibbo's homepage!
 
Old 01-03-2006, 01:07 PM
Ultra Talker

Posts: 264
Location: UK
Trades: 3
I use a star system, if you would prefer that? You need to store, the rating they give (ie 4 out of 10, so store 4) also the number of times people have rated it.

Then you can divide the score by the number of ratings to give you an average vote.

Have a look at my site http://www.uktvindex.net - goto a programme and click links on the left hand side. Or see the highest rated sites - http://www.uktvindex.net/progs/highestrated.php

Also I store ips, so people cant vote on the same link more than once.

Give me a shout if you need more help.
uktvindex is offline
Reply With Quote
View Public Profile
 
Old 01-03-2006, 02:37 PM
IslandNE's Avatar
Average Talker

Posts: 29
Location: Los Angeles,CA
Trades: 0
Quote:
Originally Posted by uktvindex
I use a star system, if you would prefer that? You need to store, the rating they give (ie 4 out of 10, so store 4) also the number of times people have rated it.

Then you can divide the score by the number of ratings to give you an average vote.

Have a look at my site http://www.uktvindex.net - goto a programme and click links on the left hand side. Or see the highest rated sites - http://www.uktvindex.net/progs/highestrated.php

Also I store ips, so people cant vote on the same link more than once.

Give me a shout if you need more help.

cool man. thats perfect, does what I want it to do. I'm not really knowledgeable about PHP, but I can set up scripts. By any chance can you send me your script?

Or I got this one script set up pretty well: http://www.phpsoft.org/download.php?...ars_rating.zip
You can rate files, however there is no "highest rated" area. how would it be done using that script?

Thanks a lot for your help guys, I appriciate it alot!
IslandNE is offline
Reply With Quote
View Public Profile
 
Old 01-06-2006, 06:06 AM
Ultra Talker

Posts: 264
Location: UK
Trades: 3
How are the ratings of the mirrors stored? on a mysql database?

Could you give me the rows you are using and I'll try to put together a code for you.
uktvindex is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Rating System
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.67062 seconds with 12 queries