Redesign - Part 1

As you may have noticed I am redesigning the site a bit. In this little series I will be posting some tips and tricks how certain things get done here.

You may have noticed the addition of a third column — or rather a second sidebar. This was done by utilizing a variant of k2 called “3 Column K2“. In these sidebars I have chosen to actually use the widgets for adding and customizing stuff (rather than editing the source files as I did in my previous attempts of adapting k2 to my needs).

Also you might find that little entry from my last.fm journal interesting. It got placed there via a php-widget with the following code (thanks to Jeriko One for the code):

<h2 class=widgettitle><a href=http://www.last.fm/user/dekay/journal/ 
    title=Syndicate as RSS>last.fm journal</a></h2>
<span class=metalink>
    <img src=http://www.last.fm/favicon.ico alt=RSS />
</span>
<?php require_once (ABSPATH . WPINC . /rss-functions.php); ?>
<?php $today = current_time(mysql, 1); ?>
<?php
$rss = @fetch_rss(http://ws.audioscrobbler.com/1.0/user/dekay/journals.rss);
if ( isset($rss->items) && 0 != count($rss->items) ) { ?>
<ul>
    <?php
    $rss->items = array_slice($rss->items, 0, 1);
    foreach ($rss->items as $item ) {
        ?>
    <li>
        <a href=<?php echo wp_filter_kses($item['link']); ?>>
        <?php echo wp_specialchars($item['title']); ?></a> <br/>
        <small><?php echo human_time_diff( strtotime($item[’pubdate’], time())); _e(’ago’); ?>
        </small><br/>
        <?php echo  _e($item['description']) ?>
    </li>

    <?php
    }
}
    ?>
</ul>

The above source code display with all its color coding glory was produced by textmate, theme by Thomas Aylott — even though it seems not all color markups make it.

3 Responses to “Redesign - Part 1”


  1. 1 Kutti

    Wie wäre es mit einem neuen Theme? (K2 nervt mich so langsam auch auf meinem Blog) :/

  2. 2 dekay

    Wie du siehst arbeite ich dran. K2 ist ja mehr als nur ein Theme… jetzt ist halt CSS-Arbeit gefragt ;)

  3. 3 dekay

    …und das ist zeitaufwändig, leider ;( Hab grad auf WP 2.2 geupdated und da gingen plötzlich die K2-Widgets nicht mehr… jetzt sind zumindest die widgets über WP im System, naja. Demnächst mehr von der CSS front, hoffe ich.

Leave a Reply