SDJLs new theme

I had a little play around with creating my own look for K2 late last night. Whilst I’m not 100% satisfied with the look at the moment, I think it’s a darn sight better than the previous bog standard look I had going on.

The most notable changes are the resized header and overall font size. I didn’t mind the smaller fonts until last night when I played around with font sizes in Firebug. I think the slightly larger size makes content easier to read and overall presentation looks nicer.

Obviously, if you’re reading this through my RSS feed then you’re not going to be seeing the new looks. Come by and have a little look and see what you think!


After a long lull of no new style for the website, I decided to change it today.
I used to use K2 some while back and had a few issues with it, but I decided to give it another try.

There a lot of new features integrated into K2 now and I’m quite impressed so far. There are a few things I still need to tweak, but I’m off out to work in a bit, so I’ll fiddle with those later!
So yeah, enjoy the new old look!


I’ve been working on a 404 error page for the theme that I use here, Subtle.

I wanted to add error page support to the theme so I could utilise the error tracker plugin for Mint and also get search engines to adjust their listings for the website.

I wrote a funky bit of PHP code, which was inspired by A List Aparts: The Perfect 404 post.
What it does is look for a referral from a listed search engine and then get the keywords used in the search. It then assigns those keywords to the variable $new_search . That variable can then be used to populate your own search form.

< ?php
// Here we do some intelligent search engine 404 checking
// This allows us to show some links to possible relevant content
 
if(strlen($_SERVER['HTTP_REFERER']) > 0) {
 
    // We have a referer value somewhere
    // Look for a search engine query
    $engines = array('google.co', 'looksmart.co', 'altavista.co', 'msn.co', 'yahoo.co');
    for($I = 0; $I < count($engines); $I++) {
        $found = strstr($_SERVER['HTTP_REFERER'], $engines[$I]);
    }
    if(strlen($found) > 0) {
 
        // We have a search engine..
        // Split the referal up to get query used
        $query = explode('?', $found);
        $parts = explode('&', $query[1]);
        $part_count = count($parts);
 
        // Find specific search terms based on differing search engines
        $style = array('q=', 'p=', 'ask=', 'key=');
        $style_count = count($style);
 
        // start by looping through the URL parts
        for($s = 0; $s < $part_count; $s++) {
 
            // Match url parts against search query types
            for($t = 0; $t < $style_count; $t++) {
                $terms = strstr($parts[$s], $style[$t]);
                if($terms == true) {
 
                    // finish loop as we've found what we need
                    $s += $part_count;
                    $t += $style_count;
                    $terms = explode('=', $terms);
                }
            }
        }
        // Search terms to echo in the search box
        $new_search = str_replace('+', ' ', $terms[1]);
    }
}
?>

I’m sure the code could be tidied up a bit, but it does its job. Feel free to use it for your purposes!


Today has been quite constructive.
I’ve had plenty of time to have a fiddle with this layout and get a few things installed that i’ve wanted to get on here for a long time.

The most noteable change is the archive page. I’ve added a tag cloud or a keyword system which means you can see how frequently a certain keyword is posted to. It’s a different way to search posts, based on how popular keywords are. It’s a little more work for me as i have to add some keywords to another field when making a post, but it’s something i plan on getting used to.
I’ve also re-enabled the live archive, which can be found at the bottom of the archives page. It’s slightly more beautiful than the built in WordPress archive listing features, so i thought i’d run with it for a while to see how it pans out.

This design isn’t actually my creation, it’s a freely available theme create by Glued Ideas. However, much like K2 it provides a way to skin a pre-made layout, which is what i’m after at the moment.
I plan on tweaking a few bits here and there and then start work on my own theme for this layout, so hopefully i’ll get something that feels a little more personalised.

lotsa emails this way!