Simpla 2 - 0.1 version

April 30th, 2009

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 license. The good bits are by Phu Ly, and the bad parts and minor WP 2.7 related changes are by yours truly).

Simpla2 released

January 22nd, 2009

Simpla 2 is now released. I removed the display of categories and tags for pages, and that’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’m using here - currently this differs in font size and placement of the sidebar.

Please speak up if you have comments and/or questions.

Making a hole in the sidebar

January 5th, 2009

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’t hard to set up support for them in an old theme either.

First we’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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<div id="sidebar">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
<h2>Pages</h2>
<ul>
<li><a href="<?php echo get_settings('home'); ?>/">Home</a></li>
<?php wp_list_pages('title_li='); ?>
</ul>
<h2>Categories</h2>
<ul>
<?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?>
</ul>
<ul>
<?php get_links_list(); ?>
</ul>
<?php endif; ?>
</div>

Here we could have made the container around sidebar into an unordered list (ul), but that would mean we’d have to have a look at the css to get things to display correctly. So instead we must do a small fix in functions.php. Instead of using register_sidebars we’ll use register_sidebar (plural vs. singular) with some parameters.

Since the functions.php to register dynamic sidebars in doesn’t exist, we’ll have to create it. Put it in the theme’s folder, and make it contain the following code. Be careful; no space or newlines before or after the lines of code:

1
2
3
4
<?php
if ( function_exists('register_sidebar') )
    register_sidebar(array('before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>'));
?>

The before and after_widget parameters wraps each widget in a div. This wouldn’t be necessary if the dynamic sidebar call was issued from inside an unordered list (ul), as the default values produces list elements (li).

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.

Anything you want to add, ask or tell? Feel free. :)

First steps

January 4th, 2009

I’ve begun making some small changes to the Simpla Theme, in order to get something looking *just* like I want. I’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 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’d love to hear if you like / dislike the changes.

Change font size

First order of business is to increase the text size, because I’ve seen what it helps on some devices. The code changes are from:

13
14
15
16
17
18
19
20
21
22
23
body{   
        background:#fff url(./images/bg.png) repeat-x;
        border-top:5px solid #333;
        color:#555;
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size:62.5%;
        line-height:1.5;
        margin:0;
        padding:0;
        text-align:center;
}

Change relevant line to the following:

18
        font-size:12pt;

Then remove lines 30 and 36 from the following block:

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#wrap{  
        margin:0 auto;
        text-align:left;
        width:76em;
}
content{
        font-size:1.2em;
        float:left;
        padding:1em;
        width:40em;
}
#sidebar{
        font-size:1.1em;
        float:right;
        padding-top:2em;
        width:20em;
}

That is, these line should be removed:

30
        font-size:1.2em;
36
        font-size:1.1em;

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:

24
        max-width:80em;
33
        width:70%;
39
        width:25%;

Flip sidebar to the left hand side

Next step is to flip the sidebar to the left hand side, just because I can. Change line 30 (or 31 if you didn’t change the font-size like above from the first block of code) to the next line:

29
30
31
32
33
#content{
        float:left;
        padding:1em;
        width:70%;
}
30
        float:right;

Minor fixes needed for Wordpress 2.7

Logout link in comment.php needed updating because of the new security measures in Wordpress. If this isn’t done, you won’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:

76
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout &raquo;</a></p>
76
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>

Start of a new year

January 4th, 2009

Then there was a new year. I mentioned, at the end of last year, that I wanted to structure my personal projects a bit more, to actually get something out of the time I spent on them. And not, like usually, jump from one to the next without getting anything done.

In that respect I plan on getting this blog re-themed. I’m jumping to the Simpla theme, and I will be documenting my changes through the process of making it my own. I’ll try and preserve some of the touches of my current theme, inspired by Hemingway for Wordpress. This will be my focus for the next two weeks. No other major project will be worked on during that period.

Two other announcements are; My two month goal is to get the blog up and running nicely again, with at least three posts each week. I need this practise in writing, and I also see that in it’s current state this blog leave much to be desired in terms of content. I’ll try and get something good going here, and would love feedback in the time ahead - if nothing more than a quick comment or a word on twitter.

The other minor thing is that my goal for 2009 is to get better at languages. I’ll try and get from a skill level of nothing and up to awful in Japanese. Why that one? I have a few reasons, the most important is that I like its sound. Or rather, acquaintances of mine has rekindled my interest. I was looking for evening classes, but they sadly fall in on the same days and time that my SO is attending choir practise this spring. I’ll go for the cd/workbook courses, and hope to report on my progress as I improve. Don’t expect anything the next two weeks, though - I’m working on my blog… ;)

I wrote about OpenID a while ago, but it seems as if that might have been before this instance of my journal. The entry is probably lost in transit backup. Restoring the past is on my todo list. It is a long list. It is a long list.

On that list were my plan to get the ability to identifying while commenting on this journal &emdash; identifying yourself with OpenID. I have the ability to identify myself with my domain. When I am out there commenting wildly (which I don’t do… sorry), I identify myself with tormodh.net. That is quite powerful. And it was unfair.

Now you can do it at my place. Hopefully… and fair.
Read the rest of this entry »

Some Hemingway hacks

March 29th, 2007

Thanks to some feedback I’ve been made aware of some errors in the hacks I’ve presented at the warpspire forum. This should be fixed now. To make your Hemingway installation work more like mine, check out the links at my Hemingway modification page.

Demagnetized tweaking

March 15th, 2007

I’ve committed myself, sort of, to make a theme based upon Kyle’s simple, but striking, Hemingway theme. I find that the design is good, and the Ideas are great - but the details and code could do with a makeover. I guess that is what Kyle thought, too, as the last released version of Hemingway was dubbed 0.19.

Yesterday I got the Single Post and Comment templates looking about as I want them, and I also removed most of the code in functions.php. The sidebar at the bottom now takes Widgets, but needs some work on styling.

Feel free to browse around, and please tell me if something shows up not quite right. I won’t release anything just right, but I do answer questions regarding the tweaking of Hemingway over at the forums (not mine; they are for the original Hemingway theme).

Hemingway for Wordpress

March 6th, 2007

I’ve recently changed theme here, and the choice fell on Hemingway by Kyle Neath. It has seen some time since release, but it is simple looking (which is a good thing), the code is clean and hopefully easy to tinker with. (I’m making my own loosely based on this.)

The forums have been down for quite a time, and doesn’t show signs of returning.

My design at this blog is deviating more and more from the Hemingway theme look - but if there is any aspect of it you’re wondering about; ask me in the comments. I’ll remove this notice, and fix up a link if I get around to make a theme download or something.

I quickly got some trouble with how to display more than two posts at the front page, but (as others probably have) solved them quickly. I also did a quick hack on how to display more than two posts on each row, but I won’t be using that style myself. I’ll try and tinker with this theme on my own, but seeing as Kyle did promise (in November 2006) to release a new and improved version … soon, I won’t put too much work in it.

I’ll try and write up changes I do and post them here in this journal, or at the forums. That’ll hopefully make me put some effort into making them not too hackish.