Can't seem to add advertisement to header?

Jaxel

Well-known member
I'm trying to add an advertisement to the right of my header graphic... its not working...

Code:
<div class="pageWidth">
	<div class="pageContent">
		<div style="float: right;">
			<script type="text/javascript">
			var AdBrite_Title_Color = '0000FF';
			var AdBrite_Text_Color = '000000';
			var AdBrite_Background_Color = 'FFFFFF';
			var AdBrite_Border_Color = 'CCCCCC';
			var AdBrite_URL_Color = '008000';
			try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
			</script>
		</div>

		<div id="logo"><a href="{$logoLink}">
			<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
			<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
		</a></div>	
	</div>
</div>
 
No errors... the add just doesnt show up. It appears XF doesn't like my ad code... I copied this code directly from my VB installation (it works there)... and it doesnt work...

Code:
<!-- Begin: AdBrite, Generated: 2009-08-14 2:02:47  -->
<script type="text/javascript">
var AdBrite_Title_Color = '0000FF';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'FFFFFF';
var AdBrite_Border_Color = 'CCCCCC';
var AdBrite_URL_Color = '008000';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script>
<div style="text-align: center;">
<script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1301386&zs=3732385f3930&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script>
</div>
<!-- End: AdBrite -->
 
Maybe the code isn't compatible with the template syntax of XenForo :confused:?

Edit: It is compatible, I tested it on my system.

Edit 2: You should give your container some css declarations (width and height) ;)
 
I'm trying to add an advertisement to the right of my header graphic... its not working...
This works on my installation:

Code:
<div class="pageWidth">
	<div class="pageContent">
		<div style="float: right;">
			<script type="text/javascript">
			var AdBrite_Title_Color = '0000FF';
			var AdBrite_Text_Color = '000000';
			var AdBrite_Background_Color = 'FFFFFF';
			var AdBrite_Border_Color = 'CCCCCC';
			var AdBrite_URL_Color = '008000';
			try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
			</script>
<script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1301386&zs=3732385f3930&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script>
		</div>
		<div id="logo"><a href="{$logoLink}">
			<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
			<img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" />
		</a></div>
	</div>
</div
 
Top Bottom