All done!
After an afternoon’s messy PHP hacking in Wordpress’s shit little editor, I’ve now got my music page back under control and featuring a nice little player. It’s still an unordered list, but instead of showing mp3 and mod links for each tune, it shows one row with two icon links (or one, if there’s no corresponding mp3) and displays a nicely formatted song title along with some info on the original modfile.
The problem with most Wordpress audio players is that they try to load up whatever mp3 links they can see – I guess their typical use involves no more than about 5 per page. But I’ve got like 40, or something. Anyway, that was a Firefox killer, so I rustled up a means of collecting all the valid filenames in my audio directory (i.e. mp3s) into an array and then generating audio enclosure tags dynamically with a random array position. Upshot is you get a new, randomly selected tune to listen to whenever you refresh the music page…and more to the point, the most effort I’ll ever have to put into maintaining the music page is uploading the files over FTP :D Hooray.
There’s no specific need to talk about those fiddly but fundamentally pretty basic technicalities, but I thought I’d get it off my chest anyway because I’m always wretchedly proud of my pitiful programming achievements.