MyBB Community Forums

Full Version: Display positive/negative reps of a given member in custom page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So I have a custom page where I need to add two small boxes containing the number of positive and negative ratings that have been given to selected users.
How can I get access to the number of total positive and negative reps?
Still need help with this Sad
(05-06-2016, 03:54 PM)Donald_Duck Wrote: [ -> ]Note sure, You need such plugin! http://community.mybb.com/mods.php?action=view&pid=184

I don't need a list of users, but just the reputation of specific ones
(05-06-2016, 03:56 PM)ShadowOne Wrote: [ -> ]
(05-06-2016, 03:54 PM)Donald_Duck Wrote: [ -> ]Note sure, You need such plugin! http://community.mybb.com/mods.php?action=view&pid=184

I don't need a list of users, but just the reputation of specific ones

You're looking for a custom plugin.
(05-08-2016, 12:48 AM)Nasro Wrote: [ -> ]
(05-06-2016, 03:56 PM)ShadowOne Wrote: [ -> ]
(05-06-2016, 03:54 PM)Donald_Duck Wrote: [ -> ]Note sure, You need such plugin! http://community.mybb.com/mods.php?action=view&pid=184

I don't need a list of users, but just the reputation of specific ones

You're looking for a custom plugin.

Negative, solved with a PHP function.
(05-08-2016, 08:40 AM)ShadowOne Wrote: [ -> ]
(05-08-2016, 12:48 AM)Nasro Wrote: [ -> ]
(05-06-2016, 03:56 PM)ShadowOne Wrote: [ -> ]
(05-06-2016, 03:54 PM)Donald_Duck Wrote: [ -> ]Note sure, You need such plugin! http://community.mybb.com/mods.php?action=view&pid=184

I don't need a list of users, but just the reputation of specific ones

You're looking for a custom plugin.

Negative, solved with a PHP function.

Hmm PHP function?  I think you mean a MySQLi query?
(05-08-2016, 05:21 PM)Dimwu Wrote: [ -> ]
(05-08-2016, 08:40 AM)ShadowOne Wrote: [ -> ]
(05-08-2016, 12:48 AM)Nasro Wrote: [ -> ]
(05-06-2016, 03:56 PM)ShadowOne Wrote: [ -> ]
(05-06-2016, 03:54 PM)Donald_Duck Wrote: [ -> ]Note sure, You need such plugin! http://community.mybb.com/mods.php?action=view&pid=184

I don't need a list of users, but just the reputation of specific ones

You're looking for a custom plugin.

Negative, solved with a PHP function.

Hmm PHP function?  I think you mean a MySQLi query?

Yes, a query selecting the reputation table.
How? thank you
(05-08-2016, 07:34 PM)Eldenroot Wrote: [ -> ]How? thank you

$replist = $db->query("SELECT * FROM `".TABLE_PREFIX."reputation` ORDER BY `dateline` DESC");

Then use the following code and variables to create a table to display the output data:

while($rep = $db->fetch_array($replist)){

 $From = get_user($rep['uid']);
 $To = get_user($rep['adduid']);
 $ToUser = format_name($To['username'], $To['usergroup'], $To['displaygroup']);
 $FromUser = format_name($From['username'], $From['usergroup'], $From['displaygroup']);

I'm not going to spoonfeed, because it's bad - but the outcome should be similar to this:

[Image: eFurAU5.png]
Pages: 1 2