MyBB Community Forums

Full Version: Plugin hook in postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I wanna display a icon in postbit with plugin , I have already used this declared :

global $db, $mybb, $post;

and this is the hook:


$plugins->add_hook("postbit", "IconInPostbit");

and this is function :


function IconInPostbit(&$post)
{
    global $db, $mybb, $post;


        $post['profilelink'] = $post['profilelink']."Icon";

    return $post;
}

but when i tried it , it's not working or diplayed any thing .
Remove the globalized $post, you only need to add it as a function argument that is passed by reference.
thanks Omar , its works ♥