phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
PhpBB -Adsense on pages where you want in overall_header.tpl

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Google Forums  » Google AdSense
::  
Author Message
993ti



Joined: 26 Aug 2006
Posts: 16

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Fri Oct 06, 2006 10:37 am    Post subject: PhpBB -Adsense on pages where you want in overall_header.tpl

Placing adsense code in the overall_header.tpl also shows it on pages without content (registration, posting replies etc.)
Here's a handy tip for those who are using one template:

Code:
OPEN INCLUDES/PAGE_HEADER.PHP

FIND

define('HEADER_INC', TRUE);

AFTER, ADD //Only visible for guests

if ( $userdata['session_logged_in'] && ($googlead=="1") ){
   $google_ad = '';
}
if ($googlead=="1") {
$google_ad = '<table class="forumline" width="95%" cellspacing="1" cellpadding="3" border="0">
         <tr>
            <td class="row1" height="100%" valign="top">
<div align="center">
YOUR ADSENSE CODE
</div>
</td>
  </tr>
</table>';
}

FIND

   'SITENAME' => $board_config['sitename'],

BEFORE, ADD

'GOOGLE_AD' => $google_ad,

OPEN TEMPLATES/YOURTEMPLATE/OVERALL_HEADER.TPL

FIND
            </table></td>
         </tr>
      </table>

AFTER, ADD

{GOOGLE_AD}


Now you can add this code on every page where you want the ads to show like in index.php, viewforum.php and viewtopic.php

Code:
FIND

define('IN_PHPBB', true);

BEFORE, ADD

$googlead="1";


The code in page_header.php makes it only visible to guests.
If you want it to also show for logged in users, use this:
Code:

AFTER, ADD //Visible for everyone

if ($googlead=="1") {
$google_ad = '<table class="forumline" width="95%" cellspacing="1" cellpadding="3" border="0">
         <tr>
            <td class="row1" height="100%" valign="top">
<div align="center">
YOUR ADSENSE CODE
</div>
</td>
  </tr>
</table>';
}


I hope it's useful.
You can see it in action on my Aibo forum
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Sat Oct 07, 2006 7:30 am    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

Yep, handy one thanks Wink

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
HB.
PR0
PR0


Joined: 26 Oct 2006
Posts: 62

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Sat Nov 25, 2006 3:51 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

It appears that it doesn't really matter to Google. Every free forum host places their google Ads in the overall_header and footer, that displays on low ot no content pages, but yet they are not banned from Google.
Back to top
HB.
PR0
PR0


Joined: 26 Oct 2006
Posts: 62

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Sat Nov 25, 2006 3:55 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header

993ti wrote:


FIND
</table></td>
</tr>
</table>

AFTER, ADD

{GOOGLE_AD}



Just a quick question, does {GOOGL_AD} mean insert your google code there, or just leave saying {GOOGLE_AD}?
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Sat Nov 25, 2006 4:18 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

That's true many forums do output adds on login pages without any problems with Google, but, this does not mean it's the best thing to do.

The best with AdSense it to use them on pages with good content, in order to obtain related adds that can really interest users. I don't think the one on the login pages are really useful to increase incomes.

{GOOGLE_AD} in the above code stands for the AdSense code that will be parsed in the template, you should leave it as is.

It's in the php file that you need to put your AdSense html code : look for "YOUR ADSENSE CODE".

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
HB.
PR0
PR0


Joined: 26 Oct 2006
Posts: 62

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Sat Nov 25, 2006 4:49 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

dcz wrote:
That's true many forums do output adds on login pages without any problems with Google, but, this does not mean it's the best thing to do.

The best with AdSense it to use them on pages with good content, in order to obtain related adds that can really interest users. I don't think the one on the login pages are really useful to increase incomes.



You are very true, I wouldn't advise it. I'm just surprised that Google allows for it. I guess if those sites are making Google a lot of money, then they just brush it aside.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Sat Nov 25, 2006 4:59 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

This and the fact these problematic pages are far from the being the majority in a phpBB forum.

