<?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>arkinEx Codex &#187; file-icon</title>
	<atom:link href="http://www.arkinex.com/contains/file-icon/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.arkinex.com</link>
	<description>the place where all my code can be viewed</description>
	<lastBuildDate>Wed, 04 Nov 2009 20:39:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>File-icon plugin hack, sorted list.</title>
		<link>http://www.arkinex.com/wordpress/hacks/12/file-icon-hack/</link>
		<comments>http://www.arkinex.com/wordpress/hacks/12/file-icon-hack/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 22:29:18 +0000</pubDate>
		<dc:creator>arkin</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[file-icon]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[sort]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.arkinex.com/wordpress/hacks/12/file-icon-hack/</guid>
		<description><![CDATA[Today, i installed the WordPress File Icons Plugin (v2.0) by  Roland Rust and discovered something really annoying whilst so great at the same time. I think the file icon plugin is a great idea, but contains 2 problems. The first, is a client side problem. The icons css stylesheet has to be loaded each time [...]]]></description>
			<content:encoded><![CDATA[<p>Today, i installed the WordPress <a href="http://wordpress.designpraxis.at/plugins/file-icons/" class="more-link">File Icons</a> Plugin (v2.0) by  <a href="http://wordpress.designpraxis.at/">Roland Rust</a> and discovered something really annoying whilst so great at the same time.</p>
<p>I think the file icon plugin is a great idea, but contains 2 problems.</p>
<p><span id="more-12"></span><br />
The first, is a client side problem. The icons css stylesheet has to be loaded each time as it is embedded into the html document (in the &lt;head&gt; tags) and therefore cannot be cached by your browser as your are roaming around the website.</p>
<p>The second, is an administration/configuration annoyance. The icons are not in any particular order and therefore finding the desired one can be a pain in the ass.</p>
<p>The first one would take some modification to get around, whilst the second can be easily patched.</p>
<p><strong>The fix</strong></p>
<p>Find the file file-icons.php which should be located in your /wp-content/plugins/file-icons/ directory.<br />
Verify that the file is around 12Kb and the plugin is version 2.0 (so we don&#8217;t break it or encounter any problems).</p>
<p>Next, go to line 226. Which should look like:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$iconset_cached</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></div></div>

<p>Then, insert a new line before this, and the final result should look like:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">sort</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$iconset_cached</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Sorted list hack by arkinex.com</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$iconset_cached</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></div></div>

<p>This now makes the list sorted alphabetically, making the desired icons easier to find.<br />
For additional help on patterns, comment on this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.arkinex.com/wordpress/hacks/12/file-icon-hack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
