<?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; phpBB</title>
	<atom:link href="http://www.ericm.ca/tag/phpbb/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>Facebook&#8217;s Like Button and integration with phpBB</title>
		<link>http://www.ericm.ca/2010/09/02/facebooks-like-button-and-integration-with-phpbb/</link>
		<comments>http://www.ericm.ca/2010/09/02/facebooks-like-button-and-integration-with-phpbb/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 07:24:05 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[configurator]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Like Button]]></category>
		<category><![CDATA[phpBB]]></category>

		<guid isPermaLink="false">http://www.ericm.ca/?p=339</guid>
		<description><![CDATA[Just a few months earlier, Facebook released their new Like Button which is popping up on most popular websites and forums. Implementing this button with phpBB forums isn&#8217;t as simple as grabbing the code generated from Facebook&#8217;s configurator. That is, if you want it to work properly with the dynamic pages of your forum. The [...]]]></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%2F2010%2F09%2F02%2Ffacebooks-like-button-and-integration-with-phpbb%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ericm.ca%2F2010%2F09%2F02%2Ffacebooks-like-button-and-integration-with-phpbb%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Just a few months earlier, Facebook released their new <strong class="location">Like Button</strong> which is popping up on most popular websites and forums. Implementing this button with phpBB forums isn&#8217;t as simple as grabbing the code generated from Facebook&#8217;s <a href="http://developers.facebook.com/docs/reference/plugins/like">configurator</a>. That is, if you want it to work properly with the dynamic pages of your forum.<a href="http://www.ericm.ca/files/2010/09/facebook_like_button.png"><img class="aligncenter size-full wp-image-340" title="Facebook Like Button" src="http://www.ericm.ca/files/2010/09/facebook_like_button.png" alt="" width="271" height="33" /></a></p>
<p>The configurator generates two sets of code for you to choose from, Iframe and XFBML, both of which will link to the static URL you provide. Most people want it to link to dynamic pages, specifically, the phpBB thread that is being Liked. Two things must be done to accomplish this: modifying the code provided by the configurator, and configuring phpBB to allow the Facebook bot access to your forum. (Full credit goes to <a href="http://www.phpbb.com/community/viewtopic.php?f=72&amp;t=2074905&amp;hilit=facebook+like">this</a> phpBB thread for providing guidance.)</p>
<h1>Modifying the Iframe code</h1>
<blockquote><p>&lt;iframe src=&#8221;http://www.facebook.com/plugins/like.php?href=http%3A%2F%2F<strong>www.yourwebsite.com</strong>%2Fviewtopic.php%3Ff%3D{S_FORUM_ID}%26t%3D{S_TOPIC_ID}&amp;amp;layout=standard&amp;amp;show_faces=true&amp;amp;width=450&amp;amp;action=like&amp;amp;colorscheme=light&#8221; scrolling=&#8221;no&#8221; frameborder=&#8221;0&#8243; allowTransparency=&#8221;true&#8221; style=&#8221;border:none; overflow:hidden; width:450px; <strong>height:30px</strong>&#8220;&gt;&lt;/iframe&gt;</p></blockquote>
<p>I highlighted two important parts of the above code:</p>
<ol>
<li><strong>www.yourwebsite.com</strong> &#8211; replace this with your own URL. This also assumes you installed phpBB in the root directory. If you happened to have installed phpBB in a folder, you will need to replace the URL with: www.yourwebsite.com<strong>%2F</strong>folder</li>
<li><strong>height:30px</strong> &#8211; By default, the configurator sets it to 80 which is much too large. I found 30px to be the perfect height but you may play around with this number. You may also set the width, which appears twice in the above code, to whatever you feel works best for you (450 is the default)</li>
</ol>
<h1>Inserting Facebook Like Button into phpBB</h1>
<p>The above code should be pasted into <strong class="location">viewtopic_b</strong><strong class="location">ody.html</strong>. Where in that template should the code belong?<a href="http://www.ericm.ca/files/2010/09/facebook_like_button_example.png"><img class="aligncenter size-full wp-image-341" title="Facebook Like Button in phpBB forum" src="http://www.ericm.ca/files/2010/09/facebook_like_button_example.png" alt="" width="381" height="77" /></a></p>
<p>Personally, I wanted the Like Button to appear right next to the Post Reply button as this would give it the biggest exposure. Here&#8217;s how:</p>
<blockquote><p><strong>Find:</strong></p>
<p>&lt;div class=&#8221;topic actions&#8221;&gt;</p>
<p>&lt;div class=&#8221;buttons&#8221;&gt;</p>
<p><strong>Paste below:</strong></p>
<p>The Iframe code modified above.</p></blockquote>
<h1>Adding the Facebook bot in phpBB and configuring bot permissions</h1>
<p>This final step will ensure that Facebook has the required permissions to pull your thread titles correctly.</p>
<p>In phpBB, login to the <strong class="location">Administration Control Panel</strong>. Under <strong class="location">Quick Access</strong>, select <strong class="location">Spiders/Robots</strong> and then <strong class="location">Add bot</strong>.</p>
<p>Use the following settings:</p>
<ul>
<li>Bot name: FaceBook [Linkcheck]</li>
<li>Agent match: facebookexternalhit/1.1</li>
</ul>
<p>All other settings not mentioned can be left default or blank.</p>
<p>Now, you need to ensure that the Facebook bot has access to your forums. Still in the Administration Control Panel, click on the <strong class="location">User and Groups</strong> tab. Under <strong class="location">Groups</strong>, click on <strong class="location">Groups&#8217; forum permissions</strong>. Select <strong class="location">Bots</strong> from the drop-down menu and hit submit. At this point you should select the appropriate forum sections (<strong class="location">All forums</strong> would work) and hit submit. Here, ensure that you assign the <strong class="location">Bot access</strong> role for each forum section and click <strong class="location">Apply all permissions</strong>.</p>
<p>At this point, the Facebook Like Button should be configured correctly for the dynamic pages of your phpBB forums.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericm.ca/2010/09/02/facebooks-like-button-and-integration-with-phpbb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>phpBB: Display different content for guests and members</title>
		<link>http://www.ericm.ca/2010/05/19/phpbb-display-different-content-for-guests-and-members/</link>
		<comments>http://www.ericm.ca/2010/05/19/phpbb-display-different-content-for-guests-and-members/#comments</comments>
		<pubDate>Wed, 19 May 2010 11:02:04 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[phpBB]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.ericm.ca/?p=253</guid>
		<description><![CDATA[To display different content depending on whether or not a user is logged into your phpBB forums, simply use the following code in your template files: &#60;!&#8211; IF not S_USER_LOGGED_IN &#8211;&#62; Text between these tags will be displayed to guests. &#60;!&#8211; ENDIF &#8211;&#62; &#60;!&#8211; IF not S_IS_BOT and S_USER_LOGGED_IN &#8211;&#62; Text between these tags will [...]]]></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%2F2010%2F05%2F19%2Fphpbb-display-different-content-for-guests-and-members%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.ericm.ca%2F2010%2F05%2F19%2Fphpbb-display-different-content-for-guests-and-members%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><img src="http://www.ericm.ca/wp-content/uploads/2010/05/PhpBB_Logo1.png" alt="PhpBB_Logo[1]" title="PhpBB_Logo[1]" width="345" height="119" class="aligncenter size-full wp-image-254" /></p>
<p>To display different content depending on whether or not a user is logged into your phpBB forums, simply use the following code in your template files:</p>
<blockquote><p><strong class="code">&lt;!&#8211; IF not S_USER_LOGGED_IN &#8211;&gt;</strong></p>
<p>Text between these tags will be displayed to <strong>guests</strong>.</p>
<p><strong class="code">&lt;!&#8211; ENDIF &#8211;&gt;</p>
<p>&lt;!&#8211; IF not S_IS_BOT and S_USER_LOGGED_IN &#8211;&gt;</strong></p>
<p>Text between these tags will be displayed to <strong>members</strong>.</p>
<p><strong class="code">&lt;!&#8211; ENDIF &#8211;&gt;</strong></p></blockquote>
<p>This piece of code is particularly useful in the <strong class="location">index_body.html</strong> or <strong class="location">overall_header.html</strong> template to entice guests to register at your forums.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericm.ca/2010/05/19/phpbb-display-different-content-for-guests-and-members/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>

