Fancy category list plugin for wordpress

An updated version of the plugin is now available with the links fixed

I’m in the process of putting together websites for the students to use this coming academic year and one of the things I wanted to try was a beatblog similar to the Everyblock style of site. So I’ve been playing around with wordpress and various plugins to build a site that is organised by ward and displays stories on a map. The idea being that it gets students playing with tags, geotags etc as well as helping them see how this kind of thing can be helpful for finding stories within their community (a skill much desired by the industry)

I’ll post more about my thinking and the practical process of the site as it beds in. But in the process of putting the site together I had a go at building a plugin (extra functionality for wordpress) which I thought I would share.

I’m a fan of the layout of Everyblock. It’s a great design. I particullay like the way they display the number of posts as a percentage of the total in a section with a neat bar graph kind of thing. It’s a quick way to pick out busy sections.

A visual guide to popular sections

A visual guide to popular sections from everyblock

So I thought ‘I’d like a bit of that kind of thing on the beatblog’.

With a bit of digging around I found a great tutorial by Wilson Miner, designer and co-founder of EveryBlock, on how those lists where made using CSS and ordinary html lists. Worth a look.

Having got it working within WordPress (a good deal of template bashing later) I thought it would be a perfect snippet to try and make in to a widget so that I didn’t need to hard code it in to the pages. Which, thanks to a great tutorial by Tim Trott on how to make wordpress widgets, I have done.

The fancy category list widget

The fancy category list widget

And in the spirit of these things,  here it is for you to try if you want to.

You can see it in action here (warning:this site is under development so don’t be alarmed if it looks odd)

How to install

The file contains a folder called fancycatlist. Put the whole folder and its contents to the plugin directory of your wordpress isntall and then activate the plugin in your wordpress back-end.

The folder contains two files. The actual plugin file (fancycatlist.php) and the style sheet that does most of the layout work for the list (fancycatlist.css). If you want to make major changes to the look and feel it’s the css file you want to be tweaking

Once it is installed you’ll find that you have a new widget called Fancy category list.  It’s meant to be used in the sidebar.

Settings

The widget has a number of settings

  • List title: This appears above the list in the Leave it blank and nothing is displayed.
  • Parent category ID: This restricts the list to show the categories in a parent category. So in my install I have all the ward categories under a parent category called Wards. Leaving this blank will list all the categories on the site that have a post assigned. Empty categories don’t show up.
  • Style information: These boxes allow you to customise some of the look and feel. You can change the colour of the category text, the bar behind , the number of posts and the roll-over colour.

Pretty straightforward I think.

The result is something like this

The fancy Category list

The fancy Category list

How it works

The plugin works by counting the number of posts published on your blog and then working out what percentage each category accounts for to generate the bar.  It then generates a standard list of the results and applies the CSS required to make it look nice. So the truth is that its not entirely accurate to the section (especially if you use the parent setting) but I needed a ‘grand total number’ to work with.

What’s next

To be honest probably nothing. If I was to take it any further it would probably be to give the option of it displaying little sparkline style graphs. It could also do with setting up so that you could have multiple instances of the list and a few more settings. I’m also sure that the CSS would have some proper hackers spinning on their chairs. But it works for me and it looks not-to-bad on most installs.

If you get some use out of it or change it, let me know. It may not say it in the files but the stuff is there for you to do with what you will. If you make millions off of it then rememeber me in your will.

Notes etc:

Notice I said ” can be helpful” when talking about using the web to help cover communities. I don’t think it’s a replacement. No one in their right mind does. So please don’t hassle me about killing traditional reporting.

If enough people are interested I can write a post about how I made the actual plugin. But I have to say that everything I learned came from Tim’s post.

Top Gear on WordPress

Last in my (just invented) Day’o'screengrabs. Those of you using wordpress may have seen, via the dashboard, that Top Gear (the show and magazine) are using wordpress for their web presence. Cue a lot of comments from Toyota driving reps.

From the screengrab above you can see that they haven’t quite got the excerpts sorted yet but it looks good.

Just in case you think Clarkson has goen green and is recycling old posts, don’t panic. It’s just the excerpts.

