Design

Freebird Theme for Chyrp

Chyrp is a new blogging engine designed to be lightweight yet customizable, and it claims that it “destroys the fine line separating a blog and a tumblelog.” Sounds okay to me. The demo is available here, although some of the functionality has been disabled due to Digg Effect (591 diggs so far, in case someone’s interested).

Anyways, I’m not here to write a review about the engine. Not yet. Instead, after reading about Chryp a little, I decided to learn and find out how the theme system works. While I obviously can’t claim that I have completely mastered the art of Chyrp theme creation, this is what I came up with.

Introducing Freebird, a Chyrp Theme

Free Image Hosting at www.ImageShack.us

This one’s a simple, tumblelog-flavored theme with relatively narrow width and minimal decoration so that your content remains the focus of the site. The screenshot above does not show the admin bar, for which you will need to install Chyrp and use this theme to find out.

Interested? Download Freebird, completely free.

Credits and Stuff

  • The name Freebird is taken from a song by YUI (not to be confused with the Yahoo! UI Library).
  • The background pattern is modified from one pattern made by Squidfingers. Squidfingers’ patterns rock.
  • Icons are from Brand Spanking New’s Mini Icons v2, which by the way is an awesome, free, iconset.
  • Most PHP files inside the theme are copied directly from Chyrp Default, modified here and there to fit.
  • This theme is licensed under GPL.

Conclusion

I plan to create a separate post to discuss more about Chyrp, including how the theme system works, so this part will not be too comprehensive. In short, I find myself grinning a lot while working on Freebird. The theme system is indeed powerful and highly modifiable, and it’s been quite a fun little project to work on. There’s only one page of documentation, but it’s really quite intuitive once you dig into the theme files.

So, this is where I leave you to play around with the new theme. Have fun!

4 Responses

WordPress

WordPress 2.5, Backend Redesign, and Happy Cog

So the news is out that the next version of WordPress, 2.4, is not going to happen. Instead, we will immediately get 2.5 by March 2008. Following the links, I got to read that one of the most anticipated update for the next version is that the backend will be redesigned.

Now, that is big. I don’t think it’s an understatement to say that there are hundreds of thousands of people utilizing the WordPress admin everyday. Scratch that. Matt said that the Presentation page in the wordpress.com backend got 2.4 million pageviews by October 2007. On just the Presentation page. Without counting the self-hosted installation.

In other words, there is a huge number of people who have familiarized themselves with the current backend design. If you’re going to redesign it, this is a big task.

And then I found out at wp-hacker mailing list archives that Happy Cog is doing the redesign.

Happy freakin’ Cog. Wow.

Think of this, an open-source project hiring the web agency headed by the King of Web Standards himself to redesign the backend design. If you haven’t heard of them, Happy Cog is to web design the way Liquid Tension Experiment to progressive rock scene. In a word, a supergroup.

More evidence about this fact could be found at the WordCamp site and also hinted at Liz Danzico’s blog. Liz is the information architect, usability analyst and editor at Happy Cog.

Now, this is a wonderful move by WordPress. For a task this big, they have chosen to do the right thing: get the professional to tackle it. I’m not sure if the redesigned admin demo here is the one made by Happy Cog or not, but since Matt said that it’s probably around 10%-20% of the real thing, it’s best to save the comments for now.

All in all, it’s a great news. I’m so going to learn and tinker and tear it apart once it shipped. Now, for the painful task of waiting until March…

PS: If you want to dig around more on the wp-hackers archives about Happy Cog’s involvement, this might be a good start (it’s a Google search because the archives page itself does not have a search functionality).

2 Responses

Design, WordPress

Decluttering WordPress Theme’s Sidebar Widget Code

The usual code for a widget-enabled sidebar goes like this:

