SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 24, 2012, 06:11:59 pm

Login with username, password and session length
Members
Total Members: 10071
Latest: cdavidson012
Stats
Total Posts: 28687
Total Topics: 4977
Online Today: 94
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 2
Guests: 51
Total: 53
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
| | | | |-+ 
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: [3.0a] Top rated  (Read 1952 times)
Vincent Volmer
Community Suite Customer
Sr. Member
******
Offline Offline

Posts: 464


SMF 2.0.1


View Profile WWW
« on: April 06, 2010, 08:50:54 am »

Hello SMFHacks,

In the Gallery3.0a the statistics of the Most rated are not correct displayed. Don't know if this was in a previous version too?

Please see attachment.

Vincent
« Last Edit: May 27, 2010, 03:53:26 pm by Vincent Volmer » Logged

SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #1 on: April 07, 2010, 07:02:03 pm »

What rating do those images have? When you view them?
It is now
(rating / totalratings ) AS ratingaverage
Logged
Vincent Volmer
Community Suite Customer
Sr. Member
******
Offline Offline

Posts: 464


SMF 2.0.1


View Profile WWW
« Reply #2 on: April 08, 2010, 03:03:45 am »

What rating do those images have? When you view them?
It is now
(rating / totalratings ) AS ratingaverage

All the images displayed have a rating of 5 stars by one member. So that's correct. But we have 'the most rated' image rated with 139 stars by 29 members and that one should be the number 1 in the top10.

Vincent
« Last Edit: May 27, 2010, 03:53:45 pm by Vincent Volmer » Logged

SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #3 on: April 08, 2010, 10:02:30 am »

Are you using points settings instead of stars in the gallery?
Logged
Vincent Volmer
Community Suite Customer
Sr. Member
******
Offline Offline

Posts: 464


SMF 2.0.1


View Profile WWW
« Reply #4 on: April 08, 2010, 10:21:43 am »

Are you using points settings instead of stars in the gallery?

No, only stars...
« Last Edit: May 27, 2010, 03:54:00 pm by Vincent Volmer » Logged

Vincent Volmer
Community Suite Customer
Sr. Member
******
Offline Offline

Posts: 464


SMF 2.0.1


View Profile WWW
« Reply #5 on: May 20, 2010, 03:08:50 am »

Hello SMFHacks,

Hereby some more information.

See our top10 of the most rated from the gallery (also attachment):
Top 10
129 'stars' by 29 members
126 'stars' by 27 members
110 'stars' by 24 members
106 'stars' by 23 members
107 'stars' by 22 members
085 'stars' by 21 members
097 'stars' by 20 members
094 'stars' by 20 members
083 'stars' by 19 members
091 'stars' by 19 members
085 'stars' by 18 members
097 'stars' by 17 members

2 issues
(1) Most rated should be determined (imo) by the amount of 'stars' instead of members who voted.
(2) Top10 in gallery stats should be the same...... (please see first opst of this topic)

Thanks,

Vincent
Logged

SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 9678


View Profile
« Reply #6 on: May 20, 2010, 10:25:40 am »

I get what you are saying I don't think I am going to change how it works. Since this seems better.

Probably will rename Most Rated to Top Rated instead.
Logged
Vincent Volmer
Community Suite Customer
Sr. Member
******
Offline Offline

Posts: 464


SMF 2.0.1


View Profile WWW
« Reply #7 on: May 27, 2010, 03:53:06 pm »

I edited the code in Gallery2.php to let it function like the way I mean it.....

This is how it is now (last versions of galleryPro):


This is how it should be i.m.o:


So I abused  Wink your code:
in Gallery2.php find:
Code:
// Top Rated
$result = $smcFunc['db_query']('', "
SELECT
id_picture, title,rating, (rating / totalratings ) AS ratingaverage
FROM {db_prefix}gallery_pic
WHERE approved = 1 AND totalratings > 0 ORDER BY ratingaverage DESC LIMIT 10");

replace with (code copied from Gallery 2.5.7.x)
Code:
// Top Rated
$result = $smcFunc['db_query']('', "
SELECT
id_picture, title,rating
FROM {db_prefix}gallery_pic
WHERE approved = 1 AND totalratings > 0 ORDER BY rating DESC LIMIT 10");
Logged

Vincent Volmer
Community Suite Customer
Sr. Member
******
Offline Offline

Posts: 464


SMF 2.0.1


View Profile WWW
« Reply #8 on: December 20, 2010, 04:07:45 pm »

Hello,

Please reconsider this...

I get what you are saying I don't think I am going to change how it works. Since this seems better.


I'm still using the old code and that looks better IMO.

Vincent

Logged

Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 08:02:50 am]

[Today at 04:11:41 am]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.236 seconds with 19 queries.