Monday, September 24, 2012

Add Adsense in PHPBB3 forum



I have a PHPBB3 forum:
http://jiansenlu.comze.com

To add AdSense in PHPBB3 forum,
1) Go to Administrator Control Panel, Click styles at the top menu,
then click templates at right menu
2)  Click edit button near subsilver2
I do not want to show ads everywhere in the admin control, so I choose not to modify overall_header.html. I only modified viewforum_body.html, viewtopic_body.html, index_body.html.
In the drop down menu, select  these files and add the following code  under the first line:
(replace xxxxxxxxxx to your adsense ID)
<div class="adsense" style="width:728px;margin:auto;float:center">
<script type="text/javascript">
<!--
google_ad_client = "pub-xxxxxxxxxx";
/* 728x90, created 10/14/10 */
google_ad_slot = "4962036764";
google_ad_width = 728;
google_ad_height = 90;
</script>
 <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
<br />
<script type="text/javascript">
<!--
google_ad_client = "pub-xxxxxxxxxx";
/* 728x15, created 10/14/10 */
google_ad_slot = "3734232982";
google_ad_width = 728;
google_ad_height = 15;
</script>
 <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script>
</div>
<p />


Result can be seen in my PHPBB3 forum:
http://jiansenlu.comze.com

No comments:

Post a Comment