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
(2016-05-08, 12:48 AM)Nasro Wrote: [ -> ] (2016-05-06, 03:56 PM)ShadowOne Wrote: [ -> ] (2016-05-06, 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.
(2016-05-08, 08:40 AM)ShadowOne Wrote: [ -> ] (2016-05-08, 12:48 AM)Nasro Wrote: [ -> ] (2016-05-06, 03:56 PM)ShadowOne Wrote: [ -> ] (2016-05-06, 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?
(2016-05-08, 05:21 PM)Dimwu Wrote: [ -> ] (2016-05-08, 08:40 AM)ShadowOne Wrote: [ -> ] (2016-05-08, 12:48 AM)Nasro Wrote: [ -> ] (2016-05-06, 03:56 PM)ShadowOne Wrote: [ -> ] (2016-05-06, 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.
(2016-05-08, 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: