Why PHP isn’t so bad

I love PHP. I’ve worked with a fair number of languages and I have to say that I absolutely love PHP. I love its cleanliness, its elegance, and its fabulours online documentation and community support.

I come across a lot of people in various walks of life who rubbish the language because of various perceived (usually historical) weaknesses. So when I saw this article from DevZone I felt I had to post and say how much I agree with it. I also think that the PHP community might benefit from a little more self-promotion once in a while … but it seems that everyone is rather too busy “solving the web problem” (the original aim of PHP) to worry about little things like that :)

Joomla! Brief And Pretty URLs

Well the website for my netball club is definitely going ahead, They are even more up for it than I imagined! So you can find the new site at www.shipleynetball.org.uk and hopefully it will actually get some content soon.

Installing Joomla!

I installed a new copy of Jooma! which was just as easy the second time as it was the first – you literally sit down to install it and before you remember you forgot about your coffee, its done and you’re already fiddling with the administration tool. This time I installed some extras.

EventList

I can’t say enough about how much I like the eventlist component from schlu.net. In addition to the date management bit which I tried out before, I’ve also installed the calendar module that is also available. I know its very alpha but I haven’t managed to break it yet and its exactly what this module needed! Also it makes sense for the users on the netball site to click on a particular saturday and see all the fixtures by day so that’s very good.

Another thing I must mention again about this component is the locations functionality. We play at one of five venues and you have to input the venues before you input the events but then once the address information, directions and whatever have been input they get associated with the fixture automatically … and its got a google maps link too :)

OpenSEF

Pretty URLs are something I feel quite strongly about. They’re strong and human-memorable which I think counts for a lot. I understand they’re also really good for search engines although I’m not an expert and I am under the impression that search engines kind of read your content these days. Well this was a complete faff from start to finish. It took me literally two hours from start to finish and that was only because I gave up, set the thing up manually, and sat down to write this before bed. Here are the steps I think I probably needed to follow, in the order it happened.

  1. Firstly, you need apache mod_rewrite and all the forums will tell you to test this first. Which is a good start.
  2. Turn on the Joomla! search engine friendly URLs (under Site -> Global Configuration -> SEO -> Search Engine Friendly URLS) and take a few moments to check that those are working. I have no idea what a search engine would find friendly about those URLS, they had commas in which I always find unnatural but never mind!
  3. Now try to move forward with the OpenSEF component. Basically you install it, and then you keep reading the tutorial because there’s some faffing about with the .htaccess file. Gotcha: The old Joomla! search engine friendly URLs need to be enabled as well – I turned them off when I commented out all the stuff relating to them in the .htaccess file without realising I wasn’t supposed to be doing that!
  4. Once its working, the pretty URLs get generated when you click on the links, so it will show the old link and then when you follow it it generates the pretty one, redirects you, and then uses it forever after. It is possible to input links manually in the administration part. I found that one of my plugins just would not get linked properly, it was listed under Components in the Admin part of OpenSEF, and I enabled that, and the pretty url resolved to the component if typed in directly, but it just wouldn’t update itself. As I say, I gave up and entered it manually … and now I’m never touching my links again! I think stuff like item and category links are going to work pretty well though and I think that’s really important for when we add additional content to the site.

Anyway I still like Joomla! and I think its going to be a nice simple interface for the people who are going to be writing articles for the site so I’m still quite pleased with it, if temporarily exasperated! If anyone knows what I was missing then suggestions are gratefully received.

London PHP Conference

Its all sorted and we’re booked onto the London PHP Conference in February. Its a bit of a geeky thing to do as a couple I suppose but I’m really looking forward to it. There are some speakers that I will be positively star-struck to see in the flesh (Cal Evans and Rasmus Lerdorf) and some people that I’m really looking forward to meeting in person that I have had contact with online.

Due to the exciting way that train fares work here in the UK, its much cheaper to travel to London on Thursday evening1, stay both Thursday and Friday night in a hotel in central London and then travel back on Saturday afternoon. To be fair the journey back is cross-country and takes 4 hours but I upgraded the tickets to first-class for £3 and we won’t be changing trains so I’m sure it will be fine.

