The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PHPInclude Variables in Formbit Templates
The variables in PHPInclude do no show up in any of the formbit templates where I have inserted them (though they work fine on other templates).
The search feature referenced me to a post which suggested that I add $session to a specified line in the functions.php file. This, however, seems to have already been done with 2.3.0 but to no affect. Any help on forcing PHPInclude variables to be displayed in the formbit templates would be appreciated. Thanks. |
#2
|
||||
|
||||
bit variables areoften called within functions.
and functions just can use variables from other part of the script (phpinclude her) if you made em global in that function Basic php knowledge |
#3
|
|||
|
|||
Quote:
Can you please provide an example? |
#4
|
|||
|
|||
Check out http://www.php.net/manual/en/languag...bles.scope.php for what he's talking about.
|
#5
|
|||
|
|||
Quote:
Thank you for the link. I have a better understanding of globals within functions but at the same time, I'm still unsure as to how to apply this in order for the fuction to show on postbit. Are you saying I need to put global on fuctions made in phpinclude? My code in the external script isn't incased in a fuction syntax. All it does is echo out html based on whether or not if this is the first instance of the code being applied. A real world example using this problem would be most helpful. Thanks. |
#6
|
|||
|
|||
Put simply, there's nothing you can do without editing how phpinclude itself works.
|
#7
|
|||
|
|||
Quote:
Would you be willing to dilvulge a little more detail? Perhaps I can ask a programmer who is knowledgable with PHP. All I would need to know is what areas need to be edited. |
#8
|
|||
|
|||
I am knowledgable in PHP considering I have developed a full emergency messenging system in it at NASA. phpinclude is eval'ed after bit templates, which is why it does not have acccess to the bit templates (which are eval'ed before it).
|
#9
|
|||
|
|||
Quote:
|
#10
|
|||
|
|||
You can't without rewriting a significant chunk of gettemplate() to:
1. See if a flag is set 2. If not, eval phpinclude and set it 3. Continue with normal gettemplate functions ...also removing it from (IIRC) global.php. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|