Look for example
We have a member with Karma : 0
Now want I would like to do!
Karma : 1
and with the same way
Karma : -1
What karma mode are you using?
are you using some other mod for karma?
No , the standard official Karma from 2.0.1
If it's necessary I can install one mod for this ... ( no problem )
assuming you're using total karma:
Your theme/Display.template.php find:
// Is karma display enabled? Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
<li class="karma">', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '</li>';
replace with:
// Is karma display enabled? Total or +/-?
if ($modSettings['karmaMode'] == '1')
{
$total_karma = $message['member']['karma']['good'] - $message['member']['karma']['bad'];
if ($total_karma == 0)
$total_karma = '<span style="color: black;">'.$total_karma.'</span>';
elseif ($total_karma <= -1)
$total_karma = '<span style="color: red;">'.$total_karma.'</span>';
elseif ($total_karma >= 1)
$total_karma = '<span style="color: green;>"'.$total_karma.'</span>';
echo '
<li class="karma">', $modSettings['karmaLabel'], ' ', $total_karma, '</li>';
}
that should do it.
I am going to test it mate. Thanks for your try , I will edit my post for the results 8)
It isnt working , it's like blank, it doesnt show the number
hahahahaha you have a mistake lol at the + and i test it with your mistake look
<span style="color: green;>"'.$total_karma.'</span>';
Anyway thanks bro it's working
Resolved