I’m really looking forward to hearing the talks and meeting the people at the conference, I’ve never been to anything like it before and I can’t wait! Also two nights in central London with Kevin can’t be a bad thing :)

1 To put this in perspective, its costing us £9.50 to travel on Thursday night and the walk-on Single Fare is £273. It really pays to be organised.

Dating Joomla!

Well its early days in our relationship but so far, Joomla! and I are getting along just fine. Since I installed it I’ve had a proper fiddle with most of the bits and pieces (mostly turning things off actually!!) and now its looking much better.

Since I’ll want to introduce fixtures, I’ve used a calendar extension called EventList from schlu.net and its fabulous. It took me ages to get the idea that to change how a category displays its items, you edit the menu item that points to it. It still seems like a bit of a funny concept (what if you link to it from somewhere else?) but it really works now I’ve figured it out. I used this to stop the date and author being displayed in the “Venues” section, since they don’t mean a lot. To remove the same information from the individual articles I edited each article individually.

I’ve also changed templates, there are loads available to download but I was struggling a bit with ones I didn’t like or didn’t know how to change. In the end I chose the “sporticus” one from www.rockettheme.com, it was easy to change the colour and I made some other changes to it as well.

At one point I got quite stressed with the layout of news articles on the front page, one or two was fine, but three did a funny layout with one at the top and the next two next to each other. Once again its the menu item property, I changed the number of columns to put all the articles in line with one another and it looks great!

The other thing I must mention is the community, I’ve registered for the forums but so far have been able to find things I needed just by searching the threads. The tone of the forums is much nicer than I’ve seen elsewhere and most of the Joomla! gang seem keen to spread the word. I must also give a special mention to my phpwomen friend and personal Joomla! consultant, Amy who has been very helpful and even answered questions before I ask them :)

Wouldn’t It Be Cool If …

As a geek, I sometimes create websites for other people or organisations who don’t have the technical skills to create them themselves. Tonight I’m meeting with the Netball Club Committee (well they are meeting and I am gatecrashing) to discuss whether a website would be useful for them.

The thing is, for a non-technical person, it seems that anything is possible on the internet, so some very interesting conversations will result. These are usually started with the line “Wouldn’t it be cool if …” and end with things ranging from “the website could phone you and tell you someone replied to your forum post” to “we had a dancing reindeer all over the clean and stylish site you just redesigned … as its Christmas”. [1]

I’ll let you know what requests I get hit with tonight, I’m hoping they’ll think that news and events will be enough to be going on with but we shall see!

1 I ignored the first and ended up giving in to the second request.

Gadget Update

After I wrote about the death of a gadget, I decided that I would definitely just go out and buy something which would make music, to use in the car and at the gym, which wouldn’t matter if it died too. So I got one of these logik orbit mp3 players (mine was actually black). I thought it would fit the bill, it was dirt cheap (35 GBP for 2gb player), little, and had multicoloured backlight which I love!

Not such a good idea. It had an internal battery that never seemed to hold charge for long. The mini-usb connection was a faff but that was the least of the problems I had. Often, it would play and show the battery as half full or even more, but if you turned it off for ten minutes when you stopped at a service station and then asked it to play again, it just wouldn’t turn on. This thing took longer to boot than my sister’s windows machine, an old hand-me-down from me with goodness-knows-what installed on it. I regularly ended up on a long drive or in the gym with no music, not something I enjoy. The best was when we used it in the car while visiting over Christmas. I had never really noticed before but it doesn’t correctly identify the tracks. When playing a track, it would show you 3 random pieces of information. They weren’t even necessarily an artist, an album and a title – you would just get any three. My favourite was “we will rock you” being labelled as “Kylie” sung by “Andrew Lloyd Webber” from the album “various” :)

Better things

So I got an iriver T20 from Scan’s Today Only for a little over fifty quid.

Its beautiful. Its cute, its tidy and its elegant. The biggest downside was that it is a “play for sure” player, but following instructions from a couple of sites, it was possible downloaded the manufacturer’s new firmware and turned the device into a normal USB mass storage that can be seen and understood by Linux as well.

This device is tiny (did I mention it’s also quite cute?), has a lovely quality of screen, a separate line in socket and a USB connection that retracts into it when not in use. The menus are not terribly intuitive but so far I haven’t found anything I wanted to do and couldn’t find out how. The battery doesn’t seem to go flat at all, it plays ogg-vorbis format and frankly its the best thing I have spent money on in a long time. Isn’t it satisfying to have something that you really like?