<div id="sidebar">
  <ul>
    <li id="pages" class="widget widget_pages">
      <h2 class="widgettitle">Pages</h2>
      <ul>
      <li class="page_item page-item-2"><a href="http://url/?page_id=2" title="About">About</a></li>
		  <li class="page_item page-item-2"><a href="http://url/?page_id=2" title="About">Contact</a></li>
      </ul>
    </li>

    <li id="categories-1" class="widget widget_categories">
      <h2 class="widgettitle">Categories</h2>
      <ul>
      <li class="cat-item cat-item-3"><a href="http://url/?cat=3" title="View all posts filed under Asides">Asides</a></li>
      <li class="cat-item cat-item-1"><a href="http://url/?cat=1" title="View all posts filed under Uncategorized">Uncategorized</a></li>
      </ul>
    </li>
  </ul>
</div>

This is where I begin to wonder. Why do widgets go into an unordered list? Semantically, it’s possible to argue that the sidebar is actually a list of widgets, therefore the usage of the <ul> tag. But with that same logic, the content area of a blog is basically just a list of posts. Yet I never found any theme placing each post inside an <li> tag. Have you?

This is what Automattic has to say on this, emphasis mine:

Notice that the entire sidebar is an unordered list and the titles are in <h2> tags. Not every theme is built this way and it’s not necessary to do so, but it’s currently the most common sidebar markup in the themes we surveyed so we adopted it. The element with id=”links” is the equivalent of one basic widget.

So, I assume that this practice date back before WP Widgets is created, and is simply picked for compatibility reasons (so that it’s easy to convert already-made themes to be widget-ready). But that does not mean it is still necessary for new themes, I believe.

If you take a look at some of the more well-known web designers’ code, you’ll see that they don’t do this on their sidebar. While none of these examples actually used WordPress widget on their site, but does that matter? Widgets or plain old hardcoded PHP, we’re simply talking about items (or sections, contents) on the sidebar, right?

The last thing that also bothered me is that the usual code above looked so cluttered. Tag soup, anyone? Nested <ul>’s and everything. They’re actually quite difficult to follow, and I don’t see a reason why something simpler can’t be achieved yet still be semantically okay. Something like this, for instance:

<div id="sidebar">
  <div id="pages" class="widget widget_pages">
    <h2 class="widgettitle">Pages</h2>
    <ul>
      <li class="page_item page-item-2"><a href="http://url/?page_id=2" title="About">About</a></li>
    </ul>
  </div>

  <div id="categories-1" class="widget widget_categories">
    <h2 class="widgettitle">Categories</h2>
    <ul>
      <li class="cat-item cat-item-3"><a href="http://url/?cat=3" title="View all posts filed under Asides">Asides</a></li>
      <li class="cat-item cat-item-1"><a href="http://url/?cat=1" title="View all posts filed under Uncategorized">Uncategorized</a></li>
    </ul>
  </div>
</div>

Mm. Tasty.

And So We Bump into Troubles…

By default, the value for the function register_sidebar (consult Widgets API docs page for more info) are these:

$p = array(
  'before_widget' => '<li id="%1$s" class="widget %2$s">',
  'after_widget' => "</li>/n",
  'before_title' => '<h2 class="widgettitle">',
  'after_title' => "</h2>/n"
);

register_sidebars(1, $p);

In other words, the built-in Widgets code is to put each of them inside an <li>. To fix this, we do it this way:

$p = array(
  'before_widget' => '<div id="%1$s" class="widget %2$s">',
  'after_widget' => "</div>/n",
  'before_title' => '<h2 class="widgettitle">',
  'after_title' => "</h2>/n"
);

register_sidebars(1, $p);

And to set-up the Widgets area inside sidebar.php, simply use the code:

<div id="sidebar">
  <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
  // static code here
  <?php endif; ?>
</div>

And that’s it. Simple changes, much lovely code. Thoughts?

4 Responses

WordPress

Upgrading WordPress the “Sneaky” Way

WordPress 2.3.2 is out, and we’ve just recently upgraded this site accordingly. The list of bug fixes can be checked here.

