MyBB Community Forums

Full Version: how to remove the edit, delete buttons/links from plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi all,

i have made a plugin and i want, if plugin is activated, on each post, remove the edit, delete buttons/links.

i think it is in post bit. but i dont know how to do it in plugin?

which method / function will replace which code block to empty or '' or simply remove the div, links etc?
Use the postbit hooks. It passes along the $post var, which has all of those buttons.

If you go an take a peek at the postbit template, you can see what you're going to want to do is:
function called_on_postbit_hook($post)
{
$post['button_quickdelete'] = '';
$post['button_edit'] = '';
return $post;
}
you mean this : and this works for my plugin , thanks


$plugins->add_hook("postbit", "called_on_postbit_hook");
function called_on_postbit_hook($post)
{
$post['button_quickdelete'] = '';
$post['button_edit'] = '';
return $post;
}



thanks a lot, i was struggling since last 3 days for it. can you refer me any tutorial or know how links , documentation where postbit type methos are written clearly, what arguments are passing there ect.

agian thanks