<?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>unwittinglyrad &#187; Web</title>
	<atom:link href="http://unwittinglyrad.com/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://unwittinglyrad.com</link>
	<description>The thoughts and ramblings of Rad.</description>
	<lastBuildDate>Thu, 19 Aug 2010 01:22:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>IPB: Pinned Topic background colours</title>
		<link>http://unwittinglyrad.com/2009/09/11/ipb-pinned-topic-background-colours/</link>
		<comments>http://unwittinglyrad.com/2009/09/11/ipb-pinned-topic-background-colours/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 05:10:25 +0000</pubDate>
		<dc:creator>Rad</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://unwittinglyrad.com/?p=1327</guid>
		<description><![CDATA[
So, through necessity I&#8217;ve figured out a way to highlight the background colours of pinned topics for Invision Power Board 2.3.x and thought I&#8217;d share &#8230;]]></description>
			<content:encoded><![CDATA[<p><img src="http://unwittinglyrad.com/wp-content/uploads/2009/09/ipbpinned.png" alt="ipbpinned" title="ipbpinned" width="750" height="344" class="alignnone size-full wp-image-1328" /></p>
<p><span class="introparagraph">So, through necessity I&#8217;ve figured out a way to highlight the background colours of <strong>pinned topics</strong> for <strong>Invision Power Board 2.3.x</strong> and thought I&#8217;d share my solution with everyone.</span></p>
<p>Getting the pinned topics to highlight is quite a simple procedure and takes approximately 10 minutes to complete. It involves editing two template files found in <span class="highlight">Forum Index</span>, these are: <span class="highlight">render_pinned_start</span> and <span class="highlight">render_forum_row</span>. Code edits are highlighted in <span class="codehighlight">blue</span>.</p>
<hr />
<h4>Step 1</h4>
<p>Involves adding a <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">style=&quot;background:#;&quot;</span> to the <strong>td</strong> in <strong>render_pinned_start</strong>. This will overwrite the background property that is defined in the <strong>darkrow1</strong> class. This edit adjusts the background colour for the <strong>Important Topics</strong> title.</p>
<p class="displaycode">
&lt;!&#8211;PINNED&#8211;&gt;<br />
&lt;if=&quot;$show == 1&quot;&gt;<br />
&lt;tr&gt;<br />
&lt;td class=&quot;darkrow1&quot; colspan=&quot;8&quot; <span class="codehighlight">style=&quot;background:#fbf2ca;&quot;</span>&gt;&lt;b&gt;{$this-&gt;ipsclass-&gt;lang[&#39;pinned_start&#39;]}&lt;/b&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/if&gt;<br />
&lt;!&#8211; END PINNED &#8211;&gt;
</p>
<hr />
<h4>Step 2</h4>
<p>This is the more time consuming part and involves adding some <strong>if</strong>, <strong>else</strong> statements and <strong>style</strong> code to <strong>render_forum_row</strong>. What you see below is pretty much the <em>standard</em> code duplicated in order to use the functionality of <strong>if, else</strong> statements.</p>
<p>Open your favourite text editor, then simply copy and paste the content from <strong>render_forum_row</strong> in it. Then duplicate the code from <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">&lt;tr&gt;</span> to <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">&lt;/tr&gt;</span> within your text document. You then want to add <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">&lt;if=&quot;$data[&#39;tid&#39;] == <strong>your-topic-id</strong> || $data[&#39;tid&#39;] == <strong>your-topic-id</strong>&quot;&gt;</span> at the very top of your code. Replace <strong>your-topic-id</strong> with the pinned topic ID&#8217;s off your forum (you will find them if you view source).</p>
<p>The example in my code shows <em>two</em> ID variables because I have more than one pinned topic. You will need to add an additional <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">|| $data[&#39;tid&#39;] == </span> for each topic ID.</p>
<p>Where the first <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">&lt;/tr&gt;</span> ends and  second <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">&lt;tr&gt;</span> begins, between these two you want to place an <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">&lt;else /&gt;</span> statement. This basically tells IPB how to display topics if the ID&#8217;s from the <strong>if</strong> statement don&#8217;t match. At the end of the second <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">&lt;/tr&gt;</span>, place an <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">&lt;/if&gt;</span>, this will close off the <strong>if</strong> statement which you started at the very top of all the code.</p>
<p>From here, all that is left to do is add <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">style=&quot;background:#;&quot;</span> with your own colour code to each of the <strong>td</strong> cells <em><strong>above</strong></em> the <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">&lt;else /&gt;</span> line of code. My final step was to add <span style="font-family: Lucida Console, Monaco; font-size: 11px; letter-spacing: -0.5px; color:#999;">style=&quot;font-weight:bold;&quot;</span> to pinned topic title so that it stands out more.</p>
<h4>The final result, complete code:</h4>
<p class="displaycode">
<span class="codehighlight">&lt;if=&quot;$data[&#39;tid&#39;] == <strong>your-topic-id</strong> || $data[&#39;tid&#39;] == <strong>your-topic-id</strong>&quot;&gt;</span><br />
&lt;!&#8211; Begin Topic Entry {$data[&#39;tid&#39;]} &#8211;&gt;<br />
&lt;tr&gt;<br />
	&lt;td align=&quot;center&quot; class=&quot;$class2&quot; <span class="codehighlight">style=&quot;background:#fffbe9;&quot;</span> id=&#39;tid-folder-{$data[&#39;tid&#39;]}&#39; onclick=&#39;return topic_toggle_folder(&quot;{$data[&#39;tid&#39;]}&quot;, &quot;{$data[&#39;state&#39;]}&quot;);&#39;&gt;{$data[&#39;folder_img&#39;]}&lt;/td&gt;<br />
	&lt;td align=&quot;center&quot; class=&quot;$class2&quot; <span class="codehighlight">style=&quot;background:#fffbe9;&quot;</span>&gt;&lt;/td&gt;<br />
	&lt;td class=&quot;$class2&quot; valign=&quot;middle&quot; <span class="codehighlight">style=&quot;background:#fffbe9;&quot;</span>&gt;<br />
	    &lt;div style=&#39;float:right&#39;&gt;{$data[&#39;_rate_img&#39;]}&lt;/div&gt;<br />
		&lt;div&gt;<br />
			{$data[&#39;go_new_post&#39;]}{$data[&#39;prefix&#39;]} {$data[&#39;attach_img&#39;]}&lt;span id=&#39;tid-span-{$data[&#39;tid&#39;]}&#39;&gt;&lt;a id=&quot;tid-link-{$data[&#39;tid&#39;]}&quot; href=&quot;{$this-&gt;ipsclass-&gt;base_url}showtopic={$data[&#39;tid&#39;]}&quot; title=&quot;{$this-&gt;ipsclass-&gt;lang[&#39;topic_started_on&#39;]} {$data[&#39;start_date&#39;]}&quot; <span class="codehighlight">style=&quot;font-weight:bold;&quot;</span>&gt;{$data[&#39;title&#39;]}&lt;/a&gt;&lt;/span&gt; {$data[&#39;PAGES&#39;]}<br />
			&lt;div class=&quot;desc&quot;&gt;&lt;span onclick=&#39;return span_desc_to_input(&quot;{$data[&#39;tid&#39;]}&quot;);&#39; id=&#39;tid-desc-{$data[&#39;tid&#39;]}&#39;&gt;{$data[&#39;description&#39;]}&lt;/span&gt;&lt;/div&gt;<br />
		&lt;/div&gt;<br />
	&lt;/td&gt;<br />
	&lt;td align=&#39;center&#39; class=&quot;$classposts&quot; <span class="codehighlight">style=&quot;background:#fffbe9;&quot;</span>&gt;<br />
     {$data[&#39;posts&#39;]}<br />
&lt;if=&quot;$data[&#39;_hasqueued&#39;] == 1 and $inforum == 1&quot;&gt;<br />
&amp;nbsp;&lt;a href=&quot;{$this-&gt;ipsclass-&gt;base_url}showtopic={$data[&#39;tid&#39;]}&amp;amp;modfilter=invisible_posts&quot;&gt;&lt;{BC_QUEUED_POSTS}&gt;&lt;/a&gt;<br />
&lt;/if&gt;<br />
    &lt;/td&gt;<br />
	&lt;td align=&quot;center&quot; class=&quot;$class2&quot; <span class="codehighlight">style=&quot;background:#fffbe9;&quot;</span>&gt;{$data[&#39;starter&#39;]}&lt;/td&gt;<br />
	&lt;td align=&quot;center&quot; class=&quot;$class1&quot; <span class="codehighlight">style=&quot;background:#fffbe9;&quot;</span>&gt;{$data[&#39;views&#39;]}&lt;/td&gt;<br />
	&lt;td class=&quot;$class2&quot; <span class="codehighlight">style=&quot;background:#fffbe9;&quot;</span>&gt;&lt;span class=&quot;lastaction&quot;&gt;{$data[&#39;last_post&#39;]}&lt;br /&gt;&lt;a href=&quot;{$this-&gt;ipsclass-&gt;base_url}showtopic={$data[&#39;tid&#39;]}&amp;amp;view=getlastpost&quot;&gt;{$data[&#39;last_text&#39;]}&lt;/a&gt; &lt;b&gt;{$data[&#39;last_poster&#39;]}&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;<br />
&lt;if=&quot;$this-&gt;ipsclass-&gt;member[&#39;is_mod&#39;] == 1 and $inforum == 1 and $data[&#39;tidon&#39;] == 1&quot;&gt;<br />
&lt;td align=&quot;center&quot; class=&quot;$class1&quot;&gt;&lt;input type=&#39;hidden&#39; name=&#39;tid_{$data[&#39;real_tid&#39;]}&#39; id=&#39;tid_{$data[&#39;real_tid&#39;]}&#39; /&gt;&lt;a href=&quot;#&quot; title=&quot;{$this-&gt;ipsclass-&gt;lang[&#39;click_for_mod&#39;]}&quot; onclick=&quot;forum_toggle_tid(&#39;{$data[&#39;real_tid&#39;]}&#39;); return false;&quot;&gt;&lt;img name=&quot;img{$data[&#39;real_tid&#39;]}&quot; id=&#39;ipb-topic-{$data[&#39;real_tid&#39;]}&#39; src=&quot;{$this-&gt;ipsclass-&gt;vars[&#39;img_url&#39;]}/topic_selected.gif&quot; alt=&#39;&#39; /&gt;&lt;/a&gt;&lt;/td&gt;<br />
&lt;/if&gt;<br />
&lt;if=&quot;$this-&gt;ipsclass-&gt;member[&#39;is_mod&#39;] == 1 and $inforum == 1 and $data[&#39;tidon&#39;] == 0&quot;&gt;<br />
&lt;td align=&quot;center&quot; class=&quot;$class1&quot; <span class="codehighlight">style=&quot;background:#fffbe9;&quot;</span>&gt;&lt;input type=&#39;hidden&#39; name=&#39;tid_{$data[&#39;real_tid&#39;]}&#39; id=&#39;tid_{$data[&#39;real_tid&#39;]}&#39; /&gt;&lt;a href=&quot;#&quot; title=&quot;{$this-&gt;ipsclass-&gt;lang[&#39;click_for_mod&#39;]}&quot; onclick=&quot;forum_toggle_tid(&#39;{$data[&#39;real_tid&#39;]}&#39;); return false;&quot;&gt;&lt;img name=&quot;img{$data[&#39;real_tid&#39;]}&quot; id=&#39;ipb-topic-{$data[&#39;real_tid&#39;]}&#39; src=&quot;{$this-&gt;ipsclass-&gt;vars[&#39;img_url&#39;]}/topic_unselected.gif&quot; alt=&#39;&#39; /&gt;&lt;/a&gt;&lt;/td&gt;<br />
&lt;/if&gt;<br />
&lt;/tr&gt;<br />
<span class="codehighlight">&lt;else /&gt;</span></span><span class="displaycode"><br />
&lt;tr&gt;<br />
	&lt;td align=&quot;center&quot; class=&quot;$class2&quot; id=&#39;tid-folder-{$data[&#39;tid&#39;]}&#39; onclick=&#39;return topic_toggle_folder(&quot;{$data[&#39;tid&#39;]}&quot;, &quot;{$data[&#39;state&#39;]}&quot;);&#39;&gt;{$data[&#39;folder_img&#39;]}&lt;/td&gt;<br />
	&lt;td align=&quot;center&quot; class=&quot;$class2&quot;&gt;{$data[&#39;topic_icon&#39;]}&lt;/td&gt;<br />
	&lt;td class=&quot;$class2&quot; valign=&quot;middle&quot;&gt;<br />
	    &lt;div style=&#39;float:right&#39;&gt;{$data[&#39;_rate_img&#39;]}&lt;/div&gt;<br />
		&lt;div&gt;<br />
			{$data[&#39;go_new_post&#39;]}{$data[&#39;prefix&#39;]} {$data[&#39;attach_img&#39;]}&lt;span id=&#39;tid-span-{$data[&#39;tid&#39;]}&#39;&gt;&lt;a id=&quot;tid-link-{$data[&#39;tid&#39;]}&quot; href=&quot;{$this-&gt;ipsclass-&gt;base_url}showtopic={$data[&#39;tid&#39;]}&quot; title=&quot;{$this-&gt;ipsclass-&gt;lang[&#39;topic_started_on&#39;]} {$data[&#39;start_date&#39;]}&quot;&gt;{$data[&#39;title&#39;]}&lt;/a&gt;&lt;/span&gt; {$data[&#39;PAGES&#39;]}<br />
			&lt;div class=&quot;desc&quot;&gt;&lt;span onclick=&#39;return span_desc_to_input(&quot;{$data[&#39;tid&#39;]}&quot;);&#39; id=&#39;tid-desc-{$data[&#39;tid&#39;]}&#39;&gt;{$data[&#39;description&#39;]}&lt;/span&gt;&lt;/div&gt;<br />
		&lt;/div&gt;<br />
	&lt;/td&gt;<br />
	&lt;td align=&#39;center&#39; class=&quot;$classposts&quot;&gt;<br />
     {$data[&#39;posts&#39;]}<br />
&lt;if=&quot;$data[&#39;_hasqueued&#39;] == 1 and $inforum == 1&quot;&gt;<br />
&amp;nbsp;&lt;a href=&quot;{$this-&gt;ipsclass-&gt;base_url}showtopic={$data[&#39;tid&#39;]}&amp;amp;modfilter=invisible_posts&quot;&gt;&lt;{BC_QUEUED_POSTS}&gt;&lt;/a&gt;<br />
&lt;/if&gt;<br />
    &lt;/td&gt;<br />
	&lt;td align=&quot;center&quot; class=&quot;$class2&quot;&gt;{$data[&#39;starter&#39;]}&lt;/td&gt;<br />
	&lt;td align=&quot;center&quot; class=&quot;$class1&quot;&gt;{$data[&#39;views&#39;]}&lt;/td&gt;<br />
	&lt;td class=&quot;$class2&quot;&gt;&lt;span class=&quot;lastaction&quot;&gt;{$data[&#39;last_post&#39;]}&lt;br /&gt;&lt;a href=&quot;{$this-&gt;ipsclass-&gt;base_url}showtopic={$data[&#39;tid&#39;]}&amp;amp;view=getlastpost&quot;&gt;{$data[&#39;last_text&#39;]}&lt;/a&gt; &lt;b&gt;{$data[&#39;last_poster&#39;]}&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;<br />
&lt;if=&quot;$this-&gt;ipsclass-&gt;member[&#39;is_mod&#39;] == 1 and $inforum == 1 and $data[&#39;tidon&#39;] == 1&quot;&gt;<br />
&lt;td align=&quot;center&quot; class=&quot;$class1&quot;&gt;&lt;input type=&#39;hidden&#39; name=&#39;tid_{$data[&#39;real_tid&#39;]}&#39; id=&#39;tid_{$data[&#39;real_tid&#39;]}&#39; /&gt;&lt;a href=&quot;#&quot; title=&quot;{$this-&gt;ipsclass-&gt;lang[&#39;click_for_mod&#39;]}&quot; onclick=&quot;forum_toggle_tid(&#39;{$data[&#39;real_tid&#39;]}&#39;); return false;&quot;&gt;&lt;img name=&quot;img{$data[&#39;real_tid&#39;]}&quot; id=&#39;ipb-topic-{$data[&#39;real_tid&#39;]}&#39; src=&quot;{$this-&gt;ipsclass-&gt;vars[&#39;img_url&#39;]}/topic_selected.gif&quot; alt=&#39;&#39; /&gt;&lt;/a&gt;&lt;/td&gt;<br />
&lt;/if&gt;<br />
&lt;if=&quot;$this-&gt;ipsclass-&gt;member[&#39;is_mod&#39;] == 1 and $inforum == 1 and $data[&#39;tidon&#39;] == 0&quot;&gt;<br />
&lt;td align=&quot;center&quot; class=&quot;$class1&quot;&gt;&lt;input type=&#39;hidden&#39; name=&#39;tid_{$data[&#39;real_tid&#39;]}&#39; id=&#39;tid_{$data[&#39;real_tid&#39;]}&#39; /&gt;&lt;a href=&quot;#&quot; title=&quot;{$this-&gt;ipsclass-&gt;lang[&#39;click_for_mod&#39;]}&quot; onclick=&quot;forum_toggle_tid(&#39;{$data[&#39;real_tid&#39;]}&#39;); return false;&quot;&gt;&lt;img name=&quot;img{$data[&#39;real_tid&#39;]}&quot; id=&#39;ipb-topic-{$data[&#39;real_tid&#39;]}&#39; src=&quot;{$this-&gt;ipsclass-&gt;vars[&#39;img_url&#39;]}/topic_unselected.gif&quot; alt=&#39;&#39; /&gt;&lt;/a&gt;&lt;/td&gt;<br />
&lt;/if&gt;<br />
&lt;/tr&gt;<br />
<span class="codehighlight">&lt;/if&gt;</span><br />
&lt;!&#8211; End Topic Entry {$data[&#39;tid&#39;]} &#8211;&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://unwittinglyrad.com/2009/09/11/ipb-pinned-topic-background-colours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
