<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Journal of Tormod Haugen</title>
	
	<link>http://journal.tormodh.net</link>
	<description>Thoughts on life, work and technology</description>
	<pubDate>Tue, 21 Jul 2009 09:24:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/tormodh" /><feedburner:info uri="tormodh" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Simpla 2 - 0.1 version</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/Wq1aPVA5PKI/</link>
		<comments>http://journal.tormodh.net/2009/04/30/simpla-2-01-version/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 09:37:08 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[projects]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[release]]></category>

		<category><![CDATA[simpla]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=275</guid>
		<description><![CDATA[It is official; I cannot name things or version products.
I hereby declare version oh-won (0.1) of Simpla 2 released. The only change is that it now supports nested comments and other fun comment related stuff from WP 2.7.
Please feel free to rework, criticize and moan loudly. Responses are cherished!
(the theme is still under CC-Attribution Share-Alike [...]]]></description>
			<content:encoded><![CDATA[<p>It is official; I cannot name things or version products.</p>
<p>I hereby declare version oh-won (0.1) of <a href="simpla2">Simpla 2</a> released. The only change is that it now supports nested comments and other fun comment related stuff from WP 2.7.</p>
<p>Please feel free to rework, criticize and moan loudly. Responses are cherished!</p>
<p>(the theme is still under <a href="http://creativecommons.org/licenses/by-sa/3.0/">CC-Attribution Share-Alike</a> license. The good bits are by <a href="http://ifelse.co.uk/">Phu Ly</a>, and the bad parts and minor WP 2.7 related changes are by <a href="about">yours truly</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/04/30/simpla-2-01-version/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/04/30/simpla-2-01-version/</feedburner:origLink></item>
		<item>
		<title>Solution to “Error starting modern compiler”</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/iLXKolmHrcs/</link>
		<comments>http://journal.tormodh.net/2009/04/21/solution-to-error-starting-modern-compiler/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 09:39:13 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[ant]]></category>

		<category><![CDATA[classpath]]></category>

		<category><![CDATA[eclipse]]></category>

		<category><![CDATA[error]]></category>

		<category><![CDATA[modern compiler]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=265</guid>
		<description><![CDATA[Right. So then I had the chance to open a old project in in eclipse today. From an old workspace. Tests still ran, code looked just as bad as  badass as before.
Running the clean-build target through ant produced a message I haven&#8217;t seen before, though.
C:\Users\tormod.haugen\workspace\PROJECT\build.xml:38: Error starting modern compiler
Luckily Google was just a browser [...]]]></description>
			<content:encoded><![CDATA[<p>Right. So then I had the chance to open a old project in in eclipse today. From an old workspace. Tests still ran, code looked just as <del>bad as</del>  badass as before.</p>
<p>Running the <code>clean-build</code> target through <code>ant</code> produced a message I haven&#8217;t seen before, though.</p>
<blockquote><p>C:\Users\tormod.haugen\workspace\PROJECT\build.xml:38: Error starting modern compiler</p></blockquote>
<p>Luckily Google was just a browser away, and I discovered through <a href="http://www.pitr.net">pitr&#8217;s blog</a> that I <a href="http://www.pitr.net/index.php/2006/12/17/error-starting-modern-compiler/">needed to update the JVM used by Eclipse</a> to the same as pointed at by <code>JAVA_HOME</code>.</p>
<p>I guess there can be more to it, and I guess you could override <code>JAVA_HOME</code> for that build, but this worked. Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/04/21/solution-to-error-starting-modern-compiler/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/04/21/solution-to-error-starting-modern-compiler/</feedburner:origLink></item>
		<item>
		<title>Java plugin in Firefox under Ubuntu 9.04</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/KW9xfvjZDaM/</link>
		<comments>http://journal.tormodh.net/2009/04/15/java-plugin-in-firefox-under-ubuntu-904/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 15:51:38 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[openjdk]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[troubleshoot]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=260</guid>
		<description><![CDATA[I needed to install a Java plugin for Firefox under Ubuntu 9.04 (beta). This didn&#8217;t happen by itself when I installed sun-java6-plugin, but a quick search showed me what Eirik Hoem found out a year ago.
Or, as Karl Trygve said in a comment; messing about in /usr is usually not a good idea - the [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to install a Java plugin for Firefox under Ubuntu 9.04 (beta). This didn&#8217;t happen by itself when I installed <code>sun-java6-plugin</code>, but a quick search showed me what <a href="http://blog.eirikhoem.net/">Eirik Hoem</a> found out <a href="http://blog.eirikhoem.net/index.php/2008/04/30/firefox-java-problem-with-ubuntu-804-solved/">a year ago</a>.</p>
<p>Or, as Karl Trygve said in a comment; <q>messing about in /usr is usually not a good idea</q> - the link could be made in <code>/usr/lib/firefox-3.0/plugins</code>, and the plugin would then be available for all users on the computer.</p>
<p>Linking the java plugin to Firefox (paths might vary a bit, depending on Java versions):</p>
<blockquote><p>
cd ~/.mozilla/firefox/.default/plugins<br />
sudo ln -s /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so
</p></blockquote>
<p>I didn&#8217;t have Icedtea installed, but I do use OpenJDK for development. Works now, at least. <img src='http://journal.tormodh.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/04/15/java-plugin-in-firefox-under-ubuntu-904/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/04/15/java-plugin-in-firefox-under-ubuntu-904/</feedburner:origLink></item>
		<item>
		<title>Simpla2 released</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/G1K1woWiX9A/</link>
		<comments>http://journal.tormodh.net/2009/01/22/simpla2-released/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 18:31:35 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[projects]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[release]]></category>

		<category><![CDATA[simpla]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=252</guid>
		<description><![CDATA[Simpla 2 is now released. I removed the display of categories and tags for pages, and that&#8217;s it. If you add widgets for Pages, Categories and Blogroll, it should look just about the same way as the original theme by Phu Ly.
It is not the one I&#8217;m using here - currently this differs in font [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/simpla2">Simpla 2</a> is now released. I removed the display of categories and tags for pages, and that&#8217;s it. If you add widgets for Pages, Categories and Blogroll, it should look just about the same way as <a href="http://ifelse.co.uk/simpla">the original theme</a> by <a href="http://ifelse.co.uk/">Phu Ly</a>.</p>
<p>It is not the one I&#8217;m using here - currently this differs in <a href="/2009/01/04/first-steps/">font size and placement of the sidebar</a>.</p>
<p>Please speak up if you have comments and/or questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/01/22/simpla2-released/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/01/22/simpla2-released/</feedburner:origLink></item>
		<item>
		<title>Promises, promises</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/qpjmtWGnvpg/</link>
		<comments>http://journal.tormodh.net/2009/01/21/promises-promises/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 11:40:45 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[Random]]></category>

		<category><![CDATA[aspire one]]></category>

		<category><![CDATA[computer]]></category>

		<category><![CDATA[trouble]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=244</guid>
		<description><![CDATA[I can only say; don&#8217;t make too many promises. I said I should blog a it more yesterday - but reality has made it so that my only working computer at home is my Aspire One, and the time I had set off for blogging and fixing up a theme download went into a drain [...]]]></description>
			<content:encoded><![CDATA[<p>I can only say; don&#8217;t make too many promises. I said I should blog a it more yesterday - but reality has made it so that my only working computer at home is my Aspire One, and the time I had set off for blogging and fixing up a theme download went into a drain marked &#8220;fix desktop computer&#8221;. Will be back.</p>
]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/01/21/promises-promises/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/01/21/promises-promises/</feedburner:origLink></item>
		<item>
		<title>Update on my Theme project</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/2tdfMBGU-Hw/</link>
		<comments>http://journal.tormodh.net/2009/01/20/update-on-my-theme-project/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 10:02:24 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[projects]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[goals]]></category>

		<category><![CDATA[simpla]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=241</guid>
		<description><![CDATA[It is now over two weeks since I said I would focus on my blog and theme. And I haven&#8217;t blogged the last week. Good start? Yes, I think so.
I haven&#8217;t done as much as I wanted to, but I wouldn&#8217;t say that much time has been lost to me switching focus. The lack of [...]]]></description>
			<content:encoded><![CDATA[<p>It is now over two weeks since I said I would focus on my blog and theme. And I haven&#8217;t blogged the last week. Good start? Yes, I think so.</p>
<p>I haven&#8217;t done as much as I wanted to, but I wouldn&#8217;t say that much time has been lost to me switching focus. The lack of updates the last week is unfortunate, though, and I should focus on getting blog posts out even if my <em>focused</em> project isn&#8217;t going forth. I&#8217;ve been spending time on other things than the blog lately, but most of that is on stuff that is more important than a project; friends, family etc.</p>
<p>I&#8217;ll drum together a package with the changes I&#8217;ve done to <a href="http://ifelse.co.uk/simpla">Simpla</a>, and make it available. It is <a title="Creative Commons: Attribution-Share Alike" href="http://creativecommons.org/licenses/by-sa/2.5/">CC licensed</a>, so it is alright. I might do more later, but the next blog/theme related project is to hack together a new look, as I have mumbled about earlier. This is not my next project.</p>
<p>I&#8217;ll blog my next focus later today, and I&#8217;ll also try and keep my updates ticking in a few times a week, at least.</p>
]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/01/20/update-on-my-theme-project/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/01/20/update-on-my-theme-project/</feedburner:origLink></item>
		<item>
		<title>Skype on Acer Aspire One</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/wZzunOurf04/</link>
		<comments>http://journal.tormodh.net/2009/01/08/skype-on-acer-aspire-one/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 20:53:30 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[aspire one]]></category>

		<category><![CDATA[computer]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=237</guid>
		<description><![CDATA[Yesterday I installed Skype on my Acer Aspire One. I did it on the Linpus Lite Distro, and it was quick and painless. Everything I had read up until yesterday had prepared me for a difficult and time consuming task. I set at it with grim persistence, though - I needed Skype, and my desktop [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I installed <a href="http://skype.com">Skype</a> on my Acer Aspire One. I did it on the Linpus Lite Distro, and it was quick and painless. Everything I had read up until yesterday had prepared me for a difficult and time consuming task. I set at it with grim persistence, though - I needed Skype, and my desktop is crashing every one or two hours now.</p>
<p>With a bit more research it all looked brighter. It seems as if Linpus is built on Fedora (6?), and then I could at least use the rpm (package) from skype.com. There still was a few troubling hints that I had to download it and install with yam - getting every prerequisite package before I could get it installed.</p>
<p>Reality was even easier than I had guessed, and about as easy as I could hope. I located the terminal and changed the root password, fixing a system menu to the right mouse button, <a href="http://www.laptopmag.com/advice/how-to/aspire-one-apps.aspx?step=1">as described by Laptop Magazine</a>. After that I downloaded the rpm package from the net - and it opened by default in the package manager. A few <q>ok</q>&#8217;s later, and it had installed all dependencies and skype itself.</p>
<p>I&#8217;m still planning on getting <a href="http://www.jonramvi.com/ubuntu-eees-new-name/">easy peasy</a> installed on it later, but I guess I&#8217;ll wait until I got time, money and inspiration to get more memory, a SD card and a bigger battery pack for it. Then I probably got a &lt; 1.0 kg computer with almost as much processing power as my aging desktop&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/01/08/skype-on-acer-aspire-one/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/01/08/skype-on-acer-aspire-one/</feedburner:origLink></item>
		<item>
		<title>Tag, you got it.</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/fJ3Me5ELlMs/</link>
		<comments>http://journal.tormodh.net/2009/01/05/tag-you-got-it/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 21:22:55 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[famfamfam]]></category>

		<category><![CDATA[icon]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[simpla]]></category>

		<category><![CDATA[tags]]></category>

		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=222</guid>
		<description><![CDATA[As you might have noticed; I&#8217;ve got a tag cloud in my sidebar. And there were no tags under the entries, and none on the single post page. That is because, as with the widgets, this is an old theme - from when the dinosaurs roamed the earth and whatnot. And tagging wasn&#8217;t in Wordpress [...]]]></description>
			<content:encoded><![CDATA[<p>As you might have noticed; I&#8217;ve got a tag cloud in my sidebar. And there were no tags under the entries, and none on the single post page. That is because, as with the widgets, this is an old theme - from when the dinosaurs roamed the earth and whatnot. And tagging wasn&#8217;t in Wordpress core.</p>
<p>I&#8217;ve quickly added the tags as a new line below the post&#8217;s category, setting a class to the span for markup, wrapping it in a div for that new line business. The change is to insert the three last lines below into <q>index.php</q> (lines 21 through 23). This fixes both the index page and the single post view, as there&#8217;s no specific markup code for single posts, pages or archives. I&#8217;ll add some beautifying code for this later, and individual templates for my own theme modification.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;">                &lt;div class=&quot;postinfo&quot;&gt;
                        &lt;span class=&quot;postedby&quot;&gt;Posted by <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
                        &lt;span class=&quot;filedto&quot;&gt;Filed in <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_category<span style="color: #009900;">&#40;</span><span style="">', '</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_post_link<span style="color: #009900;">&#40;</span><span style="">'Edit'</span><span style="color: #339933;">,</span> <span style="">' | '</span><span style="color: #339933;">,</span> <span style="">''</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
                &lt;/div&gt;
                &lt;div class=&quot;postinfo&quot;&gt;
                        &lt;span class=&quot;tagged&quot;&gt;Tagged <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_tags<span style="color: #009900;">&#40;</span><span style="">''</span><span style="color: #339933;">,</span> <span style="">', '</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
                &lt;/div&gt;</pre></td></tr></table></div>

<p>In addition, we need to add some css to style up the tags listing with an icon as the other post info. I chose the <q>page_component.gif</q> image from the same icon series as Simpla uses; the Minis from Famfamfam. Put it in the <q>/images/</q> folder in your theme&#8217;s folder and add the following code to <q>styles.css</q>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>121
122
123
124
125
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">.tagged<span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">./images/page_component.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span>;
        <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span>;
        <span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span>;
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>You can probably see that the style information of the last couple of entries in <q>styles.css</q> are very much alike? Just the file names are different. I get an urge to extract the redundant information as a separate style class, like below, and let each line with an icon get marked with two classes. This makes the file look like this from line 106:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #6666ff;">.icon</span><span style="color: #00AA00;">&#123;</span>  
        <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">3px</span>;
        <span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span>;
<span style="color: #00AA00;">&#125;</span>
.postedby<span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">./images/user.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span>;
<span style="color: #00AA00;">&#125;</span>
.filedto<span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">./images/post.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span>;
<span style="color: #00AA00;">&#125;</span>
.commentslink<span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">./images/packaged.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span>;
<span style="color: #00AA00;">&#125;</span>
.tagged<span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">./images/page_component.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span>;
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>I must now change each line with one of the above class descriptions and add <q>icon</q>. This is easy, as they are collected together in the <q>index.php</q> file. And if nothing else; it saves a tiny bit on bandwidth. Not that it is optimized for it. The programmer in me like to pull out shared information.</p>
<p>From my last change this will now look like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;">                &lt;div class=&quot;entrymeta&quot;&gt;
                &lt;div class=&quot;postinfo&quot;&gt;
                        &lt;span class=&quot;icon postedby&quot;&gt;Posted by <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
                        &lt;span class=&quot;icon filedto&quot;&gt;Filed in <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_category<span style="color: #009900;">&#40;</span><span style="">', '</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;?php</span> edit_post_link<span style="color: #009900;">&#40;</span><span style="">'Edit'</span><span style="color: #339933;">,</span> <span style="">' | '</span><span style="color: #339933;">,</span> <span style="">''</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
                &lt;/div&gt;
                &lt;div class=&quot;postinfo&quot;&gt;
                        &lt;span class=&quot;icon tagged&quot;&gt;Tagged <span style="color: #000000; font-weight: bold;">&lt;?php</span> the_tags<span style="color: #009900;">&#40;</span><span style="">''</span><span style="color: #339933;">,</span> <span style="">', '</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/span&gt;
                &lt;/div&gt;
                <span style="color: #000000; font-weight: bold;">&lt;?php</span> comments_popup_link<span style="color: #009900;">&#40;</span><span style="">'No Comments &amp;#187;'</span><span style="color: #339933;">,</span> <span style="">'1 Comment &amp;#187;'</span><span style="color: #339933;">,</span> <span style="">'% Comments &amp;#187;'</span><span style="color: #339933;">,</span> <span style="">'icon commentslink'</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
                &lt;/div&gt;</pre></td></tr></table></div>

<p>Find all four <q>icon</q> additions? The last is at the end of the <q>comments_popup_link</q> thingey. Great! I also downloaded <q>page_package.gif</q>, <q>page_tick.gif</q> and <q>page_cross.gif</q> for marking of todo lists as I was picking out the tags icon. That is something not directly connected to upgrading Simpla - and perhaps I should find or make a plugin for it. But it&#8217;s for another post.</p>
<p>Agree or disagree on method, markup, choice of icon or anything? Speak up, I&#8217;d love to hear.</p>
]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/01/05/tag-you-got-it/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/01/05/tag-you-got-it/</feedburner:origLink></item>
		<item>
		<title>Making a hole in the sidebar</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/pGfQLXCitWY/</link>
		<comments>http://journal.tormodh.net/2009/01/05/making-a-hole-in-the-sidebar/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 19:25:39 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[sidebar]]></category>

		<category><![CDATA[simpla]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[widgets]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=213</guid>
		<description><![CDATA[The next step is fixing the sidebar. As this is a pretty old theme, the sidebar is rather statically set up. It links your pages, categories and links. Nowadays these Widgets are all the rage - and it isn&#8217;t hard to set up support for them in an old theme either.
First we&#8217;ll make the sidebar [...]]]></description>
			<content:encoded><![CDATA[<p>The next step is fixing the sidebar. As this is a pretty old theme, the sidebar is rather statically set up. It links your pages, categories and links. Nowadays these Widgets are all the rage - and <a href="http://codex.wordpress.org/Widgetizing_Themes">it isn&#8217;t hard to set up</a> support for them in an old theme either.</p>
<p>First we&#8217;ll make the sidebar accept widgets. The easy, and right, way is to wrap the old sidebar in a condition saying it should be displayed if there is no support for widgets. Do it like this; insert line 2 and 15, making the code look like below:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;">&lt;div id=&quot;sidebar&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="">'dynamic_sidebar'</span><span style="color: #009900;">&#41;</span> || <span style="color: #339933;">!</span>dynamic_sidebar<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;h2&gt;Pages&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> get_settings<span style="color: #009900;">&#40;</span><span style="">'home'</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>/&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="">'title_li='</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;
&lt;h2&gt;Categories&lt;/h2&gt;
&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> wp_list_cats<span style="color: #009900;">&#40;</span><span style="">'sort_column=name&amp;optioncount=1&amp;hierarchical=0'</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;
&lt;ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> get_links_list<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/ul&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endif</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;</pre></td></tr></table></div>

<p>Here we could have made the container around sidebar into an unordered list (ul), but that would mean we&#8217;d have to have a look at the css to get things to display correctly. So instead we must do a small fix in <q>functions.php</q>. Instead of using <q>register_sidebars</q> we&#8217;ll use <q>register_sidebar</q> (plural vs. singular) with some parameters.</p>
<p>Since the <q>functions.php</q> to register dynamic sidebars in doesn&#8217;t exist, we&#8217;ll have to create it. Put it in the theme&#8217;s folder, and make it contain the following code. Be careful; no space or newlines before or after the lines of code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="">'register_sidebar'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
    register_sidebar<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="">'before_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="">'&lt;div id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;'</span><span style="color: #339933;">,</span> <span style="">'after_widget'</span> <span style="color: #339933;">=&gt;</span> <span style="">'&lt;/div&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>The before and after_widget parameters wraps each widget in a div. This wouldn&#8217;t be necessary if the dynamic sidebar call was issued from inside an unordered list (ul), as the default values produces list elements (li).</p>
<p>Now the only task left is to go into the widget page (in the blog administration) and add what you want. I suggest Pages, Categories and Links if you want to keep the feel of Simpla, as it were. Keep tuned for more.</p>
<p>Anything you want to add, ask or tell? Feel free. <img src='http://journal.tormodh.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/01/05/making-a-hole-in-the-sidebar/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/01/05/making-a-hole-in-the-sidebar/</feedburner:origLink></item>
		<item>
		<title>First steps</title>
		<link>http://feedproxy.google.com/~r/tormodh/~3/t2d0GWuZPpY/</link>
		<comments>http://journal.tormodh.net/2009/01/04/first-steps/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 19:04:45 +0000</pubDate>
		<dc:creator>Tormod Haugen</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[code]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[sidebar]]></category>

		<category><![CDATA[simpla]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[troubleshoot]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://journal.tormodh.net/?p=187</guid>
		<description><![CDATA[I&#8217;ve begun making some small changes to the Simpla Theme, in order to get something looking *just* like I want. I&#8217;ll share my changes, and also the code if somebody asks for it. For now this is filed as work in progress. And there will be progress.
Here are the things I did to change the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve begun making some small changes to the Simpla Theme, in order to get something looking *just* like I want. I&#8217;ll share my changes, and also the code if somebody asks for it. For now this is filed as work in progress. And there will be progress.</p>
<p>Here are the things I did to change the theme as it looks now (2009-01-04T20:59:12+01:00). Increase / change font size and screen real estate. Flip the sidebar to the left. Fix logout from near comment field. I&#8217;d love to hear if you like / dislike the changes.</p>
<h4>Change font size</h4>
<p>First order of business is to increase the text size, because I&#8217;ve seen what it helps on some devices. The code changes are from:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span>   
        <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">./images/bg.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-x</span>;
        <span style="color: #000000; font-weight: bold;">border-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#333</span>;
        <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#555</span>;
        <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span> Georgia<span style="color: #00AA00;">,</span> <span style="color: #ff0000;">&quot;Times New Roman&quot;</span><span style="color: #00AA00;">,</span> Times<span style="color: #00AA00;">,</span> <span style="color: #993333;">serif</span>;
        <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">62.5</span>%</span>;
        <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1.5</span>;
        <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span>0;
        <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span>0;
        <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span>;
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>Change relevant line to the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>18
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">12pt</span>;</pre></td></tr></table></div>

<p>Then remove lines 30 and 36 from the following block:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #cc00cc;">#wrap</span><span style="color: #00AA00;">&#123;</span>  
        <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span>0 <span style="color: #993333;">auto</span>;
        <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span>;
        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">76em</span>;
<span style="color: #00AA00;">&#125;</span>
<span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2em</span>;
        <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span>;
        <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">1em</span>;
        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">40em</span>;
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#sidebar</span><span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.1em</span>;
        <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span>;
        <span style="color: #000000; font-weight: bold;">padding-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">2em</span>;
        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">20em</span>;
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>That is, these line should be removed:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>30
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.2em</span>;</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>36
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1.1em</span>;</pre></td></tr></table></div>

<p>These font-size changes means that we have to redistribute a bit of space in the content area. Change line 24, 33 and 39 from above to the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>24
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">max-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">80em</span>;</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>33
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">70</span>%</span>;</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>39
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">25</span>%</span>;</pre></td></tr></table></div>

<h4>Flip sidebar to the left hand side</h4>
<p>Next step is to flip the sidebar to the left hand side, just because I can. Change line 30 (or 31 if you didn&#8217;t change the font-size like above from the first block of code) to the next line:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>29
30
31
32
33
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #cc00cc;">#content</span><span style="color: #00AA00;">&#123;</span>
        <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span>;
        <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">1em</span>;
        <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">70</span>%</span>;
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>30
</pre></td><td class="code"><pre class="css css" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span>;</pre></td></tr></table></div>

<h4>Minor fixes needed for Wordpress 2.7</h4>
<p>Logout link in <q>comment.php</q> needed updating because of the new security measures in Wordpress. If this isn&#8217;t done, you won&#8217;t be able to log out from the link beside the comment field. Find and replace first block of code with the second block of code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>76
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;">&lt;p&gt;Logged in as &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="">'siteurl'</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/profile.php&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$user_identity</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;. &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="">'siteurl'</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-login.php?action=logout&quot; title=&quot;Log out of this account&quot;&gt;Logout &amp;raquo;&lt;/a&gt;&lt;/p&gt;</pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>76
</pre></td><td class="code"><pre class="php php" style="font-family:monospace;">&lt;p&gt;Logged in as &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> get_option<span style="color: #009900;">&#40;</span><span style="">'siteurl'</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>/wp-admin/profile.php&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$user_identity</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/a&gt;. &lt;a href=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> wp_logout_url<span style="color: #009900;">&#40;</span>get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>; <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; title=&quot;Log out of this account&quot;&gt;Log out &amp;raquo;&lt;/a&gt;&lt;/p&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://journal.tormodh.net/2009/01/04/first-steps/feed/</wfw:commentRss>
		<feedburner:origLink>http://journal.tormodh.net/2009/01/04/first-steps/</feedburner:origLink></item>
	</channel>
</rss>
