MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
Moderators: Moderators
Page 1/2 1 2 >
Forum RSS feedReply
Highest-rating block
AuthorText
suge
Senior Member
Avatar

Posts: 178
Contributes: 146

Gender: _MALE_
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?
Delete Edit Quote
 
Zion
Junior Member
Avatar

Posts: 27
Contributes: 29

Gender: _MALE_
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.
Delete Edit Quote
 
suge
Senior Member
Avatar

Posts: 178
Contributes: 146

Gender: _MALE_
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. Smile

Is there a way to add more so to get a top 5 or 10?
Delete Edit Quote
 
JPappi
Senior Member
Avatar

Posts: 295
Contributes: 72

Gender: _MALE_
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

Image
Delete Edit Quote
 
Zion
Junior Member
Avatar

Posts: 27
Contributes: 29

Gender: _MALE_
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.
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1300
Contributes: 537

Gender: _MALE_
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:
code

$NUMDL = 5;
 
Delete Edit Quote
 
Zion
Junior Member
Avatar

Posts: 27
Contributes: 29

Gender: _MALE_
Online: No
Date: 07/08/2008 12:25
Re: Highest-rating block
#post10978
Smile 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.
Delete Edit Quote
 
paulo89
Moderator
Developer

Avatar

Posts: 1300
Contributes: 537

Gender: _MALE_
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.
Delete Edit Quote
 
suge
Senior Member
Avatar

Posts: 178
Contributes: 146

Gender: _MALE_
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. Smile
Delete Edit Quote
 
suge
Senior Member
Avatar

Posts: 178
Contributes: 146

Gender: _MALE_
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?
Delete Edit Quote
 
Reply
Page 1/2 1 2 >
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.103.63.59

Username
Password
New files
MemHT Wiki
Friends
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo