![]() |
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? |
Well $show would be the most appropriate place to put it. But try adding a 'global $my_custom_var;' to your script.
|
Quote:
|
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'] |
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... :paranoid: :nervous: |
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... :) |
All times are GMT. The time now is 07:00 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|