Monday 13 May 2002

Minimizing pings to weblogs.com

Noticing that “MT pings every time you save a post with status ‘Publish’, even if you only saved it because you were correcting a typo, Phil Ringnalda has created a hack “to only ping weblogs.com (and blo.gs, if you’ve added a ping to it as well) when you have actually added a new post, or changed a post from ‘Draft’ to ‘Publish’.”

Even though I will be saving a backup copy first, the thought of modifying lib/MT/App/CMS.pm fills me with dread. But Phil’s hack addresses a definite problem: I continue to fuss with spelling and grammar after I’ve published a post. And even though MT doesn’t display the message from weblogs.com as Radio does (on the Events page), I still hear it in my head:

Thanks for the ping, however we can only accept one ping every five minutes. It’s cool that you’re updating so often, however, if I may be so bold as to offer some advice—take a break, you’ll enjoy life more.

So I might wait a day or two to see if Phil (or anyone else) discovers any bugs in his hack. But then I’ll probably adopt it. (Is there a mechanism by which modifications to the MT code get transformed into feature requests and eventually become part of the next release?)

Permalink

Comments

I think the main channels for going from hack to feature are the "Bug Reports" and "Request a feature" categories of the MT support forum (and I suppose "Tips and Tricks" as well). I haven't posted it there yet, hoping to get a few friends to test it and tell me if I did anything, ah, unfortunate with it before I put it somewhere that I can't edit easily. It certainly works perfectly for me, but so far my MT hacking experience shows that there can be a bit of difference among servers.

Funny you should mention a reluctance to muck around in the MT code. I've read a few comments along those lines, some making it sound vaguely immoral, if not downright illegal. I'm baffled by that, since hackability was the primary reason I switched to MT. As far as I'm concerned, CMS.pm is just another text file on my server. Even if I didn't have a perfectly good backup ready on my desktop, and another in a .tar.gz file, there's always another one waiting in a fresh .tar.gz at movabletype.org. I'm just thrilled no end that the only real limit to what I can do to the program is my limited knowledge of Perl. I'm not quite batty enough to start messing with the parts that save things in the database (at least, not without a fresh export/backup), but other than that I figure everything else is fair game.

Posted by: Phil Ringnalda on 13 May 2002 at 09:44 AM

Sorry if I gave the wrong impression, Phil. I certainly don't think it's illegal or immoral to muck around in the MT code. I think my hesitancy was partly due to the fact that I'm not a programmer but mainly because the anal retentive side of me worries about keeping track of changes made to the default code. Your "Stop Spam-Pinging" hack is useful enough, however, to negate those objections.

Posted by: Jonathon Delacour on 13 May 2002 at 01:27 PM

This discussion is now closed. My thanks to everyone who contributed.

© Copyright 2002-2003 Jonathon Delacour