Zemanta Pixie

Come and sit at my table – RSS and serendipity

One of things about wordpress that is interesting and annoying in equal measure is the dashboard. For those who don’t wordpress: it’s the front page of the admin area.It’s got some useful stuff on there. But it is, for the most part, a feed for WordPress news stories.
Now I often find myself clicking on them as they point to new plugins or bug fixes ( a fact of life with open source software) and one I link I will often click to is Matt Mullenweg who actually created worsdpress.

Why tell you this. Well on his blog he has a syndicate section with all the usual RSS stuff. But he also has the following:

How do I feel about syndication? A long time ago Jeffrey Zeldman said something to this effect:
Q: If you offered an RSS feed, I could read your stuff without visiting your site.
A: If you stored your groceries on the sidewalk, we could eat your food without sitting across the table from you.
I’m not going to force you to, but come sit at my table and we can have jolly good time. There is so much on this site that by its very nature will never be available in syndicated format. Come for the words, stay for the pictures, jazz quotes, and useless contemporia.

Does that make me want to cut my feeds or hack them back so that you need to visit the site to read the full story. No. I know it’s an important way to consume information. But when many MSM organisatiosn are re-positioning themselves as the community hub – the big dinner table- it does make me think. Especially if, as some have predicted, the homepage is dead.

We need to work a little harder at how our RSS feeds work.

Really simple serendipity

One of the joys of a newspaper is the serendipity of news. For every story we want to read we may find one we didn’t know about that is equally interesting.

Feeds aren’t like that. They are usually automated, organised and published with structure in mind. I get a news feed or a specific sports feed.

Perhaps what we need to do is start peppering our news feeds with other content. maybe we just need to syndicate everything ? I’m not sure.

I think our news feeds need to stay organised (that’s how people use them) but maybe they are too much about the contents of our fridge at the moment. Maybe we need to think of them more like menus with free samples (and before the word free is misinterpreted, no that doesn’t mean I support pay walls) to entice people in to sit at our tables.

That means we need to know even more about our audience. After all you don’t want just anyone eating at your table.

WordPress as a cms for journalists

Alf Hermida has a great post on how he beat a tight budget by using WordPress as a CMS system to create a news site for the UBC Graduate School of Journalism.

The site [TheThunderbird.ca ] is run on an installation of WordPress MU, the multiple user version of this versatile software. WordPress offers an easy to use content management system, making it simple for the students to learn how to post stories. WordPress MU can be a little temperamental, meaning that some plugins won’t work with it.

Over the past few years I’ve tried a number of CMS systems to run the online newsdays. Everything from Mambo to a neat piece of software called PROPS. Anything free that would save the students doing too much hard coding of webpages. But it hasn’t been an easy journey.

Looking for a solution

This year we just finished an installation of Avid’s Active Content Manager so we should soon have a pretty hefty CMS but I still needed something quick and easy to fill the gap. I had braced myself for a long hard battle with Joomla. Like othes I was not looking forward to the template work – my experience with joomla forerunner mambo had burned me there. So I bit the bullet and thought that WordPress couldn’t be that hard to tweak. It wasn’t and I know run newsday exercises using wordpress as the cms.

Templates

Like Hermida I came across the excellent Revolution News theme. There are other premium news themes out there as well but thought that $99 would have to come out of my pocket if I wanted to get it done quick. So before taking the plunge I did a bit of searching around.

There are some pretty good free themes around well suited to newspaper/magazine style work. I ended up using the Mimbo theme by Darren Hoyt. I liked the layout and it seemed like a flexible template

newsbiscuit

Plugins

Of course there are number of plugins I use as well.

I’m also planning in using the Role Manager plugin to add an extra layer of control for users.
Overall

It needs some tweaking and I got a little more equated with WordPress template tags than I would have liked (oh, okay, I got a perverse geeky pleasure from making it work). The process for putting up thumbnails images isnt as neat as it could be, but it’s simple and it works. It also seems to be the standard way of doing it in these templates.

So, overall its a success.

If anyone wants to try the version of the template I ended up with, drop me a line and I’ll share.