Your Second Life online status on a WordPress widget, take three [UPDATED AGAIN]

I’ve been postponing this literally for… years. On the very first weeks after I started blogging about Second Life, I wanted people to look at my blog and see if I was online in SL or not. It would be a very simple way to promote the cool way that Second Life allowed us to interact with external sites. Back then, we just had XML/RPC, and you had to email the XML/RPC channel that SL had generated for your object, and save the channel ID to disk. Complicated! Specially because when the sim rebooted I’d get a new channel ID by email and had to remember to manually update the blog.

But this was a really simple thingy, which I had hardcoded on my former blog software. Then I switched to WordPress. This meant a few more tweaks, but it was manageable. After a few years, Linden Lab introduced HTTPRequest, which at least allowed us to contact a web server from in-world; this made the code simpler, because it could be fully automated. My previous version was available on this article.

Still, this was rather stupid. You had to hack your theme (the original code predated WordPress widgets) or use something like Samsarin PHP to embed some PHP on a widget — which is nice, but, well, not for the casual blogger. No, what needed to be done was a plugin for WordPress.

I’m ashamed to admit that I have postponed learning how to do WordPress widgets for ages… every time I learned a bit of the arcane art of writing WordPress plugins, the code changed ever so slightly, and I quickly tired of hunting from an up-to-date tutorial. In any case, nobody used the online status thingy anyway, or close to nobody, so I really didn’t care much… it was more about an exercise in plugin writing than anything else.

| | | Next → |
%d bloggers like this: