Hi everyone. I have some trouble including a php file in my template, will describe the problem below:
I have a template with an header, a navbar, the forum/content, footer and a fixed right bar. I want to insert this php code(for now) into the right bar:
userbox.php
PHP Code:
<?php
echo '<a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]">Logga ut</a>';
?>
userbox plugin:
PHP Code:
ob_start();
include('userbox.php');
$userboxinsert= ob_get_contents();
ob_end_clean();
vB_Template::preRegister('footer',array('php_include' => $php_include));
Inside the footer template I have made a div that is fixed and I call the plugin with this code:
PHP Code:
{vb:raw userboxinsert}
But it doesn't output my desired string.
The HOOK is parse_templates.
When i in the plugin write echo $userboxinsert; the userbox get's inserted but at the top of the screen, so the link works.
Would be very happy if someone could help me with this problem!
--------------- Added [DATE]1301321363[/DATE] at [TIME]1301321363[/TIME] ---------------
I can add that when I turn debug on, the file is included but it doesn't write out any text!