Dynamic Text Replacement with PHP and Javascript

Holy . Cow.

Most sites that replace text with images do so using hand-made images, which isn’t so terrible when there are a set number of headings, but it quickly becomes unmanageable on a site that is updated several times per day. However the replacement is performed, each image needs to be bound to the text it is replacing. That binding usually manifests itself as an <img> tag, an embedded style sheet, or a custom id attribute. And over time, through layout changes and redesigns, that binding needs to be managed by someone.

We can forget all that nonsense. No more <img> or <span> tags, no more id attributes or wasted time in Photoshop, and no more messy CSS hacks. Using JavaScript and PHP, we can generate accessible image-headings using any font we like. And we don’t have to change the structure of our HTML or CSS at all.

And again: Holy. Cow.

Watch as the download size for all your favourite design blogs increases by approximately 15% over the next couple of weeks as they all start using custom fonts for their entry titles.

For that matter, I’ve been dying to use Papyrus here on Sunpig for some time now…

Firefox 0.9

Gosh, there’s a new version of Firefox, too. The ol’ cable modem is fair creaking under the weight of downloads today.

I don’t like the toolbar buttons of the new default skin, but on the other hand version 0.9 now has a nice new Theme manager, and the long-awaited Extension manager, too. Nifty.

iTunes Music Store (UK) opens

About time, too. At this point, I can’t really see myself buying whole albums from the service, but that might change depending on how easy it is to turn the protected AAC files into unprotected MP3s. (I usually go through several Windows reinstalls and multiple PC hardware upgrades each year, and I can really do without the hassle of reacquiring and reinstalling even more licenses and keys.) I suspect that I’ll mostly be buying single tracks, both new and old. 79p a track is really not that bad.

Update: …and iTunes 4.6 still can’t sodding properly refresh CD-ROM drives that don’t have autoplay enabled.

Second update: …okay, so it does refresh CD-ROM drives, sort of. Here’s how:

  1. Eject disc
  2. Switch to a different application
  3. Switch back to iTunes
  4. The old CD should now wink out of existence
  5. Insert new CD
  6. Switch to a different application
  7. Switch back to iTunes
  8. The new CD should now be recognised

This, to my mind, is still far from “proper” refreshing. Still, for all the chunky goodness that is available in iTunes, I can forgive the programmers this minor oversight.

Pain++

While I was dropping Alex and Fiona off at nursery today, I felt (and heard) something in my wrist go pop as I lifted Fiona out of her car seat. Since then, almost every movement of my wrist hurts a lot, and I can’t exert any kind of force (pushing, pulling, gripping) with my right hand without experiencing a great deal of sharp, stabbing pain.

Curiously enough, I can still type. I think this is because my typing posture is pretty good, and I keep my wrists straight while I’m tapping away at the keys. I still think it might be time for a natural keyboard. The only problem with that is that they’re wider and taller than normal keyboards, and I’m not sure if one would fit in the sliding tray under my desk, and still leave me enough room for my mouse. Maybe it’s time for a trackball. (Takes up less room than a travelling mouse.) Might be time to brush up on my Windows keyboard shortcuts, too.

I actually went to see my doctor for the less severe version of this problem last week. Now that it’s taken a jump for the worse, I think I’m going to have to go back again…

Reality TV shows and low-cost labour

It struck me the other day that reality TV shows are another example of an industry shedding skilled employees, only to replace them with lower-paid temporary workers. Out go the professional actors and presenters, and in come the shallow attention-seekers and Z-list celebrities eager to flaunt their lack of talent in order to (re)gain their 15 minutes of fame, or whatever dubious prize is on offer.

Modern life is rubbish.