PDA

View Full Version : Hook for $vboptions[copyrighttext]


Dan_UPC
10-23-2008, 12:35 PM
I'm creating a product and one of the plugins needs to alter $vboptions[copyrighttext] at runtime before it gets displayed in the footer ... Which hook location would allow me to access $vboptions[copyrighttext]? I tried global_start and global_complete but neither of them worked for this.

Dan_UPC
10-27-2008, 02:06 PM
Any clues?

Lynne
10-27-2008, 02:28 PM
What is the exact code you are using in your plugin?

Dan_UPC
10-27-2008, 02:45 PM
I've tried a number of things just to see if the variable is being changed but even something simple like


$vboptions[copyrighttext]="test";


Does nothing in all the hook locations I've tried.

--------------- Added 1225126687 at 1225126687 ---------------

Ok I have it working now.


$vboptions['copyrighttext'] = "test";


Does nothing.


$vbulletin->options['copyrighttext'] = "test";


Correctly changes it when placed in global_start. Annoying since the 2 are supposed to be equivalent and $vboptions['copyrighttext'] is what is called in the footer template.

Lynne
10-27-2008, 03:59 PM
You can't do it like that. I do it like this (well, it's modified for copyrighttext here, but I use it for other things):

$vbulletin->options['copyrighttext'] = 'test';

Dan_UPC
10-27-2008, 04:12 PM
Thanks, I came to the same conclusion a few minutes ago. Just annoying since the template and code sent me on a wild goose chase. The template reference $vboptions['copyrighttext'] and the code indicates $vboptions == $vbulletin->options ... Any way it's all good now. Thanks for your help.

Paul M
10-27-2008, 04:25 PM
$vboptions is ONLY available in templates.

Dan_UPC
10-27-2008, 04:27 PM
Thanks. Would be nice if there was some documentation to tell us things like that.