L
L
Lev Lybin2011-06-14 14:57:31
phpBB
Lev Lybin, 2011-06-14 14:57:31

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?
image
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Ano, 2011-06-14
@lybin

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;
}

S
Saiputdin Omarov, 2011-06-14
@generalx

Probably when there is no voice :-)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question