how to remove the edit, delete buttons/links from plugin - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: Extensions (https://community.mybb.com/forum-201.html) +--- Forum: Plugins (https://community.mybb.com/forum-73.html) +---- Forum: Plugin Development (https://community.mybb.com/forum-68.html) +---- Thread: how to remove the edit, delete buttons/links from plugin (/thread-111966.html) |
how to remove the edit, delete buttons/links from plugin - zbaig - 2012-01-20 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? RE: how to remove the edit, delete buttons/links from plugin - Paul H. - 2012-01-20 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:
RE: how to remove the edit, delete buttons/links from plugin - zbaig - 2012-01-20 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 |