Extending Joomla! Eventlist

Recently I extended the Eventlist extension for Joomla! to allow my netball club to add the results of fixtures to their site as well as the fixtures which are managed using eventlist.

It was actually much more straightforward than I expected so here’s a quick rundown of the changes:

  1. add two columns to the jos_eventlist_dates table to hold the scores
  2. add them to the class by editing components/com_eventlist/eventlist.class.php
  3. edit the sql statements in components/com_eventlist/eventlist.php and add in our new columns
  4. adding input boxes to the admin interface to administrator/components/com_eventlist/admin.eventlist.html.php, just a couple of input type=”text” boxes
  5. adding a new column to fixture lists in file components/com_eventlist/eventlist.html.php (not taking account of the lovely flexible width administration tool in the admin interface) and putting the results into each row

The scores default to 0-0 and show as 0-0 when there are no results – netball doesn’t really finish with no goals scored so its safe to assume that this means no result in this case! Last weekend our match finished 40-28 which is about average.

Hopefully this is interesting or useful to someone – if nothing else it will remind me what I changed next time I come to do something similar or further modify this!

Pink Snowflake Hoodie

This project has been a very long time in the making. In fact it had stalled completely at one front, one back and half a sleeve when the baby in question arrived! Its for the new daughter of a friend of mine and the first thing I’ve attempted to knit on this scale.

Its knitted in snowflake – the result was absolutely beautiful but I wouldn’t recommend snowflake to a beginner knitter and I won’t be knitting with it again in a hurry. The project was much bigger than I anticipated, the sleeves were almost the size of the front and the hood was something else again – picking up stitches is something I struggle with at the best of times, never mind in novelty yarn!

Thanks to support from my mum (both moral and technical) I did finish the project and manage to give the hoodie to its new owner – welcome Molly :)

A Very Narrow Howto of Podcasting

I recently featured in an episode of Zend’s PHP Abstract. A few people have asked how I went about preparing and recording the piece so here’s a quick overview.

Choosing a Topic

This actually wasn’t hard because I wanted to pick something that I have particular knowledge of. As a part-trained Oracle DBA with experience of Oracle and PHP, these two topics seemed like an obvious choice.

Preparing the ‘Cast

I was quite determined not to read aloud from a script, so I put together some bullet points and practised doing the talk from those quite a lot. Playing back these attempts helped me to see what worked and what didn’t – those points got added, removed and re-ordered quite a few times. Even after a lot of practise, I was still pausing too much between points. I ended up transcribing my unscripted version and then re-recording it, which worked well as I had my own natural language but no pauses!

Sound and Software

I was concerned that I would need additional equipment, such as a better microphone. However my partner has a macbook and the built-in microphone on that proved to be up to the job. I used Garageband from Apple’s ilife to record the track (and also to edit out the clicking I got from pressing the mouse to start/stop recording!). This saves files in .m4a format, but this can be converted to .mp3 using itunes.

PHP Abstract Podcast

I’m a regular listener to the PHP Abstract podcast from DevZone – and this week, I’m the star! Its a short podcast about PHP and Oracle, and you can find it here. Most of the comments so far seem to mostly revolve around my accent …

New LornaJane

Welcome to the newly made-over lornajane.net!

I wasn’t desperate for a change of look but I have been tiring of textpattern for a while. The new version is running on serendipity which will hopefully be easier to work with and suit me better. Handily serendipity was able to import most of my textpattern content (more about the actual process in a later post) so it’s been more about ironing out kinks (like getting the images across) and fiddling with templates than anything else.

The angel up the top there is a new acquisition – the result of my commissioning my good friend Gretchen at http://www.girlscantwhat.com (they also do design work, see http://design.girlscantwhat.com/) to make me something to use as an avatar and general virtual familiar. I hope you like her, I do!

I’ve taken care to get links from the old site working and hopefully the feeds should be working as well – if you’re reading this on your feed reader, then pop in and see the new setup. If you see anything, not working or looking otherwise wrong, please let me know and I’ll take a look. Otherwise, enjoy :)

Facebook Followup

So I was having trouble with facebook a while back, but things have improved.

  • I now check facebook every day
  • I have 38 friends
  • I have seen the pictures of my cousin’s first few weeks at university.
  • I’ve finally uploaded a profile picture because everyone seems to have one! Only two of my friends don’t … and I can understand why.

Facebook is good for staying in touch with people, I’ve exchanged messages with lots of people who are on my peripheral network but with whom I could easily have lost touch, especially because I’ve moved house a lot. People have a “status” and can update it at will, so you can see who is looking forward to their weekend or who is having a bad day.

