xenyo
11-19-2007, 09:58 AM
Hi there,
I'm trying to integrate my site header to my vBulletin 3.6.8 forum. My site header includes some php echoes + a site search form on the top. That's why i made a Plugin that includes the header_site.php (placed in the same folder as the forum files) and than I call this plugin in the header of my template using $myphpheader.
This is my Plugin code with Hook - global_start:
ob_start();
include('forum_menu.php');
$myphpheader = ob_get_contents();
ob_end_clean();
This is the how i include the plugin in my template header:
<div id="maincontainer">
$myphpheader
</div>
OK. Now everything is showing fine! (http://development.iratethis.com/new/forum/?styleid=2) But my problems start when I try to use some php like echo, etc... and than everything crashes, saying:
Fatal error: Call to undefined function: user_nr() in /home/xenyo/public_html/development/new/forum/forum_menu.php on line 52
Ok. I understand this is because the functions of my main site are not included but even if I include them at the top of the php page...:
<?
include("include/condb.php");
include("functions.php");
include("functions.inc.php");
//$_SESSION["irtuser"]=175;
if(isset($_SESSION["userid"])){
$_SESSION["irtuser"]=$_SESSION["userid"];
}
?>
...it still crashes but with another error:
Fatal error: Call to a member function on a non-object in /home/xenyo/public_html/development/new/forum/index.php on line 394
Do you have any idea why this is happening? And if this is the best way to make your site header appear at top of the forum...
Thanks in advance for any help... :)
I'm trying to integrate my site header to my vBulletin 3.6.8 forum. My site header includes some php echoes + a site search form on the top. That's why i made a Plugin that includes the header_site.php (placed in the same folder as the forum files) and than I call this plugin in the header of my template using $myphpheader.
This is my Plugin code with Hook - global_start:
ob_start();
include('forum_menu.php');
$myphpheader = ob_get_contents();
ob_end_clean();
This is the how i include the plugin in my template header:
<div id="maincontainer">
$myphpheader
</div>
OK. Now everything is showing fine! (http://development.iratethis.com/new/forum/?styleid=2) But my problems start when I try to use some php like echo, etc... and than everything crashes, saying:
Fatal error: Call to undefined function: user_nr() in /home/xenyo/public_html/development/new/forum/forum_menu.php on line 52
Ok. I understand this is because the functions of my main site are not included but even if I include them at the top of the php page...:
<?
include("include/condb.php");
include("functions.php");
include("functions.inc.php");
//$_SESSION["irtuser"]=175;
if(isset($_SESSION["userid"])){
$_SESSION["irtuser"]=$_SESSION["userid"];
}
?>
...it still crashes but with another error:
Fatal error: Call to a member function on a non-object in /home/xenyo/public_html/development/new/forum/index.php on line 394
Do you have any idea why this is happening? And if this is the best way to make your site header appear at top of the forum...
Thanks in advance for any help... :)