You can find code on how to add adsense in phpbb forum. But you cant find a complete ones where you can add adsense both on top and at the bottom of the page of the forum website. The following will walk you through how to do it in 10 mins.
To avoid breaking Googles TOS it's important not to place ads on registration or welcome pages. As there still seem to be a number of people doing this I thought I'd write this guide. The following text outlines how to quickly add adsense banners to the top and bottom of each page.Tested with phpBB version 2.0.17
Index page:
Open index_body.tpl
For The footer:
Find <!-- END switch_user_logged_out -->
After add the following code:
=========================
<table width="100%" border="0" cellpadding="10">
<tr>
<td><div align="center">
Place your Google 728*90 Ad Code Here
</div></td>
</tr>
</table>
=======================
For the header :
Find <!-- END switch_user_logged_in -->
After add the following code:
========================
<table width="100%" border="0" cellpadding="10">
<tr>
<td><div align="center">
Place your Google 728*90 Ad Code Here
</div></td>
</tr>
</table>
========================
Forum pages:
For header:
Open viewforum_body.tpl
Find <a href="{U_MARK_READ}">{L_MARK_TOPICS_READ}</a></span></td>
</tr>
</table>
After add the following code:
==========================
<table width="100%" border="0" cellpadding="10">
<tr>
<td><div align="center">
Place your Google 728*90 Ad Code Here
</div></td>
</tr>
</table>
==========================
For footer:
Find </form>
After add the following code:
==========================
<table width="100%" border="0" cellpadding="10">
<tr>
<td><div align="center">
Place your Google 728*90 Ad Code Here
</div></td>
</tr>
</table>
===========================
Posts:
Open viewtopic_body.tpl
Find
<tr align="center">
<td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0">
<tr><form method="post" action="{S_POST_DAYS_ACTION}">
<td align="center"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER} <input type="submit" value="{L_GO}" class="liteoption" name="submit" /></span></td>
</form></tr>
</table></td>
</tr>
</table>
After add the following code:
================================
<table width="100%" border="0" cellpadding="10">
<tr>
<td><div align="center">
Place your Google 728*90 Ad Code Here
</div></td>
</tr>
</table>
================================
You can also add banners using overall_header and overall_footer files. If you need to know how to add banners then ask us through our forum.
|