<?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>Inspirated &#187; Bugfix</title>
	<atom:link href="http://inspirated.com/tag/bugfix/feed" rel="self" type="application/rss+xml" />
	<link>http://inspirated.com</link>
	<description>krkhan&#039;s blog</description>
	<lastBuildDate>Thu, 05 Apr 2012 16:19:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>TweetMeme and XHTML</title>
		<link>http://inspirated.com/2009/08/29/tweetmeme-and-xhtml</link>
		<comments>http://inspirated.com/2009/08/29/tweetmeme-and-xhtml#comments</comments>
		<pubDate>Sat, 29 Aug 2009 08:47:22 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Bugfix]]></category>
		<category><![CDATA[TweetMeme]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://inspirated.com/?p=241</guid>
		<description><![CDATA[The last tweet on my Twitter account is dated around 2 years ago. I stopped using the service in late 2007 because I didn&#8217;t see a point in &#8220;microblogging&#8221; anymore. Somehow though, I found myself doing something similar on my Facebook status messages for over an year now. Accordingly, I thought it wouldn&#8217;t be a [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The last tweet on my Twitter account is dated around 2 years ago. I stopped using the service in late 2007 because I didn&#8217;t see a point in &#8220;microblogging&#8221; anymore. Somehow though, I found myself doing something similar on my Facebook status messages for over an year now. Accordingly, I thought it wouldn&#8217;t be a bad idea to go back and take a look at the current state of tweeting affairs. Meanwhile, I searched for a plugin to link Twitter with WordPress and found <a href="http://wordpress.org/extend/plugins/tweetmeme/">TweetMeme</a>. The nifty little code places &#8220;Tweet&#8221; buttons on the blog posts. Unfortunately, after I activated it my site broke down on account of invalid XHTML (since the pages get delivered to FF as <code>application/xhtml+xml</code>, that was expected too). A quick look at the code resulted in the following fix:</p>
<div style="text-align: center"><a href="http://inspirated.com/uploads/tweetmeme-1.5-xhtmlfix.diff">tweetmeme-1.5-xhtmlfix.diff</a></div>

<div class="wp_syntax"><div class="code"><pre class="diff" style="font-family:monospace;">diff -Naur tweetmeme/tweetmeme.php tweetmeme.xhtml/tweetmeme.php
<span style="color: #888822;">--- tweetmeme/tweetmeme.php	2009-07-17 20:52:11.000000000 +0600</span>
<span style="color: #888822;">+++ tweetmeme.xhtml/tweetmeme.php	2009-08-29 03:03:00.000000000 +0600</span>
<span style="color: #440088;">@@ -26,21 +26,21 @@</span>
     $button .= '&lt;iframe src=&quot;http://api.tweetmeme.com/button.js?url=' . urlencode<span style="">&#40;</span>$url<span style="">&#41;</span>;
&nbsp;
     if <span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_source'<span style="">&#41;</span><span style="">&#41;</span> <span style="">&#123;</span>
<span style="color: #991111;">-        $button .= '&amp;source=' . urlencode<span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_source'<span style="">&#41;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">+        $button .= '&amp;amp;source=' . urlencode<span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_source'<span style="">&#41;</span><span style="">&#41;</span>;</span>
     <span style="">&#125;</span> 
&nbsp;
     if <span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_version'<span style="">&#41;</span> == 'compact'<span style="">&#41;</span> <span style="">&#123;</span>
<span style="color: #991111;">-        $button .= '&amp;style=compact';</span>
<span style="color: #00b000;">+        $button .= '&amp;amp;style=compact';</span>
     <span style="">&#125;</span> else <span style="">&#123;</span>
<span style="color: #991111;">-		$button .= '&amp;style=normal';</span>
<span style="color: #00b000;">+		$button .= '&amp;amp;style=normal';</span>
 	<span style="">&#125;</span>
&nbsp;
 	if <span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_url_shortner'<span style="">&#41;</span><span style="">&#41;</span> <span style="">&#123;</span>
<span style="color: #991111;">-    	$button .= '&amp;service=' . urlencode<span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_url_shortner'<span style="">&#41;</span><span style="">&#41;</span> . '';</span>
<span style="color: #00b000;">+    	$button .= '&amp;amp;service=' . urlencode<span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_url_shortner'<span style="">&#41;</span><span style="">&#41;</span> . '';</span>
 	<span style="">&#125;</span>
&nbsp;
 	if <span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_api_key'<span style="">&#41;</span><span style="">&#41;</span> <span style="">&#123;</span>
<span style="color: #991111;">-		$button .= '&amp;service_api=' . urlencode<span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_api_key'<span style="">&#41;</span><span style="">&#41;</span>;</span>
<span style="color: #00b000;">+		$button .= '&amp;amp;service_api=' . urlencode<span style="">&#40;</span>get_option<span style="">&#40;</span>'tm_api_key'<span style="">&#41;</span><span style="">&#41;</span>;</span>
 	<span style="">&#125;</span>
&nbsp;
 	$button .= '&quot; ';</pre></div></div>

<p>At the same time, I also encourage people to take a look at &#8220;<a href="http://www.humorix.org/articles/2009/04/word/">Wordr</a>&#8221; &#8212; the nanoblogging startup that&#8217;s going to make Twitter totally obsolete within months to come.</p>
<div class="shr-publisher-241"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2009/08/29/tweetmeme-and-xhtml">Permalink</a> |
<a href="http://inspirated.com/2009/08/29/tweetmeme-and-xhtml#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/bugfix" rel="tag">Bugfix</a>, <a href="http://inspirated.com/tag/tweetmeme" rel="tag">TweetMeme</a>, <a href="http://inspirated.com/tag/twitter" rel="tag">Twitter</a>, <a href="http://inspirated.com/tag/web" rel="tag">Web</a>, <a href="http://inspirated.com/tag/web-20" rel="tag">Web 2.0</a>, <a href="http://inspirated.com/tag/wordpress" rel="tag">WordPress</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2009/08/29/tweetmeme-and-xhtml/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rough patches</title>
		<link>http://inspirated.com/2009/02/17/rough-patches</link>
		<comments>http://inspirated.com/2009/02/17/rough-patches#comments</comments>
		<pubDate>Tue, 17 Feb 2009 10:20:13 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Bugfix]]></category>
		<category><![CDATA[fGallery]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Patch]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.inspirated.com/wordpress/?p=186</guid>
		<description><![CDATA[A little while ago I had to code a few fixes for the fGallery WordPress plugin. The patch was released as version 2.4.1-1 and it wasn&#8217;t until yesterday that I noticed the &#8220;Previous&#8221; and &#8220;Next&#8221; links behaving erratically for my images. Fixing it required a little hair-pulling dance with SQL sub-queries. Anyhow-way, the end product [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>A little while ago I had to code a few fixes for the <a href="http://www.fahlstad.se/wp-plugins/fgallery/">fGallery</a> WordPress plugin. The patch was released as version <a href="http://www.inspirated.com/wordpress/2008/09/21/fixing-wordpress-fgallery-plugin"><code>2.4.1-1</code></a> and it wasn&#8217;t until yesterday that I noticed the &#8220;Previous&#8221; and &#8220;Next&#8221; links behaving erratically for my images. Fixing it required a little hair-pulling dance with SQL sub-queries. Anyhow-way, the end product does work as expected. Here&#8217;s the <strong>incremental</strong> <a href="http://www.inspirated.com/uploads/fgallery-2.4.1-2.diff">diff</a> with the bugfix which should be applied to the <code>2.4.1-1</code> release. If you don&#8217;t understand what was just said in the last line, you can use the already <a href="http://www.inspirated.com/uploads/fgallery-2.4.1-2.zip">patched zip archive</a> to have things automatically sorted out.</p>
<div class="shr-publisher-186"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2009/02/17/rough-patches">Permalink</a> |
<a href="http://inspirated.com/2009/02/17/rough-patches#comments">No comment</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/bugfix" rel="tag">Bugfix</a>, <a href="http://inspirated.com/tag/fgallery" rel="tag">fGallery</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/patch" rel="tag">Patch</a>, <a href="http://inspirated.com/tag/php" rel="tag">PHP</a>, <a href="http://inspirated.com/tag/sql" rel="tag">SQL</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a>, <a href="http://inspirated.com/tag/wordpress" rel="tag">WordPress</a>, <a href="http://inspirated.com/tag/xhtml" rel="tag">XHTML</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2009/02/17/rough-patches/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing WordPress fGallery plugin</title>
		<link>http://inspirated.com/2008/09/21/fixing-wordpress-fgallery-plugin</link>
		<comments>http://inspirated.com/2008/09/21/fixing-wordpress-fgallery-plugin#comments</comments>
		<pubDate>Sun, 21 Sep 2008 16:22:05 +0000</pubDate>
		<dc:creator>krkhan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Bugfix]]></category>
		<category><![CDATA[fGallery]]></category>
		<category><![CDATA[Injection]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Patch]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.inspirated.com/wordpress/?p=165</guid>
		<description><![CDATA[For the past two years, I have been using Fredrick Fahlstad&#8217;s fGallery plugin for managing images in my WordPress blog. Unfortunately, this excellent piece of software was left unmaintained with the last stable release taking place way back in 2006. For a while now, I&#8217;ve had my gripes with some of the things in fGallery. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>For the past two years, I have been using Fredrick Fahlstad&#8217;s <a href="http://www.fahlstad.se/wp-plugins/fgallery/">fGallery</a> plugin for managing images in my WordPress blog. Unfortunately, this excellent piece of software was left unmaintained with the last stable release taking place way back in 2006. For a while now, I&#8217;ve had my gripes with some of the things in fGallery. The two options I had were to either (A) fix what was broken or to (B) use another plugin from WordPress Extend.</p>
<p>(B) seemed like too much trouble so I decided to go for the former option and get my hands wet with PHP again. Here&#8217;s a list of stuff that I modified in the original <code>2.4.1</code> release:</p>
<ul>
<li>Fixed output of special HTML characters in album and image titles to conform with XHTML standards.</li>
<li>Modified to send HTTP response &#8220;<code>Status:200 OK</code>&#8221; back to the client in <code>fim_photos.php</code>. Without this, all of my fGallery pages were <a href="http://wordpress.org/support/topic/202306">returning 404 error code</a> for nice URLs even though they were working in the browser.</li>
<li>Fixed an SQL injection vulnerability in <code>fim_rss.php</code>.</li>
<li>Fixed image order on album pages and RSS feeds. Without using the table name in the ORDER queries, images were being returned in random order.</li>
<li>Fixed date issues in album RSS feeds.</li>
<li>Images are now shown in their original sizes in case their width is smaller than 600 pixels. In case they overflow this limit, they are shown in a 600 pixels wide frame with an option to click them for viewing in original size. This was to prevent larger image from messing up blog themes.</li>
</ul>
<p>Here&#8217;s a <code><a href="http://inspirated.com/uploads/fgallery-2.4.1-1.diff">diff</a></code> file with the mentioned changes, which should be applied to the <code>2.4.1</code> release. I&#8217;ve also uploaded a <a href="http://inspirated.com/uploads/fgallery-2.4.1-1.zip">modified zip archive</a> for convenience of those who don&#8217;t have access to the <code>patch</code> command.</p>
<div class="shr-publisher-165"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><hr />
<p><small><a href="http://inspirated.com/2008/09/21/fixing-wordpress-fgallery-plugin">Permalink</a> |
<a href="http://inspirated.com/2008/09/21/fixing-wordpress-fgallery-plugin#comments">5 comments</a>
<br/>
Post tags: <a href="http://inspirated.com/tag/bugfix" rel="tag">Bugfix</a>, <a href="http://inspirated.com/tag/fgallery" rel="tag">fGallery</a>, <a href="http://inspirated.com/tag/injection" rel="tag">Injection</a>, <a href="http://inspirated.com/tag/open-source" rel="tag">Open Source</a>, <a href="http://inspirated.com/tag/patch" rel="tag">Patch</a>, <a href="http://inspirated.com/tag/php" rel="tag">PHP</a>, <a href="http://inspirated.com/tag/sql" rel="tag">SQL</a>, <a href="http://inspirated.com/tag/technology" rel="tag">Technology</a>, <a href="http://inspirated.com/tag/wordpress" rel="tag">WordPress</a>, <a href="http://inspirated.com/tag/xhtml" rel="tag">XHTML</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://inspirated.com/2008/09/21/fixing-wordpress-fgallery-plugin/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.744 seconds -->

