<?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>Fergusweb Network &#187; Coding</title>
	<atom:link href="http://www.fergusweb.net/c/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fergusweb.net</link>
	<description>Truly just another WordPress site</description>
	<lastBuildDate>Tue, 30 Aug 2011 21:34:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Thesis Theme 1.5 with WordPress 2.8</title>
		<link>http://www.fergusweb.net/blog/2009/05/thesis-15-with-wordpress-28/</link>
		<comments>http://www.fergusweb.net/blog/2009/05/thesis-15-with-wordpress-28/#comments</comments>
		<pubDate>Wed, 20 May 2009 12:56:00 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.fergusweb.net/?p=259</guid>
		<description><![CDATA[I&#8217;ve been playing with the newest version of WordPress (2.8), which is due to be released in the near future.  It features a completely new way of writing Widgets, so I&#8217;ve been testing that out. I discovered a clash with my favourite wordpress theme, the Thesis framework.  Took me a little while to figure it [...]]]></description>
			<content:encoded><![CDATA[<p><a class="post_image_link" href="http://www.fergusweb.net/blog/2009/05/thesis-15-with-wordpress-28/" title="Permanent link to Thesis Theme 1.5 with WordPress 2.8"><img class="post_image alignright remove_bottom_margin" src="http://www.fergusweb.net/wp-content/uploads/2009/05/istock_000007408954xsmall-150x149.jpg" width="150" height="149" alt="Post image for Thesis Theme 1.5 with WordPress 2.8" /></a>
</p><p>I&#8217;ve been playing with the newest version of WordPress (2.8), which is due to be released in the near future.  It features a completely new way of writing <a href="http://codex.wordpress.org/WordPress_Widgets_Api/">Widgets</a>, so I&#8217;ve been testing that out.</p>
<p>I discovered a clash with my favourite wordpress theme, the <a href="http://www.fergusweb.net/hop/thesis/">Thesis framework</a>.  Took me a little while to figure it out, but I think I&#8217;ve solved the problem.<span id="more-259"></span></p>
<p>[AlertBox text="<strong>Update 18 June 09</strong>: Thesis 1.5.1 has been released, and makes this patch unneccessary."]</p>
<p><strong>The problem</strong></p>
<p>WordPress 2.8 features an excellent Widget manager in the admin area.  But with Thesis 1.5, this area is unusable.  Widgets cannot be dragged/dropped, which is essential.  It seems that the JS provided by Thesis clashes with JS provided by WordPress on a few different screens.</p>
<p><strong>The fix</strong></p>
<p>Open up your Thesis files, and look in <code>/lib/admin/admin.php</code>.   Look for function <code>thesis_options_js()</code></p>
<p>{code type=php}<br />
$date_modified_js = filemtime(THESIS_SCRIPTS . &#8216;/thesis.js&#8217;);<br />
$date_modified_ui = filemtime(THESIS_SCRIPTS . &#8216;/jquery-ui.js&#8217;);<br />
echo &#8216;&lt;script type=&#8221;text/javascript&#8221; src=&#8221;&#8216; . THESIS_SCRIPTS_FOLDER . &#8216;/thesis.js?d=&#8217; . date(&#8216;mdy-Gms&#8217;, $date_modified_js) . &#8216;&#8221; /&gt;&lt;/script&gt;&#8217; . &#8220;\n&#8221;;<br />
echo &#8216;&lt;script type=&#8221;text/javascript&#8221; src=&#8221;&#8216; . THESIS_SCRIPTS_FOLDER . &#8216;/jquery-ui.js?d=&#8217; . date(&#8216;mdy-Gms&#8217;, $date_modified_ui) . &#8216;&#8221; /&gt;&lt;/script&gt;&#8217; . &#8220;\n&#8221;;<br />
{/code}</p>
<p>Thesis comes with its own jQuery UI script, which clashes with the in-built wordpress scripts.  Replace that function with this one:</p>
<p>{code type=php}<br />
if (!is_admin()) { return; }<br />
$date_modified_js = filemtime(THESIS_SCRIPTS . &#8216;/thesis.js&#8217;);<br />
$date_modified_ui = filemtime(THESIS_SCRIPTS . &#8216;/jquery-ui.js&#8217;);<br />
wp_enqueue_script(&#8216;jquery-ui-core&#8217;);<br />
wp_enqueue_script(&#8216;jquery-ui-sortable&#8217;);<br />
wp_enqueue_script(&#8216;jquery-ui-tabs&#8217;);<br />
wp_enqueue_script(&#8216;thesis-admin-js&#8217;, THESIS_SCRIPTS_FOLDER.&#8217;/thesis.js&#8217;);<br />
{/code}</p>
<p>Also look for the function <code>thesis_admin_styles_and_scripts()</code></p>
<p>It contains this:</p>
<p>{code type=php}<br />
add_action(&#8216;admin_head&#8217;, &#8216;thesis_options_stylesheet&#8217;);<br />
add_action(&#8216;admin_head&#8217;, &#8216;thesis_options_js&#8217;);<br />
{/code}</p>
<p>Replace with this:</p>
<p>{code type=php}<br />
add_action(&#8216;admin_head&#8217;, &#8216;thesis_options_stylesheet&#8217;);<br />
add_action(&#8216;admin_head&#8217;, &#8216;thesis_options_js&#8217;);<br />
add_action(&#8216;init&#8217;, &#8216;thesis_options_js&#8217;);<br />
{/code}</p>
<p>And problem solved!  So far I haven&#8217;t discovered any unwanted side-affects.  You may only need to enqueue jquery-ui-sortable.</p>
<p>[AlertBox text="<strong>Update 18 June 09</strong>: Thesis 1.5.1 has been released, and makes this patch unneccessary."]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fergusweb.net/blog/2009/05/thesis-15-with-wordpress-28/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Thesis Tutorial &#8211; Creating New Widget Areas</title>
		<link>http://www.fergusweb.net/blog/2009/03/thesis-tutorial-creating-new-widget-areas/</link>
		<comments>http://www.fergusweb.net/blog/2009/03/thesis-tutorial-creating-new-widget-areas/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 04:41:57 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.fergusweb.net/?p=166</guid>
		<description><![CDATA[[NoticeBox text="This tutorial deals with the Thesis wordpress theme. It may not mean much if you haven't worked with Thesis before."] The wonderful Thesis wordpress theme comes with two sidebars which are very configurable.  You can insert widgets into either sidebar, exactly as you wish. But what if you want to put a widget somewhere [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>[NoticeBox text="This tutorial deals with the Thesis wordpress theme.  It may not mean much if you haven't worked with Thesis before."]</p>
<p>The wonderful <a href="http://www.fergusweb.net/hop/thesis/">Thesis</a> wordpress theme comes with two sidebars which are very configurable.  You can insert widgets into either sidebar, exactly as you wish.</p>
<p>But what if you want to put a widget somewhere else?  Let&#8217;s take a look at the <a href="http://www.tailored.com.au/contact/">Tailored Web Services</a> website.  (That&#8217;s my employer).   Look at the footer of this site.  There are three columns down there, and each one contains a widget.<span id="more-166"></span></p>
<h2>So how did that happen?</h2>
<p>The key functions here are <code>register_sidebar()</code>and <code>dynamic_sidebar()</code>.</p>
<p>Together, these functions allow us to set up an extra &#8220;sidebar&#8221;, which will be widget-enabled through the wp-admin area.</p>
<p>Let&#8217;s start with this:</p>
<p>{code type=php}<br />
&lt;?php<br />
add_action(&#8216;thesis_hook_footer&#8217;, &#8216;customFooter&#8217;);<br />
function customFooter() {<br />
?&gt;<br />
&lt;div class=&#8221;footer1&#8243;&gt;<br />
&lt;ul class=&#8221;sidebar_list&#8221;&gt;<br />
&lt;?php if ( !function_exists(&#8216;dynamic_sidebar&#8217;) || !dynamic_sidebar(&#8216;Footer1&#8242;) ){ ?&gt;<br />
&lt;li class=&#8221;widget&#8221;&gt;Dynamic Widgets are not enabled&lt;/li&gt;<br />
&lt;?php } ?&gt;<br />
&lt;/ul&gt;&lt;!&#8211; sidebar_list &#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211; footer1 &#8211;&gt;<br />
&lt;?php<br />
} // customFooter<br />
?&gt;<br />
{/code}</p>
<p>The function <code>customFooter()</code> is designed to insert the right code for a new &#8220;sidebar&#8221;.  And yes, we&#8217;re still calling it a sidebar even though it goes in the footer.</p>
<p>The <code>add_action()</code> line defines where this new block of code should go.  The Thesis User&#8217;s Guide contains a reference <a href="http://diythemes.com/thesis/rtfm/hooks/">list of all hooks</a> provided by Thesis.  In this case, we want it in the footer.</p>
<p>The <code>dynamic_sidebar('Footer1')</code> call tells WordPress to output &#8220;Footer1&#8243; there if present.</p>
<p>Next, we need to use that <code>register_sidebar()</code> function to let us put widgets in there.</p>
<p>{code type=php}<br />
&lt;?php<br />
register_sidebar(array(&#8216;name&#8217;=&gt;&#8217;Footer1&#8242;, &#8216;before_title&#8217;=&gt;&#8217;&lt;h3&gt;&#8217;, &#8216;after_title&#8217;=&gt;&#8217;&lt;/h3&gt;&#8217;));<br />
?&gt;<br />
{/code}</p>
<p>By default, your widget titles will always be wrapped in &lt;h3&gt; tags.  You can change that if you want to.  The important argument to this function is the &#8220;name&#8221;.  The name should be the same as you used in the <code>dynamic_sidebar()</code> call.  Be descriptive:  We should call this &#8220;Footer Left&#8221;, or &#8220;Footer Right&#8221; to avoid any confusion later on.</p>
<h2>Here&#8217;s one I prepared earlier</h2>
<ul>
<li><a href="http://www.fergusweb.net/code/custom-three-column-widget-ready-footer-for-thesis/">Custom three-column widget-ready footer</a></li>
</ul>
<p>Paste the code from this page into your <code>custom_functions.php</code> file.  When you add some CSS to float the columns side-by-side, you&#8217;ll get the same three-column footer we have on Tailored.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fergusweb.net/blog/2009/03/thesis-tutorial-creating-new-widget-areas/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>IE Operation Aborted &#8211; javascript issues</title>
		<link>http://www.fergusweb.net/blog/2007/09/ie-operation-aborted-javascript-issues/</link>
		<comments>http://www.fergusweb.net/blog/2007/09/ie-operation-aborted-javascript-issues/#comments</comments>
		<pubDate>Wed, 26 Sep 2007 00:16:04 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.fergusweb.net/82-ie-operation-aborted-javascript-issues/</guid>
		<description><![CDATA[I&#8217;ve been battling for a while now with a certain bug on a certain site. I don&#8217;t see this bug anywhere else, and I wasn&#8217;t able to figure out what the issue was. I eventually (trial and error) narrowed it down to some javascript. If I removed the script, the site worked. (Minus the scripted [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I&#8217;ve been battling for a while now with a certain bug on a certain site.  I don&#8217;t see this bug anywhere else, and I wasn&#8217;t able to figure out what the issue was.  I eventually (trial and error) narrowed it down to some javascript.  If I removed the script, the site worked.  (Minus the scripted functionality of course).  If I kept it in, this happened:</p>
<p style="text-align: center"><img src="http://www.fergusweb.net/wp-content/uploads/2007/09/opaborted.gif" alt="Operation Aborted - IE and javascript" /></p>
<p>I found a few articles discussing this issue, and linking back to <a href="http://www.eoghanobrien.com/article/32/ie-operation-aborted" target="_blank">Eoghan O&#8217;Brien</a>.  His fix (defer=&#8221;defer&#8221; on the javascript) didn&#8217;t help me though.</p>
<p>My issue was with <a href="http://blog.deconcept.com/swfobject/" target="_blank">SWFobject</a>.  Long story short, I ended up having to do this:</p>
<pre lang="javascript" line="1">&lt;script type="text/javascript"&gt;
window.addEvent('load', function()  {
var so = new  SWFObject('flvplayer.swf','mpl','240','200','7');
...
so.write('player');
});
&lt;/script&gt;</pre>
<p>Yes, I use <a href="http://www.mootools.net/">mootools</a>.  Instead of doing &lt;script src=&#8221;#&#8221; defer=&#8221;defer&#8221;&gt; I was able to defer the EXECUTION of the script instead, by adding it to the onLoad event sequence.</p>
<p>Still don&#8217;t know why it works, but now my page opens in Internet Explorer (IE6 and IE7, also Avant Browser)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fergusweb.net/blog/2007/09/ie-operation-aborted-javascript-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RSS feeds done right &#8211; XML + XSLT</title>
		<link>http://www.fergusweb.net/blog/2006/10/feeds-right/</link>
		<comments>http://www.fergusweb.net/blog/2006/10/feeds-right/#comments</comments>
		<pubDate>Fri, 27 Oct 2006 03:49:47 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Design Matters]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.fergusweb.net/50-feeds-right/</guid>
		<description><![CDATA[This is a blog, and its got an RSS feed. It feels like RSS feeds are becoming more and more common every day. Part of this is due to the growing popularity of blogs, and partly because web users are becoming a little more savvy. Once upon a time there was a web user. We&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This is a blog, and its got an RSS feed.  It feels like RSS feeds are becoming more and more common every day.  Part of this is due to the growing popularity of blogs, and partly because web users are becoming a little more savvy.</p>
<p>Once upon a time there was a web user.  We&#8217;ll call her Betty.  Betty found a blog she liked to read, and she checked back daily for new posts.  Then Betty found out about some more blogs she liked, so she started checking those daily too.  It wasn&#8217;t look before Betty was checking 30 blogs every day &#8211; and wow, it was starting to take a while!<span id="more-50"></span></p>
<p>This is where RSS feeds come in.  RSS (Really Simple Syndication) is a way for a blog to make its content available in an easily transportable format.  So Betty signed up to <a href="http://www.google.com.au/reader/">Google Reader</a> (or any of a million other aggregators (RSS Readers), where she could read all 30 of her blogs in one place, without wasting time visiting all of these other sites.  And she lived happily ever after.</p>
<p><img id="image49" src="http://www.fergusweb.net/wp-content/uploads/2006/10/ico-rss.gif" alt="RSS Icon" align="right" /><br />
Its very common now to visit a blog and see a button linking to the RSS feed for that blog.  But in most cases, when you click the icon, you saw raw code.</p>
<p>You see, RSS feeds are constructed from XML code.  Its kind of ugly to the untrained eye!  But have you ever heard of XLST?  It is to XML what CSS is to HTML &#8211; only a little cooler.  Take a look at the <a href="http://feeds.feedburner.com/fergusweb">fergusweb RSS feed</a>.  Thats not unstyled content! (Its not all that pretty either, but hey &#8211; thats feedburner for you!)</p>
<p>Its got an info-box at the top showing ways to subscribe, and it lays out the raw data in an acceptable manner.  This is done with the help of XLST.  Because XLST doesn&#8217;t just dictate <em>style rules</em> but it also allows you to add other content in &#8211; content only visible to the web browser, not shown by the reader.  Which is great for that &#8220;here&#8217;s an RSS feed, and here&#8217;s what you can do with it&#8221; message that should be at the top of an RSS feed.</p>
<p>You see, me &#8211; I find an RSS feed, I copy/paste the url into Google Reader.  But someone who hasn&#8217;t experienced RSS before really needs an introductory note.</p>
<p>So, if you publish an RSS feed, visit it in your web-browser to see what your visitors will see.  Does yours look as pretty as mine?</p>
<p>I&#8217;m going to be modifying some scripts I wrote for other projects to publish RSS feeds, and I&#8217;m going to be integrating XLST in there.  Now, I&#8217;ve never done this before, so I have a bit of research/learning to do first.  I&#8217;ll post again with a tutorial on the basics of XLST when I&#8217;ve done this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fergusweb.net/blog/2006/10/feeds-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
