The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Templates won't recognize my variables
What am I missing here? All I want to do is add a conditional on FORUMHOME, so that one certain forum does not display regular forum bits, but rather some custom markup. I thought it would be a breeze.
In forumhome_forumbit_level1_nopost, I want to change this PHP Code:
PHP Code:
I'm sure I have the problem isolated to $my_custom_var because this works as expected... PHP Code:
PHP Code:
Can anyone please fill me in on what I'm missing here? |
#2
|
|||
|
|||
Well $show would be the most appropriate place to put it. But try adding a 'global $my_custom_var;' to your script.
|
#3
|
|||
|
|||
Quote:
|
#4
|
|||
|
|||
It is good custom to prefix your variables in this kinda places, to avoid possible future problems with Jelsoft variables.
So use: $post['mutus_myvar'] and not: $post['myvar'] |
#5
|
|||
|
|||
Quote:
I do always attempt to uniquely identify any custom variables or function names of my own. I only used $my_custom_var as an example. My real names I don't think will ever surface in native VB code. :classic: at least I should hope not... aranoid: :nervous: |
#6
|
|||
|
|||
Quote:
so instead of $yourvariable, use $show[yourvariable] when creating and calling your variables, and you're sure it will be done correctly in a strange situation... |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|