I utterly adore the daft applications that come with facebook. My two current favourites (although they don’t see a lot of action it must be said) are the aquarium and the garden. Basically people can send each other flowers and fish (for each application respectively) along with a little message, literally just a one-liner to touch base. Its like a wave but the thing they send hangs around in your profile for a bit so you can enjoy it.

I think I’m starting to see the point, but I suspect its only the tip of the iceberg – am I missing anything important do you think?

Simple Rsnapshot Setup

Rsnapshot is a perl-based backup script manager. It is a journalised backup system – meaning that it copies all your files across to the backup media once – and then the only data it transfers after that is the changes. The backups appear on disk as complete copies – but where two generations are exactly the same file, they’re actually symlinked to the same data.

Backup Strategies

Rnsapshot has hooks for scripts that run before and after the actual snapshotting. I use the “before” script to:

The after script just unmounts the drive. To add these extra scripts you just uncomment the lines containing the cmd_preexec and cmd_postexec paths and point them to your scripts.

Getting Started

Well I could write a lot about this but to be honest I doubt I’d do better than the excellent rsnapshot howto so I suggest you read that for how to do it. Basically, enter the path you’d like to back up to, the interval you’d like to use, and then a bit further down the page which directories you want backing up (the default is /home, /etc and /usr/local) – then run the command! The howto even includes instructionsn on setting up cron to call the command regularly.

Rsnapshot Conclusion

Rsnapshot was a good tool to stumble upon as a learner sysadmin (which I am) and its very easy to use. I love the fact that it isn’t rocket science, but its a really nice, usable version of a collection of scripts which are duplicated by system administrators the world over. The file structure of the backups is the same as the content that is backed up and retrieving any generation is as simple as copying a file over. I’m sure there are other solutions out there, but I’m a convert and use it on all the local servers I administer (Ubuntu boxes, it works a treat).

Hot House

Well, not hot exactly, but definitely cosy – we’ve got central heating :)

We have had a few people round to quote for it and went with the guy who actually came round when he said he would, and wasn’t the most expensive. Well they turned up at 9am on Monday morning and it was all finished by Wednesday afternoon!

The mess was quite astonishing, I think because we have solid brick walls, so any drilling means brick dust over everything around1. They brought the water pipes up through the house in the hallway, and then along each floor in turn. The boiler went into the smallest bedroom (rather than being in the living room which is where the old one was – strangely) and that room definitely came of worst. There was also a gas fire removed from that room so we’ve got a gaping hole where there was a fireplace about thirty years ago – and the hole contains the guff that has fallen down the uncapped chimney in the intervening period.

The pipes were run under the floors, which means we’ve had every carpet in the place lifted, more or less. Happily the plumber was quite clever about not lifting floors which were difficult, such as the laminate flooring in the living room or the stone tiles in the bathroom. Presumably this is to avoid trouble for him as much as to save our floors. Having had the floors lifted through most of the house, I’m pleased to report that we have got the original floorboards intact and in good condition throughout which is nice. I’m not sure we’d expose them but they are a nice feature if we did decide to (or decide we can’t afford carpets…)

We went for a lovely big boiler which will hopefully cope well with driving two bathrooms and a kitchen, plus any additions that we make over the coming years. Certainly it drives both the heating and the shower effortlessly. Anyone who has stayed with me will know the “trick” to the shower involving running a hot tap (marked cold) while you shower – this is now eliminated :)

All in all it was well worth it – although the mess has to be seen to be believed and I did find it quite upsetting since we had just started to settle in really. Perhaps I’ll post some photos of the places which suffered rather badly – the much-hated living room panelling came off as well and its not pretty!

1 Where “everything” includes matresses, beds, towels, and all the computer kit that was upstairs! I’d have moved stuff out of the way if I’d had any idea which places were best to move them to.

Top top Tips

That is to say, some top tips for the command-line program top. Top is a program to show you the top processes consuming resources on the system. You can then press other keys and the program will respond. For example:

q to quit

z to get a colour output

x to highlight which field the results are sorted by

< and > to change which field it is sorted by

c to tooggle between the program name and the full command that was run

I don’t use every program often enough to just remember the keyboard shortcuts so its nice to keep a virtual crib sheet :)

Garden Digging Party

Last weekend we held a garden-digging party. Mostly because we have been failing to dig the garden in a timely fashion and its the time of year we should be turfing it. Personally I’m not mad about digging gardens but obviously my friends are as there were five of us digging plus one efficient tea-maker and and a 4-week-old mascot.

The weekend started with the garden looking like this:

And by the end of the next day, we had got to here:

There’s another chunk to go and a couple of paving slabs to move but we should be ready to turf quite soon – thanks to everyone who helped, I don’t know how we’d have managed on our own!