2009-11-28, 02:21 PM
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
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