MyBB Community Forums

Full Version: Plugin handles and locations
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
thanks, thats should be added to the wiki.


Will the output of your code be placed in the templates? What do i do about template intergration?
Quote: 1074 delete_thread $tid
1088 delete_post $tid
How come the hooks in newthread.php and editpost.php aren't passed the $tid? Is there a reason?
newthread has to make the thread's id, so there is no $tid yet.
editpost works with $pid and will be in $mybb->input['pid']
Okey, I've made an proposual php version of an plugin list, it is not complete, however, I wanted to know if people liked it, if not I'm gonna scrap it.
Click the hooks and there should display an message on what that hook does, if not, I've not added it yet.

Look here: http://mcdcpp.net/hooks.php
CraKteR, I think that's a great start. I think it would be nice to include what should be available in $mybb->input and the other globals when the hooks get called.
Thanks, yea that was what I was thinking, but it is alot of work, so we'll see if I got time todo all that. Gotta sleep now, gonna look at it more tomorrow tho. Smile
Finished adding all hooks to the page, got 302 hooks displayed, I've not done anything with commenting them, well some is, most is not. Hope you like it, I'll be adding more commenting later on. Smile
Hmm..I am trying to add a hook into the $seperator template.

Any help would be great. I have a lot of things but so far nothing is working.

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

function test()
{
	$seperator = str_replace("<div id=\"content\">", "<div id=\"content\">Hello World!<br />This is a sample MyBB Plugin (which can be disabled!) that displays this message on all pages.<br />", $seperator);
	return $seperator;
}

Any help would be awesome. I just need to know the syntax to run a function hook inside the seperator.
You need to add global $seperator; and return is not needed.
Pages: 1 2 3