![]() |
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 |
nvm
|
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:
|
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 |
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:
|
Quote:
|
PHP Code:
|
Quote:
|
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? |
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! |
Example above:
Code:
{vb:raw globalHeader} Code:
{vb:raw myname_footer} PHP Code:
PHP Code:
Change "myname_footer" to what you like. |
hi tom, i'm confused by your post - i'm trying to do a header include
|
HTML Code:
ob_start(); When I was running vBulletin 3.x it went into global.php But now that i've upgraded to vBulletin 4, I don't know where that code goes. Thanks Nick |
intente con todas las variaciones seƱaladas aquĆ. Alguien ha logrado hacer esto con exito?
|
Hi guys.
Trying to get some php code into my forum to get it to display the frontpage slider. I've done this. PHP Code:
What am i doing wrong? |
Just noticing the obvious error, but the name of the template is not forumhome, it is FORUMHOME.
|
Still doesn't work.... Ok,
So let's start from scratch. I have this. PHP Code:
So I've gone into add plugin, and done the following. PHP Code:
PHP Code:
|
This works perfectly! Thanks!
Quote:
|
All times are GMT. The time now is 04:59 PM. |
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:
|