| Home  |  | About  |  | Contact  |  | Board index » Web design and hosting » Developer discussion board 
Register  |   FAQ   |  Search  |  Login
Host : WEBHOSTINGPAD.COM
  • Free domain name
  • Unlimited Disk Space
  • Unlimited Bandwidth
  • Unlimited sub domain
  • Host unlimited domain
  • Unlimited MySql database
  • Unlimited Parked Domains
  • SSI (Server Side Includes)
  • Weekly Backups
  • And much more..
  • 1.99 USD per month

Visit : webhostingpad.com

Hosting: Free trial
FatCow is one of the leading webhost in the internet today. FatCow Web Hosting. Free Trial , Free Setup, Free Support, All risk free!
Visit: FatCow.com


Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: How do you put Adsense on phpBB3.x?
PostPosted: Sun Dec 14, 2008 1:51 am 
Offline

Joined: Tue Dec 09, 2008 5:55 am
Posts: 2
How do you put Adsenese on phpBB3.3? Just like one used in this board.


Last edited by Damian on Thu Dec 18, 2008 1:51 am, edited 2 times in total.

Top
 Profile E-mail  
 
 Post subject: Re: How do you put Adsense on phpBB3.x?
PostPosted: Sun Dec 14, 2008 5:29 am 
Offline
Site Admin

Joined: Wed Nov 05, 2008 8:04 am
Posts: 90
Adding adsense code after each post:
1. Login to your adsense account and create an adsense unit of suitable size with background color = border color = forum post background color.
2. Login to your forum Administration Control Panel.
3. Click on the tab “Styles”.
4. At the left menu click on the link “Templates” under the category “Style components”. A list of all installed templates will appear.
5. Click on the “Edit” link of the template which you’re using for your board.
6. A combo box listing all template files will appear. Select the file “viewtopic_body.html” at the end of the list.
7. Find string
Quote:
<div class="postbody">{postrow.MESSAGE}</div>
.
8. Replace that string by the followings.
Code:
<div class="postbody"> {postrow.MESSAGE}
<table style="width: 100%; margin: 10px 0 ;"><tr><td style="text-align: center;">
<!—your Adsense code here -->
</td></tr></table>
</div>

9. Replace the text "<!—your Adsense code here -->" with your adsense code.
10. Please do not forget to save the changes you have made.


Top
 Profile E-mail  
 
 Post subject: Re: How do you put Adsense on phpBB3.x?
PostPosted: Sun Dec 14, 2008 1:46 pm 
Offline

Joined: Mon Dec 08, 2008 2:16 am
Posts: 2
It depends where you want that your Ads appear. If you want them to appear at the top of the footer or at the top of the board (just below the horizontal menu) then you need to edit the template file overall_header.html or overall_footer.html.


Top
 Profile E-mail  
 
 Post subject: Re: How do you put Adsenese on phpBB3.x?
PostPosted: Thu Jan 15, 2009 12:44 pm 
Offline

Joined: Tue Jan 06, 2009 11:36 am
Posts: 4
sorry mimis, u can't do it. Putting adsense code in overall_header.html or overall_footer.html, ads will display on search page also going against TOC of Google. So they will cancel your account.


Top
 Profile E-mail  
 
 Post subject: I'm definitely going to bookmark you!
PostPosted: Mon Jan 19, 2009 8:38 pm 
Offline

Joined: Sun Jan 18, 2009 7:37 pm
Posts: 7
I'm definitely going to bookmark you!


Top
 Profile E-mail  
 
 Post subject: Re: How do you put Adsenese on phpBB3.x?
PostPosted: Mon Jun 15, 2009 2:48 am 
Offline

Joined: Mon Jun 15, 2009 2:44 am
Posts: 2
Hi Admin.

I have a quick question about this thread. What about if you want to show the AdSense Ad only the first or the original post? Is there any way?

Thanks! ;)


Top
 Profile E-mail  
 
 Post subject: AdSense Ad only the first or the original post on phpBB3.x
PostPosted: Mon Jun 15, 2009 1:14 pm 
Offline
Site Admin

Joined: Wed Nov 05, 2008 8:04 am
Posts: 90
Yes, there is a way. But you have to enable PHP code in your template file.
To do this,
    1. Login to your admin control panel.
    2. Under General tab click on the link security setting at the bottom of the vertical menu.
    3. Now enable the option Allow php in templates:.
    4. Click submit button to save the change.
Now open file "viewtopic_body.html."
Find string
Quote:
<div class="postbody">{postrow.MESSAGE}</div>
.
Replace that string by the followings.
Code:
<div class="postbody">{postrow.MESSAGE}
<!-- PHP -->
static $adsense=0;
$adsense++;
$adsense_max=1; //no. of adsense block.
if($adsense<=$adsense_max){
<!-- ENDPHP -->
<table style="width:100%; margin:10px 0;"><tr><td style="text-align:center;">
<!—your Adsense code here -->
</td></tr></table>
<!-- PHP -->}<!-- ENDPHP -->
</div>

Please do not forget to save the changes you have made.
___________________________________________
**Please give me feedback


Top
 Profile E-mail  
 
 Post subject: Re: How do you put Adsenese on phpBB3.x?
PostPosted: Mon Jun 15, 2009 3:38 pm 
Offline

Joined: Mon Jun 15, 2009 2:44 am
Posts: 2
OMG. That's cool. I'd prefer to use this way, because for example, if the first thread is a 2 lines post, and the second one is a 1 or 2 line reply, that is going to look like a flood of AdSense.

I'll try it then, Thank you so much. :D I'll let you know if it works.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
©  2008,   http://ramui.com   All rights reserved.
Powered by phpBB