AdSense on PHPBB?

SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Spacemail by SpaceshipSpacemail by Spaceship
Watch

Phronesis

Established Member
Impact
48
How do you put Adsense up on PHPbb? Is it possible?
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
If you want it in your header edit the overall_header.tpl or overall_footer.tpl files and add the javascript code.

Also, if thats no help talk to my good friend Mr. Google
 
0
Close
Depends on where you want it. Give me a location, I'll find you the template ;)

-Eric
 
0
Close
0
Close
Thanks all - I actually installed a template from phpbbhacks already. Maybe I need to look at another one. I'd like to put a landscape adsense banner just below the main header. This is the first time messing with a forum.
 
0
Close
Open, overall_header.tpl and find the following (bottom of file):
PHP:
		<br />
Add below:
PHP:
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
  <tr> 
	<td align="center" valign="middle">your adsense code</td>
  </tr>
</table>
<br />
 
0
Close
In that case its the overall_header.tpl file, located within whichever template folder you're using for your forums theme (subsilver is default)

Basically you want to look towards the end of that file for where the header content ends, and then pop in your adsense code, providing you don't break any tables or screw up the alignment etc.

Also - are you using the inline adsense code hack from phpbbhacks? (the one that puts the adsense ad after either each post or every first post. I have that installed on one of my developing forums which doesn't have a great deal of visitors, so curious about the sort of feedback on usage of that (more intrusive) adsense placement

Edit: Darn, beaten to it :P
 
0
Close
Just a note, ensure you do not have adsense ads on pages such as login pages etc (non content pages) as it is a violation of their tos.
 
0
Close
Attached is the template I'm using. I looked at phpbbhacks and found an adsense mod but wasn't sure which file to alter b/c it refers to the default subsilver.

This is the code for the overall_header.tpl

PHP:
<?xml version="1.0" encoding="{S_CONTENT_ENCODING}"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="{S_CONTENT_DIRECTION}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
{META}
{NAV_LINKS}
<title>{SITENAME} :: {PAGE_TITLE}</title>
<link rel="stylesheet" href="templates/fisubgreen/{T_HEAD_STYLESHEET}" type="text/css" />
<!-- BEGIN switch_enable_pm_popup -->
<script type="text/javascript">
<!--
	if ( {PRIVATE_MESSAGE_NEW_FLAG} )
	{
		window.open('{U_PRIVATEMSGS_POPUP}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');;
	}
//-->
</script>
<!-- END switch_enable_pm_popup -->
</head>
<body>
<a name="top" id="top"></a>
<table class="bodyline" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
<table class="topbkg" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr> 
<td><a href="{U_INDEX}"><img src="templates/fisubgreen/images/phpbb2_logo.jpg" border="0" alt="{L_INDEX}" title="{L_INDEX}" width="240" height="110" /></a></td>
<td align="center" width="100%"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr> 
<td align="center" class="topnav"> <a href="{U_FAQ}">{L_FAQ}</a>  •  <a href="{U_SEARCH}">{L_SEARCH}</a>
 •  <a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a>  • 
 <a href="{U_GROUP_CP}">{L_USERGROUPS}</a>
<!-- BEGIN switch_user_logged_out -->
  •  <a href="{U_REGISTER}">{L_REGISTER}</a>
<!-- END switch_user_logged_out -->
 •  <a href="{U_PROFILE}">{L_PROFILE}</a>  •  <a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>  
•  <a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<tr>
<td>

Maybe I'm blind - I don't see the <br /> you mentioned Second.
Thanks for continued help!
 
0
Close
anybody?
 
0
Close
The following is directly below your header:

Code:
<table class="topbkg" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr> 
<td><a href="{U_INDEX}"><img src="templates/fisubgreen/images/phpbb2_logo.jpg" border="0" alt="{L_INDEX}" title="{L_INDEX}" width="240" height="110" /></a></td>
<td align="center" width="100%"> </td>
</tr>
</table>

Try putting the ad directly below this. If this doesn't work, or if you want the ad to go below the text links, which I assume is at the top, put the ad directly below this:

Code:
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr> 
<td align="center" class="topnav"> <a href="{U_FAQ}">{L_FAQ}</a>  •  <a href="{U_SEARCH}">{L_SEARCH}</a>
 •  <a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a>  • 
 <a href="{U_GROUP_CP}">{L_USERGROUPS}</a>
<!-- BEGIN switch_user_logged_out -->
  •  <a href="{U_REGISTER}">{L_REGISTER}</a>
<!-- END switch_user_logged_out -->
 •  <a href="{U_PROFILE}">{L_PROFILE}</a>  •  <a href="{U_PRIVATEMSGS}">{PRIVATE_MESSAGE_INFO}</a>  
•  <a href="{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT}</a></td>
</tr>
</table>

I've done a lot of phpBB template modifications, etc... in the past. If I actaully saw the template it would help. But try those two places, and if you don't like the way it looks, post back with a link to the template. Then I could probably tell you for sure.

Good luck,
David
 
0
Close
i am expert at phpBB i been doing it for 3 1/2 years now. I used to have a free hosting site but it got shutdown. The forum was too big :)

http://phpbbhacks.com is what i recommended.

Or

http://phpbb-amod.com
 
0
Close
Rudy said:
I've done a lot of phpBB template modifications, etc... in the past. If I actaully saw the template it would help. But try those two places, and if you don't like the way it looks, post back with a link to the template. Then I could probably tell you for sure.

Good luck,
David


Hey David, I attached the template in my last post. Thanks.
 
0
Close
Thanks all - got it working!
 
0
Close
Good to see you got it working. :)
 
0
Close
filth@flexiwebhost said:
Just a note, ensure you do not have adsense ads on pages such as login pages etc (non content pages) as it is a violation of their tos.


Oops. I noticed this has happened. How do I correct?
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Member card: see how many threads a member started
The member card now shows a Threads number, right after Posts. The member card is the box that opens when you point at a name. Profile...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back