The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PHP Include in Header
Hi Guys..
I am in the process of creating a skin for my forum but i have ran into a problem. My problem is: Can i use a PHP include such as: PHP Code:
Cheers, Marc |
#2
|
|||
|
|||
No, you can not use PHP in templates, they are only HTML.
You can however create a plugin with your PHP-code, assign the output to a variable and use that variable in your template. |
#3
|
|||
|
|||
Ill give that a try and post back! Thanks!
By the way, what would my Hook Location be? The header? --------------- Added [DATE]1192626390[/DATE] at [TIME]1192626390[/TIME] --------------- Anyone?! Please!! |
#4
|
||||
|
||||
Use global_start if you want it to be available on all pages.
|
#5
|
|||
|
|||
Ok, thanks but how do i put this in my template?
As you can probubly guess, im a beginner with vBulletin code! |
#6
|
||||
|
||||
Plugin on the global_start hook:
PHP Code:
Code:
<!-- logo --> <a name="top"></a> $myheader |
#7
|
|||
|
|||
Thanks,
I have created a new product (called 'nav') and added a plugin within (called 'navshow') it's hook location is global_start... In plugin 'navshow i have: Code:
$navig ='<?php include('../../../core.php'); top('Forum'); ?>'; It still isnt working, what am i doing wrong Thanks in advance! |
#8
|
||||
|
||||
Change your plugin code to:
PHP Code:
|
#9
|
||||
|
||||
<a href="http://www.vbulletin.com/docs/html/templates_externalfiles" target="_blank">http://www.vbulletin.com/docs/html/t..._externalfiles</a>
|
#10
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|