Sortable Views in Drupal 6

I’m completely new to Drupal, I’ve heard a lot about it and I know some evangelists, but I’ve never had reason to use it – until now. So, I might be using the wrong words for things or not explaining things too well, but I’m going to record this because it took me so long to find, and I might need it again.

I am working the Workflow Summary page, which is populated by a view. This view has fields, filters and I can specify the sort order for it, which is all great and it has a surprisingly accessible interface considering all the ajax and whatever else that is going on in there. But the users wanted to be able to re-sort the columns as they went along. Guess what? Drupal already has a way to do this!

  1. Edit the view you want to add the column sorting to
  2. Under “Basic Settings”, look for “Style: Table” and click on the picture of a cog next to it. (if I were a serious blogger, I’d screenshot. Never mind, eh?)
  3. Scroll down to see the table settings
  4. There is a list of the fields, and a tickbox for each labelled “sortable” – tick the boxes for any columns you want users to be able to change the sort order on

I didn’t find this very fast but thanks to some help from #drupaluk on freenode someone pointed me in the right direction – my columns now have clickable headers and resort as expected! If this helps, or if you have any more tips for this type of thing, please do add a comment.

PHPUK Conference (London) 2009

Last week I was in London for the annual PHP conference held by the PHP London User Group. One thing that makes this conference different from any others I’ve attended is that its organised by volunteers. Another thing which makes it unique is that I have attended more than one of these annual events: this is my third year in attendance here, whereas I’ve yet to attend any other conference more than once.

This year had quite a different feel from the other times I’ve attended. With a “real” conference venue at Olympia Conference Centre and talks by big-name employers rather than the usual round of community luminaries, I wasn’t really sure what to expect. In fact for the first time I didn’t even try to attend talks in every slot, since there weren’t so many that appealed to me. Of the talks I did see however, I can only give great praise for the most part. I was completely taken by surprise by Aral Balkan’s “The Future’s So Bright, I Gotta Wear Shades” talk. I mean, put a trendy guy with a cool name who claims to be a flash developer together with a cheesy talk title and make it the first talk of the day … I mean, meh. However, I was very happily surprised to find it was a great talk, the audience loved it and I was completely inspired!

The organisers also allowed us to have a stand to represent phpwomen.org which was great. We had little badges and moo cards to give away and quite a few people, men and women alike, dropped by to ask what we were about and to say hi. We had fewer general passers-by talking to us this year than last year. I’m not sure whether that was the more formal setting, because we were there last year anyway and are better known now, or whether the fact that there were actually quite a few women there put the guys off getting too close to the group :) Either way, it was great to have everyone and we made lots of new friends!

The PHPWomen Stand

All in all, I had a wonderful time and enjoyed the crowd and all the people I met – both old friends and new ones. See you all next year!

techPortal – new PHP developer resource

There is a new resource for PHP developers available from today – techPortal from Ibuildings. First, I must add the disclaimer – Ibuildings are my employers, so I’ve known about this project for a while. I helped set up the site and the first tech article on there is mine. With those aside though, this site is going to be a really valuable resource – with content on advanced topics mostly written by my colleagues. Ibuildings employs some pretty accomplished people and has a steady stream of interesting projects, I get to chat over these things when I see the guys (and girls) in the bar; it’ll be great to have it written down and shareable.

The “share” aspect of techPortal is really key – we have all learned a lot from other people publishing and sharing their knowledge, and this is a central point for all our developers to contribute in the same way. I’m also very excited on a personal level since I’m already published on the site! My article Getting Started with Memcached is my first contribution to this new venture and I’m looking forward to seeing what else will follow :)

(I should point out that the article is now a few weeks old and doesn’t include anything about the new memcached extension recently released by Andrei Zmievski. Perhaps there could be a sequel … )

Bean Dish

I have recently made this “bean something” dish a few times, for vegetarian fajitas, to eat with rice, and also as filling for baked potatoes. Its yummy and even better I can feed it to a friend with a requirement for meat-free, dairy-free and gluten-free food! Here’s the recipe:

1 onion
1 tin of tomatoes
1 tin of kidney beans in chilli sauce
herbs and seasoning

chop the onion and fry in a little oil. When it is soft, add the rest of the ingredients and simmer for fifteen minutes.

Speaking at GeekUp Leeds

On 18th February, I’ll be making an appearance at Geekup Leeds, to give a talk entitled “Linux-Fu for PHP Developers”. Basically this is a tour of some of my most-favourite command line tools available in Linux, and its a pre-cursor to the talk I’ll give later this year at php|tek in Chicago. What’s different about the Leeds version is:

  1. I have no idea yet if I can type and talk at the same time
  2. Its in a pub
  3. I will be using the Geekup-standard 20/20 format – 20 seconds per slide, 20 slides

I’m not panicking exactly, but I am thinking I need to get some practise in and decide which commands need to be included in this initial short talk version. Suggestions welcome, add to the comments please!

PHPWomen “I am” Competition

PHPWomen have announced a new competition on their website – to complete a sentence “I am a phpwomen member because…” in a post on their forums to win a prize! Already people are posting and the prize is a certificate to spend at php|architect’s site. Pop over to the forums and join in the fun!

DPC 2009 – Currently Calling for Papers

The Call for Papers for the Dutch PHP Conference 2009 is currently open – with only a week left, it closes next week on Friday 13th. I went to this conference in Amsterdam for the first time last year, when I was still relatively new in my job at Ibuildings. This year, I’ll be there again and looking forward to attending the sessions, the social events – and of course a great excuse to catch up with all my colleagues and the wider dutch PHP community. Hope to see you there :)

Locked Joomla! Content

I run the website for my local netball club and when I implemented this site I chose Joomla! to run it on. It seemed like a good idea at the time, in fact I even thought some of the other club members might log in and type into the user-friendly WYSIWYG editor to make content appear. Well, it doesn’t happen often – and when it does it seems like Joomla! locks up all sorts of things, from articles to menu items, which means I can’t edit them!

It turns out there is a simple solution to this problem, in the admin panel, just go to System -> Global Checkin … and all the locked items will become unlocked!! The concept of locking anything which is web-based annoys me immensely, but at least I know how to work around it in this instance – hopefully I’ll remember next time I have this problem.

Locking Session in KDE

I’ve been using KDE full-time long enough that I ought to know this, but I had to look it up! I was working in a shared location and I wanted to lock my session when I walked away from my machine. There’s an option in the start menu but the keyboard shortcut is ctrl + alt + L – then you need your password to unlock it when you get back.

OSCON CfP

The OSCON Call for Participation is open for another couple of days and I’ve finally got over my nerves and submitted some talks to them. I haven’t been to this conference before, and couldn’t afford to send myself – but I took a look at last year’s schedule and knew I would kick myself if I didn’t even give myself a chance to get there. So I’ve submitted a few talks (one borrowed) and we’ll see what happens …