Two new features

Two new features implemented as of today.  I'd be funnier about all this, but I'm tired, in the middle of squashing an ugly bug I just found this morning, and my sense of humor went off to have a four-martini lunch somewhere around noon.  It's nearly four hours later, and it hasn't bothered to stagger back in to work yet.  Wanker.

(Have a sneaking suspicion that this flurry of work has something to do with an upcoming vacation?  You'd be right.)Registered users may now subscribe to comments on any post (past or present) on cat.net.  I've long appreciated the feature over at scriptygoddess, so that I can be notified when someone posts a comment to one of my entries there, but I've always wished for a slightly different implementation.  By the time you present subscribe/unsubscribe radio buttons, plus an extra text field and submit button for subscribing-without-commenting, you've got a seriously cluttered batch of forms.

In addition, it seems like the way it's set up now is not likely to scale very well.  Every new comment on a subscribed entry produces a notification email.  What if you've got a flurry of comments going, and a ton of people subscribed to the entry?  That's a massive snowfall of email.

Which can be loosely translated to "Gareth will shoot me if I write my function like that."

(Love ya, Gareth.  You're the best.  :P)

So, one night a couple of weeks ago, Tenzing and I were sprawled out in our favorite thinking places - I, sprawled out on my stomach on the reading room couch, and he, nestled in a very small ball in the bend of the backs of my knees.  My legs were vibrating with his purring.  Call it a Pavlovian reaction, but I'm so accustomed to it that I can barely think about code without it.

About twenty minutes later, I figured out how to do it.  It was incredibly simple for registered users - since their email address is on record, all Quarto needs to know is if they want to subscribe or unsubscribe.

Every [x] minutes (I have it set for 15 on domesticat) a cronjob kicks in and runs a script that checks for new comments.  No matter how many comments have actually been posted in the last 15 minutes, a subscribed user will only receive one email per subscribed entry.  It just seems to be a much politer and resource-conscious way of handling things (but, granted, requires cron).

So, yeah.  Call it a registration free-for-all, or something.  Go for it.  Make my day, or something.

Feature #2 will be transparent to the rest of you users.  Users with postdating privileges may set a new post's entry date to a date in the future.  While it's postdated, an entry will not show up anywhere on the site (except in the admin interface); it will only appear when it is no longer in the future.

The only drawback to this was that, in the past, email notification of those new posts wouldn't be sent when the post became 'live.'  Since I've got a chunk of folk who use my notifylist to know when new posts are made, it seemed kinda crappy to leave them out.

There's now a little cron script that checks every couple of hours to see if there are no-longer-postdated posts that need notifications sent.  If there are...taken care of.  All without effort or thought on my part.

I am <em>all</em> about that.  (Why?  See second paragraph of this entry.)

Oh, and for those of you who were a little squidgy about providing instant-message contact information for your account - only registered users may see that information now.

Hey, my sense of humor just dragged in.  Nice of it to show back up.  :)

all tags: 

Comments

Hey, um, vacation? Who said? :p

I think it was Jeff... Hey, we have to go now. I've picked up the case of RC Cola that Andy wanted, and I've got beer I have to take to Heather. They're going to shoot us if we don't show up now.

Amy, if you're taking RC, don't forget the Moon Pies. You might want to throw in a chicken fried steak or two, also. :)