The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Including custom PHP file and header / footer
Hello!
I'm hoping someone has had this issue and was able to find a solution... I just upgraded from vb 4 to vb 5 connect, and to my disappointment, I realized that the plugins system was no longer supported. I had a plugin that included a PHP file that generated a user session from our main website, and then passed rendered HTML in a variable, that we simply included above the header. For example, this was my plugin code before: Code:
include('/home/webapps/current/ext/forum_user_session.php'); // HEADER VARIABLES vB_Template::preRegister('dt11_forum_header', array("new_header" => $new_header)); vB_Template::preRegister('dt11_footer', array("new_footer" => $new_footer)); // HEADER FOR FORUM $dt09_forum_header = vB_Template::create('dt11_forum_header')->render(); // FOOTER FOR FORUM $dt09_footer = vB_Template::create('dt11_footer')->render(); vB_Template::preRegister('footer', array("dt09_footer" => $dt09_footer)); Any way to make this work in vb 5 Connect? thank you in advance! |
#2
|
||||
|
||||
Build an API to expose the data that you need exposed, call the API within the template using {vb:data} calls, push that data to your custom templates from within the template.
Easy. |
#3
|
||||
|
||||
In case someone is looking for a more helpful in-depth explanation, I found it here:
https://vborg.vbsupport.ru/showthread.php?t=302307 |
Благодарность от: | ||
Lynne |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|