<?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>Fri, 03 Feb 2012 04:29:44 +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>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 my solution with everyone. 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 Forum Index, these are: render_pinned_start and render_forum_row. Code edits are highlighted in blue. Step 1 Involves adding a style=&#34;background:#;&#34; to the td in render_pinned_start. This will overwrite the background property that is defined in the darkrow1 class. This edit adjusts the background colour for the Important Topics title. &#60;!&#8211;PINNED&#8211;&#62; &#60;if=&#34;$show == 1&#34;&#62; &#60;tr&#62; &#60;td class=&#34;darkrow1&#34; colspan=&#34;8&#34; style=&#34;background:#fbf2ca;&#34;&#62;&#60;b&#62;{$this-&#62;ipsclass-&#62;lang[&#39;pinned_start&#39;]}&#60;/b&#62;&#60;/td&#62; &#60;/tr&#62; &#60;/if&#62; &#60;!&#8211; END PINNED &#8211;&#62; Step 2 This is the more time consuming part and involves adding some if, else statements and style code to render_forum_row. What you see below is pretty much the standard code duplicated [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://unwittinglyrad.com/wp-content/uploads/2009/09/ipbtopics.jpg" alt="" title="ipbtopics" width="960" height="450" class="alignnone size-full wp-image-2369" /></p>
<p><span class="introparagraph">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 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="highlightgrey">Forum Index</span>, these are: <span class="highlightgrey">render_pinned_start</span> and <span class="highlightgrey">render_forum_row</span>. Code edits are highlighted in <span class="highlight">blue</span>.</p>
<hr />
<p><span class="subtitle">Step 1</span></p>
<p>Involves adding a <span class="highlightgrey">style=&quot;background:#;&quot;</span> to the td in render_pinned_start. This will overwrite the background property that is defined in the darkrow1 class. This edit adjusts the background colour for the Important Topics title.</p>
<blockquote class="blockquotecode"><p>&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="highlight">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></blockquote>
<hr />
<p><span class="subtitle">Step 2</span></p>
<p>This is the more time consuming part and involves adding some if, else statements and style code to render_forum_row. What you see below is pretty much the <em>standard</em> code duplicated in order to use the functionality of if, else statements.</p>
<p>Open your favourite text editor, then simply copy and paste the content from render_forum_row in it. Then duplicate the code from <span class="highlightgrey">&lt;tr&gt;</span> to <span class="highlightgrey">&lt;/tr&gt;</span> within your text document. You then want to add <span class="highlightgrey">&lt;if=&quot;$data[&#39;tid&#39;] == your-topic-id || $data[&#39;tid&#39;] == your-topic-id&quot;&gt;</span> at the very top of your code. Replace your-topic-id 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 class="highlightgrey">|| $data[&#39;tid&#39;] == </span> for each topic ID.</p>
<p>Where the first <span class="highlightgrey">&lt;/tr&gt;</span> ends and  second <span class="highlightgrey">&lt;tr&gt;</span> begins, between these two you want to place an <span class="highlightgrey">&lt;else /&gt;</span> statement. This basically tells IPB how to display topics if the ID&#8217;s from the if statement don&#8217;t match. At the end of the second <span class="highlightgrey">&lt;/tr&gt;</span>, place an <span class="highlightgrey">&lt;/if&gt;</span>, this will close off the if 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 class="highlightgrey">style=&quot;background:#;&quot;</span> with your own colour code to each of the td cells <em>above</em> the <span class="highlightgrey">&lt;else /&gt;</span> line of code. My final step was to add <span class="highlightgrey">style=&quot;font-weight:bold;&quot;</span> to pinned topic title so that it stands out more.</p>
<p><span class="subtitle">The final result, complete code:</span></p>
<blockquote class="blockquotecode"><p><span class="highlight">&lt;if=&quot;$data[&#39;tid&#39;] == your-topic-id || $data[&#39;tid&#39;] == your-topic-id&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="highlight">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="highlight">style=&quot;background:#fffbe9;&quot;</span>&gt;&lt;/td&gt;<br />
	&lt;td class=&quot;$class2&quot; valign=&quot;middle&quot; <span class="highlight">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="highlight">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="highlight">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="highlight">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="highlight">style=&quot;background:#fffbe9;&quot;</span>&gt;{$data[&#39;views&#39;]}&lt;/td&gt;<br />
	&lt;td class=&quot;$class2&quot; <span class="highlight">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="highlight">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="highlight">&lt;else /&gt;</span></span><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="highlight">&lt;/if&gt;</span><br />
&lt;!&#8211; End Topic Entry {$data[&#39;tid&#39;]} &#8211;&gt;</p></blockquote>
]]></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>