So I guess that's why Google does not bother yet too much about them.
Doing this could be more problematic for a young forum with few pages, but I do myself wait until a web site as grown a bit before I implement AdSense. It's just safer, as the averages will be performed over more events, avoiding the extremes reachable with few visits (like one page loaded some day and one click, eg an 100% and suspicious ratio).

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
WC



Joined: 13 Jul 2007
Posts: 2

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Fri Jul 13, 2007 1:49 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

I have a question about this "mod" in the intial post. What exactly is it supposed to do? It mentions something about how the Adsense will appear in non-content pages such as the registration pages, posting replies etc. Is this mod supposed to make the Google Ads no appear in these kinds of pages even though it is in the overall_header.tpl?

I have put my leaderboard into the overall_header.tpl for my forum. I
can't see however how else to put it right at the top as this would be
the file to place the code in. But if it is in the overall_header,
then it would automatically appear in the registration page etc. How else can you put it onto the page at the top?

Does this mod get around that?

And could someone clarify what it's supposed to do exactly when it says:

Quote:
The code in page_header.php makes it only visible to guests.
If you want it to also show for logged in users, use this:
Code:


What exactly is only appearing to guests or potentially to logged in users?

Any help appreciated.

Thanks
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Fri Jul 13, 2007 5:31 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

WC wrote:
I have a question about this "mod" in the intial post. What exactly is it supposed to do? It mentions something about how the Adsense will appear in non-content pages such as the registration pages, posting replies etc. Is this mod supposed to make the Google Ads no appear in these kinds of pages even though it is in the overall_header.tpl?

I have put my leaderboard into the overall_header.tpl for my forum. I
can't see however how else to put it right at the top as this would be
the file to place the code in. But if it is in the overall_header,
then it would automatically appear in the registration page etc. How else can you put it onto the page at the top?

Does this mod get around that?

And could someone clarify what it's supposed to do exactly when it says:

Quote:
The code in page_header.php makes it only visible to guests.
If you want it to also show for logged in users, use this:
Code:


What exactly is only appearing to guests or potentially to logged in users?

Any help appreciated.

Thanks


Yes this piece of code is supposed to only output adds on content pages, eg index.php, viewtopic.php and viewforum.php. Then it is supposed to only output them for guest, but looking at the code, I'm not this sure.

We'll release a real mod for this sometime Wink

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
WC



Joined: 13 Jul 2007
Posts: 2

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Fri Jul 13, 2007 10:27 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

Ok thanks. I installed it on my board and it worked - I was able to display the leaderboard in the overall header only on the index, viewtopic and viewforum pages. I don't know what that bit about visible to guests or registered users is though. It all seems to appear the same whether logged in or not.
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Thu Jul 19, 2007 9:06 am    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

You can extend the adds output to all phpBB pages if you like, by repeating this part on other files :
Code:

FIND

define('IN_PHPBB', true);

BEFORE, ADD

$googlead="1";


faq.php, search.php, memberlist.php could be interesting as well. The idea is to avoid them on pages like privmsg.php.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
abhishek1711
PR0
PR0


Joined: 03 May 2007
Posts: 59

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Tue Aug 07, 2007 12:29 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

is this really required. does google actually care to ban publishers coz of this? i have it out in overall_header and it shows in all pages....but thts the way it is for past 4 months


if its serious then id have to implement it or else why take the trouble Evil or Very Mad
Back to top
SeO
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 15 Mar 2006
Posts: 3103

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Tue Aug 07, 2007 5:06 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

Well, I personally never heard of anyone being banned from the Google Adsense program for showing adds on pages bots cannot see, this mod is more to create the possibility to prevent from doing so.

The problem, if we really want to find one, is that we all agreed not to talk about their guidelines and documentation. It makes it pretty hard to just talk about it Laughing

_________________
Back to top
abhishek1711
PR0
PR0


Joined: 03 May 2007
Posts: 59

PhpBB -Adsense on pages where you want in overall_header.tplPosted: Tue Aug 07, 2007 7:03 pm    Post subject: Re: PhpBB -Adsense on pages where you want in overall_header.tpl

yeah ill take the risk then Wink
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » Google Forums  » Google AdSense
Page 1 of 1

Navigation Similar Topics

Jump to: