<?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>Christian Bullock</title>
	<atom:link href="http://www.christianbullock.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.christianbullock.com</link>
	<description>Custom phpBB Designer</description>
	<lastBuildDate>Mon, 06 Feb 2012 22:12:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Absolution v1.1 available</title>
		<link>http://www.christianbullock.com/2012/absolution-v1-1-available</link>
		<comments>http://www.christianbullock.com/2012/absolution-v1-1-available#comments</comments>
		<pubDate>Mon, 06 Feb 2012 22:06:55 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=470</guid>
		<description><![CDATA[An updated version of Absolution, compatible with phpBB 3.0.10 is now available. ]]></description>
			<content:encoded><![CDATA[<div style="clear: both;"></div>
<div class="postbuttons">
<a class="download" href="http://www.christianbullock.com/downloads/absolution.zip">Absolution.zip</a>
</div>
<p>Absolution has been overhauled and updated, and is now compatible with phpBB 3.0.10. The update has significantly de-cluttered the original Absolution style, as well as adding some fresh appearance and increased usability. There are a number of changes I&#8217;d still like to make to the style before it&#8217;s fully &#8220;complete&#8221;, however I&#8217;m sufficiently happy with it at the moment to release.</p>
<h3>Where to download</h3>
<p>Currently, the only place to download the updated version is <a href="http://www.christianbullock.com/downloads/absolution.zip">here</a> . You can also download it by clicking the big pink button above. </p>
<p>I am currently waiting for phpBB.com, phpbb3styles.net and awesomestyles.com to update their hosted versions of the style. </p>
<h3>How do I update?</h3>
<p>Given the huge amount of changes, there is no update file. The only way to update the style would be to overwrite your current Absolution style and refresh Absolution&#8217;s imageset, theme and template in the ACP&#8217;s &#8220;Styles&#8221; tab. This is a far from ideal situation for those with a large number of MODs, however there was little that could be done to avoid this. </p>
<h3>Support</h3>
<p>Support can be obtained by emailing me through the contact page. Due to the large volume of emails I receive I cannot guarantee a reply, though I will do my best to reply to most problems. </p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2012/absolution-v1-1-available/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Absolution &amp; Supernova 3.0.9 Information</title>
		<link>http://www.christianbullock.com/2011/absolution-supernova-3-0-9-information</link>
		<comments>http://www.christianbullock.com/2011/absolution-supernova-3-0-9-information#comments</comments>
		<pubDate>Tue, 12 Jul 2011 17:05:53 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=447</guid>
		<description><![CDATA[Time constraints and busy schedule will delay release of updated styles.]]></description>
			<content:encoded><![CDATA[<p>Owing to time constraints, a busy schedule and commitments to customers, I am unable to update Absolution and Supernova to phpBB 3.0.9 for at least a week.</p>
<p>For those who use either style and have already updated their boards to 3.0.9, update instructions can be downloaded from here: http://download.phpbb.com/pub/release/3.0/update/to_3.0.9/phpBB-3.0.8_to_3.0.9-codechanges.zip &#8211; Both styles are based on &#8220;Prosilver&#8221;, those are the instuctions you may follow.</p>
<p>Please accept my apologies for the inconvenience this may cause.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2011/absolution-supernova-3-0-9-information/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>jQuery stylesheet switcher for phpBB</title>
		<link>http://www.christianbullock.com/2011/phpbb-jquery-stylesheet-switcher</link>
		<comments>http://www.christianbullock.com/2011/phpbb-jquery-stylesheet-switcher#comments</comments>
		<pubDate>Tue, 10 May 2011 22:34:19 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[phpBB3 Tutorials]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=419</guid>
		<description><![CDATA[Ever wanted to allow your members to each choose from one of multiple colour schemes or backgrounds? This tutorial will teach you how to add a jQuery powered stylesheet switcher to your phpBB forum. ]]></description>
			<content:encoded><![CDATA[<div style="clear: both;"></div>
<h3>What we&#8217;re trying to achieve</h3>
<p>User customisation is becoming more and more popular in forum software. Things like collapsible categories, collapsible sidebars, customisable backgrounds, choice of colour scheme are all things that nobody could really imagine would have existed in styles 5 years ago. Now they play a huge part in separating the best styles from the rest. This tutorial will teach you how to add a jQuery stylesheet switcher to your forum, allowing your users to choose between different colour schemes.</p>
<div class="postbuttons"><a class="download" href="http://www.christianbullock.com/downloads/stylesheet-switcher.zip">stylesheet-switcher.zip</a></div>
<h3>Preparation</h3>
<p>You&#8217;ll need a decent <a href="http://notepad-plus-plus.org">Source code editor</a> to complete this tutorial. You should also <strong>download the stylesheet-switcher.zip archive</strong> and then:</p>
<p><strong>Copy:</strong> /stylesheet-switcher/jquery.cookie.js <strong>to</strong> /styles/prosilver/template/<br />
<strong>Copy:</strong> /stylesheet-switcher/blank.css <strong>to</strong> /styles/prosilver/theme/<br />
<strong>Copy:</strong> /stylesheet-switcher/colours <strong>to</strong> /styles/prosilver/theme/</p>
<h3>Step 1) HTML Edits</h3>
<p>Firstly we need to connect to jQuery and the cookie plugin. Next we&#8217;ll be adding the blank stylesheet connection (used to override the default style&#8217;s style information). Finally all we need to do here is add the links that the end user will use to change between the stylesheets.</p>
<p><strong>Open:</strong> /styles/prosilver/template/overall_header.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/forum_fn.js&quot;&gt;&lt;/script&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;!-- If the above line is already present, don't add it again --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/jquery.cookie.js&quot;&gt;&lt;/script&gt;</pre>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;!-- IF S_CONTENT_DIRECTION eq 'rtl' --&gt;
	&lt;link href=&quot;{T_THEME_PATH}/bidi.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;screen, projection&quot; /&gt;
&lt;!-- ENDIF --&gt;</pre>
<p><strong>After, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;link rel=&quot;stylesheet&quot; href=&quot;{T_THEME_PATH}/blank.css&quot; type=&quot;text/css&quot; class=&quot;colour-switcher&quot; /&gt;</pre>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;a name=&quot;start_here&quot;&gt;&lt;/a&gt;</pre>
<p><strong>After, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">    &lt;br /&gt;&lt;br /&gt;

    &lt;div class=&quot;navbar&quot;&gt;
    	&lt;div class=&quot;inner&quot;&gt;&lt;span class=&quot;corners-top&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
        	&lt;ul class=&quot;linklist rightside&quot;&gt;
            	&lt;li&gt;&lt;strong&gt;Colour:&lt;/strong&gt;&lt;/li&gt;
            	&lt;li&gt;&lt;a href=&quot;#&quot; rel=&quot;{T_THEME_PATH}/colours/red.css&quot; class=&quot;switch&quot;&gt;Red&lt;/a&gt; &amp;bull; &lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;#&quot; rel=&quot;{T_THEME_PATH}/colours/green.css&quot; class=&quot;switch&quot;&gt;Green&lt;/a&gt; &amp;bull; &lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;#&quot; rel=&quot;{T_THEME_PATH}/colours/yellow.css&quot; class=&quot;switch&quot;&gt;Yellow&lt;/a&gt; &amp;bull; &lt;/li&gt;
                &lt;li&gt;&lt;a href=&quot;#&quot; rel=&quot;{T_STYLESHEET_LINK}&quot; class=&quot;switch&quot;&gt;Default&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;span class=&quot;corners-bottom&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
    &lt;/div&gt;</pre>
<p>Pay attention to the rel=&#8221;" attribute of each &lt;a&gt; tag. The stylesheet linked here will populate a blank stylesheet called after phpBB&#8217;s, therefore overwriting the default style information. We also add a &#8220;default&#8221; link which links to the default style&#8217;s CSS. It will essentially define the same stylesheet twice, but is a <strong>lot</strong> more graceful than writing a blank cookie over the user&#8217;s colour choice and then forcibly refreshing the page.</p>
<h3>Step 2) CSS Edits</h3>
<p>This step is largely down to yourselves and what you want to do with the script. Those of you well versed in CSS will know exactly how to override CSS information, if you&#8217;re not familiar with CSS then this probably isn&#8217;t for you.</p>
<p>Here we are going to take a really basic look at <strong>green.css</strong>:</p>
<pre class="brush: xml; title: ; notranslate">/* Green stylesheet. Override everything here.
This is called after phpBB's stylesheet, so !important shouldn't be required in most cases */

html, body {
	background-color: #009900;
}</pre>
<p>When this stylesheet is activated, the colour <strong>#009900</strong> will override prosilver&#8217;s default white. Instead of using colours it is possible to add any style information to change element. For example, you could override the <strong>forabg</strong> and <strong>forumbg</strong> to re-colour the category / forum borders. You could override <strong>.headerbar</strong> to change the blue header, or even just give your users a choice of different background images instead of colours.</p>
<h3>Step 3) The jQuery</h3>
<p>This is where all the magic happens. It should be straight forward to understand reading through the code.</p>
<p><strong>Open:</strong> /styles/prosilver/template/overall_header.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;link rel=&quot;stylesheet&quot; href=&quot;{T_THEME_PATH}/blank.css&quot; type=&quot;text/css&quot; class=&quot;colour-switcher&quot; /&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot;&gt;
      if($.cookie(&quot;colour-choice&quot;)) {
         $(&quot;link.colour-switcher&quot;).attr(&quot;href&quot;,$.cookie(&quot;colour-choice&quot;));
      }
   $(document).ready(function() {
      $(&quot;a.switch&quot;).click(function() {
         $(&quot;link.colour-switcher&quot;).attr(&quot;href&quot;,$(this).attr('rel'));
         $.cookie(&quot;colour-choice&quot;,$(this).attr('rel'), {expires: 365, path: '/'});
         return false;
      });
   });
&lt;/script&gt;</pre>
<p>Assuming you&#8217;ve done everything correctly, you should now be able to change between colours on your style by clicking the different coloured links.</p>
<h3>Finishing off</h3>
<p>It&#8217;s important to know that if you&#8217;re an Administrator, your chosen colour will not carry over into the &#8220;password confirmation screen&#8221; when trying to log into the Administration Control Panel. This is because the cookie the script writes your preference to is in one directory, whereas the ACP (and authentication) is in another directory entirely.</p>
<p>If you found this tutorial useful, please consider <a href="../donate">donating</a>. If you have any serious problems, let me know in the comments below. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2011/phpbb-jquery-stylesheet-switcher/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Moderator column on index page</title>
		<link>http://www.christianbullock.com/2011/phpbb-moderator-column-on-index-page</link>
		<comments>http://www.christianbullock.com/2011/phpbb-moderator-column-on-index-page#comments</comments>
		<pubDate>Thu, 07 Apr 2011 16:57:25 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[phpBB3 Tutorials]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=261</guid>
		<description><![CDATA[Add a new column to the index page showing forum-specific Moderators next to their respective forum(s). This was default in phpBB1, and has proved a popular feature in other bulletin board solutions ever since.]]></description>
			<content:encoded><![CDATA[<div style="clear: both;"></div>
<h3>What we&#8217;re trying to achieve</h3>
<p>Quite simply we&#8217;re going to learn how to add a &#8220;Moderator&#8221; column to the index page, after the &#8220;last post&#8221; column . If the Administrator has set forum-specific moderators they will be displayed next to their respective forums.</p>
<h3>Preparation</h3>
<p>To complete this tutorial, you&#8217;ll need a decent <a href="http://notepad-plus-plus.org/">Source Code Editor</a>.</p>
<h3>Step 1) HTML Edits</h3>
<p>Here we&#8217;re simply placing the code and the necessary IF statements. We&#8217;ll also remove the old &#8220;Moderators:&#8221; display from below the forum description. It won&#8217;t look quite right until we add the CSS later.</p>
<p><stong>Open:</stong> /styles/prosilver/template/forumlist_body.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;dd class=&quot;posts&quot;&gt;{L_POSTS}&lt;/dd&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;dd class=&quot;moderators&quot;&gt;{L_MODERATORS}&lt;/dd&gt;</pre>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;dd class=&quot;posts&quot;&gt;{forumrow.POSTS} &lt;dfn&gt;{L_POSTS}&lt;/dfn&gt;&lt;/dd&gt;</pre>
<p><strong>After, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;dd class=&quot;moderators&quot;&gt;&lt;!-- IF forumrow.MODERATORS --&gt;{forumrow.MODERATORS}&lt;!-- ELSE --&gt;--&lt;!-- ENDIF --&gt;&lt;/dd&gt;</pre>
<p><strong>Find and delete:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;!-- IF forumrow.MODERATORS --&gt;
	&lt;br /&gt;&lt;strong&gt;{forumrow.L_MODERATOR_STR}:&lt;/strong&gt; {forumrow.MODERATORS}
&lt;!-- ENDIF --&gt;</pre>
<h3>Step 2) CSS Edits</h3>
<p>At this point your index page should be looking pretty messy. We need to cut down the width of the topiclist &lt;dt&gt; tag (and some of the &#8220;last post&#8221; column) to accommodate the width of the Moderator column, then add some styling rules for the moderator column.</p>
<p><strong>Open:</strong> /styles/prosilver/theme/content.css</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">ul.topiclist dt {
	display: block;
	float: left;
	width: 50%;
	font-size: 1.1em;
	padding-left: 5px;
	padding-right: 5px;
}</pre>
<p><strong>Replace with:</strong></p>
<pre class="brush: xml; title: ; notranslate">ul.topiclist dt {
	display: block;
	float: left;
	width: 40%;
	font-size: 1.1em;
	padding-left: 5px;
	padding-right: 5px;
}</pre>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">dd.lastpost {
	width: 25%;
	font-size: 1.1em;
}</pre>
<p><strong>Replace with:</strong></p>
<pre class="brush: xml; title: ; notranslate">dd.lastpost {
	width: 20%;
	font-size: 1.1em;
}</pre>
<p><strong>Below that, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">dd.moderators {
	width: 15%;
	font-size: 1.1em;
	text-align: center;
	line-height: 2.2em;
}</pre>
<h3>Finishing off</h3>
<p>What you should now see is a Moderator column on the index page (and on viewforum.php if you have subforums). If the Administrator hasn&#8217;t assigned any forum-specific Moderators, two dashes &#8220;&#8211;&#8221; will be displayed instead. To set forum-specific Moderators, click: <strong>ACP &rarr; &#8220;Permissions&#8221; tab &rarr; Forum Moderators</strong>, then choose your forums and add users using the bottom-left box. Also make sure <strong>&#8220;Enable display of moderators:&#8221;</strong> is <em>enabled</em> in <strong>ACP &rarr; Load Settings</strong>.</p>
<h3>Support / Donations</h3>
<p>If you find a mistake in this tutorial, please <a href="../contact">let me know</a>. Did you find this tutorial useful? <a href="../donate">Make a donation</a>. If you&#8217;re having trouble implementing this on your board, <a href="../forum">ask for help</a>. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2011/phpbb-moderator-column-on-index-page/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Firefox 4 homepage prompt</title>
		<link>http://www.christianbullock.com/2011/phpbb-set-as-homepage-prompt</link>
		<comments>http://www.christianbullock.com/2011/phpbb-set-as-homepage-prompt#comments</comments>
		<pubDate>Sat, 02 Apr 2011 15:51:28 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[phpBB3 Tutorials]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=336</guid>
		<description><![CDATA[This light script displays a notice to Firefox users prompting them to make your site the homepage in their browser. Complete with "Don't show again" feature. Inspired by Facebook.]]></description>
			<content:encoded><![CDATA[<div style="clear: both;"></div>
<h3>What we&#8217;re trying to achieve</h3>
<p>Recently Facebook added a prompt in the upper-right of Firefox browsers prompting them to make Facebook the homepage by dragging an icon over the home button. Using some Firefox specific CSS and jQuery we&#8217;ll learn how to add said feature to a phpBB3 forum.</p>
<div class="postbuttons"><a href="http://www.christianbullock.com/downloads/ff4-home-prompt.zip" class="download">ff4-home-prompt.zip</a></div>
<h3>Preparation</h3>
<p>To complete this tutorial you&#8217;ll need a decent <a href="http://notepad-plus-plus.org/">Source Code Editor</a>. You also need to <strong>download the ff4-home-prompt.zip archive</strong> by clicking the button above. Then:</p>
<p><strong>Copy:</strong> /ff4-home-prompt/arrow.png <strong>to</strong> /styles/prosilver/theme/images/<br />
<strong>Copy:</strong> /ff4-home-prompt/icon.png <strong>to</strong> /styles/prosilver/theme/images/<br />
<strong>Copy:</strong> /ff4-home-prompt/tip.png <strong>to</strong> /styles/prosilver/theme/images/<br />
<strong>Copy:</strong> /ff4-home-prompt/jquery.cookie.js <strong>to</strong> /styles/prosilver/template/</p>
<h3>Step 1) HTML Edits</h3>
<p>Firstly we need to connect to jQuery. Then place our code.</p>
<p><strong>Open:</strong> /styles/prosilver/template/overall_header.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/forum_fn.js&quot;&gt;&lt;/script&gt;</pre>
<p><strong>After, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;!-- If the above line is already present, don't add it again) --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/jquery.cookie.js&quot;&gt;&lt;/script&gt;</pre>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;body id=&quot;phpbb&quot; class=&quot;section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}&quot;&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;hp-container&quot;&gt;
	&lt;div class=&quot;hp-tip&quot;&gt;&lt;/div&gt;
    &lt;div class=&quot;hp-inner&quot;&gt;
    	&lt;div class=&quot;hp-content&quot;&gt;
        	&lt;a href=&quot;http://www.yoursite.com&quot; class=&quot;hp-icon&quot;&gt;&lt;img src=&quot;{T_THEME_PATH}/images/icon.png&quot; width=&quot;32&quot; height=&quot;32&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
        	&lt;strong&gt;Make us your Homepage!&lt;/strong&gt;
            &lt;br /&gt;&lt;span&gt;&amp;larr; Drag the icon over your Home button&lt;/span&gt;
        &lt;/div&gt;
        &lt;div class=&quot;hp-links&quot;&gt;
        	&lt;a href=&quot;#&quot; class=&quot;noshow&quot;&gt;Don't show again&lt;/a&gt; | &lt;a href=&quot;#&quot; class=&quot;close&quot;&gt;No thanks&lt;/a&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<p><strong><span style="color: #FF0000;">Note:</span></strong> Replace <strong>http://www.yoursite.com</strong> with the link to your forum&#8217;s index page.</p>
<h3>Step 2) CSS Edits</h3>
<p>Here are the basic styling rules, as well as a Firefox specific rule to only show the prompt in Firefox.</p>
<p><strong>Open:</strong> /styles/prosilver/theme/common.css</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">.clear {
	display: block;
	clear: both;
	font-size: 1px;
	line-height: 1px;
	background: transparent;
}</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">.hp-container {
	width: 301px;
	height: 103px;
	background-color: rgba(39,107,178,0.4);
	position: absolute;
	top: 0;
	right: 30px;
	z-index: 9999;
	display: none; /* hide from non FF browsers */
}

