
December 22nd, 2003, 11:01 PM
|
|
|
|
Join Date: Apr 2007
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
phpBB/random banner problem
I am having a bear of a time with inserting a random banner to my phpBB pages. The code is javascript and worked in my old board. It also works on pages outside of the message board. If anyone is familiar with the phpBB, I am simply placing the code on the overall_header.tpl file. For some reason, nothing shows up. I can ad a normal banner anywhere just fine.
If anyone knows of a site that has a phpBB going with a random banner on it, that would be a big help. If I could see the source code.
Below is the code I am trying to insert. Thanks for any help.
Code:
table width="100%">
<tr>
<td align="center">
<SCRIPT LANGUAGE="Javascript" type="text/Javascript"><!--
function banner() {} ; b = new banner() ; n = 0;
b[n++]= "<A HREF='http://www.sponsor1.com' target='_PARENT'><IMG SRC='http://www.mydomain.com/phpBB2/templates/subSilver/images/oly.gif' BORDER='2'></A>" ;
b[n++]= "<A HREF='http://www.sponsor2.com' target='_PARENT'><IMG SRC='http://www.mydomain.com/phpBB2/templates/subSilver/images/mill.jpg' BORDER='2'></A>" ;
i=Math.floor(Math.random() * n) ;
document.write( b[i] ) ;
//--></SCRIPT>
</td>
</tr>
</table>
|