View Full Version : why $vbulletin->options don't work in postbit_display_complete hook >>??????
Jason4Ever
07-12-2009, 02:52 PM
hello,
plz i wrote plugin , but i stopped because i tried use option , but it didn't work in postbit_diplsay_hook , i tried $vbulletin->options[... , so what's the problem , why it's don't work with postbit_display_complete ?? and how to solve it ??
thanks,
Lynne
07-12-2009, 03:04 PM
Let's see the plugin code. (Did you make $vbulletin global?)
Jason4Ever
07-12-2009, 03:09 PM
hi,
no i didn't make $vbulletin global >? ,, how ?
this is cut of plugin code:
if($vbulletin->options['smaw_onoff'] == 1)
{
// code here ..
}
all $vbulletin varibales don't work , like : $vbulletin->options['smaw_onoff'] although it work but in another hook like showthread
Lynne
07-12-2009, 03:11 PM
To make $vbulletin global:
global $vbulletin;
Jason4Ever
07-12-2009, 03:13 PM
where i put it ?
Lynne
07-12-2009, 03:21 PM
where i put it ?
Somewhere before you want to use the variable $vbulletin. (Perhaps the first line of your plugin?)
Jason4Ever
07-12-2009, 03:32 PM
very good , it's work now , thank u Lynne
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.