.hp-tip {
	width: 301px;
	height: 10px;
	background: url(&quot;{T_THEME_PATH}/images/tip.png&quot;) no-repeat left top;
}

.hp-inner {
	background-color: #eaf5ff;
	margin: 5px;
	padding: 5px;
	height: 73px;
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 12px;
}

.hp-content {
	background: url(&quot;{T_THEME_PATH}/images/arrow.png&quot;) no-repeat right top #e0effd;
	border: 1px solid #9bcfff;
	height: 26px;
	padding: 10px;
}

.hp-content strong {
	color: #0c233b;
}

.hp-content span {
	font-size: 11px;
	color: #364c62;
}

.hp-icon {
	float: left;
	margin: -2px 6px 0 -4px;
}

.hp-links {
	color: #1d4e82;
	text-align: right;
	height: 18px;
	margin-top: 7px;
}

.hp-links a {
	color: #276bb2;
}

.hp-links a:hover {
	color: #3080d3;
}

/* Display to Firefox only */
@-moz-document url-prefix(http://www.yoursite.com/)
{
  .hp-container {display: block;}
}</pre>
<p><strong style="color: #FF0000;">Important:</strong> Make sure you replace <strong>http://www.yoursite.com</strong> with your domain on the following line:</p>
<pre class="brush: xml; title: ; notranslate">@-moz-document url-prefix(http://www.yoursite.com/)</pre>
<p>If using localhost, use <strong>http://localhost/</strong></p>
<h3>Step 3) The jQuery</h3>
<p>A basic function to fade the message out when the &#8220;No thanks&#8221; link is clicked. Add a cookie to stop the message showing &#8220;Don&#8217;t show this again&#8221; link is clicked.</p>
<p><strong>Open:</strong> /styles/prosilver/template/overall_header.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/jquery.cookie.js&quot;&gt;&lt;/script&gt;</pre>
<p><strong>After, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function(){
	$(&quot;a.close&quot;).click(function(){
		$(&quot;.hp-container&quot;).fadeOut();
	});
	$(&quot;a.noshow&quot;).click(function(){
		$(&quot;.hp-container&quot;).fadeOut();
		$.cookie(&quot;hp-state&quot;,&quot;noshow&quot;, {expires: 30, path: '/'});
	});

	var hpState = $.cookie(&quot;hp-state&quot;);

	if(hpState == 'noshow') {
		$(&quot;.hp-container&quot;).hide();
	};
	return false;
});
&lt;/script&gt;</pre>
<p>Cookies will expire after 1 month (30 days), at which point the user would need to click the &#8220;Don&#8217;t show again&#8221; link.</p>
<h3>Support / Donations</h3>
<p>Since this is quite a sensative script, support (if required) can be obtained over on the <a href="../forum">Support Forum</a>. If you use this script and like it, please consider <a href="../donate">making a donation</a>. Finally if you find a mistake, <a href="../contact">contact me</a> and let me know. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2011/phpbb-set-as-homepage-prompt/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Simple global notices</title>
		<link>http://www.christianbullock.com/2011/phpbb-simple-global-notices</link>
		<comments>http://www.christianbullock.com/2011/phpbb-simple-global-notices#comments</comments>
		<pubDate>Mon, 28 Mar 2011 09:00:00 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[phpBB3 Tutorials]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=367</guid>
		<description><![CDATA[Ever needed to inform your users of something, but not wanted to post a full announcement? Displaying a simple coloured message in the header of your site is a great way to do this. Complete with "close" icon, supported by cookies.]]></description>
			<content:encoded><![CDATA[<div style="clear: both;"></div>
<h3>What we&#8217;re trying to achieve</h3>
<p>Simple notices in your header. As a board Admin at some point you&#8217;ve probably had to inform your users of something fairly important such as: Scheduled Maintenance, a change to your forum rules or default time zone change. Sometimes a full-on announcement isn&#8217;t appropriate, instead you can use a coloured message in the header of your site to draw your members&#8217; attention. Supported by cookies, messages won&#8217;t re-appear when they are closed. Thanks to Unknown Bliss for inspiring me to make this into a tutorial.</p>
<div class="postbuttons"><a class="download" href="http://www.christianbullock.com/downloads/global-notices.zip">global-notices.zip</a></div>
<h3>Preparation</h3>
<p>To complete this tutorial you&#8217;ll need a decent <a href="http://notepad-plus-plus.org/">Source Code editor</a>. Secondly, you need to <strong>download the global-notices.zip archive</strong> by clicking the &#8220;download&#8221; button above. Then:</p>
<p><strong>Copy:</strong> /global-notices/blue-cross.gif &nbsp; <strong>to</strong> &nbsp; /phpBB/styles/prosilver/theme/images/<br />
<strong>Copy:</strong> /global-notices/green-cross.gif &nbsp; <strong>to</strong> &nbsp; /phpBB/styles/prosilver/theme/images/<br />
<strong>Copy:</strong> /global-notices/red-cross.gif &nbsp; <strong>to</strong> &nbsp; /phpBB/styles/prosilver/theme/images/<br />
<strong>Copy:</strong> /global-notices/yellow-cross.gif &nbsp; <strong>to</strong> &nbsp; /phpBB/styles/prosilver/theme/images/<br />
<strong>Copy:</strong> /global-notices/jquery.cookie.js &nbsp; <strong>to</strong> &nbsp; /phpBB/styles/prosilver/template/</p>
<h3>Step 1) HTML Edits</h3>
<p>So first up we need to connect to jQuery, the cookie plugin and then place the notice.</p>
<p><strong>Open:</strong> /styles/prosilver/template/overall_header.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/forum_fn.js&quot;&gt;&lt;/script&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;!-- If the above line is already present, don't add it again --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/jquery.cookie.js&quot;&gt;&lt;/script&gt;</pre>
</p>
<h3>Notice at very top of page</h3>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;body id=&quot;phpbb&quot; class=&quot;section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}&quot;&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;global-notice notice-top green&quot;&gt;
	&lt;strong&gt;Notice:&lt;/strong&gt; Scheduled Maintenance at 15:00 UTC.
    &lt;a class=&quot;cross&quot; href=&quot;#&quot;&gt;Close&lt;/a&gt;
