MyBB Hacks

Full Version: My New Hooks: Will This Work?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I'll test this myself, just looking for some idea if it will work as expected.
On a 'custom' page which includes global.php:
i.e.

PHP Code:
<?php

define('IN_MYBB', 1);
require_once './global.php';

// comments here....
// code here....

$plugins->run_hooks("thispage_mynewhook);

// more code here....

?>

...now will this 'new hook' be available to a MyBB plugin?
Is it really that easy, or do I need to include other file(s), and / or...
...how are new MyBB hooks created?

Thank you very much

Yes, it'll work as long as you get the syntax correct.
Perfect...glad to hear it, thanks ZB...
...too easy.  Biggrin
But look at the hook code please;

Code:
$plugins->run_hooks("thispage_mynewhook);


It should be;

Code:
$plugins->run_hooks("thispage_mynewhook");


A " is missing.

I see that was left out, thanks.
No Problem Fire Fox Smile
Reference URL's