The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Hi, I want to add a code in the header of my forum and I would like to know in which file I can put it, I would like for it to appear in every page like if it was part of the forum, in this moment I'm using global.php, what do you say?
|
#2
|
|||
|
|||
![]()
When you say you want it in the header, do you mean between the html header tags, or part of the forum header? If you mean the tags, then put it in the headinclude template, otherwise put it in the header template.
That assumes you mean html code or javascript. If you mean php code then you need to create a plugin. |
#3
|
|||
|
|||
![]()
yes the code is in php...
i want to put the wordpress header in vbulletin PHP Code:
|
#4
|
|||
|
|||
![]()
Fortunately someone just asked a similar question so I've got it all written up: You need to put your code in a plugin. Here's the manual page for creating a plugin: https://www.vbulletin.com/docs/html/main/add_plugin
You will need to buffer the output and capture it in a string variable, then register that variable to a template, then add a tag to the template. Here's the manual page that describes including an external file that produces output: https://www.vbulletin.com/docs/html/..._externalfiles . The code to regiater a variable to a template is below that. Then you need to add your variable in the header template. So the whole thing together might look like this: Plugin code (hook location global_start): PHP Code:
Then in the header template: Code:
{vb:raw wpheader} |
#5
|
|||
|
|||
![]()
The code you posted doesn't work, I am using this code on "global.php" and works but the problem is that changes the font of vbulletin
PHP Code:
|
#6
|
|||
|
|||
![]()
What happens, do you see nothing, or you see the forum but without the wp header? I notice that your require'd file starts with C://, are you sure that path is correct?
|
#7
|
|||
|
|||
![]()
I see nothing, I'm testing on localhost first!
|
#8
|
|||
|
|||
![]() Quote:
PHP Code:
|
#9
|
|||
|
|||
![]()
I think you forgot to include this line of code
PHP Code:
|
#10
|
|||
|
|||
![]()
Oh, yeah - I did forget it in the original plugin code I posted above - sorry about that (or did you just edit post #3 and insert it?). I included it in the updated version above. (You don't need the <?php and ?> tags in a plugin).
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|