PDA

View Full Version : Accessing board settings in plugin


scarex80
12-28-2009, 06:37 PM
Hi guys,
I'm trying to understand the new vbulletin release and, writing a plugin, I'm facing a strange problem.

I'm trying to write a plugin with this code
$output=$vbulletin->options['bbtitle'];
vB_Template::preRegister('header',array('my_insert var' => $output));
In order to put the board name into a personal var in header template.

But the var is empty.

I've tried several hooks (global_start was the right place for me according to old release) but with no success.

Can someone help me?

Thank you!

Regards

Lynne
12-28-2009, 08:42 PM
Go into the functions.php file where the header is rendered (I think that's the one - you can try a search if that isn't it) and look further up on the page for a hook location that is rendered before the header and then use that one.

scarex
12-29-2009, 07:41 AM
Go into the functions.php file where the header is rendered (I think that's the one - you can try a search if that isn't it) and look further up on the page for a hook location that is rendered before the header and then use that one.

The correct hook is "global_bootstrap_init_start". Thank you very much Lynne!