The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Include php page
I'm trying to include a php file with the following code as documented on the vBulletin pages, my plugin is setup as:
PHP Code:
Many Thanks |
#2
|
|||
|
|||
nvm
|
#3
|
||||
|
||||
The way variables are used in templates has changed in vBulletin 4. You must register any variables before using them and address them like so: {vb:raw globalHeader}
PHP Code:
|
#4
|
|||
|
|||
Okay I have managed to get the php include for 4.0 working with the following code:
Template: Code:
{vb:raw globalHeader} Plugin: PHP Code:
However what I really want to do is basically create my own custom template page, the problem with this current include is that the vb code inside ../header.php is just printed instead of being executed, what can I do to fix this? Many Thanks |
#5
|
|||
|
|||
Along the same lines....
What would be the easiest way to include php pages in the CMS? For example, I run HamWeather on my site. PReviosuly - using vbAdvanced - I made some templates that called in php files to display the weather. Can I do the same via CMS? Something like this for example: PHP Code:
|
#6
|
||||
|
||||
Quote:
|
#7
|
||||
|
||||
PHP Code:
|
#8
|
||||
|
||||
thanks Lynne, but that doesnt work either :'(
|
#9
|
||||
|
||||
It doesn't help when you just say something doesn't work. The best thing to do is say "This is my exact code in the ____ hook location {post code} and this is exactly what I have in my template {post about five lines above and below added code also}."
My guess would be you don't have the correct hook location. Did you look in the code to see where the header is rendered? And then looked above the code to pick a hook above there? Or did you just randomly pick a hook location? |
#10
|
|||
|
|||
Quote:
All i could find on this board was a link to the manual. That guy that always posts the link and says stuff about people must not like the manual needs to up date it with the code on how to use the variables in the template. I bet then he would no longer need to post the link. Thanks again! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|