Standard Upgrade Procedure

The usual upgrading process goes like this:

  1. Backup everything in your site (files and MySQL DB).
  2. Deactivate plugins.
  3. Get the latest WordPress files and overwrite the old files. Deleting first instead of overwriting is also encouraged.
  4. Visit the wp-admin/upgrade.php page to auto-upgrade the database structure.
  5. Check permalinks structure and update .htaccess if necessary.
  6. Reactivate all plugins.
  7. Done.

The Sneaky Way

Now, just as an experiment, I tried another way to upgrade this install my way. As a disclaimer, I don’t recommend anyone to try this. It’s just an experiment, mmkay?

So, this is what I do:

  1. Backup everything.
  2. Deactivate plugins.
  3. Download the latest WordPress files.
  4. Overwrite only the files changed from previous version. The list of revised files for this version can be found both here or from the WordPress Trac diff here. For future versions, I’m sure the changed files will be mentioned as well.
  5. Visit the wp-admin/upgrade.php page to auto-upgrade the database structure.
  6. Permalinks and .htaccess shouldn’t get changed I’m sure. Heck, I didn’t overwrite it! But it’s always a good thing to check.
  7. Reactivate all plugins.
  8. Done.

Everything seems to be doing fine after I did this. Well, you can read this, can’t you?

Pro and Cons

Pro:

  • Good if your connection is slow. Only upload a few files instead of the entire WordPress files.
  • Can learn the inner workings of WordPress a little more.
  • It’s a bit more risky and challenging, if you’re into that sort of thing.

Cons:

  • Must be extra careful when overwriting. Gotta have the correct files to upload.
  • It’s a bit more risky and challenging, if you’re against that sort of thing.

Other Notes

  • After reactivating WordPress Stats plugin, it asked me to input my WP API Key again. This bugged me a bit, afraid that my old stats is already gone. After entering the API Key again, I found that the stats does not duplicate (i.e.: it seems to resume the previous stats), so hopefully nothing goes wrong. I will need to check more whether the traffic actually updates or not (note: the Stats get updated about once in 3 minutes—although my personal experience says 10 minutes).
    UPDATE:The Stats plugin works. So, it seems that the key re-entering thing does not break anything.
  • Also note that Akismet does not ask for API Key upon reactivating. Hello, Automattic?
  • It would be a good idea to use Maintenance Mode plugin during the upgrade process. We apologize for any weirdness you get during our recent upgrading attempt.

1 Response

Lexicon

Lexicon: Breadcrumb

In this new Lexicon category, we will try to explain various web design terms in a collection of short, easy to understand articles. This is our first entry. Have fun learning with us!

Breadcrumb

In the science of web accessibility, breadcrumb is a form of navigation links designed to show user their current location inside a website. This is an example from Yahoo! Directory:

Sample image of breadcrumb navigation

Also notice that the breadcrumb structure is similar with the URL format:

The page's URL matches the breadcrumb structure

All items in the breadcrumb is hyperlinked, except for the current page, which is bolded to emphasize the “you are here effect”. For maximum effect, the breadcrumb is better placed on the top area of the page. And, if the page is quite long, placing another breadcrumb at the bottom is also a good idea.

The term “breadcrumb” came from the story Hansel and Gretel, where they left a trail of breadcrumbs to help them return back to home. Their breadcrumbs were then eaten by animals, causing them to get lost, but that’s another story.

Leave a response

Asides

End of Netscape

New announcement regarding the fate of Netscape Navigator. We don’t really use Netscape much, but if it means less browser to check compatibility issues with, we’re pretty much happy about it.

Leave a response

Asides

The Magazineer

The Magazineer

A blog for people who love, and make, magazines. Powered by WordPress. With an absolutely gorgeous theme.

Leave a response

Page 7 of 9← First...56789

Hello!

My name is Hafiz Rahman. I do standards-based web design and WordPress works. I'm open for new projects, and here's where you can contact me.