Google Adsense and PhpBB3
Posted: 27 Jul 2011, 08:40
Google Adsense and PhpBB3
Written by Stoker
Lets see if we can earn some money with our phpBB3 board.
Its not my experience that you will earn lots of money, but it will give you some extra money for the fun stuff.
You can place Google Ads almost everywhere, but the best place is in the topics.
Lets place the adsense coder after first post in this code example.
Open styles/prosilver/template/viewtopic_body.html
Find:
Add before:
Open styles/subsilver2/template/viewtopic_body.html
Find:
Add before:
Subsilver2 instructions will be added soon
A little note about the IF statement we are using
This part of the code we are adding is making sure that the Adsense is added after first post on all pages:
Lets say we want it after last post instead, then we should use this:
And if we want it after first post and after last post if we have more than 3 replies:
Written by Stoker
Lets see if we can earn some money with our phpBB3 board.
Its not my experience that you will earn lots of money, but it will give you some extra money for the fun stuff.
You can place Google Ads almost everywhere, but the best place is in the topics.
Lets place the adsense coder after first post in this code example.
Open styles/prosilver/template/viewtopic_body.html
Find:
Code: Select all
<!-- END postrow -->
Code: Select all
<!-- IF postrow.S_FIRST_ROW -->
<div class="panel bg1">
<div class="inner"><span class="corners-top"><span></span></span>
<div style="text-align: center;">
Your adsense code here
</div>
</div>
<span class="corners-bottom"><span></span></span></div>
<hr class="divider" />
<!-- ENDIF -->
Open styles/subsilver2/template/viewtopic_body.html
Find:
Code: Select all
Code: Select all
A little note about the IF statement we are using
This part of the code we are adding is making sure that the Adsense is added after first post on all pages:
Code: Select all
<!-- IF postrow.S_FIRST_ROW -->
Code: Select all
<!-- IF postrow.S_LAST_ROW -->
Code: Select all
<!-- IF postrow.S_FIRST_ROW or postrow.S_ROW_COUNT > 3 and postrow.S_LAST_ROW -->