MovableBlog: Tape Delay
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).
Put this code somewhere near the beginning of your index template.
$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:
// 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>
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.