Back to General Articles

HowTo: Add Adbrite ads to a sidebar
by Langly 12 Feb 2006

I use the Put a Column on the Left Side of Every Forum Page for the left column and add the code to the style. I use Extremepixels iskin black so it might be in a different place than it is located in iskin black. I put the code at the beginning of the 'header' part of the style. Be sure to adjust the location of the code so it will show up right on your page. It is located in the first two lines.

Code:
<div style="position:absolute; width:145px; height:240px; left:40px; top:300px; text-align:center;">
				 <TABLE cellpadding="0" cellspacing="0" width="100%" height="100%">
				 <TR>
					<TD  width="100%" height="100%" valign="middle" align="center">
					<script type="text/javascript" src="http://4.adbrite.com/mb/jscript_array.php?sid=123456"></script>
					<script type="text/javascript">
					if (window.AdBrite)
					{
					if (AdBrite.length > 4) 
					{ 
						a = 4;
					}
					else
					{
						a = AdBrite.length
					}
					for ( x = 0; x < a; x++ ) {
					var AdBriteURLArray = AdBrite[x][0].split('/');
					document.write('<a  class="adHeadline2"  onmouseover="window.status=\' ' + AdBriteURLArray[2] + ' \'; return true;" onmouseout="window.status=\' \'; return true;"  href="' + AdBrite[x][1] + '" target="_blank"><b><span class="adHeadline2">' + AdBrite[x][2] + '</span></b></a><br><a  class="adText2"  onmouseover="window.status=\' ' + AdBriteURLArray[2] + ' \'; return true;" onmouseout="window.status=\' \'; return true;"  href="' + AdBrite[x][1] + '" target="_blank"><span class="adText2">' + AdBrite[x][3]  + '</span></a><br><br>');
					}
					}
					</script>
					</TD>
				 </TR>
				 </TABLE>
				</div>
				</div>
				<script>
				var a=50;
				pos = 5;
				TO = null;
				function shake(object,speed)
				{ 
				  obj = eval(object)
				  if (pos == 5)
				  {
					pos = -5;
				  }
				  else
				  {
					pos = 5;
				  }  
				  obj.style.left = parseInt(obj.style.left) + pos;
				  obj.style.top = parseInt(obj.style.top) + pos;
				  obj = object
				  sp = speed
				  TO = setTimeout("shake(obj,sp)",speed);
				}
				function stopshake()
				{
					clearTimeout(TO);
					document.getElementById("floatingbox").style.top = '82';
					document.getElementById("floatingbox").style.left = '381';
				}
				function closefloating()
				{
				   document.getElementById("floatingbox").style.display = 'none';
				}
				function show_oio()
				{
				   document.getElementById("floatingbox").style.display = '';
				   shake(document.getElementById("floatingbox"),75);
				   setTimeout("stopshake()",1000);
				}
				Drag.init(document.getElementById("floatingbox"));
				</script>
I hope this helps and people find it of use.


vblts.ru supports vBulletin®, 2022-2024