&lt;/div&gt;</pre>
<h3>Notice below header</h3>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;a name=&quot;start_here&quot;&gt;&lt;/a&gt;</pre>
<p><strong>Before, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;br /&gt;
&lt;div class=&quot;global-notice green&quot;&gt;
	We're going in! See you on the other side.
    &lt;a class=&quot;cross&quot; href=&quot;#&quot;&gt;Close&lt;/a&gt;
&lt;/div&gt;</pre>
<h3>Step 2) CSS Edits</h3>
<p>Just some basic styling rules, accommodating 4 colour schemes by default. If you have some basic CSS knowledge you&#8217;ll be able to add your own colours.</p>
<p><strong>Open:</strong> /styles/prosilver/theme/colours.css</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">input.disabled {
	color: #666666;
}</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">.global-notice {
	padding: 12px;
	font-family: Tahoma, Geneva, sans-serif;
	font-size: 12px;
	font-weight: bold;
	margin-bottom: 10px;
	border: 1px solid;
	-moz-box-shadow: inset 0 -1px #FFFFFF;
}

.global-notice strong {
	color: #000000;
}

.notice-top {
	border-top: none;
	border-left: none;
	border-right: none;
	margin-top: -12px;
}

.blue {
	background-color: #e5f4ff;
	border-color: #a7cee2;
	color: #004b90;
}

