<?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>UBB.threads and Wordpress experts &#187; How to</title>
	<atom:link href="http://sirdude.com/ubbthreads/how-to/feed" rel="self" type="application/rss+xml" />
	<link>http://sirdude.com</link>
	<description>Customizations, integrations, bridges and more</description>
	<lastBuildDate>Fri, 30 Mar 2012 06:29:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Custom Vimeo BBCode for UBB.Threads</title>
		<link>http://sirdude.com/custom-vimeo-bbcode-for-ubb-threads.html</link>
		<comments>http://sirdude.com/custom-vimeo-bbcode-for-ubb-threads.html#comments</comments>
		<pubDate>Thu, 05 May 2011 18:11:54 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[UBB.threads]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=942</guid>
		<description><![CDATA[I've had quite a few customers request a custom BBCode for Vimeo, so rather than go into a long post about it, I will post the file and some short instructions on how to implement.
Related posts:<ul>
<li><a href='http://sirdude.com/a-better-youtube-custom-bbcode.html' rel='bookmark' title='A Better YouTube custom BBcode'>A Better YouTube custom BBcode</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
<li><a href='http://sirdude.com/ubb-threads-user-selectable-tooltip-preferences.html' rel='bookmark' title='UBB.threads user selectable tooltip preferences'>UBB.threads user selectable tooltip preferences</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft  wp-image-958" style="border: 0pt none; margin: 0pt 10px 10px 0pt;" title="Web Coding" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/05/Web-Coding-128x128.png" alt="" />I&#8217;ve had quite a few customers request a custom BBCode for Vimeo, so rather than go into a long post about it, I will post the file and some short instructions on how to implement.</p>
<p>There are really two ways to add a Custom Tag. One being to manually type all the appropriate fields in and the other is to import from a previously exported tag from a working UBB.Threads site.</p>
<p>Since I have one working on many sites, I exported it for your convenience.</p>
<p>The file to import into the Custom Tag Editor is below:</p>
<div class="woo-sc-box download  rounded ">
<img alt="txt" title="txt" class="download-icon" src="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/img/filetype_icons/document-text.png" /><a href="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/download.php?id=7" title="Downloaded 154 times">Vimeo Custom Tag - v1</a> - Downloaded 154 times
</div>
<p><img class="size-full wp-image-946 alignleft" title="import-new-tags" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/05/import-new-tags.png" alt="" width="496" height="104" />To import this file, go to your Admin Control Panel, Content tools and select the 2nd Tab ( <em>Custom Tag Editor</em> ).</p>
<p>The URL to this page would be: <em></em></p>
<p>&#8220;http://<em><span style="color: #800000;">yourforums.com/forums</span></em>/admin/rebuildcontent.php&#8221;</p>
<p>where the colored text would be replaced with the base URL to your forums.</p>
<p>Locate the bottom menu ( or tabs, if you prefer ) and click on &#8220;Import New Tags&#8221;.</p>
<p>Once imported, you will see the following form:</p>
<p><a href="http://sirdude.com/wpbleh/wp-content/uploads/2011/05/vimeo.png" rel="wp-prettyPhoto"><img class="aligncenter size-large wp-image-947" title="vimeo" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/05/vimeo-640x594.png" alt="" width="640" height="594" /></a></p>
<p>The &#8216;Custom Tag&#8217; I used is &#8216;vimeo&#8217;, however you are free to use the more common &#8216;video:vimeo&#8217; if you would like. I prefer the shorter / less typing approach.</p>
<div class="woo-sc-box note  rounded ">
The other reason I use the vimeo tag, is that it mirrors the same tags or &#8220;shortcode&#8221; used in WordPress. Makes sense to keep it consistent  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /><br />
</div>
<p>So when the user inserts the tag into a post with the following as an example:</p>
<pre class="brush: plain; title: ; notranslate">
[ vimeo ]http://vimeo.com/23199805[ /vimeo ] ( no spaces )
</pre>
<p>The result is:</p>
<p><p><a href="http://sirdude.com/custom-vimeo-bbcode-for-ubb-threads.html"><em>Click here to view the embedded video.</em></a></p><br />
Have at it and enjoy !</p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/a-better-youtube-custom-bbcode.html' rel='bookmark' title='A Better YouTube custom BBcode'>A Better YouTube custom BBcode</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
<li><a href='http://sirdude.com/ubb-threads-user-selectable-tooltip-preferences.html' rel='bookmark' title='UBB.threads user selectable tooltip preferences'>UBB.threads user selectable tooltip preferences</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/custom-vimeo-bbcode-for-ubb-threads.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Better YouTube custom BBcode</title>
		<link>http://sirdude.com/a-better-youtube-custom-bbcode.html</link>
		<comments>http://sirdude.com/a-better-youtube-custom-bbcode.html#comments</comments>
		<pubDate>Tue, 03 May 2011 15:52:42 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[7.x]]></category>
		<category><![CDATA[Custom BBCode]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=898</guid>
		<description><![CDATA[A forum that I consult to ( SimHQ ), recently informed me that YouTube has changed the URL format for when you click the "Share" Link below the video. It no longer matches the URL in the address bar and this was causing some confusion.

The URL in the address bar remains the familiar one that links to youtube.com, adding the ?v=xxxx parameter as always, but the Share link has gone a different way now.

So... how do we modify the existing custom BBCode tag to accomplish this, you ask?
Related posts:<ul>
<li><a href='http://sirdude.com/custom-vimeo-bbcode-for-ubb-threads.html' rel='bookmark' title='Custom Vimeo BBCode for UBB.Threads'>Custom Vimeo BBCode for UBB.Threads</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
<li><a href='http://sirdude.com/upcoming-events-custom-island.html' rel='bookmark' title='Upcoming events Custom Island'>Upcoming events Custom Island</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-911" title="page_php_128" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/05/page_php_128.png" alt="" width="128" height="128" />A forum that I consult to ( <a title="Simulation Headquarters" href="http://simhq.com" target="_blank">SimHQ </a>), recently informed me that YouTube has changed the URL format for when you click the &#8220;Share&#8221; Link below the video. It no longer matches the URL in the address bar and this was causing some confusion.<img class="alignright size-full wp-image-933" title="share-video" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/05/share-video.png" alt="" width="139" height="73" /></p>
<p>The URL in the address bar is the still the familiar one that links to youtube.com, adding the ?v=xxxx parameter as always, but the Share link has gone a different way now.</p>
<p>Namely, YouTube decided to use &#8220;<em>http://youtu.be/kXRSZSxXB9g</em>&#8221; for example.</p>
<p>This, of course broke any existing BBcode regexes that UBB.Threads had in place and simply didn&#8217;t parse if the user used the URL generated from the &#8220;<em>Share</em>&#8221; button.</p>
<p>Quandary, you say?</p>
<p><img class="size-full wp-image-907 alignnone" title="No not really" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/05/nrly.png" alt="" width="72" height="66" /></p>
<p>I looked at the resulting embed code and it is the same as before, so the regex simply needs to be updated to handle both cases; old and new.</p>
<p>For UBB.threads forum admins, go to your Control Panel, Content Tools and Custom Tag Editor ( shown below ):</p>
<div id="attachment_904" class="wp-caption aligncenter" style="width: 604px"><a rel="wp-prettyPhoto" href="http://sirdude.com/wpbleh/wp-content/uploads/2011/05/yt-custom1.png"><img class="size-large wp-image-904" title="yt-custom" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/05/yt-custom1-594x640.png" alt="" width="594" height="640" /></a><p class="wp-caption-text">Click to see Full size</p></div>
<p>The only line that needs to be modified is the Matching regex:</p>
<pre class="brush: php; title: ; notranslate">

(|.*youtu\.be/|.*v=)([a-zA-Z0-9_-]{8,12})(|&amp;.*)
</pre>
<p>and you are good to go.</p>
<div class="woo-sc-box tick large rounded " style="padding-left:15px;background-image:none;">You can double click on the regex above and the line will be automatically selected. You can then copy it and paste it into your UBB.threads admin BBcode edit window.</div>
<p>Just a note on the regex. It actually parses three different types:</p>
<div class="shortcode-unorderedlist green-dot"></p>
<ul>
<li>YouTube URL from address bar: http://www.youtube.com/watch?v=JOddp-nlNvQ&amp;feature=grec_index</li>
<li>YouTube from &#8220;Share&#8221;: http://youtu.be/JOddp-nlNvQ</li>
<li>YouTube ID: JOddp-nlNvQ</li>
</ul>
<p></div>

<p>All three produce the same embed code and a case in point would be:</p>
<p style="text-align: center;"><strong><span style="color: #800000;">[yt]http://youtu.be/JOddp-nlNvQ[/yt]</span></strong></p>
<p>produces:</p>
<p><a href="http://sirdude.com/a-better-youtube-custom-bbcode.html"><em>Click here to view the embedded video.</em></a></p>
<p>You can also just download the entire custom text file below and import it, so as to play with it separately before enabling. I used the &#8216;yt&#8217; tag, instead of what you may be more familiar with &#8216;<em>video:youtube</em>&#8216;. Typing [yt] seems much easier for my forum members anyway!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /> </p>
<img alt="txt" title="txt" class="download-icon" src="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/img/filetype_icons/document-text.png" /><a href="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/download.php?id=6" title="Downloaded 156 times">Youtube Custom BBcode for Import - v1.1</a> - Downloaded 156 times
<p>Enjoy  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/llama.gif' alt=':llama:' class='wp-smiley' /> </p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/custom-vimeo-bbcode-for-ubb-threads.html' rel='bookmark' title='Custom Vimeo BBCode for UBB.Threads'>Custom Vimeo BBCode for UBB.Threads</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
<li><a href='http://sirdude.com/upcoming-events-custom-island.html' rel='bookmark' title='Upcoming events Custom Island'>Upcoming events Custom Island</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/a-better-youtube-custom-bbcode.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UBB.threads user selectable tooltip preferences</title>
		<link>http://sirdude.com/ubb-threads-user-selectable-tooltip-preferences.html</link>
		<comments>http://sirdude.com/ubb-threads-user-selectable-tooltip-preferences.html#comments</comments>
		<pubDate>Sun, 13 Mar 2011 20:13:11 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Modifications]]></category>
		<category><![CDATA[7.x]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=225</guid>
		<description><![CDATA[In version 7.3 of UBB.threads, we introduced tooltips. This allows users to hover over a topic title in a lists of posts for a forum and have a sneak preview of what was inside, so to speak.

Well, the mistake I made was to make it only an admin selectable option. In other words the entire user base for a particular forum would either have it or not have it. This caused problems, because I've found that users either love it or hate it and the middle ground is rare.
Related posts:<ul>
<li><a href='http://sirdude.com/adding-a-top-logo-to-your-ubb-threads-forum.html' rel='bookmark' title='Adding a top logo to your UBB.threads forum'>Adding a top logo to your UBB.threads forum</a></li>
<li><a href='http://sirdude.com/how-to-install-ubb-threads-on-your-site.html' rel='bookmark' title='How to install UBB.threads on your site'>How to install UBB.threads on your site</a></li>
<li><a href='http://sirdude.com/demystifying-the-ubb-threads-content-structure.html' rel='bookmark' title='Demystifying UBB.threads framework &#8211; Part I'>Demystifying UBB.threads framework &#8211; Part I</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-877" title="Coding" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/03/package_code_128.png" alt="" width="128" height="128" /></p>
<p>From what I&#8217;ve seen, the naysayers win in most cases and it ends up with the forum turning off the option entirely. Whoever wants it, just can&#8217;t get it. Matter of fact, this is the case over at <a title="Home of UBB.threads" href="http://www.ubbcentral.com/forums/ubbthreads.php/topics/242110/Give_users_option_to_enable_di.html#Post242110" target="_blank">Ubb.central</a> right now ( I posted the solution there as well ).</p>
<p>It&#8217;s turned off for whatever reason.</p>
<p>So, that leads me to this post and the first modification to stock UBB.threads 7.5.6. This post will walk you through what you need to do in order to give the users the option to have it or not by editing their profile and choosing which they prefer.</p>
<h3>Step 1:</h3>
<p>Go into Registration settings / Registration screen and set the Custom field prompt ( example picture below ) to something meaningful:</p>
<p><img class="aligncenter size-full wp-image-881" title="Custom Field 1" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/03/custom-field-1.png" alt="" width="576" height="87" /></p>
<p>When saved, this will add an extra field to the user profile screen that allows them to show the Tooltip ( 1 ) or to not show it ( 0 ).</p>
<h3>Step 2:</h3>
<p>Enable tooltips globally for the forum. In other words, it will be turned on by default. This is done in Display Options, General and is pictured below:</p>
<p><img class="aligncenter size-full wp-image-882" title="Enable Forum Tooltips" src="http://sirdude.com/wpbleh/wp-content/uploads/2011/03/forum-enable-tooltips.png" alt="" width="575" height="309" /></p>
<h3>Step 3:</h3>
<p>Open up the file &#8216;scripts/postlist.inc.php&#8217; and make 2 small changes. This will essentially look at the user profile setting and enable tooltips or not.</p>
<p>Find:</p>
<pre class="brush: php; title: ; notranslate">

&quot;user_fields&quot; =&gt; &quot;t2.USER_TOPIC_VIEW_TYPE, t2.USER_TOPICS_PER_PAGE, t2.USER_POSTS_PER_TOPIC&quot;,
</pre>
<p>Change to:</p>
<pre class="brush: php; title: ; notranslate">

&quot;user_fields&quot; =&gt; &quot;t2.USER_TOPIC_VIEW_TYPE, t2.USER_TOPICS_PER_PAGE, t2.USER_POSTS_PER_TOPIC,USER_EXTRA_FIELD_1&quot;,
</pre>
<p>Then find:</p>
<pre class="brush: php; title: ; notranslate">

$postrow[$z]['tooltip'] = &quot;&quot;;
if ($config['TOOLTIP_LENGTH'] &amp;&amp; $config['TOOLTIP_LENGTH'] &gt; 0) {
</pre>
<p>and change to:</p>
<pre class="brush: php; title: ; notranslate">

$postrow[$z]['tooltip'] = &quot;&quot;;
if ($config['TOOLTIP_LENGTH'] &amp;&amp; $config['TOOLTIP_LENGTH'] &gt; 0
                                              &amp;&amp; $user['USER_EXTRA_FIELD_1'] == '1') {
</pre>
<h3>Step 4:</h3>
<p>Tell your forum members about it or better yet, link to this post!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/hihi.gif' alt=':hihi:' class='wp-smiley' /> </p>
<p>That&#8217;s it!</p>
<p> <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/llama.gif' alt=':llama:' class='wp-smiley' /> </p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/adding-a-top-logo-to-your-ubb-threads-forum.html' rel='bookmark' title='Adding a top logo to your UBB.threads forum'>Adding a top logo to your UBB.threads forum</a></li>
<li><a href='http://sirdude.com/how-to-install-ubb-threads-on-your-site.html' rel='bookmark' title='How to install UBB.threads on your site'>How to install UBB.threads on your site</a></li>
<li><a href='http://sirdude.com/demystifying-the-ubb-threads-content-structure.html' rel='bookmark' title='Demystifying UBB.threads framework &#8211; Part I'>Demystifying UBB.threads framework &#8211; Part I</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/ubb-threads-user-selectable-tooltip-preferences.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Image upload directly into your post</title>
		<link>http://sirdude.com/image-upload-directly-into-your-post.html</link>
		<comments>http://sirdude.com/image-upload-directly-into-your-post.html#comments</comments>
		<pubDate>Sun, 21 Nov 2010 08:05:57 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Modifications]]></category>
		<category><![CDATA[UBB.threads]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=796</guid>
		<description><![CDATA[A feature that has always been needed is a simple way to upload images directly into a new post without having to either upload to a gallery forum first or a popular picture sharing site, then link to it.

There are other methods too, including having a companion photopost installation that links the board members together, but in the end, you can't beat, just clicking on a button in the editor toolbar, selecting a number of images and uploading them right into a post.
Related posts:<ul>
<li><a href='http://sirdude.com/alternating-row-colors-in-a-post-island.html' rel='bookmark' title='Alternating row colors in a Post Island'>Alternating row colors in a Post Island</a></li>
<li><a href='http://sirdude.com/adding-a-top-logo-to-your-ubb-threads-forum.html' rel='bookmark' title='Adding a top logo to your UBB.threads forum'>Adding a top logo to your UBB.threads forum</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-810" style="margin: 10px; border: 0pt none; background:transparent;" title="7 ALT Links" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/7-ALT-Links.png" alt="" width="128" height="128" />A feature that has always been needed on <a href="http://www.ubbcentral.com/forums/ubbthreads.php/forum_summary.html">ubb.threads</a> is a simple way to upload images directly into a new post without having to either upload to a gallery forum first or a popular picture sharing site, then link to it.</p>
<p>There are other methods too, including having a companion <a href="http://www.photopost.com/">photopost </a>installation that links the board members together, but in the end, you can&#8217;t beat, just clicking on a button in the editor toolbar, selecting a number of images and uploading them right into a post.</p>
<p>Furthermore, it would be nice for all the bbcode markup to be auto-generated without thinking.</p>
<p>Bottom line: Click, browse and Save!</p>
<p>Well, this now exists as a custom modification. The difference with this modification is that I won&#8217;t be posting all the files to change here, because they aren&#8217;t trivial. I will instead describe how it works, then make it available as a paid modification by me for your board.</p>
<p>Here is how it works:</p>
<p>First of all the modification adds the editor buttons to the quick reply area. This is logical, since those images are cached once the images are loaded the first time. No speed issues really apply. The new and improved quick reply is shown below:</p>
<p style="text-align: center;"><a href="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/quick-reply1.jpg"><img class="size-large wp-image-800  aligncenter" title="quick-reply" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/quick-reply1-640x171.jpg" alt="" width="640" height="171" /></a></p>
<p>There is a new kid on the block, which initiates the image up-loader.</p>
<p>It&#8217;s the 5th icon over from the left <img class="alignnone size-full wp-image-801" title="2" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/2.jpg" alt="" width="31" height="31" /></p>
<p>The blue up arrow over the image is the symbol for uploading the image into a post.</p>
<p>Clicking this image pops up a nifty shadowbox dialog that guides the user through the process of uploading one or more images into the post.</p>
<p>The dialog is shown below:</p>
<p style="text-align: center;"><a href="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/upload-dialog.jpg"><img class="size-large wp-image-802 aligncenter" title="upload-dialog" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/upload-dialog-640x229.jpg" alt="" width="640" height="229" /></a></p>
<p>When first used, there is a fairly lengthy help text to guide the user through what is really an easy and painless process. You simply browse to your computer and &#8220;Add file from your PC&#8221; or alternatively can paste a URL from a remote picture (ie: imageshack, tinypix or photobucket) and the up-loader will send it to the server.</p>
<p>Since the process is so easy, you will find that the help text is no longer needed and that can be hidden (cookie based to remember your preference) by clicking the [ Hide help ] button on the upper right corner.</p>
<p>Uploading is all ajax driven and you will get feed back as the file uploads with a loading icon ( <img class="alignnone size-full wp-image-803" title="ajax-loader" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/ajax-loader.gif" alt="" width="56" height="21" /> ). Once complete, the dialog shows a thumbnail for each image on the left. An example of two images is shown below:</p>
<p style="text-align: left;"><a href="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/two-pics.jpg"><img class="size-large wp-image-804  aligncenter" title="two-pics" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/two-pics-640x348.jpg" alt="" width="640" height="348" /></a>The user can continue to repeat the process of adding files from their PC or from remote URLs and the thumbnails will keep being added to the vertical list.</p>
<p>If for some reason, you change your mind after seeing a particular thumbnail, just click on the [ Remove ] button to the right of the specific thumbnail and it won&#8217;t be included in the batch to be inserted into the post.</p>
<p>When ready, you have two options to save into the post and they are &#8220;<a href="http://www.lokeshdhakar.com/projects/lightbox2/">Lightbox</a>&#8221; or &#8220;Standard&#8221;</p>
<p>Lightbox would normally be used if you are uploading very large pictures, that you want to expand as a lightbox effect when clicked. I actually use a free library called &#8220;<a href="http://www.shadowbox-js.com/">Shadowbox</a>&#8220;, which is based upon the Lightbox idea.</p>
<p>Standard is for normal or smaller images that don&#8217;t need to be clicked on at all to see their full potential.</p>
<p>There are admin settings to set the maximum width of an image when it appears in a post, so as to not interfere with the board display as well as a maximum physical width of the expanded image in lightbox mode.</p>
<p>For this example, I saved the images as a Lightbox to see how this effect works:</p>
<p><a href="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/bbcode.jpg"><img class="alignnone size-large wp-image-807" title="bbcode" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/bbcode-640x69.jpg" alt="" width="640" height="69" /></a></p>
<p>The IMG tags are auto generated, with an additional set of parameters (gal and a hash value) to specify that they are to be treated as a lightbox gallery.</p>
<p>Clicking either image, brings up the lightbox and you can click on all the images to cycle through them:</p>
<p><a href="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/lightbox.jpg"><img class="alignnone size-full wp-image-808" title="lightbox" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/lightbox.jpg" alt="" width="530" height="542" /></a></p>
<p>I&#8217;ve installed this on quite a few sites now and they simply love it, since it&#8217;s all in one place.</p>
<p>If you are interested, just use the <a href="http://sirdude.com/a-new-frickin-contact-page">contact form</a> and ask for a quote. You can view <a href="http://www.ubbcentral.com/forums/ubbthreads.php/users/3429.html">my profile comments</a> on the many satisfied customers that have had this and / or other modifications done.</p>
<p>One satisfied customer even went as far as to write an article on it <a href="http://www.simhq.com/_commentary/all_043a.html">here </a> <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/rawk.gif' alt=':rawk:' class='wp-smiley' /> </p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/alternating-row-colors-in-a-post-island.html' rel='bookmark' title='Alternating row colors in a Post Island'>Alternating row colors in a Post Island</a></li>
<li><a href='http://sirdude.com/adding-a-top-logo-to-your-ubb-threads-forum.html' rel='bookmark' title='Adding a top logo to your UBB.threads forum'>Adding a top logo to your UBB.threads forum</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/image-upload-directly-into-your-post.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Upcoming events Custom Island</title>
		<link>http://sirdude.com/upcoming-events-custom-island.html</link>
		<comments>http://sirdude.com/upcoming-events-custom-island.html#comments</comments>
		<pubDate>Sat, 06 Nov 2010 05:26:18 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Custom island]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=777</guid>
		<description><![CDATA[Ubb.threads has a very underused, but powerful capability in what are called "Custom Islands".

You essentially can have a php code module be scheduled to run at whatever interval you want to produce output to be used as one of the custom islands (left or right) on your forums.

This will show you how

Related posts:<ul>
<li><a href='http://sirdude.com/a-custom-island-that-grabs-an-rss-feed.html' rel='bookmark' title='UBB.threads Custom Island from an RSS feed'>UBB.threads Custom Island from an RSS feed</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
<li><a href='http://sirdude.com/getting-more-out-of-the-custom-island-editor.html' rel='bookmark' title='Getting more out of the Custom Island Editor'>Getting more out of the Custom Island Editor</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-779" style="margin: 10px;" title="Calender" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/Calender-128x128.png" alt="" width="128" height="128" /><a title="UBB Central" href="http://www.ubbcentral.com/forums/ubbthreads.php/ubb/cfrm">Ubb.threads</a> has a very underused, but powerful capability in what are called &#8220;Custom Islands&#8221;.</p>
<p>You essentially can have a php code module be scheduled to run at whatever interval you want to produce output to be used as one of the custom islands (left or right) on your forums.</p>
<p>I was recently asked to provide such a beast for a customer of mind at <a title="Fishing Minnesota forums" href="http://fishingminnesota.com/forums">Fishing Minnesota</a> and figured that I would share it with the Threads public. Thanks to Rick Paquin for this!</p>
<p>I&#8217;ve done the work, so all you have to do is copy the code and paste it into one of your empty custom islands, enable it, set a schedule for how often it updates and you are good to go.</p>
<p>The code is shown below:</p>
<pre class="brush: php; title: ; notranslate">/* PHP CODE HERE, IF NECESSARY */

# Change the next parameter to the maximum future events you want
$maxEvents = 10;
# Change to whichever column this Custom Island will be shown (for CSS)
$portalCol = 'left';

# -- Nothing changes below, unless you are non-n00bers ;)
$intTime = time();
$dateParts = getdate($intTime);
$dtYr = $dateParts['year'];

$q = &quot;
 SELECT ce.CALENDAR_EVENT_SUBJECT, ce.TOPIC_ID, t.POST_ID,
 ce.CALENDAR_EVENT_DAY, ce.CALENDAR_EVENT_MONTH,
 ce.CALENDAR_EVENT_YEAR, ce.CALENDAR_EVENT_BODY
 FROM {$config['TABLE_PREFIX']}CALENDAR_EVENTS ce, {$config['TABLE_PREFIX']}TOPICS t
 WHERE ce.CALENDAR_EVENT_TYPE='public'
 AND ce.CALENDAR_EVENT_RECURRING = 'never'
 AND ce.CALENDAR_EVENT_YEAR &gt;= $dtYr
 AND ce.TOPIC_ID=t.TOPIC_ID
&quot;;
$r = $dbh-&gt;do_query($q);
$ceList = array();
while (list($ceSubject, $topicID, $postID, $ceDay, $ceMon, $ceYr) = $dbh-&gt;fetch_array($r)) {
 $ceTime = mktime(0,0,0,$ceMon,$ceDay,$ceYr);
 if ($ceTime &gt;= $intTime) {
 $ceList[$ceTime]['Subject'] = $ceSubject;
 $ceList[$ceTime]['postID'] = $postID;
 }
}

# Create the list
$i=0;
sort($ceList);
foreach ($ceList as $ce) {
 $cssExt = ($i++&amp;1) ? '2' : '1';
 $cssClass = 'class=&quot;' . $portalCol . 'alt-' . $cssExt .'&quot;';
 if ($i == 1) {
 $htmlList .= &quot;&lt;a href=\&quot;{$config['FULL_URL']}/ubbthreads.php?ubb=showflat&amp;Number={$ce['postID']}\&quot;&gt;{$ce['Subject']}&lt;/a&gt;&quot;;
 } else {
 $htmlList .= &quot;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td $cssClass&gt;&quot;;
 $htmlList .= &quot;&lt;a href=\&quot;{$config['FULL_URL']}/ubbthreads.php?ubb=showflat&amp;Number={$ce['postID']}\&quot;&gt;{$ce['Subject']}&lt;/a&gt;&quot;;
 }
}

/* DO NOT CHANGE THE LINE BELOW */
$body = &lt;&lt;&lt;EOF

$htmlList

EOF;
/* DO NOT CHANGE THE LINE ABOVE */</pre>
<p>There really are only two things to change here:</p>
<ul>
<li>How many upcoming events to display (line 4)</li>
<li>Which column the island will be on (left or right &#8211; line 6)</li>
</ul>
<p>That&#8217;s it for the code!</p>
<p>The final thing to do is to configure the custom island&#8217;s behavior and I&#8217;ll just show a screenie of the parameters I chose:</p>
<p><img class="size-full wp-image-784 aligncenter" style="border: 1px solid black; margin: 10px; padding: 4px;" title="ci-params" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/ci-params.jpg" alt="" width="521" height="427" /></p>
<p>I set the island to update every 2 hours (120), gave it a title and that was it! Well, almost. One final thing was to go to portal settings and select which column (left or right) to display it on and what order.</p>
<p>Here&#8217;s how it looks on the right hand column at Fishing Minnesota forums:</p>
<p><img class="aligncenter size-full wp-image-793" title="ci-right" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/11/ci-right.jpg" alt="" width="174" height="292" /></p>
<p>Enjoy and hit the tip jar on the upper right of the site, if you find this worth it  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/smiley.gif' alt=':)' class='wp-smiley' /> </p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/a-custom-island-that-grabs-an-rss-feed.html' rel='bookmark' title='UBB.threads Custom Island from an RSS feed'>UBB.threads Custom Island from an RSS feed</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
<li><a href='http://sirdude.com/getting-more-out-of-the-custom-island-editor.html' rel='bookmark' title='Getting more out of the Custom Island Editor'>Getting more out of the Custom Island Editor</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/upcoming-events-custom-island.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Adding a Gametrailers.com video tag</title>
		<link>http://sirdude.com/adding-a-gametrailer-com-video-tag.html</link>
		<comments>http://sirdude.com/adding-a-gametrailer-com-video-tag.html#comments</comments>
		<pubDate>Sun, 04 Apr 2010 21:41:08 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[7.x]]></category>
		<category><![CDATA[bbcode]]></category>
		<category><![CDATA[UBB.threads]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=730</guid>
		<description><![CDATA[A customer of mine recently wanted to know if I could gin up a custom ubbcode tag for Gametrailer.com and I obliged him.
Related posts:<ul>
<li><a href='http://sirdude.com/adding-a-top-logo-to-your-ubb-threads-forum.html' rel='bookmark' title='Adding a top logo to your UBB.threads forum'>Adding a top logo to your UBB.threads forum</a></li>
<li><a href='http://sirdude.com/adding-smiley-pop-up-to-the-shoutbox.html' rel='bookmark' title='Adding Smiley pop-up to the Shoutbox'>Adding Smiley pop-up to the Shoutbox</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-743" style="margin: 10px; border: none;" title="package" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/04/pack.png" alt="" width="128" height="128" />A customer of mine recently wanted to know if I could gin up a custom ubbcode tag for <a href="http://gametrailers.com">Gametrailers.com</a> and I obliged him.</p>
<p>The first thing is to note a pattern that can be matched from the video URL and the resulting embed code at the site. In most cases, this is what you want to do; look at a source URL or other identifier and try to find a correlation between that and the resulting html markup that is normally called the <em>embed code.</em></p>
<p>For this example, the URL I used was:</p>
<pre class="brush: xml; title: ; notranslate">http://www.gametrailers.com/video/pax-east-breach/63822</pre>
<p>and the resulting embed code was:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div style=&quot;width: 480px;&quot;&gt;
  &lt;object
    classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot;
    codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0&quot;
    id=&quot;gtembed&quot;
    width=&quot;480&quot;
    height=&quot;392&quot;&gt;
  &lt;param name=&quot;allowScriptAccess&quot; value=&quot;sameDomain&quot; /&gt;
  &lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;
  &lt;param name=&quot;movie&quot; value=&quot;http://www.gametrailers.com/remote_wrap.php?mid=63822&quot;/&gt;
  &lt;param name=&quot;quality&quot; value=&quot;high&quot; /&gt;
  &lt;embed
    src=&quot;http://www.gametrailers.com/remote_wrap.php?mid=63822&quot;
    swLiveConnect=&quot;true&quot;
    name=&quot;gtembed&quot;
    align=&quot;middle&quot;
    allowScriptAccess=&quot;sameDomain&quot;
    allowFullScreen=&quot;true&quot;
    quality=&quot;high&quot;
    pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot;
    type=&quot;application/x-shockwave-flash&quot;
    width=&quot;480&quot;
    height=&quot;392&quot;&gt;
  &lt;/embed&gt;
  &lt;/object&gt;
&lt;div style=&quot;font-size: 10px; font-family: Verdana; text-align: center; width: 480px; padding-top: 2px; padding-bottom: 2px; background-color: black; height: 32px;&quot;&gt;
  &lt;div&gt;
    &lt;a style=&quot;color:#FFFFFF;&quot; href=&quot;http://www.gametrailers.com&quot; title=&quot;GameTrailers.com&quot;&gt;Video Games&lt;/a&gt; |
    &lt;a style=&quot;color:#FFFFFF;&quot; href=&quot;http://www.gametrailers.com/game/breach/12938&quot; title=&quot;Breach&quot;&gt;Breach&lt;/a&gt; |
    &lt;a style=&quot;color:#FFFFFF;&quot; href=&quot;http://www.gametrailers.com/video/pax-east-breach/63822&quot; title=&quot;PAX East 10: Destruction Walkthrough&quot;&gt;PAX East 10: Destruction Walkthrough&lt;/a&gt;
  &lt;/div&gt;
  &lt;div style=&quot;padding-top: 3px;&quot;&gt;
    &lt;a style=&quot;color:#FFFFFF;&quot; href=&quot;http://xbox360.gametrailers.com/&quot; title=&quot;XBox 360&quot;&gt;XBox 360&lt;/a&gt; |
    &lt;a style=&quot;color:#FFFFFF;&quot; href=&quot;http://ps3.gametrailers.com/&quot; title=&quot;PS3&quot;&gt;Playstation 3&lt;/a&gt; |
    &lt;a style=&quot;color:#FFFFFF;&quot; href=&quot;http://wii.gametrailers.com/&quot; title=&quot;Wii&quot;&gt;Nintendo Wii&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>I cleaned up the code to be on multiple lines, instead of a giant glob of embed code, for readability.</p>
<p>The first thing I want to do is just to remove the extraneous crap after the object and embed code. No need to have all those extra links, so we&#8217;ll just remove them and the resulting embed code looks like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;gt-embed&quot;&gt;
  &lt;object
    classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot;
    codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0&quot;
    id=&quot;gtembed&quot;
    width=&quot;480&quot;
    height=&quot;392&quot;&gt;
  &lt;param name=&quot;allowScriptAccess&quot; value=&quot;sameDomain&quot; /&gt;
  &lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;
  &lt;param name=&quot;movie&quot; value=&quot;http://www.gametrailers.com/remote_wrap.php?mid=63822&quot;/&gt;
  &lt;param name=&quot;quality&quot; value=&quot;high&quot; /&gt;
  &lt;embed
    src=&quot;http://www.gametrailers.com/remote_wrap.php?mid=63822&quot;
    swLiveConnect=&quot;true&quot;
    name=&quot;gtembed&quot;
    align=&quot;middle&quot;
    allowScriptAccess=&quot;sameDomain&quot;
    allowFullScreen=&quot;true&quot;
    quality=&quot;high&quot;
    pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot;
    type=&quot;application/x-shockwave-flash&quot;
    width=&quot;480&quot;
    height=&quot;392&quot;&gt;
  &lt;/embed&gt;
  &lt;/object&gt;
&lt;/div&gt;
</pre>
<p>Also note that I wrapped the whole thing in a containing div with the <em>class=&#8221;gt-embed&#8221;</em></p>
<p>The key things to note is the relationship between the URL and the resulting embed and to further hone in on that point, lines 10 and 13 are key. They take the numeric value from the URL and include it there.</p>
<p>This is where a regex comes into play. We&#8217;ll capture that number from the URL and substitute it into the embed code and be done with it.</p>
<p>The regex that does this is:</p>
<pre class="brush: php; title: ; notranslate">(|.*/video/.*/)(\d+)</pre>
<p>It has two captures, with the first one being just to discard all of the URL up to the final numeric value. The second capture is then used in the substitution markup as follows:</p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;gt-embed&quot;&gt;
	&lt;object
		classid=&quot;clsid:d27cdb6e-ae6d-11cf-96b8-444553540000&quot;
		codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0&quot;
		id=&quot;gtembed&quot;
		width=&quot;480&quot;
		height=&quot;392&quot;&gt;
	&lt;param name=&quot;allowScriptAccess&quot; value=&quot;sameDomain&quot; /&gt;
	&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;
	&lt;param name=&quot;movie&quot; value=&quot;http://www.gametrailers.com/remote_wrap.php?mid=\\2&quot;/&gt;
	&lt;param name=&quot;quality&quot; value=&quot;high&quot; /&gt;
	&lt;embed
		src=&quot;http://www.gametrailers.com/remote_wrap.php?mid=\\2&quot;
		swLiveConnect=&quot;true&quot;
		name=&quot;gtembed&quot;
		align=&quot;middle&quot;
		allowScriptAccess=&quot;sameDomain&quot;
		allowFullScreen=&quot;true&quot;
		quality=&quot;high&quot;
		pluginspage=&quot;http://www.macromedia.com/go/getflashplayer&quot;
		type=&quot;application/x-shockwave-flash&quot;
		width=&quot;480&quot;
		height=&quot;392&quot;&gt;
	&lt;/embed&gt;
	&lt;/object&gt;
&lt;/div&gt;</pre>
<p>Lines 10 and 13 use the <em>\\2</em> to represent the 2nd capture value; namely the number.</p>
<p>That&#8217;s it!</p>
<p>One further thing to note is that the gametrailer site also has user videos too and the relationship between URL and resulting embed is slightly different. It is different enough to warrant another ubbcode tag.</p>
<p>Rather than go into all of what would pretty much be the same concept, I will just include the exported tags. You  can import both of them in the Custom Tag editor and make any changes you&#8217;d like. For example, you might want to use different tags than what I chose ( and ).</p>
<p>That is all up to you.</p>
<div class="download">
<p>Text or Zip available, you decide:</p>
<p><img alt="txt" title="txt" class="download-icon" src="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/img/filetype_icons/document-text.png" /><a href="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/download.php?id=4" title="Downloaded 233 times">Gametrailer ubbcode - v1.1</a> - Downloaded 233 times<br />
<img alt="zip" title="zip" class="download-icon" src="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/img/filetype_icons/document-zipper.png" /><a href="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/download.php?id=5" title="Downloaded 214 times">Gametrailer ubbcode (zipped) - v1.1</a> - Downloaded 214 times</p>
</div>
<p>The  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/llama.gif' alt=':llama:' class='wp-smiley' />  approves.  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/adding-a-top-logo-to-your-ubb-threads-forum.html' rel='bookmark' title='Adding a top logo to your UBB.threads forum'>Adding a top logo to your UBB.threads forum</a></li>
<li><a href='http://sirdude.com/adding-smiley-pop-up-to-the-shoutbox.html' rel='bookmark' title='Adding Smiley pop-up to the Shoutbox'>Adding Smiley pop-up to the Shoutbox</a></li>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/adding-a-gametrailer-com-video-tag.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a top logo to your UBB.threads forum</title>
		<link>http://sirdude.com/adding-a-top-logo-to-your-ubb-threads-forum.html</link>
		<comments>http://sirdude.com/adding-a-top-logo-to-your-ubb-threads-forum.html#comments</comments>
		<pubDate>Sun, 14 Mar 2010 16:27:42 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Themes and Styles]]></category>
		<category><![CDATA[7.x]]></category>
		<category><![CDATA[Getting started]]></category>
		<category><![CDATA[Styles and themes]]></category>
		<category><![CDATA[UBB.threads]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=661</guid>
		<description><![CDATA[I don't know how many times I've seen someone post on the UBB.central support forums, "How do I add a logo to the top of my new forum?". It's a simple request, really and we'll find out that the answer is just as simple.
Related posts:<ul>
<li><a href='http://sirdude.com/adding-a-gametrailer-com-video-tag.html' rel='bookmark' title='Adding a Gametrailers.com video tag'>Adding a Gametrailers.com video tag</a></li>
<li><a href='http://sirdude.com/how-to-import-a-new-style-into-ubb-threads.html' rel='bookmark' title='How to import a new style into UBB.threads'>How to import a new style into UBB.threads</a></li>
<li><a href='http://sirdude.com/adding-smiley-pop-up-to-the-shoutbox.html' rel='bookmark' title='Adding Smiley pop-up to the Shoutbox'>Adding Smiley pop-up to the Shoutbox</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-662" style="margin: 10px; border: medium none;" title="Doc-png" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/03/Doc-png.png" alt="" width="128" height="128" />I don&#8217;t know how many times I&#8217;ve seen someone post on the UBB.central support forums, &#8220;How do I add a logo to the top of my new forum?&#8221;. It&#8217;s a simple request, really and we&#8217;ll find out that the answer is just as simple.</p>
<p>This article will build up to the final answer by first making a new style available, discussing some of the particulars and then culminate with adding the top logo itself. Feel free to skip to the end, if that is all the information you really need or want.</p>
<p>The style that you can download is a simple fixed width one, with three basic colors involved: Red, White and Blue. It became a reality, when I had a customer want &#8220;something simple&#8221; and many times, simple IS better anyway.</p>
<p>I won&#8217;t get into all the details of how to import a style into UBB.threads, because there is a lengthy, step by step saga that you can read about <a title="How to import a new style into UBB.threads" href="http://sirdude.com/2010/228/how-to-import-a-new-style-into-ubb-threads.html">here</a>. Feel free to read that article first, if you aren&#8217;t too familiar with the whole style importation process.</p>
<p>We&#8217;ll just get on with it, import the new style and use it instead of the stock UBB.threads style shown here:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-673" title="Stock-needs-logo" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/03/stock1.jpg" alt="" width="652" height="273" /></p>
<p>That&#8217;s the standard we&#8217;re all used to by now, excluding the &#8220;wonderful&#8221; free hand logo I placed up top in the screen capture editor to stand out like a sore thumb. I&#8217;ve also added one category and one forum, just to have something to show in the screen capture. You probably have much more content on your forum, however you get the picture.  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Grab the style, import it, and also upload the other directories to the corresponding forum directories on your site:</p>
<p class="download"><img alt="zip" title="zip" class="download-icon" src="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/img/filetype_icons/document-zipper.png" /><a href="http://sirdude.com/wpbleh/wp-content/plugins/download-monitor/download.php?id=3" title="Downloaded 211 times">Red, White N Blue style - v1.1</a> - Downloaded 211 times</p>
<p>After importing the style in the Style Editor, saving it and selecting it in your preferences, you should see something that looks similar to the picture, below:</p>
<div id="attachment_675" class="wp-caption aligncenter" style="width: 672px"><a href="http://sirdude.com/wpbleh/wp-content/uploads/2010/03/imported.jpg"><img class="size-full wp-image-675 center-shadow" title="imported" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/03/imported.jpg" alt="" width="662" height="133" /></a><p class="wp-caption-text">Initial look after import (Click for full size)</p></div>
<p>The first thing you will notice is that the style is setup to default to a fixed width of 1100 pixels wide and centered on the screen. You can quickly change this to allow it to be full width by removing the following from the <em>Extra Properties</em> section of the style:</p>
<pre class="brush: css; title: ; notranslate">#content {
  width:1100px;
  margin:0 auto;
}</pre>
<p>Regardless of what you decide, you are probably reading onward and wondering how to get the damned logo to show up. You can see stuff in the <em>Extra Properties</em> section pertaining to a logo and might be wondering why it hasn&#8217;t shown up yet.</p>
<p class="note">This assumes you have uploaded both the <em>styles</em> and <em>images</em> directories to your site, of course</p>
<p>The entire extra css is shown below, minus some of the extra stuff you can actually throw away:</p>
<pre class="brush: css; title: ; notranslate">#content {
  width:1100px;
  margin:0 auto;
}

#head {
  position:relative;
  margin: 0px auto;
  padding: 0px;
  width: 1100px;
  height: 130px;
  background: transparent;
}

.top-mb {
  position:absolute;
  top:0px;
  left:425px;
  width: 393px;
  height: 123px;
  padding: 0px;
  margin:0px;
  border:none;
  display:inline;
  background:url(../styles/rwb/images/mb-logo.png) transparent no-repeat;
}

.post-buttons img {
  display:none;
}
</pre>
<p>It sure looks like it <em>should</em> be displaying!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/eek.gif' alt=':eek:' class='wp-smiley' /> </p>
<p>But there is one final thing to do and that is to go to the Display Options, General, HTML Includes tab and paste some markup for the css to act upon. My example for my local development system is shown below:</p>
<pre class="brush: xml; title: ; notranslate">&lt;div id=&quot;head&quot;&gt;
  &lt;a href=&quot;http://sd.com/sirdude.com/stock/ubbthreads.php?ubb=cfrm&quot;&gt;
    &lt;div class=&quot;top-mb&quot;&gt;&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;</pre>
<p>Save this out and you should see your logo on top. Well&#8230;. make that the example logo I supplied for you  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/hihi.gif' alt=':hihi:' class='wp-smiley' /> </p>
<p>You can supply your own logo. Just make sure that the <em>.top-mb</em> class matches the new file name or simply upload a new file on top of the original. It is your choice.</p>
<p class="info">You will also want to change the <em>href</em> URL to your board value, since there really isn&#8217;t an <em>sd.com</em>, if you get my drift. I&#8217;ll leave that little change up to you</p>
<p>The final result is shown below:</p>
<div id="attachment_685" class="wp-caption aligncenter" style="width: 678px"><a href="http://sirdude.com/wpbleh/wp-content/uploads/2010/03/with-logo.jpg"><img class="size-full wp-image-685" title="Houston, We have logo!" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/03/with-logo.jpg" alt="" width="668" height="221" /></a><p class="wp-caption-text">In all its glory (Click for full size)</p></div>
<p style="margin-top: 10px;">I hope this helped out in some small way. What amazes me is that there is already 5 downloads and I am just now finishing off this article. Who is wearing out their F5 key and laying in wait for a new .zip to be available?</p>
<p>Regardless, the  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/llama.gif' alt=':llama:' class='wp-smiley' />  approves!</p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/adding-a-gametrailer-com-video-tag.html' rel='bookmark' title='Adding a Gametrailers.com video tag'>Adding a Gametrailers.com video tag</a></li>
<li><a href='http://sirdude.com/how-to-import-a-new-style-into-ubb-threads.html' rel='bookmark' title='How to import a new style into UBB.threads'>How to import a new style into UBB.threads</a></li>
<li><a href='http://sirdude.com/adding-smiley-pop-up-to-the-shoutbox.html' rel='bookmark' title='Adding Smiley pop-up to the Shoutbox'>Adding Smiley pop-up to the Shoutbox</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/adding-a-top-logo-to-your-ubb-threads-forum.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Demystifying UBB.threads framework &#8211; Part I</title>
		<link>http://sirdude.com/demystifying-the-ubb-threads-content-structure.html</link>
		<comments>http://sirdude.com/demystifying-the-ubb-threads-content-structure.html#comments</comments>
		<pubDate>Thu, 04 Mar 2010 01:22:45 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[7.x]]></category>
		<category><![CDATA[Modifications]]></category>
		<category><![CDATA[Templates]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=549</guid>
		<description><![CDATA[Have you ever gone to a UBB.threads site, notice something unique about it's layout and wonder 'how the heck did they do that' ?

For example, there is a very well put together site that is in the 'Community spotlight' forum over at UBB.central called [ <a title="Love the Garden forums" href="http://www.lovethegarden.com/forums/" target="_blank">Love the Garden</a> ]
Related posts:<ul>
<li><a href='http://sirdude.com/a-custom-island-that-grabs-an-rss-feed.html' rel='bookmark' title='UBB.threads Custom Island from an RSS feed'>UBB.threads Custom Island from an RSS feed</a></li>
<li><a href='http://sirdude.com/getting-more-room-in-ubb-threads-style-editor.html' rel='bookmark' title='Getting more room in UBB.threads style editor'>Getting more room in UBB.threads style editor</a></li>
<li><a href='http://sirdude.com/alternating-row-colors-in-a-post-island.html' rel='bookmark' title='Alternating row colors in a Post Island'>Alternating row colors in a Post Island</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-570 drop-shadow" style="margin: 10px; border: medium none;" title="Demystifying UBB.threads templates" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/03/toolbar-info-150x150.png" alt="" width="128" height="128" />Have you ever gone to a UBB.threads site, notice something unique about it&#8217;s layout and wonder &#8216;how the heck did they do that&#8217; ?</p>
<p>For example, there is a very well put together site that is in the &#8216;Community spotlight&#8217; forum over at UBB.central called [ <a title="Love the Garden forums" rel="shadowbox;width=1100" href="http://www.lovethegarden.com/forums/" target="_blank">Love the Garden</a> ].</p>
<p>They peeked under the hood, figured out what needed to be done and created both a unique look and feel to their forum, while not doing anything super radical in the process. The end result is probably one of the best looking UBB.threads sites I&#8217;ve yet seen.</p>
<p>All that is needed to accomplish the same kind of thing for your site is to understand the basic building blocks that go into displaying any page on a forum. At first that might seem daunting, but as you&#8217;ll read further on in this article, you&#8217;ll find that it&#8217;s not so hard after all.</p>
<p>In most cases, the UBB.threads software takes the URL, determines what kind of page needs to be displayed (forum list, post list, topic etc), wraps it in a header and footer, slaps a left or right column or both for good measure and spits it out in HTML.</p>
<p>But, if you&#8217;re like me and you have an itch to see what makes a site unique for some reason, you&#8217;ll probably be running Firefox with Firebug installed and you&#8217;ve worn out your right mouse button by clicking and then doing &#8216;Inspect Element&#8217;!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/laugh.gif' alt=':D' class='wp-smiley' /> </p>
<p><img class="alignleft size-full wp-image-553 drop-shadow" style="margin: 10px; border: none;" title="Under the hood" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/03/uh11.jpg" alt="" width="359" height="253" />You inevitably see stuff like this and the natural first reaction might be to simply want to close it up and go watch a movie instead or take a shot of Jack Daniels to erase the horror!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/shocked.gif' alt=':shocked:' class='wp-smiley' /> </p>
<p>It&#8217;s like TABLE heaven or hell, however you might look at it.</p>
<p>Not to worry though, it&#8217;s really not as &#8216;bad&#8217; as it looks.</p>
<p>All we need to understand is just four templates and how they get glued together to show a nice looking site like <a title="Love the Garden forums" href="http://www.lovethegarden.com/forums/">Love the Garden</a> is.</p>
<p>Then, let&#8217;s get on with it and identify these templates, deconstruct them into a simpler form for demonstration purposes and then show what I did with them on this site in particular.</p>
<div class="note">
<p>I&#8217;ve done something very similar to what they&#8217;ve done and haven&#8217;t violated any &#8216;rules&#8217; because all the changes are done to templates and CSS for presentation purposes.</p>
<p>The stock code is left intact!</p>
<p>You can see the work in progress over [ <a title="My Forums - in progress" href="http://sirdude.com/forum">here</a> ]. Please note that the actual forum styling is in flux, since I&#8217;m trying to support not only a style previewer, but a theme previewer, in anticipation of version 8.0 of Threads</p>
</div>
<p>The four files in order of use are:</p>
<ul>
<li><em>templates/default/header.tpl</em></li>
<li><em>templates/default/left_column.tpl</em></li>
<li><em>templates/default/right_column.tpl</em></li>
<li><em>templates/default/footer.tpl</em></li>
</ul>
<p>If you open each one up individually in your editor, you might head on over to the Jack Daniels bottle again, since there is really no indentation practiced at all. They just &#8216;work&#8217;!</p>
<p>What follows next is a result of my stripping out all the clutter, adding HTML comments<br />
for sections and gluing them together into one contiguous file as shown below:</p>
<pre class="brush: xml; collapse: true; light: false; title: ; toolbar: true; notranslate">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;{$lang.XML_LANG}&quot; lang=&quot;{$lang.XML_LANG}&quot; dir=&quot;{$lang.READ_DIRECTION}&quot;&gt;
&lt;head&gt;
	&lt;title&gt;Your board title stuff&lt;/title&gt;
	&lt;meta name=&quot;generator&quot; content=&quot;UBB.threads {$version}&quot; /&gt;
	{$headerinsert}
	{$refresh}
	&lt;!-- Other meta, links and javascript stuff --&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;a id=&quot;top&quot;&gt;&lt;/a&gt;

	&lt;!-- Optional admin closed message --&gt;
	&lt;div id=&quot;content&quot;&gt;
		{$headerfile}

		&lt;table align=&quot;center&quot; width=&quot;{$config.TABLE_WIDTH}&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
			&lt;tr&gt;
				&lt;td&gt;
					{$tbopen}
						&lt;tr&gt;
							&lt;td class=&quot;breadcrumbs&quot;&gt;Breadcrumb bar here&lt;/td&gt;
						&lt;/tr&gt;
						&lt;tr&gt;
							&lt;td class=&quot;navigation&quot;&gt;Navigation menu here&lt;/td&gt;
						&lt;/tr&gt;
					{$tbclose}
				&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
				&lt;td&gt;
					&lt;table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;margin-top: -5px&quot;&gt;
						&lt;!-- End of header.tpl --&gt;

						&lt;!-- Start of left_column.tpl --&gt;
						&lt;tr&gt;
							&lt;td width=&quot;{$left_width}&quot; valign=&quot;top&quot; class=&quot;left_col&quot;&gt;
								{$island_data} &lt;!-- All of the left column Islands --&gt;
							&lt;/td&gt;
							&lt;td valign=&quot;top&quot; width=&quot;{$body_width}&quot; class=&quot;body_col&quot;&gt;
						&lt;!-- End of left_column.tpl --&gt;

								&lt;!--
										The middle stuff goes here, depending upon which script you are running:
										 	(postlist, showflat, viewmessages etc.
								--&gt;

						&lt;!-- Start of right_column.tpl --&gt;
							&lt;/td&gt;
							&lt;td width=&quot;{$right_width}&quot; valign=&quot;top&quot; class=&quot;right_col&quot;&gt;
								{$island_data} &lt;!-- All of the right column Islands --&gt;
						&lt;!-- End of right_column.tpl --&gt;

						&lt;!-- Start of footer.tpl --&gt;
							&lt;/td&gt;
						&lt;/tr&gt;
					&lt;/table&gt;
				&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
				&lt;td&gt;
					{$tbopen}
						&lt;tr&gt;
							&lt;td class=&quot;footer&quot; align=&quot;left&quot;&gt;
								&lt;table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
									&lt;tr&gt;
										&lt;td width=&quot;60%&quot;&gt;Board rules . Mark all read . Style select&lt;/td&gt;
										&lt;td align=&quot;right&quot; width=&quot;40%&quot;&gt;Contact Us . Homepage . Top&lt;/td&gt;
									&lt;/tr&gt;
								&lt;/table&gt;
							&lt;/td&gt;
						&lt;/tr&gt;
					{$tbclose}
					&lt;br /&gt;
				&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;
		{$footerfile}
	&lt;/div&gt;&lt;!-- #content --&gt;

	&lt;div id=&quot;footer&quot; align=&quot;center&quot; class=&quot;small&quot;&gt;Debug info and powered by UBB.Threads(tm)&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Compare this with what the raw files that I started with and it looks MUCH more manageable. Lets delve deeper into each of the four files and note any limitations as well as possibilities.</p>
<h5>header.tpl</h5>
<pre class="brush: xml; highlight: [6,7,14,15,17,20,27]; title: ; notranslate">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;{$lang.XML_LANG}&quot; lang=&quot;{$lang.XML_LANG}&quot; dir=&quot;{$lang.READ_DIRECTION}&quot;&gt;
&lt;head&gt;
	&lt;title&gt;Your board title stuff&lt;/title&gt;
	&lt;meta name=&quot;generator&quot; content=&quot;UBB.threads {$version}&quot; /&gt;
	{$headerinsert}
	{$refresh}
	&lt;!-- Other meta, links and javascript stuff --&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;a id=&quot;top&quot;&gt;&lt;/a&gt;

	&lt;!-- Optional admin closed message --&gt;
	&lt;div id=&quot;content&quot;&gt;
		{$headerfile}

		&lt;table align=&quot;center&quot; width=&quot;{$config.TABLE_WIDTH}&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
			&lt;tr&gt;
				&lt;td&gt;
					{$tbopen}
						&lt;tr&gt;
							&lt;td class=&quot;breadcrumbs&quot;&gt;Breadcrumb bar here&lt;/td&gt;
						&lt;/tr&gt;
						&lt;tr&gt;
							&lt;td class=&quot;navigation&quot;&gt;Navigation menu here&lt;/td&gt;
						&lt;/tr&gt;
					{$tbclose}
				&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
				&lt;td&gt;
					&lt;table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; style=&quot;margin-top: -5px&quot;&gt;
						&lt;!-- End of header.tpl --&gt;
</pre>
<p>This file sets the stage for all the other files to follow. It loads up your board title for the browser, includes the css and javascript, includes your header insert ($headerinsert} file, grabs your body header ($headerfile) sets the maximum width of your board <em>($config['TABLE_WIDTH'])</em> and puts out the Breadcrumbs and Navigation rows.</p>
<p class="note">Of course, it does much more than this, but I summarized. It also is pre-loading all the popup menus (javascript) and so forth, but that isn&#8217;t important for this post.</p>
<p>I&#8217;ve highlighted the lines that are of note in the above code snippet.</p>
<p>One thing that I immediately took advantage of was the code in line 14, where it has a containing div of id=&#8221;content&#8221;. By simply adding the following CSS to your Extra Properties section of the style editor, you can change your board to a fixed width. Example:</p>
<pre class="brush: css; title: ; notranslate">
#content {
  width:1100px;
  padding:0;
  margin:0 auto;
}
</pre>
<p>For the CSS junkies out there, I set the board width to 1100 pixels, no padding and the horizontal margin to auto, which centers it on the screen. Table width can then be 100% and you basically get what you see on my forum right now [ <a title="My forums" href="http://sirdude.com/forum">here</a> ]</p>
<p>I prefer fixed width for many reasons, but they are probably best to be discussed in another article.</p>
<p>One other thing to note, you could have also achieved a fixed width by setting the &#8216;Table Width: (all screens)&#8217; in General Options to 1100 and achieved the same result, however in the following article, I will show you why I am going the CSS route  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /> </p>
<h5>left_column.tpl</h5>
<p>Even though this says &#8216;left&#8217;, it really is responsible for 2 things. The actual left column (if enabled) and the middle column or the main body being displayed. There is a conditional in the tpl file that decides whether to output 1 or 2 columns based upon the existence of an enabled left column. In either case, the middle column will be output.</p>
<pre class="brush: xml; highlight: [3,6]; title: ; notranslate">
						&lt;!-- Start of left_column.tpl --&gt;
						&lt;tr&gt;
							&lt;td width=&quot;{$left_width}&quot; valign=&quot;top&quot; class=&quot;left_col&quot;&gt;
								{$island_data} &lt;!-- All of the left column Islands --&gt;
							&lt;/td&gt;
							&lt;td valign=&quot;top&quot; width=&quot;{$body_width}&quot; class=&quot;body_col&quot;&gt;
						&lt;!-- End of left_column.tpl --&gt;

								&lt;!--
										The middle stuff goes here, depending upon which script you are running:
										 	(postlist, showflat, viewmessages etc.
								--&gt;
</pre>
<p>I highlighted lines 3 and 6, since they determine the width of the left and middle columns. It is hardwired in the code to 15% for left or right column and whatever is left over is subtracted from 100%. So the middle column will be either 100% (no left or right), 85% (1 column, left or right) or 70% (all columns enabled). There is no wiggle room without changing code.</p>
<div class="alert">
<p>Or is there!??!</p>
<p>I&#8217;ll discuss later how to make the templates do your bidding, code be dammed!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/hihi.gif' alt=':hihi:' class='wp-smiley' />  We&#8217;ll break out of most of the TABLE world for structure and enter into the DIV and CSS world as well</p>
</div>
<p>I forgot to mention the comment I put in for &#8216;The middle stuff goes here,&#8230;.&#8217; This is where the actual middle column information is placed and is determined by the UBB.threads URL and specifically the value of the &#8216;ubb&#8217; parameter. If you&#8217;ve seen the classic URL structure in the past, it was something like &#8216;ubbthreads.php?ubb=showflat&#8230;&#8217;, which told the program to generate a list of posts for a particluar thread. The format of how showflat looks is (surprise) dictated by the file <em>showflat.tpl</em>  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /> </p>
<h5>right_column.tpl</h5>
<pre class="brush: xml; highlight: [3]; title: ; notranslate">
						&lt;!-- Start of right_column.tpl --&gt;
							&lt;/td&gt;
							&lt;td width=&quot;{$right_width}&quot; valign=&quot;top&quot; class=&quot;right_col&quot;&gt;
								{$island_data} &lt;!-- All of the right column Islands --&gt;
						&lt;!-- End of right_column.tpl --&gt;
</pre>
<p>Much like the left_column.tpl file where the right column is output. Note the width again and the same rule applies.</p>
<h5>footer.tpl</h5>
<pre class="brush: xml; title: ; notranslate">
						&lt;!-- Start of footer.tpl --&gt;
							&lt;/td&gt;
						&lt;/tr&gt;
					&lt;/table&gt;
				&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
				&lt;td&gt;
					{$tbopen}
						&lt;tr&gt;
							&lt;td class=&quot;footer&quot; align=&quot;left&quot;&gt;
								&lt;table width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
									&lt;tr&gt;
										&lt;td width=&quot;60%&quot;&gt;Board rules . Mark all read . Style select&lt;/td&gt;
										&lt;td align=&quot;right&quot; width=&quot;40%&quot;&gt;Contact Us . Homepage . Top&lt;/td&gt;
									&lt;/tr&gt;
								&lt;/table&gt;
							&lt;/td&gt;
						&lt;/tr&gt;
					{$tbclose}
					&lt;br /&gt;
				&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;
		{$footerfile}
	&lt;/div&gt;&lt;!-- #content --&gt;

	&lt;div id=&quot;footer&quot; align=&quot;center&quot; class=&quot;small&quot;&gt;Debug info and powered by UBB.Threads(tm)&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>This basically cleans up the &#8216;mess&#8217; that the first three files created and I really don&#8217;t mean a true mess in the sense of the word, but more to the effect of closing all the open TABLE, TR and TD tags nicely and neatly.</p>
<p>It then goes on to put out the actual footer bar and any footer insert you, the admin might have entered in the Admin control panel.</p>
<p>So there you have it and I would say it&#8217;s much more simple to understand than at first.</p>
<p>Part II of this will be how I took the TABLE, TR and TD elements and completely removed them. I then went on to move things around and not be confined by having to have the Breadcrumbs above the Navigation bar. Furthermore, the fixed 15% column widths were ignored and many other things.</p>
<p>All of this was done to ONLY the tpl files, so it keeps with not changing stock code to achieve what looks like a highly modified product. My forums are an example as well as the garden site I first mentioned in this article.</p>
<p>Hope you learned a bit about UBB.threads and that it might lead you to experiment a bit on your development system. Stay tuned for Part II coming soon.</p>
<p>The  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/llamab.gif' alt=':llamab:' class='wp-smiley' />  approves!</p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/a-custom-island-that-grabs-an-rss-feed.html' rel='bookmark' title='UBB.threads Custom Island from an RSS feed'>UBB.threads Custom Island from an RSS feed</a></li>
<li><a href='http://sirdude.com/getting-more-room-in-ubb-threads-style-editor.html' rel='bookmark' title='Getting more room in UBB.threads style editor'>Getting more room in UBB.threads style editor</a></li>
<li><a href='http://sirdude.com/alternating-row-colors-in-a-post-island.html' rel='bookmark' title='Alternating row colors in a Post Island'>Alternating row colors in a Post Island</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/demystifying-the-ubb-threads-content-structure.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UBB.threads Twitter Custom Island</title>
		<link>http://sirdude.com/ubb-threads-twitter-custom-island.html</link>
		<comments>http://sirdude.com/ubb-threads-twitter-custom-island.html#comments</comments>
		<pubDate>Fri, 26 Feb 2010 08:13:33 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[UBB.threads]]></category>
		<category><![CDATA[7.x]]></category>
		<category><![CDATA[Custom island]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=460</guid>
		<description><![CDATA[Since Twitter's the rage nowadays, it's logical to have a Custom Island that displays the latest tweets and links to your Twitter feed for those who may want to follow you.
Related posts:<ul>
<li><a href='http://sirdude.com/a-custom-island-that-grabs-an-rss-feed.html' rel='bookmark' title='UBB.threads Custom Island from an RSS feed'>UBB.threads Custom Island from an RSS feed</a></li>
<li><a href='http://sirdude.com/getting-more-out-of-the-custom-island-editor.html' rel='bookmark' title='Getting more out of the Custom Island Editor'>Getting more out of the Custom Island Editor</a></li>
<li><a href='http://sirdude.com/upcoming-events-custom-island.html' rel='bookmark' title='Upcoming events Custom Island'>Upcoming events Custom Island</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-465" style="margin: 10px; border: none;" title="twitter" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/twitter.png" alt="" width="128" height="128" />It seems as if Twitter is the rage nowadays, so it is at least logical to have the option of a UBB.threads Custom Island to display your latest tweets.</p>
<p>Let&#8217;s do one!</p>
<p>This tutorial will assume you know your way around the Admin control panel for UBB.threads, but if you don&#8217;t, go the [ <a title="Introduces you to the Control Panel for Custom Islands" href="http://sirdude.com/2010/368/a-custom-island-that-grabs-an-rss-feed.html">this</a> ] article and look at the pictures  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>It should tell you what you need to know.</p>
<p>First things first: Know your Twitter username.</p>
<p>Now paste this code into one of your Custom Islands:</p>
<pre class="brush: php; title: ; notranslate"># Author: SD
# Website: http://sirdude.com
# Description:
#   Fetches a twitter feed via their .js library
# Version: 1.1
# Dependencies: Twitter .js API

$body = &lt;&lt;&lt;EOF
&lt;center&gt;
	&lt;script src=&quot;http://widgets.twimg.com/j/2/widget.js&quot;&gt;&lt;/script&gt;
	&lt;script&gt;
		new TWTR.Widget({
			version: 2,
			type: 'profile',
			rpp: 8,
			interval: 6000,
			width: 280,
			height: 400,
			theme: {
				shell: {
					background: '#FEFEFE',
					color: '#000000'
				},
				tweets: {
					background: '#FAFAFA',
					color: '#000000',
					links: '#ff0000'
				}
			},
			features: {
				scrollbar: false,
				loop: false,
				live: false,
				hashtags: true,
				timestamp: true,
				avatars: false,
				behavior: 'all'
			}
		}).render().setUser('Sirdude').start();
	&lt;/script&gt;
&lt;/center&gt;
EOF;</pre>
<p>Lines of interest that you want to change:</p>
<ul>
<li>Line 17 to specify the width in pixels of the Twitter insert within your Custom Island</li>
<li>Line 18 for the desired height in pixels</li>
<li>Line 21 wants to probably match the background color (leftalt-1 or rightalt-1) of your style&#8217;s container</li>
<li>Line 22 would be the text color</li>
<li>Lines 25 thru 27 are for individual tweets and their links</li>
<li>and finally Line 39 needs to replace &#8216;Sirdude&#8217; with your Twitter name</li>
</ul>
<p>Also, if you want a nicer looking title with an icon, paste the following into the &#8216;Name&#8217; of the Custom Island:</p>
<pre class="brush: xml; title: ; notranslate">&lt;h3&gt;&lt;a href=&quot;http://twitter.com/Sirdude&quot; title=&quot;Follow me&quot;&gt;&lt;img src=&quot;http://sirdude.com/forum/styles/images/wp-portal/ico-twitter.png&quot; alt=&quot;RSS&quot; / &gt;&lt;/a&gt; &lt;a href=&quot;http://twitter.com/Sirdude&quot;&gt;Tweet!&lt;/a&gt;&lt;/h3&gt;</pre>
<p>You will probably want to change the following things:</p>
<ul>
<li>The img URL would probably be to your &#8216;styles/images/stylename&#8217; directory and you can find a nice looking icon around the web for it or steal mine!</li>
<li>Change the URL of the feed and you&#8217;re done</li>
</ul>
<p>That&#8217;s about it and here&#8217;s what mine looks like:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-463" title="tweet" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/tweet.jpg" alt="" width="304" height="582" /></p>
<div class="info">
<p>I found the Twitter icon for the post over at this site [ <a title="Free Icons here!" href="http://designreviver.com/freebies/6-free-new-social-icons-digg-twitter-stumble-rss-delicious-reddit/">Click</a> ]. They deserve attribution for such nice free icons!</p>
<p>Also of note is to give credit to the first guy who inspired this island. That would be the folks over at <a href="http://www.campingpa.com/forums/ubbthreads.php?ubb=cfrm">CampingPA</a>. They asked me if it was possible, I noodled a bit and busted it out. Thank you again!</p>
</div>
<p>The llama approves  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/llama.gif' alt=':llama:' class='wp-smiley' /> </p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/a-custom-island-that-grabs-an-rss-feed.html' rel='bookmark' title='UBB.threads Custom Island from an RSS feed'>UBB.threads Custom Island from an RSS feed</a></li>
<li><a href='http://sirdude.com/getting-more-out-of-the-custom-island-editor.html' rel='bookmark' title='Getting more out of the Custom Island Editor'>Getting more out of the Custom Island Editor</a></li>
<li><a href='http://sirdude.com/upcoming-events-custom-island.html' rel='bookmark' title='Upcoming events Custom Island'>Upcoming events Custom Island</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/ubb-threads-twitter-custom-island.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>UBB.threads Custom Island from an RSS feed</title>
		<link>http://sirdude.com/a-custom-island-that-grabs-an-rss-feed.html</link>
		<comments>http://sirdude.com/a-custom-island-that-grabs-an-rss-feed.html#comments</comments>
		<pubDate>Wed, 24 Feb 2010 09:24:58 +0000</pubDate>
		<dc:creator>SD</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Modifications]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[7.x]]></category>
		<category><![CDATA[Custom island]]></category>
		<category><![CDATA[RSS feed]]></category>
		<category><![CDATA[UBB.threads]]></category>

		<guid isPermaLink="false">http://sirdude.com/?p=368</guid>
		<description><![CDATA[If you've ever wanted to make a UBB.threads custom island with information from an RSS Feed, then read all about it here.
Related posts:<ul>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
<li><a href='http://sirdude.com/getting-more-out-of-the-custom-island-editor.html' rel='bookmark' title='Getting more out of the Custom Island Editor'>Getting more out of the Custom Island Editor</a></li>
<li><a href='http://sirdude.com/upcoming-events-custom-island.html' rel='bookmark' title='Upcoming events Custom Island'>Upcoming events Custom Island</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-376 alignleft" title="RSS feed" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/rss-icon-150x150.png" alt="" width="150" height="150" />RSS (really simple syndicated) feeds are a very versitile, simple and popular way of sharing information between web sites. It&#8217;s pretty much a defacto standard and there are many tutorials, widgets, plugins and hard coded solutions to be found by just googling.</p>
<p>That brings me to this article and the reason I&#8217;m writing it. I want to show you how to take a custom feed from a website, consume it with some php code and then display it within a UBB.threads custom island that you then place on your portal in either the left or right sidebar.</p>
<p>We&#8217;ll then go further and show how to tailor the island by applying more CSS styling. After that we&#8217;ll kick it up a notch and come close to breaking out of Table, TR and TD world into DIV, UL and LI world. And the grand finally has yet to be determined, but you will be able to decide how far you want to go.</p>
<p>Choosing to stop after the initial creation may be all you want. It&#8217;s really up to you. Let&#8217;s get on with it then!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/bigok.gif' alt=':grin:' class='wp-smiley' /> </p>
<p>First thing we need to do is to either write from scratch a php program that consumes an RSS feed xml data and makes sense out of it or leverage off of the thousands of freely available implementations out there already. Which one do you supspect I&#8217;ll recommend?  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/hihi.gif' alt=':hihi:' class='wp-smiley' /> </p>
<p>That&#8217;s right. We&#8217;re going to use the same RSS feed consumer as WordPress does, which goes by the name Magpie RSS. You can download it [ <a title="MagpieRSS" href="http://sourceforge.net/projects/magpierss/files/">here</a> ].</p>
<p style="text-align: center;"><a href="http://sourceforge.net/projects/magpierss/files/magpierss/magpierss-0.72/magpierss-0.72.tar.gz/download"><img class="size-full wp-image-370 center-shadow" title="magpie" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/magpie.jpg" alt="" width="249" height="71" /></a></p>
<p>Save it to your hard drive and unzip the contents, then upload into your &#8216;forum/cache_builders/custom/rss&#8217; directory. Yes, it is a new directory we&#8217;re creating where MagpieRSS will reside. The &#8216;cache_builders/custom&#8217; directory seemed to be the logical parent to use and it also doesn&#8217;t interfere with any existing directories, since it&#8217;s one solely dedicated to Magpie.</p>
<p style="text-align: center;"><img class="size-full wp-image-371 center-shadow" title="Uploaded to cache_builders/custom/rss directory" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/magpie-extracted.jpg" alt="" width="396" height="431" /></p>
<p>You will readily note that there are quite a lot of file here and it might look a little daunting, but I&#8217;ll take the fear of the unknown out of it by saying we&#8217;re almost there now! We&#8217;re going to include 1 line in our Custom Island code to fetch a feed and then it&#8217;s pretty much game, set and match from there  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>What I did is read the &#8216;README&#8217; file and found out that it was as simple as the first S in RSS !</p>
<p>In there it gives us a small code snippet as an example of how to use it. We&#8217;ll just follow along and tweak it for our needs. Snippet below:</p>
<pre class="brush: php; title: ; notranslate">
require_once(rss_fetch.inc);
 $url = $_GET['url'];
 $rss = fetch_rss( $url );

 echo &quot;Channel Title: &quot; . $rss-&gt;channel['title'] . &quot;&lt;p&gt;&quot;;
 echo &quot;&lt;ul&gt;&quot;;
 foreach ($rss-&gt;items as $item) {
 $href = $item['link'];
 $title = $item['title'];
 echo &quot;&lt;li&gt;&lt;a href=$href&gt;$title&lt;/a&gt;&lt;/li&gt;&quot;;
 }
 echo &quot;&lt;/ul&gt;&quot;;
</pre>
<p>There isn&#8217;t a whole heck of a lot of coding displayed, because the bulk of the work is done by the MagpieRSS class in line 1.</p>
<p><img class="size-full wp-image-414 drop-shadow alignleft" title="Control panel - Custom Islands" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/custom1.jpg" alt="" width="129" height="125" /></p>
<p>We&#8217;re going to take this little snippet, create a new Custom Island and make the changes to call &#8216;fetch_rss&#8217; with our desired RSS feed URL, parse the results and make it compatible with standard UBB.threads expected syntax.</p>
<p>This is easier than you might think, so let&#8217;s have a go.</p>
<p>To get started, you&#8217;ll need to go to the Custom Islands section of your Admin control panel. Clicking on the link brings you to a list of all your currently defined custom islands. For our example we&#8217;ll be editing Custom Island 0. Click the [ Edit ] link and you are taken to the following screen:</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-420 center-shadow" title="Edit Custom Island 0" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/custom2.jpg" alt="" width="524" height="475" /></p>
<p>This first thing we&#8217;ll want to do is edit the name of the island. I&#8217;ll choose &#8216;NBA News&#8217; for grins. I&#8217;m sure you&#8217;ll pick something that has more meaning for your website, since the name will show up as the island title when displayed on the left or right column.</p>
<p class="info">We&#8217;ll revisit the Name vs. Title relationship later in this article, since it is really HTML code and we can do more with this than just plain text!</p>
<p>The most important part of the Custom Island is the Body section, where we&#8217;ll be placing a mixture of php and HTML to accomplish our goal.</p>
<div class="info">
<p>I don&#8217;t know how many people I&#8217;ve seen get confused with this template. It&#8217;s not obvious really, but all the snippet of code is doing (and by the way, it&#8217;s ALL php code) is just filling in a variable named $body with some stuff.That&#8217;s it!</p>
<p>So, in reality one could just replace the entire thing with 1 line of code:  $body = &lt;&lt;&lt;EOF &#8220;Hello World&#8221; EOF; and be done with it. Furthermore, we wouldn&#8217;t really need the &#8216;EOF&#8217; stuff, but the custom island code uses it to signal end of file, so we have to keep that in.</p>
</div>
<p>Shown below is the resulting code I&#8217;ve placed into the Custom Island to fetch a feed from</p>
<pre class="brush: php; title: ; notranslate"># Author: SD
# Website: http://sirdude.com
# Description:
#   Fetches a feed, parses it and makes it ready for a Custom Island
# Version: 1.1
# Dependencies: Uses MagpieRSS library (in cache_builders/custom/rss directory)

# Configuration parameters go here
$feedURL = 'http://www.nba.com/rss/nba_rss.xml';
$numItems = 5;

# Let it rip!
require_once('rss/rss_fetch.inc');
$rss = fetch_rss($feedURL);

# Start of feed loop
$i = 0;
$feedinfo = '&lt;table width=&quot;100%&quot;&gt;';
foreach ($rss-&gt;items as $item ) {
	if ($i &gt;= $numItems) continue;
		$title = $item[title];
		$url   = $item[link];
		$feedinfo .= '&lt;tr&gt;&lt;td class=&quot;rightalt-';
		$feedinfo .= ($i&amp;1) ? '1' : '2';
		$feedinfo .= &quot;\&quot;&gt;&lt;a href=$url&gt;$title&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;
		$i++;
	}
$feedinfo .= '&lt;/table&gt;';

# Hand off to UBB.threads, which expects $body to have the stuff!
$body = &lt;&lt;&lt;EOF
	$feedinfo
EOF;</pre>
<div class="note">
<p><img class="size-full wp-image-433 alignright drop-shadow" title="hover" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/hover.jpg" alt="" width="127" height="81" />I&#8217;ll also point out here that if you hover over the syntax highlighted code, a little box will appear which allows you to copy the code with 1 click to your clipboard or view the code and / or print it.</p>
<p>No need to Click, drag, select, Right click and copy. I always hated having to do that.</p>
<p>It&#8217;s perty handy!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/rawk.gif' alt=':rawk:' class='wp-smiley' /> </p>
</div>
<p><img class="alignleft size-full wp-image-429 drop-shadow" title="Portal Layout" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/custom31.jpg" alt="" width="428" height="442" />We now hopefully have something that will work and of course it will, since I wouldn&#8217;t be putting it here as an example if I hadn&#8217;t tested it first!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/mutt.gif' alt=':mutt:' class='wp-smiley' /> </p>
<p>To find out, you must first click &#8216;Update Custom Portal Box&#8217; and then Go to &#8216;Portal Layout&#8217; and enable it.</p>
<p>In this example, I see the &#8216;NBA news&#8217; has shown up, instead of what was &#8216;CustomIsland 0&#8242;. Clicking the Right Column pull-down and selecting 4 ensures that it will be the 4th island down in order.</p>
<p>The Search, Shout Box and Who&#8217;s Online islands will be shown before it.</p>
<p>After you&#8217;ve set your order the way you want it, just click on &#8216;Update Layout&#8217; and UBB.threads will take the Island and make it available for users browsing your forums.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-440" title="Your island on the forums" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/custom4.jpg" alt="" width="207" height="274" /></p>
<p style="text-align: center;">There is is in all its glory!  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/rawk.gif' alt=':rawk:' class='wp-smiley' /> </p>
<p>At this point you really don&#8217;t need to read further, because you have all that is needed to make your own. Just change the $feedURL and $numItems and you are good to go for your forum.</p>
<p>If you want to dive deeper into what makes it &#8216;tick&#8217; and also look into customizing it further, then keep reading!</p>
<p>The code is shown below for reference, minus all the header crapola:</p>
<pre class="brush: php; title: ; notranslate"># Configuration parameters go here
$feedURL = 'http://www.nba.com/rss/nba_rss.xml';
$numItems = 5;

# Let it rip!
require_once('rss/rss_fetch.inc');
$rss = fetch_rss($feedURL);

# Start of feed loop
$i = 0;
$feedinfo = '&lt;table width=&quot;100%&quot;&gt;';
foreach ($rss-&gt;items as $item ) {
	if ($i &gt;= $numItems) continue;
		$title = $item[title];
		$url   = $item[link];
		$feedinfo .= '&lt;tr&gt;&lt;td class=&quot;rightalt-';
		$feedinfo .= ($i&amp;1) ? '1' : '2';
		$feedinfo .= &quot;\&quot;&gt;&lt;a href=$url&gt;$title&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;
		$i++;
	}
$feedinfo .= '&lt;/table&gt;';

# Hand off to UBB.threads, which expects $body to have the stuff!
$body = &lt;&lt;&lt;EOF
	$feedinfo
EOF;</pre>
<h5>What is happening here?</h5>
<ul>
<li>Lines 2 and 3 are where you configure the feed URL and now many items to display</li>
<li>Line 6 grabs the MagpieRSS library which does 95% of the heavy lifting</li>
<li>Line 7 leverages that and gets the feed data (if you looked at the raw feed data, it would be in XML format)</li>
<li>Line 11 assumes we are going to use a TABLE container (we&#8217;ll talk about changing this later on)</li>
<li>Lines 12 thru 20 loops for all the returned feed data and creates a row (TR, TD) for each feed entry</li>
<li>Line 16 alternates the color for each row, using the UBB.threads classes stored in your style</li>
<li>Line 18 makes each entry a clickable URL</li>
<li>Line 21 finishes off the TABLE container</li>
<li>and Lines 24 thru 26 hand off $body to UBB.threads parser</li>
</ul>
<p>That&#8217;s it in a nutshell</p>
<p>Could the code be cleaner and easier to read? Absolutely.</p>
<p><img class="alignleft size-full wp-image-447 drop-shadow" title="Our goal" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/thegoal1.jpg" alt="" width="306" height="376" />We&#8217;ll get into that now in the next part of this article which will aim to get a Custom Island to look completely different than the forum style, but more like one of the right hand Widgets on this blog.</p>
<p>It&#8217;s more an exercise to show how it is done, than to impose any kind of design rules for custom islands down the road.</p>
<p>Remember, the goal of this blog is to have the forum integrated into WordPress, with WordPress as the Portal. Keeping that in mind, I want to take the first step with this custom island.  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>With the picture to the left in mind, let&#8217;s get to figuring out how to get there.</p>
<p>Popping the hood on the HTML code that generates the widget shows that it is very similar to the one we generated for UBB.threads. The main difference is that it is DIV, UL, LI based versus TABLE, TR, TD based.</p>
<p>I&#8217;ve taken the liberty to shorten up some of the titles and descriptions to not overload on too much text. The code is shown below:</p>
<pre class="brush: xml; title: ; notranslate">&lt;div class=&quot;widget widget_kbrss&quot; id=&quot;kb-advanced-rss-4&quot;&gt;
	&lt;h3&gt;
		&lt;a title=&quot;Syndicate this content&quot; href=&quot;http://www.nba.com/rss/nba_rss.xml&quot; class=&quot;kbrsswidget&quot;&gt;
			&lt;img style=&quot;color: white;&quot; alt=&quot;RSS&quot; src=&quot;http://sirdude.com/wp-includes/images/rss.png&quot; /&gt;
		&lt;/a&gt;
		&lt;a href=&quot;http://www.nba.com/news&quot;&gt;NBA news&lt;/a&gt;
	&lt;/h3&gt;
	&lt;ul&gt;
		&lt;li&gt;
			&lt;a title=&quot;Le title&quot; href=&quot;http://www.nba.com/2010/news/02/25/cavs.shaq.hurt.ap/index.html?rss=true&quot; class=&quot;kbrsswidget&quot;&gt;Shaq leaves game with 'significant' sprained thumb&lt;/a&gt;
		&lt;/li&gt;
		&lt;li&gt;
			&lt;a title=&quot;Le title&quot; href=&quot;http://www.nba.com/2010/news/02/25/kings.thompson.ap/index.html?rss=true&quot; class=&quot;kbrsswidget&quot;&gt;Fractures in back to sideline Kings' Thompson two weeks&lt;/a&gt;
		&lt;/li&gt;
		&lt;li&gt;
			&lt;a title=&quot;Le title&quot; href=&quot;http://www.nba.com/2010/news/02/25/pierce.out.ap/index.html?rss=true&quot; class=&quot;kbrsswidget&quot;&gt;Pierce (thumb) out vs. Cavs, could miss 'couple of games'&lt;/a&gt;
		&lt;/li&gt;
		&lt;li&gt;
			&lt;a title=&quot;Le title&quot; href=&quot;http://www.nba.com/2010/news/02/25/grizzlies.thabeet.ap/index.html?rss=true&quot; class=&quot;kbrsswidget&quot;&gt;No. 2 draft pick Thabeet assigned to D-League&lt;/a&gt;
		&lt;/li&gt;
		&lt;li&gt;
			&lt;a title=&quot;Le title&quot; href=&quot;http://www.nba.com/2010/news/02/25/mavs.momentum.ap/index.html?rss=true&quot; class=&quot;kbrsswidget&quot;&gt;Win over Lakers increases Mavs' confidence&lt;/a&gt;
		&lt;/li&gt;
	&lt;/ul&gt;
&lt;/div&gt;</pre>
<p class="info">By the way, if you haven&#8217;t gotten Firefox with Firebug add-on you are missing out on a very important tool to have!</p>
<p>With the above in mind, I&#8217;ve rewritten the Custom Island code shown below:</p>
<pre class="brush: php; title: ; notranslate"># Author: SD
# Website: http://sirdude.com
# Description:
#   Fetches a feed, parses it and makes it ready for a Custom Island
# Version: 1.1
# Dependencies: Uses MagpieRSS library (in cache_builders/custom/rss directory)

# Configuration parameters go here
$feedURL = 'http://www.nba.com/rss/nba_rss.xml';
$numItems = 5;

# Let it rip!
require_once('rss/rss_fetch.inc');
$rss = fetch_rss($feedURL);

# Start of feed loop
$i = 1;
$feedinfo = '&lt;ul&gt;';
foreach ($rss-&gt;items as $item ) {
	if ($i &gt; $numItems) break;
	$feedinfo .= '&lt;li&gt;&lt;a title=&quot;' . $item[title] . '&quot; href=&quot;' . $item[link] . '&quot;&gt;' . $item[title] . '&lt;/a&gt;&lt;/li&gt;';
	$i++;
}
$feedinfo .= '&lt;/ul&gt;';

# Hand off to UBB.threads, which expects $body to have the stuff!
$body = &lt;&lt;&lt;EOF
	$feedinfo
EOF;</pre>
<p>Nothing much to explain here, since we are breaking out of the TABLE model into the DIV model. I also took the liberty to clean up the code a bit, but it&#8217;s basically the same functionality as before.</p>
<p>One further thing to do is to also change the title of the feed to use an h3 tag. I&#8217;ll post the syntax for the title later on, since we will also want to both linkify it as well as add an RSS icon to the left side. The resulting display looks like this:</p>
<p><img class="aligncenter size-full wp-image-456" title="First cut on RSS island" src="http://sirdude.com/wpbleh/wp-content/uploads/2010/02/step1.jpg" alt="" width="357" height="221" /></p>
<p>Now it&#8217;s really a matter of styling the list items with CSS in the Extra Properties section of the Style editor in UBB.threads.</p>
<p>After styling it we see the final result, which is pretty close to what you see on the portal. We can and will make it exactly the same as we progress further down the road customizing the forum style. [ <a title="The forums" href="http://sirdude.com/forum/ubbthreads.php?ubb=cfrm">Check it out</a> ]</p>
<p>The CSS is shown below for reference. At a later date and in another article I&#8217;ll get into the nitty gritty of what was done and why. There needs to be a foundation laid that includes knowing the web developer tools such as, Firefox, Firebug, Stylish, ColorZilla, Measureit and more.</p>
<pre class="brush: css; title: ; notranslate">#content{
width:1100px;
margin:0 auto;
}
.widget {
background:url(&amp;quot;../styles/images/wp-portal/bg-box.png&amp;quot &lt;img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /&gt;  repeat-x scroll 0 0 #FEFEFE;
border:1px solid #FFFFFF;
color:#555555;
font-family:Georgia,&amp;quot;Times New Roman&amp;quot;,Times,serif;
line-height:20px;
margin:0;
padding:0;
position:relative;
}
h3 {
background:url(&amp;quot;../styles/images/wp-portal/bg-widget-title.png&amp;quot &lt;img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /&gt;  repeat-x scroll 0 0 transparent;
color:#666666;
height:30px;
font-family:Verdana,Geneva,sans-serif;
font-size:10px;
font-weight:normal;
text-transform:uppercase;
line-height:14px;
margin:0;
padding:14px 15px 0;
}
.widget ul li {
background:url(&amp;quot;../styles/images/wp-portal/ico-bullet.png&amp;quot &lt;img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /&gt;  no-repeat scroll 4px 14px transparent;
border-bottom:1px solid #EDEDED;
padding-left:20px;
}

.widget ul, .widget div, .widget p {
padding:0 15px 10px;
clear:both;
margin:5px 0
}
.widget ul li a {
color:#777777;
line-height:30px;
padding:0 0;
text-decoration:none;
}</pre>
<p>For you to apply it, you would go to the Style Settings for your theme and add it to the Extra Properties textarea and Update the style.  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>One last thing to note is the Custom Island title. The &#8216;Name&#8217; field in the Custom Portal Island editor is:</p>
<pre class="brush: xml; title: ; notranslate">&lt;h3&gt;&lt;a href=&quot;http://www.nba.com/rss/nba_rss.xml&quot; title=&quot;Syndicate this content&quot;&gt;&lt;img src=&quot;http://sirdude.com/forum/styles/images/wp-portal/ico-rss.png&quot; alt=&quot;RSS&quot; /&gt;&lt;/a&gt; &lt;a href=&quot;http://www.nba.com/news&quot;&gt;NBA news&lt;/a&gt;&lt;/h3&gt;</pre>
<p>That&#8217;s it!</p>
<p>Phew  <img src='http://sirdude.com/wpbleh/wp-includes/images/smilies/ty.gif' alt=':ty:' class='wp-smiley' /> </p>
<p>Related posts:<ul>
<li><a href='http://sirdude.com/ubb-threads-twitter-custom-island.html' rel='bookmark' title='UBB.threads Twitter Custom Island'>UBB.threads Twitter Custom Island</a></li>
<li><a href='http://sirdude.com/getting-more-out-of-the-custom-island-editor.html' rel='bookmark' title='Getting more out of the Custom Island Editor'>Getting more out of the Custom Island Editor</a></li>
<li><a href='http://sirdude.com/upcoming-events-custom-island.html' rel='bookmark' title='Upcoming events Custom Island'>Upcoming events Custom Island</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://sirdude.com/a-custom-island-that-grabs-an-rss-feed.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

