News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How to put Adbrite code on the forum?

Started by flyingmembers, October 07, 2008, 11:47:41 AM

Previous topic - Next topic

flyingmembers

I already read the Google Adsense topics, but adbrite code is more complex.

I want to implement this adbrite/blacklabelads code on the forum:

<!-- Begin: Black Label Ads, Generated: 2008-10-07 11:09:56  -->
<script type="text/javascript">
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='';}
document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=869736&br=1&dk=706572736f6e616c735f355f335f776562&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script>
<div><a class="adHeadline" target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=869736&afsid=55544">Your Ad Here</a></div>
<!-- End: Black Label Ads -->


I think want to place this code in board.index.template.php in the section after:
// Here's where the "Info Center" starts...
echo '.....


However due to the large number of " ' ''s" I get errors, has anyone had any luck or know how to fix the errors?

ccbtimewiz

You need to backslash all your single quotes.

Example:

'src' would be \'src\'

Likewise you might be interested in the Ad Management mod.

Deprecated

Try this modification package: Ad Management


(Please note that I know nothing about the package, but I think you might benefit from seeing if it will benefit you.)

flyingmembers

Thanks, I tried the Ad management tool..it looked perfect.  However, after installation I found that it only makes updates to the themes/default/  since my theme doesn't use default I had no way of seeing the ads!

I'll try \ now!

[SiNaN]

You should apply the theme file edits using the manual installation instructions here to your custom themes' files in order to get it working for your custom themes.
Former SMF Core Developer | My Mods | SimplePortal


Advertisement: