News:

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

Main Menu

Google Adsense for Amber theme by Bloc

Started by aufordboy, December 26, 2005, 04:43:07 PM

Previous topic - Next topic

aufordboy

I have been playing around today to get adsense setup for my forum that is using Bloc's Amber design.  I added the adsense ads underneath the news & stats seen in the left column.  I was unable to find any info on adding adsense to this theme on the forum so I figured I'd post this.  You can see an example at my site: hxxp:www.talkhuntingonline.com [nonactive]

File to edit: index.template.php (in the theme folder)

Find:
// The "key stats" box.
echo '<br /><div style="padding: 2px 5px 2px 20px;" class="titlebg0"><b>Stats</b></div>
<div class="windowbg02" style="padding: 10px;">
<div style="padding: 5px;" class="smalltext">
<b>', $context['common_stats']['total_posts'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $context['common_stats']['total_topics'], '</b> ', $txt[64], ' ', $txt[525], ' <span style="white-space: nowrap;"><b>', $context['common_stats']['total_members'], '</b> ', $txt[19], '</span><br />
', $txt[656], ': <b> ', $context['common_stats']['latest_member']['link'], '</b>
</div>
</div>';


Directly underneath this code you just found past the following (rember to add your adsense id)


//Google adsense here
echo '<br /><div style="padding: 2px 5px 2px 20px;" class="titlebg0"><b>Sponsors</b></div>
<div class="windowbg02" style="padding: 10px;">
<center><script type="text/javascript"><!--
google_ad_client = "pub-youridgoeshere";
google_ad_width = 120;
google_ad_height = 600;
google_ad_format = "120x600_as";
google_ad_type = "text_image";
google_ad_channel ="channelgoeshere";
google_color_border = "9BA5AE";
google_color_bg = "9BA5AE";
google_color_link = "FFFFFF";
google_color_url = "000000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>
';
-AUFordBoy
hxxp:www.talkhuntingonline.com [nonactive]
hxxp:www.aufordboy.com [nonactive]
hxxp:www.sportsbettingcash.com [nonactive]
hxxp:www.debt-consolidation-service.biz [nonactive]

trenchteam

maybe this should go under tips and tricks. ???

aufordboy

A mod moved it to this category - this is not where I posted it
-AUFordBoy
hxxp:www.talkhuntingonline.com [nonactive]
hxxp:www.aufordboy.com [nonactive]
hxxp:www.sportsbettingcash.com [nonactive]
hxxp:www.debt-consolidation-service.biz [nonactive]

1MileCrash

normal members cannot post in tips and tricks. you had previously posted it in the wrong section.


* Tippmaster moves it to tips and tricks
The only thing php can't do is tell you how much milk is left in the fridge.



True Knight

I'm also trying to get Ads using PHPadsnew in my board with the Amber theme. I have tried making the changes to the files, but have no luck.

I would like a banner ad at the top under the head and some ads on the left under the stats. Can anyone help?

Thanks!

Advertisement: