Matt Gemmell

CHANGER is available now!

An action-thriller novel — book 1 in the KESTREL series.

★★★★★ — Amazon

Thistle ListCats

development 1 min read

Some further improvements today to Thistle's version of the ListCats module (which shows a list of all the 
categories in your blog).
As <a href="">mentioned previously</a>, 
Thistle's category-list display is now hierarchical. Today, I've made a couple of further improvements:
  • We now show only the appropriate segments of paths hierarchically. In other words, instead of having "dev" at the main level, and then "dev/thistle" indented below it, we now have just "thistle" indented below "dev". The way it should be.
    Here's a screenshot.
  • When display-names are enabled, we now do a case-insensitive sort, so that if you have some categories with no display-name, they sort where you would expect them to (e.g. an "email" category with no display-name sorts between categories with display-names "Development" and "My Diary"). PHP's default sorting behaviour would sort uppercase first instead.
    Here's a screenshot (same category-list as previous screenshot, but with Thistle's display-names feature enabled).
Naturally, you can customise the level of indenting, what HTML to use for indents, what HTML to use as a "bullet", and so on.


I was also looking through Robert's old "To Do" list of potential features for PHPosxom (which he gave to me via iChat the other day, 
<a href="">as he mentions here</a>), and I realised that 
Thistle already does a couple of them. Specifically:
  • Quotes/Fortune (and similar functions) - Just take any appropriate PHP script, and put it in the category-info file for whatever category you want to display the quotes/whatever on. Enable $process_cat_info, and you're away. This works for any PHP script at all, from Hello World right up to fancy MySQL-integration trickery. Think what you could do™. ;)
  • RecentEntries - Alexis Drogoul already wrote this, as I mentioned previously. A version of his module is included with Thistle.

Alexis is <a href="">getting impatient</a> for a downloadable version, 
so I'm also working on putting together an alpha distribution for adventurous types 
to play with. I will also hopefully have Thistle running here on the site somewhere (probably not taking over this blog just yet, though) sometime 
before the end of the week.

Then on Monday (24th March), Fiona and I are off to Gran Canaria for two weeks - during which time I'll not even have net access, 
much less my PowerBook!