Google Adsense and PhpBB3

Mixed forum with code snippets, guides and styles
Forum rules
Everything in this forum is for everybody
But support only for Donators!
User avatar
Stoker
Site Admin
Site Admin
Posts: 3502
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Google Adsense and PhpBB3

Post by Stoker » 27 Jul 2011, 06: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:

Code: Select all

<!-- END postrow -->
Add before:

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: 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:

Code: Select all

<!-- IF postrow.S_FIRST_ROW -->
Lets say we want it after last post instead, then we should use this:

Code: Select all

<!-- IF postrow.S_LAST_ROW -->
And if we want it after first post and after last post if we have more than 3 replies:

Code: Select all

<!-- IF postrow.S_FIRST_ROW or postrow.S_ROW_COUNT > 3 and postrow.S_LAST_ROW -->
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear


User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 03 May 2011, 22:47
BBCodes: 100
Location: The Netherlands

Google Adsense and PhpBB3

Post by Terr0r » 14 Nov 2011, 22:43

is it possible to set something in the ACP that it is possible that the normal members see the Adsense and Donate members NOT

I hope there is some that can help me whit that

Already thanks for the help

Greets Terr0r
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here

User avatar
Stoker
Site Admin
Site Admin
Posts: 3502
Joined: 12 May 2008, 21:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark

Google Adsense and PhpBB3

Post by Stoker » 14 Nov 2011, 22:49

This should do it: Group Statement
Board rules! No PM support
Sure, I can install the Mod for you ;)
Like the site? Then buy me a bear

User avatar
Terr0r
BBCoder V
BBCoder V
Posts: 339
Joined: 03 May 2011, 22:47
BBCodes: 100
Location: The Netherlands

Google Adsense and PhpBB3

Post by Terr0r » 17 Nov 2011, 16:13

thanks stoker I will take a look at there

I can not ask for help there that is because there is no support in there so I must figure it out by my self I think if there something not will work if I am right


Last bumped by Terr0r on 17 Nov 2011, 16:13.
If you can't fix it with ducktape you ain't using enough
For my MODS and BBCodes or other things that I have made take a look here