| Highest-rating block |
| Author | Text |
suge Senior Member

Posts: 178

Gender:  Online: No
Country: UK Languages: English and bad English Version: 4.0.1 |
Date: 05/08/2008 23:23 Highest-rating block | #post10913 | I really want (and need) a block that displays the top-rated downloads on your site. It maybe could display the name of the file and the average rating by the side. I think it would be a popular mod.
What does everyone think? |
|
 |
| |
Zion Junior Member

Posts: 27

Gender:  Online: No |
Date: 06/08/2008 12:32 Re: Highest-rating block | #post10936 | Hi,
I don't have a lot of experience with PHP and SQL (just 3 days), but i wrote a code that you can use.
I tested it myself and it works fine.
Please read the Readme.txt file for more information. Zion. |
|
 |
| |
suge Senior Member

Posts: 178

Gender:  Online: No
Country: UK Languages: English and bad English Version: 4.0.1 |
Date: 06/08/2008 17:41 Re: Highest-rating block | #post10947 | Thanks mate, it works great.
Is there a way to add more so to get a top 5 or 10? |
|
 |
| |
JPappi Senior Member

Posts: 295

Gender:  Online: No |
Date: 06/08/2008 21:01 Re: Highest-rating block | #post10949 | | code | $downloadrate = $dblink->get_row("SELECT *,(SELECT (SUM(vote)/COUNT(id)) AS urate FROM memht_ratings WHERE whr=4 AND wid='".$downloadfile['id']."') AS filerate FROM memht_download WHERE id='".$downloadfile['id']."' DESC LIMIT 10");
|
That should work Edited: 06/08/2008 21:02 JPappi - have fun with memHT
Project at work: Find-4u.de
|
|
 |
| |
Zion Junior Member

Posts: 27

Gender:  Online: No |
Date: 07/08/2008 04:13 Re: Highest-rating block | #post10963 | Hi again.
It won't work that way JPappi.
I made a new version for that block for you, that allows you to choose how many top rated downloads you want to show in the block.
Read the readme.txt before using it.
Have fun.
Zion. |
|
 |
| |
paulo89 Moderator Developer

Posts: 1300

Gender:  Online: No
Version: 3.8.1 Country: Portugal Languages: Portuguese, Portuguese and little english ^^ |
Date: 07/08/2008 12:13 Re: Highest-rating block | #post10973 | lol nice job but a little confuse.
Why u don´t use variable "number of downloads to show"?
Ex:
|
|
 |
| |
Zion Junior Member

Posts: 27

Gender:  Online: No |
Date: 07/08/2008 12:25 Re: Highest-rating block | #post10978 |  I'm studying Program Development on college... and as my teacher said.. better define instead of catching memory space.
But you can do it either ways. Zion. |
|
 |
| |
paulo89 Moderator Developer

Posts: 1300

Gender:  Online: No
Version: 3.8.1 Country: Portugal Languages: Portuguese, Portuguese and little english ^^ |
Date: 07/08/2008 12:42 Re: Highest-rating block | #post10981 | loool
eheheh anyway good job. |
|
 |
| |
suge Senior Member

Posts: 178

Gender:  Online: No
Country: UK Languages: English and bad English Version: 4.0.1 |
Date: 07/08/2008 15:23 Re: Highest-rating block | #post11005 | Thanks for all the work Zion, it helps me a lot.  |
|
 |
| |
suge Senior Member

Posts: 178

Gender:  Online: No
Country: UK Languages: English and bad English Version: 4.0.1 |
Date: 16/08/2008 04:25 Re: Highest-rating block | #post11172 | Zion or anyone who knows, how would you show the average rating of a file on the main download page, so a user could see what a file was rated before clicking on it?
Is that easy or hard to implement? |
|
 |
| |