I'm using the template to make yabb into somewhat of a portal.
http://www.outersurf.comMy main site uses a top and bottom template, so with yabbse's template I just call the following.
my yabb template<?php
include("/w3/usr/funkdoghtml/template/top.php");
?>
<table border=0 width=100%><tr><td><yabb uname><yabb im></td><td align=right><yabb time></td></tr>
<tr><td colspan=2 align=center><yabb menu></td></tr></table>
<table cellspacing="0" cellpadding="5" width="100%" align="center" bgcolor="#ffffff" border="0">
<tr>
<td valign="top" width="100%">
<yabb main>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="90%" align="center" border="0">
<tr>
<td nowrap="nowrap" align="right"><yabb vbstylelogin></td>
</tr>
</table>
<br />
<center><yabb copyright></center>
<?php
include("/w3/usr/funkdog/html/template/bottom.php");
?>
My problem occurs when I call a function in top.php
(which is being included in my yabbse template. What will happen is that yabbse will not output anything before the function call.
top.php example this file is included in my yabbse template<?php
include_once ("/w3/usr/funkdog/html/forum/Sources/JoeFunc.php");
print <<<EOT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
EOT;
if ($username=="Guest" AND $mainpage){
print <<<EOT
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
function outersurf_loginpage_onload() {
document.forms[0].elements[0].focus();
}
</script>
EOT;
}
?>
<body marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0"
topmargin="0" bgcolor="#FFFFFF" text="#000000" link="#336699"
<?php // jump to the login INPUT only if user is guest and we are on the frontpage
if($username=="Guest" AND $mainpage) {
echo " onLoad=\"outersurf_loginpage_onload();\" ";
}
?>
vlink="#336699" alink="#336699">
<?php
function_from_JoeFunc();
?>
yabbse will output the result from function_from_JoeFunc(); and nothing from before... like the <body> tag etc.
Any ideas why this is happening? Perhaps I dont' understand how the template is used in YaBBSE?
An example that I would want to have for this is show a recent POLL in the left nav column.