Hello I am trying to include a header file from my website above my vBulletin 4 forum so I can get it to match my website more. Now I've read and searched so much on this topic and get the same responses or articles on it which unfortunately has not solved my problem. Let me list what I have done. Created a plugin with a "global_start" hook location: ob_start(); include('../header.php'); $myheaderphp = ob_get_contents(); ob_end_clean(); Code (markup): Next I inserted the following code on the first line of my header template: {vb:raw $myheaderphp} Code (markup): Now for some reason it isn't showing at all. I've messed with my path to the file and everything for hours now and I'm starting to bang my head off the wall. Any suggestions or knowledge you may have will be greatly appreciated. Thanks in advance!
ob_start(); include('../header.php'); $myheaderphp = ob_get_contents(); ob_end_clean(); var_dump($myheaderphp); Can you post the output of above script ?
that's the reason you do not get any output... that object is EMPTY .. that's why you do not see anything you should check header.php and see if it outputs something... if not.. your object will always be empty. I hope this helps
Thanks but I had something in it before but decided to remove it to start fresh. It works but as soon as I remove "var_dump($myheaderphp);" the header goes away. Any ideas?
Since I am using VB4 wouldn't I have to preRegister the variables? If so where would I place this line of code? vB_Template::preRegister('header',array('includedphp ' => $myheaderphp)); Code (markup):