The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]()
I want to create a variable and use it in template conditionals in a few places. So far I'm not getting the scope right, or I haven't figured out the right way to access it within the templates...
I've created a plugin with just this code in it: Code:
include('./plugins/my_mod.php'); Code:
<?php foreach ($vbulletin->forumcache as $forumdata) { if ( strpos($forumdata["description"], '<!-- something -->') !== false ) { $something[] = $forumdata["forumid"]; } } ?> The plugin needs to affect the forumhome_forumbit_level1_nopost template as well as the display of navbits in forumdisplay and showthread, at least. Which hook should I use to make sure the variable $something will be valid when and accessible where I need it? How do I reference the variable from a template? I've written and tested template conditionals using vbulletin class variables, so I've got the basic syntax working okay. How do I make a variable I create have the same sort of scope? Finally, as an aside, is hiding stuff in the forum description a really stupid way to customize something to begin with? Thanks! All help will be much appreciated. Mike D. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|