[ New messages · Members · Forum rules · Search · RSS ]
Page 1 of 11
Coredownloadz Forum » Web developments and Ecommerce » Php BB Hacks and tricks » Add Google Adsense to phpBB First Post and Last Post
Add Google Adsense to phpBB First Post and Last Post
guitarmantraDate: Thursday, 2009-06-04, 9:13 AM | Message # 1
Colonel
Group: Administrators
Messages: 220
Awards: 3
Reputation: 2
Status: Offline
1) Go to the phpBB Administrator Control Panel > Styles tab > Templates > Edit (Your current template)

2) From the list of Template File, choose viewtopic_body.html

3) Look for <!-- END postrow --> (it should be somewhere at the center)

4) Paste <!-- INCLUDE google_ads_after1stpost.html --> just above (this is for the google ads after the first post)

Code

     <!-- INCLUDE google_ads_after1stpost.html -->

     <!-- END postrow -->

     <!-- INCLUDE google_ads_lastpost.html -->

5) Paste <!-- INCLUDE google_ads_lastpost.html --> just after <!-- END postrow --> (this is for the google ads after the last post)

Don't click Submit yet.

6) Now, copy the code below into a notepad, replace < GOOGLE ADSENSE CODE HERE > with your google adsense code and save it as "google_ads_after1stpost.html".

Code

<!-- IF ($postrow_i == 0) -->

<table class="tablebg" width="100%" cellspacing="1">
<tr class="row2">

<td align="center" valign="middle">
<b class="postauthor" style="color:#1845ad;"> G<span style="color:#ad1400;"> o</span> <span style="color:#c69e00;"> o</span> g<span style="color:#31b639;"> l</span> <span style="color:#ad1400;"> e</span> </b>
</td>
<td width="100%" height="25">
<table width="100%" cellspacing="0">
<tr>
<td class="gensmall" width="100%">  </td>
</tr>
</table>
</td>
</tr>

<tr class="row1">

<td valign="top" class="profile">
<table cellspacing="4" align="center" width="150">
<tr>
<td align="center"> </td>
</tr>
</table>

</td>
<td valign="top">
<table width="100%" cellspacing="5">
<tr>
<td>

<div class="postbody">

< GOOGLE ADSENSE CODE HERE >

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

<tr>
<td bgcolor="#D1D7DC" colspan="2" height="1"> </td>
</tr>
</table>
<!-- ENDIF -->


www.coredownloadz.ucoz.com
 
FileServe BitShare emoticon(
guitarmantraDate: Thursday, 2009-06-04, 9:15 AM | Message # 2
Colonel
Group: Administrators
Messages: 220
Awards: 3
Reputation: 2
Status: Offline
7) Now, copy the code below into a notepad, replace < GOOGLE ADSENSE CODE HERE > with your google adsense code and save it as "google_ads_lastpost.html".
Code

<table class="tablebg" width="100%" cellspacing="1">
<tr class="row2">

<td align="center" valign="middle">
<b class="postauthor" style="color:#1845ad;"> G<span style="color:#ad1400;"> o</span> <span style="color:#c69e00;"> o</span> g<span style="color:#31b639;"> l</span> <span style="color:#ad1400;"> e</span> </b>
</td>
<td width="100%" height="25">
<table width="100%" cellspacing="0">
<tr>
<td class="gensmall" width="100%">  </td>
</tr>
</table>
</td>
</tr>

<tr class="row1">

<td valign="top" class="profile">
<table cellspacing="4" align="center" width="150">
<tr>
<td align="center"> </td>
</tr>
</table>

</td>
<td valign="top">
<table width="100%" cellspacing="5">
<tr>
<td>

<div class="postbody">

< GOOGLE ADSENSE CODE HERE >

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

<tr>
<td bgcolor="#D1D7DC" colspan="2" height="1"> </td>
</tr>
</table>

8) Upload both google_ads_after1stpost.html and google_ads_lastpost.html to /styles/subSilver/template/ (change the path of your template accordingly)

9) Now, click Submit at the Administrator Control Panel.

10) You should see something like this forum in your forum. Change the color accordingly.

There you have it, you can now start tweaking the color, look and feel to your preference.


www.coredownloadz.ucoz.com
 
FileServe BitShare emoticon(
Coredownloadz Forum » Web developments and Ecommerce » Php BB Hacks and tricks » Add Google Adsense to phpBB First Post and Last Post
Page 1 of 11
Search: