<?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>Brian A. Thomas .com &#187; PHP</title>
	<atom:link href="http://www.brianathomas.com/archives/category/programming/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brianathomas.com</link>
	<description>Random Musings of Brian A. Thomas. Love for Ari and Sidd. Playing SWTOR...</description>
	<lastBuildDate>Wed, 08 Feb 2012 12:34:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Fixing GStyles</title>
		<link>http://www.brianathomas.com/archives/2007/10/12/fixing-gstyles/</link>
		<comments>http://www.brianathomas.com/archives/2007/10/12/fixing-gstyles/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 12:41:17 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[GStyles]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2007/10/12/fixing-gstyles/</guid>
		<description><![CDATA[I am working on fixing the theme I am using, GStyles (available here) and trying to make it work with WordPress 2.3. So far I have fixed index.php [..]]]></description>
			<content:encoded><![CDATA[<p>I am working on fixing the theme I am using, GStyles (available <a href="http://milo.peety-passion.com/themes/">here</a>) and trying to make it work with WordPress 2.3.<br />
So far I have fixed index.php and singles.php.<br />
Here is an original code snippet from singles.php (sorry, the code runs over the edge, the theme is fixed width so it runs over... I might make this column flexible in due time, one thing at a time... or see if there is a "word wrap" feature in the program highlighter)...it should be the same in index.php:</p>
<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showPlainTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;small&gt;Category: <span style="color:#000000; font-weight:bold;">&lt;?php</span> the_category<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">', '</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#000000; font-weight:bold;">?&gt;</span> &lt;strong&gt;|&lt;/strong&gt; <span style="color:#000000; font-weight:bold;">&lt;?php</span> edit_post_link<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Edit'</span>,<span style="color:#FF0000;">''</span>,<span style="color:#FF0000;">'&lt;strong&gt;|&lt;/strong&gt;'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span> <span style="color:#000000; font-weight:bold;">&lt;?php</span> comments_popup_link<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Leave a Comment'</span>, <span style="color:#FF0000;">'1 Comment'</span>, <span style="color:#FF0000;">'% Comments'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; ?&gt;&lt;br /&gt;Tags: <span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'UTW_ShowTagsForCurrentPost'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#000000; font-weight:bold;">?&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> UTW_ShowTagsForCurrentPost<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"commalist"</span><span style="color:#006600; font-weight:bold;">&#41;</span> ?&gt;&gt;&lt;?php <span style="color:#006600; font-weight:bold;">&#125;</span>?&gt;&lt;/small&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
This was fixed in my new version to look like this:</p>
<div class="igBar"><span id="lphp-5"><a href="#" onclick="javascript:showPlainTxt('php-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-5">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;small&gt;Category: <span style="color:#000000; font-weight:bold;">&lt;?php</span> the_category<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">', '</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#000000; font-weight:bold;">?&gt;</span> &lt;strong&gt;|&lt;/strong&gt; <span style="color:#000000; font-weight:bold;">&lt;?php</span> edit_post_link<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Edit'</span>,<span style="color:#FF0000;">''</span>,<span style="color:#FF0000;">'&lt;strong&gt;|&lt;/strong&gt;'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#000000; font-weight:bold;">?&gt;</span> <span style="color:#000000; font-weight:bold;">&lt;?php</span> comments_popup_link<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Leave a Comment'</span>, <span style="color:#FF0000;">'1 Comment'</span>, <span style="color:#FF0000;">'% Comments'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; ?&gt;&lt;br /&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'the_tags'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#0000FF;">$my_tags</span> = get_the_tags<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;if <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$my_tags</span> != <span style="color:#FF0000;">""</span> <span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span> the_tags<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Tags: '</span>, <span style="color:#FF0000;">', '</span>, <span style="color:#FF0000;">'&lt;br /&gt;'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Tags: None"</span>;<span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'UTW_ShowTagsForCurrentPost'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'Tags: '</span>;UTW_ShowTagsForCurrentPost<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"commalist"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;echo <span style="color:#FF0000;">'&lt;br /&gt;'</span>; <span style="color:#006600; font-weight:bold;">&#125;</span> ?&gt;&lt;/small&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
That should allow it to fall back to UTW if somebody is still using an older version of WordPress. However, I don't have an old install to test it on, but near as I can tell it should be good.<br />
I am now working on fixing the functions.php and finding a fix for the <code>post2cat</code> problems in it.<br />
The problem with GStyles in WordPress 2.3 as it stands now also comes from the following in singles.php:</p>
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> is_single<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> or is_page<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span> <a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'cattag_related_posts'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$relatedposts</span> = cattag_related_posts<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$relatedposts</span> === <span style="color:#000000; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// echo '&lt;p&gt;No related posts&lt;/p&gt;';</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;div class=&quot;related-posts&quot;&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;"></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;h2&gt;Related posts:&lt;/h2&gt;&lt;ul&gt;'</span> . <span style="color:#0000FF;">$relatedposts</span> . <span style="color:#FF0000;">'&lt;/ul&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;"></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;/div&gt; &lt;!-- [related-posts] --&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
The fix is simple enough for now, just take that bit out. It kills the Related Posts function, but <code>cattag_related_posts</code> needs the <code>post2cat</code>. Now that is the part that may be past my programming experiences so far... then again, I did figure out how to get the rest working. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2007/10/12/fixing-gstyles/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Trying to Write My Own Widget</title>
		<link>http://www.brianathomas.com/archives/2006/12/24/trying-to-write-my-own-widget/</link>
		<comments>http://www.brianathomas.com/archives/2006/12/24/trying-to-write-my-own-widget/#comments</comments>
		<pubDate>Sun, 24 Dec 2006 17:16:22 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2006/12/24/trying-to-write-my-own-widget/</guid>
		<description><![CDATA[Calling all WordPress Widget experts, I am trying to write my own widget, but I am not having luck. I get it to show up in the plugins [..]]]></description>
			<content:encoded><![CDATA[<p>Calling all WordPress Widget experts, I am trying to write my own widget, but I am not having luck. I get it to show up in the plugins and activate it, but it doesn't show on the widget list.<br />
I know about Chris Johnson's Tag Cloud Widget, but the cloud doesn't show for one thing, and the other is that I don't want it weighted, I want it shown in alphabetical order. It shows the title and nothing more using his... Okay, I got it to display by changing the display from 1 to 50, but that doesn't do a display all like 0 was supposed to do... Okay, I also got it to display in alpa order so I guess the code below is moot. <img src='http://www.brianathomas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
The code appears below the break, with a few comments after the code.<br />
<span id="more-941"></span></p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showPlainTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">Plugin Name: UTW Tag cloud widget</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">Description: A simplified tag cloud widget - requires &lt;a href=&quot;http://www.neato.co.nz/ultimate-tag-warrior/&quot;&gt;Ultimate Tag Warrior&lt;/a&gt;...</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">Author: Brian A. Thomas</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">Version: 1.0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">Author URI: http://www.brianathomas.com</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/*</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">For this plugin, I basically copied the gsearch.php plugin and modified it to my needs</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">Eventually I'll expand this to actually use the title option...</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> widget_simple_utw_cloud_init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// Check for the required plugin functions. This will prevent fatal</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// errors occurring when you deactivate the dynamic-sidebar plugin.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> !<a href="http://www.php.net/function_exists"><span style="color:#000066;">function_exists</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'register_sidebar_widget'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">return</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">function</span> simple_utw_cloud<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$args</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// $args is an array of strings that help widgets to conform to</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// the active theme: before_widget, before_title, after_widget,</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// and after_title are the array keys. Default tags: li and h2.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/extract"><span style="color:#000066;">extract</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$args</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// Each widget can store its own options. We keep strings here.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$options</span> = get_option<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'widget_simple_utw_cloud'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$title</span> = <span style="color:#0000FF;">$options</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'title'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//$order = $options['order'];</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// These generate the output&nbsp; &nbsp; </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$before_widget</span> . <span style="color:#0000FF;">$before_title</span> . <span style="color:#0000FF;">$title</span> . <span style="color:#0000FF;">$after_title</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;h3&gt;Tag Cloud&lt;/h3&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;p style=&quot;text-align:right;&quot;&gt;&lt;label for=&quot;simple_utw_cloud-title&quot;&gt;Title: &lt;input style=&quot;width: 200px;&quot; id=&quot;gsearch-title&quot; name=&quot;simple_utw_cloud-title&quot; type=&quot;text&quot; value=&quot;'</span>.<span style="color:#0000FF;">$title</span>.<span style="color:#FF0000;">'&quot; /&gt;&lt;/label&gt;&lt;/p&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//if $order = '0' {</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//&nbsp; UTW_ShowWeightedTagSet(&quot;sizedtagcloud&quot;);</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//}</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//else {</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; UTW_ShowWeightedTagSetAlphabetical<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"coloredsizedtagcloud"</span>,<span style="color:#FF0000;">""</span>,<span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//}</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#0000FF;">$after_widget</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#000000; font-weight:bold;">function</span> simple_utw_cloud_control<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$options</span> = get_option<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'widget_simple_utw_cloud'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> !<a href="http://www.php.net/is_array"><span style="color:#000066;">is_array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$options</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$options</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'title'</span>=&gt;<span style="color:#FF0000;">''</span>,<span style="color:#FF0000;">'order'</span>=&gt;<span style="color:#FF0000;">''</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span> <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'simple_utw_cloud-submit'</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// Remember to sanitize and format use input appropriately.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$options</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'title'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <a href="http://www.php.net/strip_tags"><span style="color:#000066;">strip_tags</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/stripslashes"><span style="color:#000066;">stripslashes</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'simple_utw_cloud-title'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$options</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'order'</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#FF0000;">'1'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; update_option<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'widget_simple_utw_cloud'</span>, <span style="color:#0000FF;">$options</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// Be sure you format your options to be valid HTML attributes.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$title</span> = <a href="http://www.php.net/htmlspecialchars"><span style="color:#000066;">htmlspecialchars</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$options</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'title'</span><span style="color:#006600; font-weight:bold;">&#93;</span>, ENT_QUOTES<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// This displays the Options form</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;p style=&quot;text-align:right;&quot;&gt;&lt;label for=&quot;utw_simple_cloud-title&quot;&gt;Title: &lt;input style=&quot;width: 200px;&quot; id=&quot;simple_utw_cloud-title&quot; name=&quot;simple_utw_cloud-title&quot; type=&quot;text&quot; value=&quot;'</span>.<span style="color:#0000FF;">$title</span>.<span style="color:#FF0000;">'&quot; /&gt;&lt;/label&gt;&lt;/p&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;p style=&quot;text-align:right;&quot;&gt;&lt;label for=&quot;utw_simple_cloud-order&quot;&gt;Order: &lt;input style=&quot;width: 200px;&quot; id=&quot;utw_simple_cloud-order&quot; name=&quot;utw_simple_cloud-order&quot; type=&quot;text&quot; value=&quot;'</span>.<span style="color:#0000FF;">$order</span>.<span style="color:#FF0000;">'&quot; /&gt;&lt;/label&gt;&lt;/p&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'&lt;input type=&quot;hidden&quot; id=&quot;simple_utw_cloud-submit&quot; name=&quot;simple_utw_cloud-submit&quot; value=&quot;1&quot; /&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// This registers our widget so it appears with the other available</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// widgets and can be dragged and dropped into any active sidebars.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; register_sidebar_widget<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Simple UTW Cloud'</span>, <span style="color:#FF0000;">'widget_simple_utw_cloud'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// This registers our optional widget control form. Because of this</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// our widget will have a button that reveals a 300x100 pixel form.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; register_widget_control<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'Simple UTW Cloud'</span>, <span style="color:#FF0000;">'widget_simple_utw_cloud_control'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Delay plugin execution to ensure Dynamic Sidebar has a chance to load first</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">add_action<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'plugins_loaded'</span>, <span style="color:#FF0000;">'widget_simple_utw_cloud_init'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The $options that I have above was supposed to be so that the user sets it to 0 to get the tags to display in weighted form, the 1 would display the cloud in alphabetical order, with the words being bigger if it needed to be heavy or not.<br />
The title may appear twice, I was trying to test something, but since the control never showed up, I wasn't able to test it. I wanted to see if it appeared the correct way which should be an h3 in my case.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2006/12/24/trying-to-write-my-own-widget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More PHP Editing</title>
		<link>http://www.brianathomas.com/archives/2006/08/02/more-php-editing-2/</link>
		<comments>http://www.brianathomas.com/archives/2006/08/02/more-php-editing-2/#comments</comments>
		<pubDate>Wed, 02 Aug 2006 13:41:11 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2006/08/02/more-php-editing-2/</guid>
		<description><![CDATA[I edited the PHP on the WP-Amazon Plugin for WordPress. I wanted to achieve two things. One, when adding an image, I wanted the text to follow it. [..]]]></description>
			<content:encoded><![CDATA[<p>I edited the <acronym title="PHP Hypertext Preprocessor">PHP</acronym> on the <a href="http://manalang.com/wp-amazon" title="Manalong - WordPress Plugin - WP-Amazon">WP-Amazon Plugin</a> for <a href="http://wordpress.org/" title="WordPress - Free Blog Tool and Weblog Platform">WordPress</a>. I wanted to achieve two things. One, when adding an image, I wanted the text to follow it. Two, I wanted to have it display the name of the product in the title attribute of the link, that is, when one hovers over the link, I wanted the title to display, rather then the default of "View product details at Amazon".</p>
<p>Here is the new improved code:</p>
<div class="igBar"><span id="lphp-11"><a href="#" onclick="javascript:showPlainTxt('php-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-11">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> generateHTMLCode<span style="color:#006600; font-weight:bold;">&#40;</span>format,prodname,url,imgurl<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>format==<span style="color:#FF0000;">'link'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; html = <span style="color:#FF0000;">'&lt;a href=&quot;'</span>+url+<span style="color:#FF0000;">'&quot; title=&quot;Amazon.com - '</span>+prodname+<span style="color:#FF0000;">'&quot;&gt;'</span>+prodname+<span style="color:#FF0000;">'&lt;/a&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; html = <span style="color:#FF0000;">'&lt;a href=&quot;'</span>+url+<span style="color:#FF0000;">'&quot; title=&quot;Amazon.com - '</span>+prodname+<span style="color:#FF0000;">'&quot;&gt;&lt;img src=&quot;'</span>+imgurl+<span style="color:#FF0000;">'&quot; alt=&quot;'</span>+prodname+<span style="color:#FF0000;">'&quot; /&gt;&lt;/a&gt;&lt;br /&gt;'</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; +<span style="color:#FF0000;">'&lt;a href=&quot;'</span>+url+<span style="color:#FF0000;">'&quot; title=&quot;Amazon.com - '</span>+prodname+<span style="color:#FF0000;">'&quot;&gt;'</span>+prodname+<span style="color:#FF0000;">'&lt;/a&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; htmlCode = document.getElementById<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"htmlcode"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; htmlCode.value = html;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Here is the old code so one can find it. It should be around line 190 or so (for version 1.3.2 anyhow)</p>
<div class="igBar"><span id="lphp-12"><a href="#" onclick="javascript:showPlainTxt('php-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-12">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> generateHTMLCode<span style="color:#006600; font-weight:bold;">&#40;</span>format,prodname,url,imgurl<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>format==<span style="color:#FF0000;">'link'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html = <span style="color:#FF0000;">'&lt;a href=&quot;'</span>+url+<span style="color:#FF0000;">'&quot; title=&quot;View product details at Amazon&quot;&gt;'</span>+prodname+<span style="color:#FF0000;">'&lt;/a&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html = <span style="color:#FF0000;">'&lt;a href=&quot;'</span>+url+<span style="color:#FF0000;">'&quot; title=&quot;View product details at Amazon&quot;&gt;&lt;img src=&quot;'</span>+imgurl+<span style="color:#FF0000;">'&quot; alt=&quot;'</span>+prodname+<span style="color:#FF0000;">'&quot; /&gt;&lt;/a&gt;'</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; htmlCode = document.getElementById<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"htmlcode"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; htmlCode.value = html;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I am still looking for a way to change the link to a more basic link, so Amazon's new Product Preview will work properly. However, for some reason I can't figure out where it is making the full link...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2006/08/02/more-php-editing-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More Editing Now Reading Code</title>
		<link>http://www.brianathomas.com/archives/2006/06/03/more-editing-now-reading-code/</link>
		<comments>http://www.brianathomas.com/archives/2006/06/03/more-editing-now-reading-code/#comments</comments>
		<pubDate>Sat, 03 Jun 2006 14:41:30 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Site News]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2006/06/03/more-editing-now-reading-code/</guid>
		<description><![CDATA[With the theme I am using, the sidebar got stuck below the content. Now the sidebar is aligned along the top with the content. I also had to [..]]]></description>
			<content:encoded><![CDATA[<p>With the theme I am using, the sidebar got stuck below the content. Now the sidebar is aligned along the top with the content. I also had to add code to let it know there was a sidebar to the right. The <a href="http://www.brianathomas.com/library/" title="Brian A. Thomas .com - Now Reading Library">Library</a> page looks much better now I think. If it wasn't for the theme I used, it probably wouldn't need edited...</p>
<p>Edited to clear why things were done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2006/06/03/more-editing-now-reading-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixing Now Reading</title>
		<link>http://www.brianathomas.com/archives/2006/06/01/fixing-now-reading/</link>
		<comments>http://www.brianathomas.com/archives/2006/06/01/fixing-now-reading/#comments</comments>
		<pubDate>Thu, 01 Jun 2006 07:03:31 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2006/06/01/fixing-now-reading/</guid>
		<description><![CDATA[As I mentioned before I use the Now Reading plugin for WordPress here. However, it has a small anoyance. It linked to the "You may also be interested [..]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned before I use the <a href="http://robm.me.uk/projects/plugins/wordpress/now-reading/" title="Now Reading Plugin for WordPress">Now Reading</a> plugin for <a href="http://www.wordpress.org/" title="WordPress - Free Blog Tool and Weblog Platform">WordPress</a> here. However, it has a small anoyance. It linked to the "You may also be interested in these items..." page, rather than the item's detail page. If the user didn't click "add to cart" and looked at the "also interested in these items" stuff, it would cut your earnings from 15% to only 5%. Then again an article titled <a href="http://www.kottke.org/03/02/amazon-associates-beware" title="Kottke.org - Amazon Associates Beware">Amazon Associates Beware</a> states:</p>
<blockquote><p>The "ref=nosim" links apparently work correctly, although they are undocumented on the Associates site. However, it's unclear as to whether you make more money from using them. You're more likely to make that 15%, but you might make more in the aggregate from the recommended items you get using the first method. That is, the number of people looking to buy that item right away (say, 2 people counted at 15% apiece for a $15 item for a total of $4.50) might be offset by the number of people looking to browse and then buy (10 people counted at 5% apiece for a $15 item for a total of $7.50). The reports for my site at Amazon show that people who click through seem to browse and then buy rather than buy directly...I just need to get them into the store and Amazon will take care of the rest.</p></blockquote>
<p>So perhaps it is best to leave it as is, especially on a site like this where book sales are not a real focus.<br />
Anyhow, I applied the "ref=nosim" bit to the Now Reading plugin. I applied it to template-functions.php file. I added it to the <code>function book_link</code> funtion after it puts in the books ASIN number. Here is the fixed section of code:</p>
<div class="igBar"><span id="lphp-14"><a href="#" onclick="javascript:showPlainTxt('php-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-14">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> book_link<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/global"><span style="color:#000066;">global</span></a> <span style="color:#0000FF;">$book</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$options</span> = get_option<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'nowReadingOptions'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> apply_filters<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'book_link'</span>, <span style="color:#FF0000;">"http://www.amazon{$options['domain']}/exec/obidos/ASIN/{$book-&gt;asin}/ref=nosim/{$options['associate']}?tag={$options['associate']}"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This may or may not be helpful, but I prefer to go to the books detail page myself... at least for now. <img src='http://www.brianathomas.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
EDIT: Of course it would perhaps be best to make it an option in the options panel, but that is too much work for me at the moment. Also, I might try to fix the links some of the other stuff makes to be cleaner like that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2006/06/01/fixing-now-reading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Modified GeSHi&#8217;s C# File</title>
		<link>http://www.brianathomas.com/archives/2006/05/07/geshis-c-file-modified/</link>
		<comments>http://www.brianathomas.com/archives/2006/05/07/geshis-c-file-modified/#comments</comments>
		<pubDate>Sun, 07 May 2006 22:18:54 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[CSharp]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Site News]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2006/05/07/geshis-c-file-modified/</guid>
		<description><![CDATA[As noted before, to post code in WordPress, I use the ig:Syntax Hiliter plugin. It uses the GeSHi engine. I recently decided to modify the way it colors [..]]]></description>
			<content:encoded><![CDATA[<p>As <a href="/archives/2006/04/18/code-highlighting/" title="Brian A. Thomas .com - Code Highlighting">noted before</a>, to post code in <a href="http://www.wordpress.org/" title="WordPress - Free Blog Tool and Weblog Platform">WordPress</a>, I use the <a href="http://blog.igeek.info/wp-plugins/igsyntax-hiliter/" title="Canned !! my Atropine - ig:Syntax Hiliter">ig:Syntax Hiliter</a> plugin. It uses the <a href="http://qbnz.com/highlighter/index.php" title="GeSHi - Generic Syntax Highlighter">GeSHi</a> engine.<br />
I recently decided to modify the way it colors C# code. In particular I wanted to separate <acronym title="Extensible Markup Language">XML</acronym> style comments from regular comments.<br />
To that end I modified the <acronym title="PHP Hypertext Preprocessor">PHP</acronym> code in GeSHi's C# file.<br />
<span id="more-655"></span><br />
I changed following entry in the <code>$language_data = array (</code> from: </p>
<div class="igBar"><span id="lphp-18"><a href="#" onclick="javascript:showPlainTxt('php-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-18">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'COMMENT_SINGLE'</span> =&gt; <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC66CC;color:#800000;">1</span> =&gt; <span style="color:#FF0000;">'//'</span>, <span style="color:#CC66CC;color:#800000;">2</span> =&gt; <span style="color:#FF0000;">'#'</span><span style="color:#006600; font-weight:bold;">&#41;</span>, </div>
</li>
</ol>
</div>
</div>
</div>
<p>
to</p>
<div class="igBar"><span id="lphp-19"><a href="#" onclick="javascript:showPlainTxt('php-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-19">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'COMMENT_SINGLE'</span> =&gt; <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC66CC;color:#800000;">1</span> =&gt; <span style="color:#FF0000;">'///'</span>, <span style="color:#CC66CC;color:#800000;">2</span> =&gt; <span style="color:#FF0000;">'//'</span>, <span style="color:#CC66CC;color:#800000;">3</span> =&gt; <span style="color:#FF0000;">'#'</span><span style="color:#006600; font-weight:bold;">&#41;</span>, </div>
</li>
</ol>
</div>
</div>
</div>
<p>
The <code>///</code> has to come before the <code>//</code> so it can properly recognize the <code>///</code> otherwise it sees it as another <code>//</code>.<br />
Then I modified the following entry in <code>'STYLES' => array(</code> to be like this:</p>
<div class="igBar"><span id="lphp-20"><a href="#" onclick="javascript:showPlainTxt('php-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-20">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">'COMMENTS'</span> =&gt; <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#CC66CC;color:#800000;">1</span> =&gt; <span style="color:#FF0000;">'color: #808080'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#CC66CC;color:#800000;">2</span> =&gt; <span style="color:#FF0000;">'color: #008080; font-style: italic;'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#CC66CC;color:#800000;">3</span> =&gt; <span style="color:#FF0000;">'color: #008080;'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#FF0000;">'MULTI'</span> =&gt; <span style="color:#FF0000;">'color: #008080; font-style: italic;'</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#41;</span>, </div>
</li>
</ol>
</div>
</div>
</div>
<p>
<code>2 =></code> is what it orginaly had as <code>1 =></code>, and I made <code>1 =></code> to reflect the change I wanted there, which gives the XML style comments a gray color, while leaving regular comments green.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2006/05/07/geshis-c-file-modified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Categories moved to top of posts</title>
		<link>http://www.brianathomas.com/archives/2005/10/20/categories-moved-to-top-of-posts/</link>
		<comments>http://www.brianathomas.com/archives/2005/10/20/categories-moved-to-top-of-posts/#comments</comments>
		<pubDate>Fri, 21 Oct 2005 04:28:37 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2005/10/20/categories-moved-to-top-of-posts/</guid>
		<description><![CDATA[I did some editing of the PHP source code for WordPress here and moved the categories listing to the top, added the who it was posted by... and [..]]]></description>
			<content:encoded><![CDATA[<p>I did some editing of the PHP source code for WordPress here and moved the categories listing to the top, added the who it was posted by... and at one point had the time, but the time is off by about 2 hours, which is odd since it is set for Eastern... of course it may be getting the time stamp from the server, in which case... I am not sure where it is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2005/10/20/categories-moved-to-top-of-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP editing of the site</title>
		<link>http://www.brianathomas.com/archives/2005/05/02/php-editing-of-the-site/</link>
		<comments>http://www.brianathomas.com/archives/2005/05/02/php-editing-of-the-site/#comments</comments>
		<pubDate>Mon, 02 May 2005 06:13:55 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Site News]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2005/05/02/php-editing-of-the-site/</guid>
		<description><![CDATA[Seems the site was not validating as valid XHTML. I had to edit some of the PHP code to fix it. Seems when I added the calendar back [..]]]></description>
			<content:encoded><![CDATA[<p>Seems the site was not validating as valid <acronym title="Extensible Hypertext Markup Language">XHTML</acronym>. I had to edit some of the <acronym title="PHP Hypertext Preprocessor">PHP</acronym> code to fix it. Seems when I added the calendar back in (it is off by default in <a href="http://wordpress.org/" title="WordPress home">WordPress</a> 1.5) I forgot to keep it in the proper flow of things. I also had to edit the Amazon Wishlist program to become valid XHTML. Anyhow, things validate again... if anyone cared.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2005/05/02/php-editing-of-the-site/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scripturizer Revised again</title>
		<link>http://www.brianathomas.com/archives/2005/01/19/scripturizer-revised-again/</link>
		<comments>http://www.brianathomas.com/archives/2005/01/19/scripturizer-revised-again/#comments</comments>
		<pubDate>Wed, 19 Jan 2005 22:28:35 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2005/01/19/scripturizer-revised-again/</guid>
		<description><![CDATA[The awesome WordPress plugin, Scripturizer, has been revised again (code here). Seems somebody named Brian Thomas helped them make it XHTML compliant... oh wait... that's me!]]></description>
			<content:encoded><![CDATA[<p>The awesome WordPress plugin, <a href="http://xastanford.org/archives/scripturizer-in-php/" title="Chi Alpha @ Stanford >> Scripturizer in PHP">Scripturizer</a>, has been revised again (<a href="http://dev.wp-plugins.org/file/scripturizer/trunk/scripturizer.php" title="PHP Source Code for Scripturizer 1.5 fork">code here</a>). Seems somebody named <a href="http://www.brianathomas.com/archives/2005/01/17/editing-scripturizer/" title="Brian A. Thomas .com - Editing Scripturizer">Brian Thomas</a> helped them make it <acronym title="Extensible Hypertext Markup Language">XHTML</acronym> compliant... oh wait... that's me!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2005/01/19/scripturizer-revised-again/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Editing Scripturizer</title>
		<link>http://www.brianathomas.com/archives/2005/01/17/editing-scripturizer/</link>
		<comments>http://www.brianathomas.com/archives/2005/01/17/editing-scripturizer/#comments</comments>
		<pubDate>Mon, 17 Jan 2005 21:51:41 +0000</pubDate>
		<dc:creator>Brian A. Thomas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.brianathomas.com/archives/2005/01/17/editing-scripturizer/</guid>
		<description><![CDATA[I had to edit the PHP code in Scripturizer to make it validate as XHTML. The problem is that some of the sites use an ampersand (&#038;) as [..]]]></description>
			<content:encoded><![CDATA[<p>I had to edit the <acronym title="PHP: Hypertext Preprocessor">PHP</acronym> code in <a href="http://xastanford.org/archives/scripturizer-in-php/" title="Chi Alpha at Stanford - Scripturizer in PHP">Scripturizer</a> to make it validate as <acronym title="Extensible Hypertext Markup Language">XHTML</acronym>.<br />
The problem is that some of the sites use an ampersand (&#038;) as part of their <acronym title="Uniform Resource Locator">URL</acronym>. XHTML doesn't allow that in the code, and the <code>&#038;</code> needs changed to <code>&amp;amp;</code>. A subtle difference to be sure, and what comes up on the address bar is still the same. However, it is a simple fix. So far all I fixed are ones going through <a href="http://www.biblegateway.com/" title="BibleGateway">Biblegateway</a>, which is the one I would normally use.<br />
On version 1.5, my copy has line 157 reading as follows:<br />
<code>$link = "http://biblegateway.com/bible?version=$translation&#038;passage=";</code><br />
I changed that to:<br />
<code>$link = "http://biblegateway.com/bible?version=$translation&amp;</code><br />
and viola, it now validates as XHTML.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brianathomas.com/archives/2005/01/17/editing-scripturizer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