.red {
	background-color: #ffe5e5;
	border-color: #e2a8a8;
	color: #900000;
}

.green {
	background-color: #e4ffdf;
	border-color: #b8dfb8;
	color: #3a6e31;
}

.yellow {
	background-color: #fdffe5;
	border-color: #dfe2a7;
	color: #678801;
}

.cross {
	float: right;
	width: 12px;
	height: 12px;
	background: no-repeat 50% bottom;
	text-indent: -9999px;
	display: block;
	outline: none;
}

.blue .cross {
	background-image: url(&quot;{T_THEME_PATH}/images/blue-cross.gif&quot;);
}

.red .cross {
	background-image: url(&quot;{T_THEME_PATH}/images/red-cross.gif&quot;);
}

.green .cross {
	background-image: url(&quot;{T_THEME_PATH}/images/green-cross.gif&quot;);
}

.yellow .cross {
	background-image: url(&quot;{T_THEME_PATH}/images/yellow-cross.gif&quot;);
}</pre>
<h3>Step 3) The jQuery</h3>
<p>Here we make the message fade out when the cross is clicked, and make sure it doesn&#8217;t show up again when the page is refreshed.</p>
<p><strong>Open:</strong> /styles/prosilver/template/overall_header.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/jquery.cookie.js&quot;&gt;&lt;/script&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
	$(&quot;a.cross&quot;).click(function() {
		$(&quot;.global-notice&quot;).fadeOut();
		$.cookie('noticeState', 'hidden', { expires: 3, path: '/'});
	});

	var noticeState = $.cookie('noticeState');

	if(noticeState == 'hidden') {
		$(&quot;.global-notice&quot;).hide();
	};
});
&lt;/script&gt;</pre>
<h3>Important Information</h3>
<p>This script is meant to be <strong>simple</strong>, and as such can only be used <strong>once per page</strong>. The only way you can display more than one message (without them <strong>both</strong> fading out when you click a cross) is to disable the cross by remove the link from the code. As this is intended to be a <strong>temporary</strong> message, the cookie is set to expire after 3 days. This is configurable by editing this line in overall_header.html:</p>
<pre class="brush: xml; title: ; notranslate">$.cookie('noticeState', 'hidden', { expires: 3, path: '/'});</pre>
<p>With regard to choosing between colours, that&#8217;s simple. The line that calls chosen colour is also in overall_header.html:</p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;global-notice notice-top green&quot;&gt;</pre>
<p>Here you would simply replace <strong>green</strong> with <strong>red</strong>, yellow or blue.</p>
<h3>Support / Donations</h3>
<p>If you encounter any problems implementing this script, support is freely available over on the <a href="../forum">Support Forum</a>. If you have found this script useful please consider <a href="../donate">making a donation</a>. Finally if you find a mistake let me know <a href="../contact">here</a>. Cheers. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2011/phpbb-simple-global-notices/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Collapsible Categories with Cookies</title>
		<link>http://www.christianbullock.com/2011/phpbb-collapsible-categories-with-cookies</link>
		<comments>http://www.christianbullock.com/2011/phpbb-collapsible-categories-with-cookies#comments</comments>
		<pubDate>Fri, 25 Mar 2011 21:24:53 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[phpBB3 Tutorials]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=327</guid>
		<description><![CDATA[Collapsible categories are a great way of letting your users choose their favourite parts of the forum, and hide the rest. Supported by cookies this script stores and remembers the user's preference.]]></description>
			<content:encoded><![CDATA[<h3>What we&#8217;re trying to achieve</h3>
<p>As an end user of many large boards, I find a lot of the time most of the content is of little interest to me. By using &#8220;collapsible categories&#8221;, the end user is able to essentially &#8220;minimise&#8221; the categories they don&#8217;t want to have displayed, making it easy to navigate to the ones they do. This script is also supported by cookies, meaning the user&#8217;s preference is stored and remembered for next time they visit the site.</p>
<div class="postbuttons">
<a class="download" href="http://www.christianbullock.com/downloads/collapsible-categories.zip">collapsible-categories.zip</a>
</div>
<h3>Preparation</h3>
<p>To complete this tutorial, you&#8217;ll need to use a decent <a href="http://notepad-plus-plus.org/">Source code editor</a>. Additionally, you need to <strong>download the collapsible-categories.zip archive</strong> by clicking the download button above. Then:</p>
<p><strong>Copy:</strong> /collapsible-categories/collapse-icon.png <strong>to</strong> /phpBB/styles/prosilver/theme/images/<br />
<strong>Copy:</strong> /collapsible-categories/jquery.cookie.js <strong>to</strong> /phpBB/styles/prosilver/template/<br />
<strong>Copy:</strong> /collapsible-categories/jquery.collapse.js <strong>to</strong> /phpBB/styles/prosilver/template/</p>
<p>I&#8217;d like to thank <a href="https://github.com/carhartl">Klaus Hartl</a> and <a href="http://twitter.com/#!/roflwtfbbq">Daniel Stocks</a> for the <a href="http://plugins.jquery.com/project/Cookie">jQuery Cookie</a> and <a href="http://webcloud.se/code/jQuery-Collapse/">jQuery collapse</a> plugins (respectively) used in this tutorial.</p>
<h3>Step 1) HTML Edits</h3>
<p>First up, we need to connect to jQuery and the two plugins we copied over in the previous step.</p>
<p><strong>Open:</strong> /styles/prosilver/template/overall_header.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/forum_fn.js&quot;&gt;&lt;/script&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;!-- If the above line is already present, don't add it again --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/jquery.cookie.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;{T_TEMPLATE_PATH}/jquery.collapse.js&quot;&gt;&lt;/script&gt;</pre>
<p>Now we need to add a container to the forumlist for the jQuery to reference, as well as containers around the content we want collapsing. Finally we&#8217;ll be adding the plus/minus icon used to trigger the script. We&#8217;ll add the actual jQuery later.</p>
<p><strong>Open:</strong> /styles/prosilver/template/forumlist_body.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;!-- BEGIN forumrow --&gt;</pre>
<p><strong>Before, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;forumlist&quot;&gt;</pre>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">		&lt;!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT  --&gt;
			&lt;/ul&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;/div&gt;</pre>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;ul class=&quot;topiclist forums&quot;&gt;</pre>
<p><strong>Before, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">			&lt;!-- IF SCRIPT_NAME eq 'index' --&gt;&lt;div class=&quot;trigger active&quot;&gt;&lt;/div&gt;&lt;!-- ENDIF --&gt;
			&lt;div class=&quot;collapsethis&quot;&gt;</pre>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">	&lt;!-- IF forumrow.S_LAST_ROW --&gt;
			&lt;/ul&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;/div&gt;</pre>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;!-- END forumrow --&gt;</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;/div&gt;</pre>
<h3>Step 2) CSS Edits</h3>
<p>The only CSS this script uses is to display / style the trigger icon. All of the showing / hiding is done through the jQuery.</p>
<p><strong>Open:</strong> /styles/prosilver/theme/common.css</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">.clear {
	display: block;
	clear: both;
	font-size: 1px;
	line-height: 1px;
	background: transparent;
}</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">.trigger {
	background: url(&quot;{T_THEME_PATH}/images/collapse-icon.png&quot;) no-repeat;
	width: 32px;
	height: 17px;
	cursor: pointer;
	float: right;
	position: relative;
	z-index: 9998;
	margin-top: -21px;
}

