I took your Mod and instead of putting the display in the ubbt.inc.php file I put it into the header.php include file. This way it shows up on the top right of my screen where I have blank space anyways.
Here is what my /includes/header.php file looks like for anyone else interested. I did change some table properties in the header.php and in the Mod to get this how I wanted it to look. I took out the table properties in the Mod all together since it was going into a table already.
You can look on my website to see how it looks.
<br /><table border="0" cellpadding="1" cellspacing="0" width="95%" class="tablesurround" align="center"> <br /><tr> <br /><td align="center"> <br /><table border="0" cellpadding="1" cellspacing="0" width="100%" class="tableborders" align="center"> <br /><tr> <br /><td align="center"> <br /><table border="0" cellpadding="0" cellspacing="0" width="70%" align="left"> <br /><tr> <br /><img src="http://www.tampainsider.com/images/tampains_logo.gif"><br /></tr> <br /><br /><table border="0" cellpadding="0" cellspacing="0" width="30%"><br /><tr valign="middle"><br /><br /><?<br /> $boardkeyword = "banners";<br /> <br /><br />// -----------------------------------------------<br />// End of variables - do not edit below this line<br /><br /><br /><br />// ---------------<br />// Lets pull a random banner ad - by JoshPet<br /><br /> if ($config['banners']) {<br /> $query = "<br /> SELECT B_Subject,B_Body<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Board = '$boardkeyword'<br /> AND B_Number = {$config['banners']}<br /> ";<br /> }<br /> else {<br /> $query = "<br /> SELECT COUNT(*)<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Board = '$boardkeyword'<br /> ";<br /> $sth = $dbh -> do_query($query);<br /> list($totalcount) = $dbh -> fetch_array($sth);<br /> $dbh -> finish_sth($sth);<br /><br /> $RandNumber = 0;<br /> if ($totalcount > 1) {<br /> $RandNumber = rand(0,($totalcount -1));<br /> } <br /><br /> $query = "<br /> SELECT B_Subject,B_Body<br /> FROM {$config['tbprefix']}Posts<br /> WHERE B_Board = '$boardkeyword'<br /> LIMIT $RandNumber,1<br /> ";<br /> }<br /> $sth = $dbh -> do_query($query);<br /> list ($Title,$Banner)= $dbh -> fetch_array($sth);<br /> $dbh -> finish_sth($sth);<br /><br /> $html = new html;<br /> list($tbopen,$tbclose) = $this -> table_wrapper();<br /><br />// If we found the banner, we'll send the output<br />// otherwise there just won't be a box.<br />if ($Banner) {<br />echo "<br /><b><font color=\"blue\"><u>Did You Know...</u> - <i>$Banner</i></b></font><br />";<br />}<br />?><br /></tr><br /></table><br />
Thanks for the great Mod Josh.