The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
php include within a vBullitin template?
I'm trying to replace the logo on my vBullitin site with a <?PHP include_once tag, so that I can use my global mast head as the header for the forums too.
I get nothing when I replace the default: <a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a> With: <?PHP include_once('http://www.rahlentertainment.com/livexchange/header.html');?> Any ideas? Thanks, Nick |
#2
|
|||
|
|||
You can not use PHP in Templates.
You can easily set the Header Image in your Style Settings. |
#3
|
|||
|
|||
I'm not trying to change the header image, I'm trying to replace the image with an included HTML document that has the header, plus all of the navigation.
I managed to acomplish this by placing: include('http://www.rahlentertainment.com/livexchange/header.html'); in the global.php file. the only problem is that using this method causes an error with the log-in/out scripts. When i try to log in or out, i get an error that says "Unable to add cookies, header already sent. File: http://www.rahlentertainment.com/liv...ge/header.html Line: 6" Any ideas? thanks, nick |
#4
|
||||
|
||||
You can probably code this into a plugin and use a variable to call the header script.
|
#5
|
|||
|
|||
Assuming I know the basics of HTML and PHP, but have never created a vB plugin, how would I go about creating one?
thanks, nick |
#6
|
||||
|
||||
admincp -> plugin system -> add new plugin
You will get a text box where you add the php code. The hook is the file you want it to be attached to. I'd assume since its the header template, you'd want to hook into global or something. Read the tutorial section as well for some hints about how to properly format your syntax to take advantage of vb's code. |
#7
|
|||
|
|||
Thanks. That was really easy...
|
#8
|
|||
|
|||
I tried what Reeve said a while back but it didn't work.
Hook: global_start Title: New Header Code: $new_header = include_once('http://www.rahlentertainment.com/livexchange/header.html'); Then in the header template I put $new_header but it didn't work. |
#9
|
|||
|
|||
I just used Hook:global complete, and inserted the code:
include('http://www.rahlentertainment.com/livexchange/header.html'); I didn't use variables.... |
#10
|
||||
|
||||
Why don't you just edit the "header" template?
I did that on my forum and have a costumized header whitout a problem. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|