.active {background-position: left top;}
.inactive {background-position: left bottom;}</pre>
<h3>Step 3) The jQuery</h3>
<p>Now we&#8217;ll add the jQuery. Most of the functionality takes place in the collapse.js file, though we still need to add some inline JavaScript to execute it when the collapse icon is clicked.</p>
<p><strong>Open:</strong> /styles/prosilver/template/forumlist_body.html</p>
<p><strong>Find:</strong></p>
<pre class="brush: xml; title: ; notranslate">&lt;!-- END forumrow --&gt;
&lt;/div&gt;
</pre>
<p><strong>Below, Add:</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
            $(&quot;.forumlist&quot;).collapse({show: function(){
                    this.animate({
                        opacity: 'toggle',
                        height: 'toggle'
                    }, 300);
                },
                hide : function() {

                    this.animate({
                        opacity: 'toggle',
                        height: 'toggle'
                    }, 300);
                }
            });
        &lt;/script&gt;</pre>
<p>And that&#8217;s it! If everything has gone correctly then you&#8217;ll now have a nice pretty collapse icon on each category which, when clicked, slides away the content until such point as the end user chooses to display it again.</p>
<h3>Support / Donations</h3>
<p>If something didn&#8217;t go as you planned, let me know on the <a href="../forum">Support Forum</a>. If you love this script, please consider liking it, tweeting it or <a href="../donate">making a donation</a>. Finally, if you think I&#8217;ve missed something or there&#8217;s a bug in the tutorial <a href="../contact">get in touch</a> and let me know. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2011/phpbb-collapsible-categories-with-cookies/feed</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Live Signature Character Counter</title>
		<link>http://www.christianbullock.com/2011/phpbb-live-signature-character-counter</link>
		<comments>http://www.christianbullock.com/2011/phpbb-live-signature-character-counter#comments</comments>
		<pubDate>Sun, 06 Mar 2011 21:38:50 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[phpBB3 Tutorials]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=233</guid>
		<description><![CDATA[Use this script to display a real-time indication of your signature limit, and how many characters you have remaining. You will be prevented from entering any more characters once you reach 0. Prosilver and Prosilver-based styles only.]]></description>
			<content:encoded><![CDATA[<div style="clear: both;"></div>
<div class="postbuttons"><a class="download" href="http://www.christianbullock.com/downloads/siglimit.zip">maxlength.js (1.56kb)</a></div>
<h3>What we&#8217;re trying to achieve</h3>
<p>As a regular forum user, what really annoys me is breaking the signature character limit&#8230;but not being told about until after I&#8217;ve spent 5 minutes formatting everything. This script will add a live character counter above the signature text box keeping the user informed of exactly how many characters they have left. Once the user reaches the maximum amount of characters, they won&#8217;t be able to enter any more into the text box. Thanks go to <a href="http://www.remysharp.com">Remy Sharp</a> for the jQuery functionality.</p>
<h3>Preparation</h3>
<p>To complete this tutorial, you&#8217;ll need a decent <a href="http://notepad-plus-plus.org/">source code editor</a>. You also need to <strong>download jquery.maxlength.js</strong> by clicking the download button above and extracting the zip file. Then perform the following file copy instructions:</p>
<p>
<ul>
<li><strong>Copy:</strong> siglimit/jquery.maxlength.js <strong>to</strong> /phpBB/styles/prosilver/template/</li>
</ul>
<h3>The HTML Edits</h3>
<p>First of all we need to add the message telling users how many characters they have left. We&#8217;ll then add a custom class to the textarea so the jQuery can reference it, and finally we&#8217;ll add some inline jQuery to power our counter. But firstly, we need to connect to jQuery and our max length script.</p>
<p><strong>Open: /styles/prosilver/template/overall_header.html</strong></p>
<p><strong>Find:</strong><br />
{code type=html}<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>{/code}<br />
<strong>Below, Add:</strong><br />
{code type=html}<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>{/code}<br />
<strong><span style="color: #FF0000;">Note:</span> If this line is already in your overall_header.html file (from a previous tutorial), you shouldn&#8217;t add it again.</strong></p>
<p><strong>Below that, Add:</strong><br />
{code type=html}<script type="text/javascript" src="{T_TEMPLATE_PATH}/jquery.maxlength.js"></script>{/code}</p>
<p><strong>Open:</strong> /styles/prosilver/template/posting_editor.html</p>
<p><strong>Find:</strong><br />
{code type=html}<!-- INCLUDE posting_buttons.html -->{/code}<br />
<strong>Before, Add:</strong><br />
{code type=html}<!-- IF $SIG_EDIT eq 1 --></p>
<p><strong>Characters remaining:</strong> <span class="charsLeft error">{L_SIGNATURE_LIMIT}</span></p>
<p><!-- ENDIF -->{/code}<br />
<strong>Find:</strong><br />
{code type=html}
<div id="message-box">
		<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name=&#8221;signature&#8221; id=&#8221;signature&#8221; style=&#8221;height: 9em;&#8221;<!-- ELSE -->name=&#8221;message&#8221; id=&#8221;message&#8221;<!-- ENDIF --> rows=&#8221;15&#8243; cols=&#8221;76&#8243; tabindex=&#8221;4&#8243; onselect=&#8221;storeCaret(this);&#8221; onclick=&#8221;storeCaret(this);&#8221; onkeyup=&#8221;storeCaret(this);&#8221; onfocus=&#8221;initInsertions();&#8221; class=&#8221;inputbox&#8221;>{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea></p></div>
<p>{/code}<br />
<strong>Replace with:</strong><br />
{code type=html}
<div id="message-box">
		<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name=&#8221;signature&#8221; id=&#8221;signature&#8221; style=&#8221;height: 9em;&#8221;<!-- ELSE -->name=&#8221;message&#8221; id=&#8221;message&#8221;<!-- ENDIF --> rows=&#8221;15&#8243; cols=&#8221;76&#8243; tabindex=&#8221;4&#8243; onselect=&#8221;storeCaret(this);&#8221; onclick=&#8221;storeCaret(this);&#8221; onkeyup=&#8221;storeCaret(this);&#8221; onfocus=&#8221;initInsertions();&#8221; class=&#8221;inputbox<!-- IF $SIG_EDIT eq 1 --> limited<!-- ENDIF -->&#8220;>{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea><br />
        <!-- IF $SIG_EDIT eq 1 --><br />
<input type="hidden" name="maxlength" value="{L_SIGNATURE_LIMIT}" /><!-- ENDIF -->
	</div>
<p>{/code}<br />
<strong>Find:</strong><br />
{code type=html}<!-- IF $EXTRA_POSTING_OPTIONS eq 1 -->{/code}<br />
<strong>Before, Add:</strong><br />
{code type=html}<!-- IF $SIG_EDIT eq 1 --><br />
		<script type="text/javascript">
  			$('textarea.limited').maxlength({
    		'feedback' : '.charsLeft',
   			'useInput' : true
  		});
		</script><br />
<!-- ENDIF -->{/code}</p>
<h3>Some PHP Edits</h3>
<p>So you&#8217;ve probably noticed I&#8217;ve used a template variable {L_SIGNATURE_LIMIT}, which don&#8217;t exist by default in phpBB. We&#8217;re going to create it here. Doing this allows the script to use the &#8220;Maximum Signature Length&#8221; value defined in the Administration Control Panel, rather than having to hard-code a character limit value into the template file.</p>
<p><strong>Open:</strong> /includes/ucp/ucp_profile.php</p>
<p><strong>Find:</strong><br />
{code type=php}&#8217;L_SIGNATURE_EXPLAIN&#8217;	=> sprintf($user->lang['SIGNATURE_EXPLAIN'], $config['max_sig_chars']),{/code}<br />
<strong>Below, Add:</strong><br />
{code type=php}&#8217;L_SIGNATURE_LIMIT&#8217;		=> $config['max_sig_chars'],{/code}</p>
<p>And that&#8217;s about it!</p>
<h3>Support / Donations</h3>
<p>If you encounter any problems implementing this on your board, support is freely available <a href="../forum">here</a>. If you&#8217;d like to leave me a donation for the time spent testing the script and writing the tutorial you can do so <a href="../donate">here</a>. And finally if you think I&#8217;ve missed something you can let me know <a href="../contact">here</a>. Marvellous. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2011/phpbb-live-signature-character-counter/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Add code between categories</title>
		<link>http://www.christianbullock.com/2011/phpbb-add-code-between-categories</link>
		<comments>http://www.christianbullock.com/2011/phpbb-add-code-between-categories#comments</comments>
		<pubDate>Thu, 03 Mar 2011 16:31:18 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[phpBB3 Tutorials]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=197</guid>
		<description><![CDATA[Ever wanted to add your own code "between" categories on your forum? Whether you want to display adverts, a message to your members or something else, it is easily achievable with these few template edits. Prosilver and Prosilver-based styles only.]]></description>
			<content:encoded><![CDATA[<div style="clear: both;"></div>
<h3>What we&#8217;re trying to achieve</h3>
<p>&#8220;How can I place a banner ad right below my first category?&#8221; I hear you ask. This is one of the more requested &#8220;how-to&#8217;s&#8221; on the phpBB Support Forum, and this is what I&#8217;ll be writing about today. With some really basic template edits we&#8217;ll be placing blocks of code between our categories on the index page.</p>
<h3>Preparation</h3>
<p>To complete this tutorial, you&#8217;ll need a <a href="http://notepad-plus-plus.org/">decent source code editor</a>. It&#8217;s also important that you <strong>read</strong> the whole tutorial, and not skip straight to the images.</p>
<h3>Step 1) Finding the Forum ID&#8217;s</h3>
<p>Before we can start placing our code, you need to choose where you want to put it, or in other words you need to chose which two categories you want the code to appear between. You need to find the forum ID of the forum <strong>below</strong> where you want to display your code. Here&#8217;s an example:</p>
<p><img src="http://www.christianbullock.com/wp-content/uploads/2011/03/code1.gif" alt="" title="code1" width="517" height="223" class="aligncenter size-full wp-image-202" /></p>
<p>So, because we want to add code above <strong>&#8220;Normal category 2&#8243;</strong>, that&#8217;s the forum ID we need to find &#8211; we&#8217;ll actually be using the forum ID in the next steps. To find a Forum ID <strong>hover</strong> over a forum name and look at the end of the target URL (normally displays in the <strong>bottom-left</strong> of your web browser. The forum ID is the number that appears <em>after</em> <strong>viewforum.php?f=</strong>.</p>
<p><img src="http://www.christianbullock.com/wp-content/uploads/2011/03/code2.gif" alt="" title="code2" width="620" height="216" class="aligncenter size-full wp-image-206" /></p>
<p>The example above shows us that <strong>&#8220;Normal Category 2&#8243;</strong>&#8216;s forum ID is <strong>3</strong>. We need to remember this for the next step.</p>
<h3>Step 2) Placing the code</h3>
<p>Now that we know where we want to place the code, we need to add it. We&#8217;ll be using a really simple &#8216;IF statement&#8217; in the template file to only show the code where we want it.</p>
<p><strong>Open:</strong> /styles/prosilver/template/forumlist_body.html</p>
<p><strong>Find:</strong><br />
{code type=html}<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->{/code}<br />
<strong>Before,</strong> Add:<br />
{code type=html}    <!-- IF forumrow.FORUM_ID eq '3' --><br />
    	Your code here<br />
    <!-- ENDIF -->{/code}</p>
<p>Excellent! So this IF statement is telling phpBB: &#8220;Only display this block of code if the forum ID is 3&#8243;. You can use any browser-readable code here (such as HTML, or your Google Adsense code for example). If you want to use more code between other categories, read on past the presentation step.</p>
<h3>Step 3) Making it look pretty</h3>
<p>If you insert code as-is between inside the IF statement, sure it will work but it won&#8217;t look too pretty. We can use the following code <strong>inside the IF statement</strong> that will match your forum&#8217;s style:</p>
<p>{code type=html}
<div class="forabg">
<div class="inner"><span class="corners-top"><span></span></span></p>
<ul class="topiclist">
<li class="header">
<dl class="icon">
<dt>block title</dt>
</dl>
</li>
</ul>
<ul class="topiclist forums">
<li class="row customblock">
				some code
			</li>
</ul>
<p>	<span class="corners-bottom"><span></span></span></div>
</div>
<p>{/code}</p>
<p>Then, add the following code to the <strong>bottom</strong> of /styles/prosilver/theme/common.css:<br />
{code type=css}li.customblock {<br />
	padding: 5px;<br />
	font-size: 1.2em;<br />
	text-align: center; /* Optional */<br />
}{/code}</p>
<p>And the final result!</p>
<p><img src="http://www.christianbullock.com/wp-content/uploads/2011/03/code3.gif" alt="" title="code3" width="620" height="172" class="aligncenter size-full wp-image-214" /></p>
<h3>Optional: Using &#8216;ELSEIF&#8217; to put more code between other categories</h3>
<p>When explaining these steps to people, one of the most often asked questions is &#8220;How do I add another block of code between other categories?&#8221;. Sure, you can use the same IF-statement as above, paste it again and change the forum ID, but I don&#8217;t think this is a particularly pretty or elegant solution. Instead, we can use a chain of &#8216;ELSEIF&#8217;s. The process for finding forum ID&#8217;s is the same as above, but instead of using one IF statement we can use something like this:</p>
<p>{code type=html}<!-- IF forumrow.FORUM_ID eq '1' --><br />
	code to go above Forum ID 1<br />
<!-- ELSEIF forumrow.FORUM_ID eq '3' --><br />
	code to go above forum ID 3<br />
<!-- ELSEIF forumrow.FORUM_ID eq '55' --><br />
	code to go above forum ID 55<br />
<!-- ENDIF -->{/code}<br />
So what this is telling phpBB is: &#8220;If the forum ID is 1, show this piece of code. If it&#8217;s not 1, move on&#8230;and if it&#8217;s 3 display this piece of code. If it&#8217;s not 3, move on&#8230;and if it&#8217;s 55, display this block of code&#8221;. There is no limit to the amount of ELSEIFs you can include in the chain. phpBB won&#8217;t show the code if it&#8217;s in an IF statement for a Forum ID that doesn&#8217;t exist. For example, in the code example directly above I make reference to forum ID 55 (which doesn&#8217;t exist on my demo board). Therefore, the &#8220;code to go above forum ID 55&#8243; was not displayed.</p>
<h3>Support / Donations</h3>
<p>If you have any problems using the code above, support is freely available on the <a href="../forum/">Support Forum</a>. If you have found the above guide useful and have implemented it on your board please consider <a href="../donate">making a donation</a>. Finally, if you feel I have missed anything you can let me know <a href="../contact">here</a>. Schweeeeeet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2011/phpbb-add-code-between-categories/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Replace login link with form on-click</title>
		<link>http://www.christianbullock.com/2011/replace-login-link-with-form-on-click</link>
		<comments>http://www.christianbullock.com/2011/replace-login-link-with-form-on-click#comments</comments>
		<pubDate>Mon, 28 Feb 2011 19:44:58 +0000</pubDate>
		<dc:creator>Christian</dc:creator>
				<category><![CDATA[phpBB3 Tutorials]]></category>

		<guid isPermaLink="false">http://www.christianbullock.com/?p=180</guid>
		<description><![CDATA[This ridiculously small script will, when clicked, fade out the login link and fade in a quick login form. Inspired by MyBB. Prosilver and Prosilver-based styles only.]]></description>
			<content:encoded><![CDATA[<h3>What we&#8217;re trying to achieve</h3>
<p>MyBB has quite a smart display feature in the default style. When the &#8220;login&#8221; link in the header is clicked, rather than loading a whole new page to display a form, instead the login link disappears and a quick login form shows in its place. We&#8217;ll be achieving that effect in phpBB using jQuery.</p>
<h3>Preparation</h3>
<p>To complete this tutorial you&#8217;ll need a decent <a href="http://notepad-plus-plus.org/">source code editor</a>.</p>
<h3>Step 1) HTML Edits</h3>
<p>Firstly need to display the form in the header (which will later be hidden with CSS). We also need to add a unique class to the login link&#8217;s &lt;a&gt; tag so that the jQuery can reference it.</p>
<p><strong>Open:</strong> /styles/prosilver/template/overall_header.html</p>
<p><strong>Find:</strong><br />
{code type=html}
<li class="icon-logout"><a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a></li>
<p>{/code}</p>
<p><strong>Replace with:</strong><br />
{code type=html}
<li class="icon-logout"><a <!-- IF not S_USER_LOGGED_IN -->href=&#8221;#&#8221; class=&#8221;loginbox&#8221;<!-- ELSE -->href=&#8221;{U_LOGIN_LOGOUT}&#8221;<!-- ENDIF --> title=&#8221;{L_LOGIN_LOGOUT}&#8221; accesskey=&#8221;x&#8221;>{L_LOGIN_LOGOUT}</a></p>
<form method="post" action="{S_LOGIN_ACTION}" class="quicklogin">
<input type="text" name="username" id="username" size="10" class="inputbox quickinput" title="{L_USERNAME}" value="Username" />
<input type="password" name="password" id="password" size="10" class="inputbox quickinput" title="{L_PASSWORD}" value="password" />
								<!-- IF S_AUTOLOGIN_ENABLED -->&nbsp;<label for="autologin">Remember?&nbsp;<br />
<input type="checkbox" name="autologin" id="autologin" /></label><!-- ENDIF --></p>
<input type="submit" name="login" value="{L_LOGIN}" class="button2" />{S_LOGIN_REDIRECT}<br />
								- <a href="ucp.php?mode=sendpassword">Forgot?</a><br />
							</form>
</li>
<p>{/code}</p>
<h3>Step 2) CSS Edits</h3>
<p>There isn&#8217;t a whole lot we need to style, although we do need to hide the form when the page loads, and add some width values so that it all displays correctly.</p>
<p><strong>Open:</strong> /styles/prosilver/theme/common.css</p>
<p><strong>At the bottom of the file, Add:</strong><br />
{code type=css}form.quicklogin {<br />
	display: none;<br />
}</p>
<p>form.quicklogin input.quickinput {<br />
	width: 100px;<br />
}{/code}</p>
<h3>Step 3) The jQuery</h3>
<p>For those who don&#8217;t know, jQuery is a JavaScript library which makes it really easy to add fancy effects and features to web elements. Here we&#8217;ll be telling the browser to hide the link and display the form when the link is clicked.</p>
<p><strong>Open:</strong> /styles/prosilver/template/overall_header.html</p>
<p><strong>Find:</strong><br />
{code type=html}<script type="text/javascript" src="{T_TEMPLATE_PATH}/forum_fn.js"></script>{/code}</p>
<p><strong>Below, Add:</strong><br />
{code type=html}<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script><br />
<script type="text/javascript">
$(document).ready(function() {
	$("a.loginbox").click(function() {
		// Remove the login icon
		$("li.icon-logout").removeClass("icon-logout");
		// Fade out the login link (
		$(this).fadeOut(200);
		// Fade in the form
		$("form.quicklogin").delay(500).fadeIn(100);
		return false; // stop browser from jumping when # link is clicked
	});				   
});
</script>{/code}</p>
<h3>Support / Donations</h3>
</p>
<p>If you have found this script useful, please consider <a href="http://www.christianbullock.com/donate">making a donation</a>. Support is freely available on the <a href="http://www.christianbullock.com/forum">Support Forum</a>. Finally, if you feel I&#8217;ve missed something you can let me know <a href="http://www.christianbullock.com/contact">here</a>. Awesome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.christianbullock.com/2011/replace-login-link-with-form-on-click/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

