MyBB Community Forums

Full Version: Total of members\' ratings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I used the following query to fetch and show top-rated member-list on my portal page. But result is that a list does appear with top-rated members sorted according to ratings, but rating is not a total, rather it appears like this: 2|4|1|5| . This is exactly as it appears in users table in mysql database. I would like to show the total ratings instead of all the instances of ratings of a member. Your hlep MM Smile

$query = $db->query("SELECT username, rating FROM users WHERE 1=1 $fidnot ORDER BY rating ASC LIMIT 0, $settings[statslimit]");
while($thread = $db->fetch_array($query)) {
	$viewreply = "rating";
	$thread['subject']  = htmlspecialchars(stripslashes($thread['subject']));
	eval("\\$topmems .= \\"".$templates->get("stats_thread")."\\";");
}
Sorry for not replying to this sooner.

I'm not entirely sure what you are trying to do here. If you could explain in a little more detail then I'll see what I can do to help. Smile
musicalmidget Wrote:Sorry for not replying to this sooner.

Never mind MM, I know you had been busy of late Smile

Actually I want to show on my portal page a list of top ten members. The list is compiled as per the ratings every member gets from others. You know as in memberlist page we can sort members according to ratings. In fact you helped me to have memberlist according to ratings by default.

Now on the portal page, I want something like this:

Code:
[u][b]TOP Rated Members[/b][/u]
musicalmidget � 52
chiefsaab  � 1 :(

The username in this list is clikable leading to member profile and numbers are total ratings the user has recevied from other users. I hope it's a little more clear. Please let me know if you want me to elaborate it further.
I understand what you mean now. Should be possible, so I'll see what I can do.
also though, you have to make sure it checks that reputation is on. You dont want an empty table if you have have it turned off as I do
This isn't anything todo with the reputation system, rather it's todo with the user ratings system.
Ok, I'm getting on with this one now. :p

Whereabouts would you prefer the new box to appear on the portal page? Perhaps below the "Forum Statistics" box or above the "Latest Threads" box?

Also would you like to have the option to turn this box on and off from the admin control panel or would you like it always enabled in the code?
option to turn on and off please.
Below the "Forum Statistics" box.
I don't mean to sound rude, but I was actually asking chiefsaab, as this is actually his request. Wink

I suppose I should have said that in my previous post.
oh, o. Still, it would be good ask other for thier opioins. One persons opinion might not be appreciated by other. See what I mean??

Also, I like the fact you can turn things on and off in the admin cp. I wish all mods/tutorials had this feature.
Pages: 1 2