Rowan Big Wool Mittens

I can’t really knit. I must have been able to once; I knitted toy snowmen as christmas presents for my friends when I lived at home. But its something that I can’t just pick up and potter along with like I can crochet. For my birthday I received hobbhy craft vouchers (thanks Kath and Geoff!) and the “Stitch and Bitch: Knitters Handbook” which has a lot of tips about picking up dropped stitches as well as really clear instructions for every knit stitch I’m going to need for a while.

So when I wandered into hobbycraft and they had six balls of Rowan Big Wool in “whoosh” (that’s funky pink to you and me), I decided they must have had my name on! Here are the first fruits of my knitting revival ….

This doesn’t really do them justice though, so here’s an alternative presentation, they’re still cooler than this one shows them though!

Watch this space for matching items to appear :)

A Winter’s Wrap

Thought I’d show off my most recent crochet creation as I haven’t been keeping the site up-to-date with stuff lately. I received an invite to a Christmas Ball from a friend in the Army, and accepted. My summer ballgown (I slimmed back into the pink one mum made – yay!) was going to be a bit chilly at a winter ball so I thoughtit would be good to have something to throw over the top.

A half-hour conference in the wool shop saw me with some Dolce Vita by Wendy in shade 499, no idea what its called but it looks white to me, with slightly fluffy sparkly bits. I saw this pattern on Dot’s site and thought I’d have a shot:

And the stitches in detail:

While working a small prototype I decided to add extra non-pattern rows into mine, so I have half the shell patterns that hers does. The finished article is 76 inches from wingtip to wingtip and about 18 across. It would have been longer but I basically ran out of time – I was still putting the border on it at the pre-event drinking session :)

Joomla! greetings

Next week I’ve been asked to go to the netball club committee meeting and tell them a bit about what a website is and whether I should be making them one. In order to get my brain in gear I’ve been thinking about tools that would be suitable for this … I have been looking for a reason to try out Joomla! for a while, because the phpwomen.org site uses it and I don’t know much about it. Anyway last week I read a good review of it in LinuxFormat which reviewed a number of CMS tools and rated Drupal best but gave Joomla! the same score but said it was simpler.

So I’ve just installed Joomla! for the first time and it was as easy as falling off a log :) Actually it might have been even easier than that, once I set off through the process of installing it then suddenly I was all done and fiddling with the admin tool! This product has a very active community behind it so I was quickly able to grab some free templates and suchlike, very cool (especially as they look quite complicated to write from scratch) and appealing to my instant-gratification appetite.

Items, Categories and Sections

All items (my items are like articles, I’m still learning so not sure if this would always be true) have to go into a category, and all categories have to go into sections. It is necessary to set up the sections and categories first, before creating anything to go in them; the Joomla! manual explains that these are like folders and drawers and your room would be a mess if you didn’t. Its easy to move things around later anyway so that’s no big deal.

I found it confusing to add a link to a section and realise that this would then list the categories within it, rather than the items. However I got around this by removing the menu item and creating a new one which pointed directly to the category.

Table – Content Category

The default section listing is horrible, its a big table with the date, the author, the section, the title, the phase of the moon and a bunch of filters and other navigation. The category in question is a list of netball venues and there are about five of them! I faffed around with templates and had a bit of a dig in the code (I knew there was a reason I always use PHP stuff even though I rarely fiddle with the code as it only causes upgrade nightmares), but I couldn’t work it out.

To cut short a long story, in which I learned the true size and depth of the Joomla! community from the sheer volume of material that’s around, what I actually needed to do was edit the properties of the menu item (obviously!) to make the category display differently. I’ve turned off all the guff and now I’ve got a nice, tidy list. sighs contentedly

First impressions

First impressions are that I love Joomla! but I’d need a good reason to install a tool with quite this many capabilities. This website uses textpattern and that’s more than enough for every day, but Joomla! can handle so many different types of content that there’s hardly anything you can’t do. Anyway the main purpose of the new site is to show fixtures so I will soon be trying out some events calendar extensions … I’ll let you know how I go!