MyBB Community Forums

Full Version: How to add negative reputations in a settings
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to make this hack and when I use negative reputations hard coded like this it works fine

if ($post['reputation'] <= -80)

but how can I put it in a setting where I can add the negative reputation?

I try this but it did not work

if ($post['reputation'] <= -$mybb->settings['negative_settings'])

How can I add it so it will work?

can someone please help me?
$neg = -1 * (int)$mybb->settings['negative_settings'];

if ($post['reputation'] <= $neg)
{
// Do what you want
}
thank you very much sir. can you please tell me how can I do that with the opposite for positive reputations? I tried this but it did not work

$pos = +1 * (int)$mybb->settings['positive_settings'];

if ($post['reputation'] <= $pos)
{
// Do what you want
}
Operator is the issue for positive?

$pos = (int)$mybb->settings['positive_settings'];

if ($post['reputation'] >= $pos)
{
// Do what you want
}
Thanks you very much for your help. i learnt new things