Google ads on phpbb forums

JohnJohn Junior MemberNAT Warrior
I'm not sure how useful this tutorial I made a few weeks ago will be but I made if for a few friends that were asking how I got the ads on my forums.

This is the first tutorial I have made on anything so hopefully I haven't made a mistake, this should be easy to do and I only learned this by editing files a lot then checking what happened by reloading the pages to hope for the ads on the page. Here it goes, hope it's useful to someone.

First open index_body.tpl this is found in your /templates then the template name that you are using, All the files I say you will need are located in same directory. I used notepad to open this file but you can use dreamweaver or another app if it's easier for you.

Once the file is open and ready to be edited then look for:
<a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a></td>
</tr>
</table>

Under this add
<html>
<center>
<script type="text/javascript"><!--
google_ad_client = "YOURCLIENTNUMBER";
google_alternate_color = "333333";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_color_border = "003366";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_url = "FF6600";
google_color_text = "FF6600";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</html>

You can use your own code from google for a different ad/colours etc, remember to use your client number.

Now open viewforum_body.tpl and make the changes, open the same way as you did the last one.

Find:
<td align="right" valign="bottom" nowrap="nowrap"><span class="gensmall"><b>{PAGINATION}</b></span></td>
</tr>

Under this add the advert code from google.
<html>
<center>
<script type="text/javascript"><!--
google_ad_client = "YOURCLIENTNUMBER";
google_alternate_color = "333333";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_color_border = "003366";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_url = "FF6600";
google_color_text = "FF6600";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</html>
Again, remember to use your client number.

This is the last file we will need to edit, open file viewtopic_body.tpl and get ready to make some changes.

Find:
<span class="gensmall"><b>{PAGINATION}</b><br />
&nbsp; </span></td>
</tr>
</table>
Now to add the google ads, use the code below or your own.
<html>
<center>
<script type="text/javascript"><!--
google_ad_client = "YOURCLIENTNUMBER";
google_alternate_color = "333333";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_color_border = "003366";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_url = "FF6600";
google_color_text = "FF6600";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
</html>

Hopefully after all this you will have ads on your site, if you still have problems then post back your problem and I'll have a look into it.
[+] JSlane Designs
[+] JSlane Hosts

Comments

Sign In or Register to comment.