MovableBlog: Tape Delay

Nuance 2.0

July 20, 2002

Ever write something, but realize after sleeping on it, that you made a horrible mistake? Well, I have, so the personal blog, which is currently on hiatus (but returning soon), will have what I'm calling a "tape delay".

You know how some live broadcast events are delayed? I remember that some Monday Night Football games are tape delayed by about an hour to get the biggest audience possible, and that Howard Stern, when he was being broadcast in Canada, was tape delayed by a few seconds to give radio stations here a chance to censor anything inappropriate (which, apparently, was often).

So...

Put this code somewhere near the beginning of your index template.

<?php

$now = time();

// for me, the above code is $now = time() - (3*60*60);
// because my host is on Eastern Time, whereas I'm on
// Pacific Time

$twentyFourHRs = 24 * 60 * 60;

// change the 24 to whatever number of hours you
// want to delay a post for.

?>

Then, when you get to the point of your <MTEntries>, insert this code:

<MTEntries>

<?php

// the following if statement should be entered
// without line break, to make things easier for
// some reason, I forget why

if ( ($now - mktime(<$MTEntryDate format="%k, %M, %S, %m, %e, %Y"$>)) > $twentyFourHRs)

{
?>
<i>YOUR MT TAGS</i>
<?php

}
?>

</MTEntries>

This has uses as a bare-bones editing tool for group weblogs, or even for comment systems (maybe) too. If someone posts something that you don't approve of, and don't want a lucky few who continuously press Refresh to see what they wrote, you could put it on "tape delay".

This is a early release of code of something that I'd like to have password override (for proofreading and making sure the HTML code is right) and maybe a more full-fledged moderating system for group blogs and comments, unless that's planned for a future release of MT *hint hint*. Also, similar code would necessarily need to be added for archives, but I'm planning on going without archives for a while after returning.

Posted by Richard at 11:07

Comments

Why don't you just write in draft mode, then publish when you're happy (and have given yourself time to calm down)?

I tried that. but the urge to publish an angry screed at 3 AM is too great.

yeah, now you have to delete your code in the template first and then push publish! HAH! neat idea though.

i'd think more along the lines for a group blog with an admin is to have it ONLY set entries in draft mode for some users, send you a notification that something has been published, you go check it out and it's fly-diggidy, then you publish that bad boy... now that would be cool... or geeky I forget which...

That's great, actually - I'll use that in the future. Recently I spent three weeks travelling around Southern China by rail, and had no 'net connection until I returned to my apartment in Harbin. It would've been really nice to be able to queue up posts like this.

(although I would still like to be able to do this within MT, just so that I could queue up multiple posts painlessly and with a minimum of coding.)