Code-y Bits

(First, regarding the here-and-gone-again new layout/design: I decided it wasn’t yet winter-y enough for it. We’re supposed to get some snow later this week, so maybe I’ll throw it back up after the first snowfall. If you saw it, what did you think?)

Last night I couldn’t sleep. Bloody insomnia’s back, it seems. So how did I spend my time until finally falling asleep at 5am? Rewriting part of a script, of course. Fun times. No, seriously: fun times.

After five years away, for whatever reason, I decided to open a fanlisting or two. So far, there are three: one each for Nikki Sixx, Wolfmother, and Velvet Revolver. When last I’d had fanlistings and/or joined them, I’d used Enthusiast. It’s a great script, Enthusiast. However, to run things the way I want (o hai, OCPD-y need for organisation and order), I had to use separate scripts for the codes/buttons and affiliates. It seems a script better suited for me had come along in the 4-5 years I’d been out of the loop: Listing Admin. Great thing indeed. Problem is, the affiliates section still didn’t work the way I wanted it to. Specifically, I wanted anyone interested in affiliation to be able to apply and upload a button/code on-site, and I wanted one site to be able to affiliate with several of my fanlistings (for example, I wanted a single fanlisting to be able to affiliate with both my Wolfmother and Sixx fanlistings without having to add said site twice as two separate affiliates). I’d initially accepted that I’d just have to use LA for most aspects, and Affiliationally for the affiliates section (which, unlike LA, doesn’t offer the ability to affiliate with more than one listing at a time). That got old in about, oh, a day and a half.

So what’s a geek to do? Rewrite that which displeases, of course. So I altered the LA affiliates table a bit to add “pending/approved” and “owner’s name” columns, made the necessary changes to the affiliates section in the admin panel (differentiating pending from approved affiliates, adding the “name” field to the add-affiliate and edit-affiliate pages, batch approvals, single approvals, etc), and threw together a simple form for the front-end, and voila! I’d put it up for download as a LA hack/mod (if allowed; I haven’t checked the relevant information on that), but it’s not terribly user-friendly (most paths aren’t variables, etc), and I don’t feel like commenting the code or writing up installation instructions. Maybe eventually, if anyone’s interested (and the creator of LA wouldn’t mind). For now, it seems to be working perfectly. Not a bad way to spend a few hours, methinks. Had I not done it, I would’ve just ended up watching old movies on Netflix or something. (Or catching up on “Boardwalk Empire.” I’m now two episodes behind. I should catch up this week.)

1 Comment