The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I am developing some new plugins that should only work with a new
style I am working on. My new template style is "9". I only want the plugin to fire if it is my beta template. This code does not seem to work even though when I var_dumped the array, it seemed that styleid was being set. I put it as the first line of the plugin. I was also hoping to put it in the Navbar: Insert CMS Navbar Entry plugin, so I could import the CMS to the live site and then turn it on to the public when ready. Code:
if ($vbulletin->options['styleid'] != '9') { return; } Thank you! Rick |
#2
|
||||
|
||||
![]()
What hook location are you using? You should look the hook up in the code and see if $vbulletin is global or not. If not, you need to make it global. Or, it could be the variable name is wrong. So, find the hook and see what the code is like around it.
|
#3
|
|||
|
|||
![]()
The Hook location is process_templates_complete
I am using the plugin to create navbar tabs. |
#4
|
||||
|
||||
![]()
Is the styleid available for use at that point - have you tried spitting it out right there and seeing if it is correct? (And don't you want to use $vbulletin->userinfo['styleid']?)
|
#5
|
|||
|
|||
![]()
I am starting to see what is wrong. These are template plugins, not php plugins.
I tried surrounding the Navbar tab plugin stuff with if (vb::$vbulletin->options[styleid] !== '9') return; Didn't work. I know why --- if (vb::$vbulletin->options[styleid] == '9') Didn't work, don't know why { plugin code } --- and last but not least, when I realized this was a template plugin: <vb:if condition = "$bbuserinfo['userid'] == 1"> Doesn't work, don't know why plugin code </vb:if> Parse error: syntax error, unexpected '<' On a PHP eval page, this works: $output = vb::$vbulletin->options[styleid]; |
#6
|
|||
|
|||
![]() Quote:
That is where I modify the navbar so I would think it would work. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|