<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EM &#187; Google AdSense</title>
	<atom:link href="http://www.ericm.ca/tag/google-adsense/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericm.ca</link>
	<description>Here lies random</description>
	<lastBuildDate>Sun, 31 Oct 2010 04:56:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>phpBB and Google AdSense</title>
		<link>http://www.ericm.ca/2008/01/05/phpbb-and-google-ads/</link>
		<comments>http://www.ericm.ca/2008/01/05/phpbb-and-google-ads/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 12:32:53 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[AdSense TOS]]></category>
		<category><![CDATA[Google AdSense]]></category>
		<category><![CDATA[legal]]></category>
		<category><![CDATA[monetization]]></category>
		<category><![CDATA[phpBB]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://ericm.ca/2008/web-development/phpbb-300-and-google-ads</guid>
		<description><![CDATA[I&#8217;ve been using the brand-new phpBB forum software for the past few days now and I must admit I am very impressed. But that&#8217;s a post for another time! For now, I&#8217;ll discuss the optimal placement of Google ads within phpBB&#8217;s templates, the easiest method to do so, and most importantly, how to achieve all [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.ericm.ca%2F2008%2F01%2F05%2Fphpbb-and-google-ads%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ericm.ca%2F2008%2F01%2F05%2Fphpbb-and-google-ads%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I&#8217;ve been using the brand-new phpBB forum software for the past few days now and I must admit I am very impressed. But that&#8217;s a post for another time!  For now, I&#8217;ll discuss the <strong>optimal placement of Google ads within phpBB&#8217;s templates</strong>, the <strong>easiest method</strong> to do so, and most importantly, how to <strong>achieve all this legally under Google&#8217;s TOS</strong>. </p>
<p><img alt="" src="/images/adsensephpbb.gif" title="Google Adsense and phpBB" class="aligncenter" width="366" height="58" /></p>
<p><span id="more-15"></span></p>
<h2>What is allowed?</h2>
<p>After skimming through Google&#8217;s <a href="https://www.google.com/adsense/static/en_US/LocalizedTerms.html?hl=en_US">Terms and Conditions</a>,  I have concluded that you may <em>not</em> place the advertisements in all areas of the forum. Here is the exact tidbit from the TOS:</p>
<blockquote><p><strong>5. </strong><bdo><strong> Prohibited Uses.</strong></bdo></p>
<p><bdo>You shall not, and shall not authorize or encourage any third party to:</bdo></p>
<p><bdo></bdo><bdo>(v) display any Ad(s), Link(s), or Referral Button(s) on any error page, on any registration or &#8220;thank you&#8221; page (e.g., a page that thanks a user after he/she has registered with the applicable Web site), on any chat page, in any email, or on any Web page or any Web site that contains any pornographic, hate-related, violent, or illegal content</bdo></p></blockquote>
<h2>What this means</h2>
<p>In the past, you would simply insert the ad code in just two phpBB templates: <strong class="location">overall_header.html</strong> and <strong class="location">overall_footer.html</strong>. This would display your advertisements at the top and bottom of your <em>entire</em> forum. This is no longer legal now that AdSense&#8217;s TOS explicitly states that advertisements on certain pages like registration is prohibited. </p>
<p>So how do we display the advertisements on the header and footer of our forums without violating Adsense policy? Unfortunately, this now means editing more than two phpBB templates. Fortunately, this article will go over the easiest method in placing Google ads in your forums. I will go over exactly which template files you should edit to yield the optimal page impressions/clicks. </p>
<p>But first&#8230;</p>
<h2>Editing ad code from one file</h2>
<p>Since we need to insert the ad code in more then two templates now, how can we easily update an ad code without having to go through each and every template file? We can eliminate this problem with the following easy fix.</p>
<blockquote><p>Open up Notepad or your favorite code editor, and paste your ad code within this file. </p>
<p>Save it as <strong class="location">googleads.html</strong>. </p>
<p>Upload the file with your favorite FTP to: <strong class="location">http://www.<em>YOURWEBSITE</em>.com/forums/styles/<em>YOURTHEME</em>/template/</strong></li>
<p>To insert this file into phpBB templates, you will use the following <em>ad insert code</em>: </p>
<p><strong class="code"><code>&lt;!-- INCLUDE googleads.html --&gt;</code></strong></p></blockquote>
<h2>Where to place the ads</h2>
<p>So now that you have the ad insert code, where should you place it?</p>
<p>As I mentioned above, we would have simply edited two template files in the past to display it in the header and footer of our forums. Now that this isn&#8217;t legally possibly anymore, we can achieve these same results by <em>editing all the templates that</em> don&#8217;t <em>violate Google&#8217;s TOS</em>. </p>
<p>The following guide is based on editing the <em>prosilver </em>theme, phpBB 3.0.0&#8242;s default theme. However, the following edits should work for most phpBB themes.</p>
<p>To edit the templates, login to your admin control panel and find <strong class="location">Styles Tab > Style components > Templates</strong>. To the right, click <strong class="location">Edit</strong> for the template you wish to update.</p>
<h3>The index page</h3>
<p>Let&#8217;s start off by editing the index page, the main forum page. Open up the <strong class="location">index_body.html</strong> template file.</p>
<blockquote><p><strong>Step 1</strong></p>
<p>Find (usually near the top) <strong class="code"><code>&lt;!-- INCLUDE overall_header.html --&gt;</code></strong></p>
<p>Before or after, add <strong class="code"><code>&lt;!-- INCLUDE googleads.html --&gt;</code></strong></p>
<p>Insert the ad code <em>before </em> if you wish the ad banner to appear above the header, or <em>after </em>for below the header. Most people post it <em>after </em>the code. </p>
<p><strong>DO NOT DELETE THE ORIGINAL CODE.</strong></p>
<p><strong>Step 2 </strong></p>
<p>In the same file:</p>
<p>Find (usually near the bottom) <strong class="code"><code>&lt;!-- INCLUDE overall_footer.html --&gt;</code></strong></p>
<p>Before or after, add <strong class="code"><code>&lt;!-- INCLUDE googleads.html --&gt;</code></strong></p>
<p>Most people add this <em>before </em>the footer.</p></blockquote>
<h3>A few more pages to edit&#8230;</h3>
<p>The above instructions can be applied to the following templates in the <em>exact </em>same way:</p>
<ul>
<li><strong class="location">viewforum_body.html</strong> &#8211; Viewing a forum template</li>
<li><strong class="location">ucp_header.html</strong> and <strong class="location">ucp_footer.html</strong> &#8211; User control panel template</li>
<li><strong class="location">viewtopic_body.html</strong> &#8211; Viewing a thread template</li>
<li><strong class="location">posting_layout.html</strong> &#8211; Posting a thread or replying template*</li>
</ul>
<p><em>* Before editing the</em> posting_layout.html <em>template, you can read the following optional step on how to optimize this specific template.</em></p>
<h3>The &#8216;posting a thread / replying to a post&#8217; page (optional step)</h3>
<p>After nearly a decade of running forums, I have found that an additional template can be edited to generate greater ad impressions and clicks.</p>
<p><strong>NOTE!</strong> If you are doing this optional step, do <em>not </em>apply the second step to <strong class="location">posting_layout.html</strong>; in other words, carry out step 1 but <em>skip step 2</em>. This means not adding the ad code to the footer of <strong class="location">posting_layout.html</strong>.</p>
<p>To apply this optional step, open the <strong class="location">posting_editor.html</strong> template file.</p>
<blockquote><p>Find (somewhere near the middle)<span style="font-weight: bold"></span>	<strong class="code"><code>&lt;!-- IF S_HAS_ATTACHMENTS --&gt;</code></strong></p>
<p>Add <em>before </em><strong class="code"><code>&lt;!-- INCLUDE googleads.html --&gt;</code></strong></p>
<p>This time you only have one choice: add <em>before </em>and not after.</p></blockquote>
<h2>Why the optional step and additional template?</h2>
<p>This optional step still displays the ad banner at the footer of the &#8216;posting a thread or reply&#8217; page. The only difference is how visible the advertisement becomes.</p>
<p>Without the optional step, the ad banner would appear directly above or below the footer. Either way, the advertisement would not be very visible. When a user creates a new post, the page is mainly filled with the textbox and forum options such as attachments. In most instances, the advertisement from the footer isn&#8217;t visible at all when they reply to a thread &#8211; unless the user has an enormous screen resolution.</p>
<p>Applying the optional step to the additional template effectively solves this problem. It will display the advertisement right above the <strong class="location">Save / Preview / Submit</strong> button meaning that a user <em>cannot </em>miss it! This means more clicks and more profit for your forum!</p>
<h2>Confirm the changes</h2>
<p>To ensure that all your forum members can view the template changes, click the <strong class="location">General Tab</strong> in the admin control panel. To the right, find <strong class="location">Purge the cache</strong> and click <strong class="location">Run Now</strong>. </p>
<p>Also, head over to <strong class="location">General Tab > Server configuration > Load settings</strong>.To the right, find <strong class="location">Recompile stale style components</strong> and select <strong class="location">Yes</strong>.</p>
<p>And that should do the trick! The above techniques will help you get around the legal problems of the traditional method of editing only the header and footer templates, and help you position your advertisements for maximum clickthroughs and impressions. This is the simplest phpBB modification to use. Have fun monetizing your forums!</p>
<p>For live examples, checkout <a href="http://www.rakion.biz">Rakion.biz</a> and <a href="http://www.ieatgrenades.com">ieatgrenades</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericm.ca/2008/01/05/phpbb-and-google-ads/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>

