Answer the question
In order to leave comments, you need to log in
phpbb3 and gray reputation box, what is it?
Hello! Tell me, please, when a user is given a positive vote in the picture, a green square is visible, when a negative vote is red, and in what case does gray appear?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
There is no reputation in phpbb3. Probably worth the User Reputation Points mod? The gray box is when the sum of votes is equal to zero :)
function get_rep_img($points, $username)
{
global $config, $db, $user;
$user->add_lang('mods/reputation_mod');
$user_rank = get_rep_rank($points, $username);
$block_img = '<img src="images/reputation/neutral.gif" title="' . $user_rank . '" />';
if ($points > 0)
{
$block_img = '<img src="images/reputation/pos.gif" title="' . $user_rank . '" />';
}
else if ($points < 0)
{
$block_img = '<img src="images/reputation/neg.gif" title="' . $user_rank . '" />';
}
$repeat = (intval($points / $config['rp_block_per_points']));
if ($repeat > $config['rp_max_blocks'])
{
$repeat = ($config['rp_max_blocks'] - 1);
}
return ($repeat > 0) ? str_repeat($block_img, $repeat) . $block_img : $block_img;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question