MyBB Community Forums

Full Version: Change existing function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I want to rewrite the breadcumb function with a plugin:

$plugins->add_hook("global_start", "new_breadcumb");

[...]

function new_breadcumb() {
 	global $navbits;

 	$navbits = array();
	$navbits[0]['name'] = $mybb->settings['test'];
	$navbits[0]['url'] = $mybb->settings['bburl']."/test.php";
}

This are the main parts. Is it generally possible to do this like this or should I rewrite the whole breadcrumb function? Actually this doesn't work so if it is possible I'm using the wrong hook?

Thanks!