Google adsense in PHPBB

Discussions about the phpBB2 Forum. How to get the best from this powerful script.

Moderator: Moderators

Postby charliecrow » Sat Sep 20, 2008 11:46 pm

Is it possible to get this to work with black label ads? (adbrite)

I done all correct and tested with another ad code and it worked.

but for the black label ad code it gives this error

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/*****/viewtopic.php on line 844

on line 844

Code: Select all
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='';}


full ad code is

Code: Select all
<!-- Begin: Black Label Ads, Generated: 2008-09-20 19:09:51 -->
<style type="text/css">
   .adHeadline {font: bold 10pt Arial; text-decoration: underline; color: #fb2174;}
   .adText {font: normal 10pt Arial; text-decoration: none; color: #000672;}
</style>
<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=852950&br=1&dk=6164756c7420706572736f6e616c735f385f335f776562&col=4&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=852950&afsid=55544">Your Ad Here</a></div>
<!-- End: Black Label Ads -->


thanks in advance for any work around for this (or another mod that supports this ad code)

Keep up the great work
charliecrow
 
Posts: 2
Joined: Thu Jul 10, 2008 4:27 am

Advertisement

Postby dcz » Sat Sep 27, 2008 7:46 am

Yes, the same principle can be applied to any add using some html (or JS) code to load.

In your case, the error seems to comes from viewtopic.php, you may just broke the code string in php with the ' in your html code.
Try to replace all occurrences of ' with \' inside the add code.
Should be enough.
++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Previous

Return to phpBB2 Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests