MyBB Community Forums

Full Version: Posbit error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In a plugin, I try and edit the postbit so that if the username of the poster is x then it is changed to the value of i, which is 1....

function hello_world_postbit($post)

{
$i=1;




if ($post['usertitle'] = "DeathCap"){
$post['message'] = "<strong>{$i}</strong><br /><br />{$post['message']}";
}

The above code goes well

But then when I try it with another username:
if ($post['usertitle'] = "gfdgfdgdfgdf"){
$post['message'] = "<strong>{$i}</strong><br /><br />{$post['message']}";
}

It still prints i, even when the user title of the poster isn't gfdgfdgdfgdf
Please do not create duplicate threads - http://community.mybboard.net/thread-60348.html