The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
Quote:
:disappointed: |
#12
|
||||
|
||||
Quote:
|
#13
|
|||
|
|||
Quote:
<? echo "TEST TEST TEST<br><br>"; ?> Here is what I added to the PHPInclude Template: ob_start(); require("../test.php"); $testing = ob_get_contents(); ob_end_clean(); At the forumhome_forumbit_level1_nopost template, I simply added this at the top: $testing All this does is echo out TEST TEST TEST above the categories. The problem is that the $test variable does not display in any of the formbit templates when viewed on a web browser. According to Filburt, I have to do some extensive modification in one of the php files included with VBulletin just to get this one simple feature working. |
#14
|
|||
|
|||
I thought we were talking about a variable scope problem here...
|
#15
|
|||
|
|||
Quote:
I apologize if I somehow misrepresented my problem. Did my above example help to clear things up? Let me know... |
#16
|
||||
|
||||
Your problem is related to your code in phpinclude. If you add $testing = "Test 1 Test 2 Test 3"; to phpinclude template then use $testing in the forumhome_forumbit_level*.* templates you'll be fine. So it is not phpinclude variable not showing in forumhome_forumbit_level* templates, it is your variable not getting a approprite value in the phpinclude.
|
#17
|
|||
|
|||
Quote:
I'm trying out your above example but having a little trouble. Here is what I put into the phpinclude template: ob_start(); $testing = "TESTING 1 2 3"; ob_end_clean(); With my limited knowledge of php, I'm sure it is just syntax issues or some other problem that is right under my nose. Thanks for your help. |
#18
|
||||
|
||||
Quote:
PHP Code:
If you can't get value of $testing variable displayed, this would be because you put it in the wrong template. Please notice that there are 4 of forumhome_forumbit_level*.* templates and not all of them are parsed in your forum home. Which one or ones are used depends on different conditions so try to to put the variable in each or one by one to understand how and when they are displayed. Also if you want a advise, considering the fact that you use this variable in only forumhome_forumbit_level*.* templates, you don't need to put it in phpinclude template. Just put your variable in index.php right after require('./global.php'); I personally do not fancy phpinclude solutions much as they waste unnecessary server power/memory. |
#19
|
||||
|
||||
forumhome_forumbit_level*.*
Pal, these templates are just called by function makeforumbits in index.php, so as i stated in my first post, he has to add global $testing; to that function, but i think nobody listens to me.... |
#20
|
||||
|
||||
Quote:
PHP Code:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|