+  Forum Owners
|-+  Forum Software» phpBB» Google Adsense and PHPBB2?
Username:
Password:
Pages: [1]
  Print  
Author Topic: Google Adsense and PHPBB2?  (Read 661 times)
billo
Jr. Member
**
Offline Offline

Posts: 59


View Profile
« on: July 25, 2007, 02:48:56 PM »

I am wondering how to add Google Adsense in PHPBB2? I have started different searches with different keyword but there is nothing satisfactory. Some people gave advice to add code in Overall_header or footer and some people explained that it is not Legal. What is an appropriate way to do so?
Logged
ForumOwner
Administrator
Full Member
*****
Offline Offline

Posts: 138


View Profile WWW
« Reply #1 on: July 25, 2007, 04:55:30 PM »

Hi, and welcome to the forum billo.  I'm a little unsure on how it might not be legal to insert the code in to the header template?  I'd be interested to read more about that if you have a link.

I have used AdSense on phpBB v2 before and although it depends a little on the skin you are using, I was able to insert the code in to the file:

templates/<your_template>/index_body.tpl

at the very top of this file.  So I placed something like this in the very top of that file:

<table width="100%" cellspacing="1" cellpadding="4" border="0" align="center">
<tr>
        <td width=100% align=center>
        <script type="text/javascript"><!--
        google_ad_client = "pub-xxxxxxxxxxxx";
        google_ad_width = 728;
        google_ad_height = 90;
        google_ad_format = "728x90_as";
        google_ad_type = "text_image";
.
.
.
.
.
        //--></script>
        <script type="text/javascript"
          src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
          </script>
        </td>

</tr>
</table>


That would give me a 728x90 ad block below the header of every page.

Logged
billo
Jr. Member
**
Offline Offline

Posts: 59


View Profile
« Reply #2 on: July 27, 2007, 07:00:25 AM »

Thanks for your kind reply. I have found such example but that was about some banner ad on the left of forum but I am looking for link ads which have link units. Why Google ban someone? I heard that it is against to terms and condition of Google to add code in non content files. You are using it in a right file. We heard that index_body.tpl, forum_index.tpl etc but it is Illegal to use it in overall_header and overall_footer. 
Logged
borntoforum
Jr. Member
**
Offline Offline

Posts: 60


View Profile
« Reply #3 on: July 30, 2007, 04:15:12 PM »

I always just throw the big banners into the footer and the header. Getting it into posts and such is much more difficult, because you have to edit multiple files. The header and footer are called on every page just the same.
Logged
billo
Jr. Member
**
Offline Offline

Posts: 59


View Profile
« Reply #4 on: July 31, 2007, 02:36:06 AM »

Should i perceive now that I can use Google Adsense code in Header or footer file? I have heard that there is some mod for PHPBB2 regarding Google Adsene. Does someone use that or try that. I am very much concerned about my forum.
Logged
Andrea
Guest
« Reply #5 on: September 10, 2007, 01:07:07 AM »

Check out www.phpbbhacks.com for adsense mod! It worked on my site very well.
Logged
qaswer
Newbie
*
Offline Offline

Posts: 41


View Profile
« Reply #6 on: September 15, 2007, 10:30:05 AM »

Check out www.phpbbhacks.com for adsense mod! It worked on my site very well.
Thanks for that because I didn't know about a mod on Adsense for PHPBB2. I have installed smf though after dropping Phpbb2 because it filled my forum with spam posts.
Logged
Andrea
Guest
« Reply #7 on: September 16, 2007, 07:06:19 AM »

Most probably you were added to the xrumer database. No, I won't link... Check a search engine for auto submitter!
Logged
internetg33k
Newbie
*
Offline Offline

Posts: 15


View Profile
« Reply #8 on: September 28, 2007, 04:11:40 AM »

The reason you dont want the code placed in the overall header is because then the ad will display on every single page of your forum. This is against adsense TOS because you are not allowed to place adsense ads on pages with little or no content. An example of this is the registration page on a forum.
Logged
iNTaYkE
Jr. Member
**
Offline Offline

Posts: 83


View Profile
« Reply #9 on: November 16, 2007, 10:08:09 PM »

The best way to do this is to go to phpbb.com and go to their forums.
Check out the 2.x.x mods forum.
It's much safer to use an official advertisement management mod rather than edit the files directly without proper knowledge.
Logged
Pages: [1]
  Print  
 
Jump to: