June 18, 2003
Modarated comments in MT
Jeff asked if there’s a way to moderated comments post to MT blog. I did a search and found a hack at Edith Frost. I don’t intend to moderate the comments here, so far the number of comments isn’t make sense for that. So I do a test at my local MT site, and it works! It’d be good to blog it as a note to myself.
The hack basically prevent MT to rebuild the blog entry once a comment posted. So the post commented would still mailed to you, but it wouldn’t showed on the entry until you rebuild the entry. To apply the patch, comment out the following 6 lines of code in
#$app->rebuild_indexes( Blog => $blog )
# or return $app->error($app->translate(
# "Rebuild failed: [_1]", $app->errstr));
#$app->rebuild_entry( Entry => $entry )
# or return $app->error($app->translate(
# "Rebuild failed: [_1]", $app->errstr));
However, if you’re using default MT index template, which popup a window and called MT/mt-comments.cgi to retrieve comments of the entry, the comments would still show up. To disable the javascript popup, one of the way is to change following template:
<MTEntryIfAllowComments>| a href="<$MTCGIPath$><$MTCommentScript$?entry_id=<$MTEntryID$>" onclick="OpenComments(this.href); return false"><MT_TRANS phrase="Comments"> comments (<$MTEntryCommentCount$>)</a>
/MTEntryIfAllowComments>
to
<MTEntryIfAllowComments> | <a
href="<$MTEntryLink$>#comments">Comments
(<$MTEntryCommentCount$>)</a>
Be warned, you have to rebuild the page after read and approved the comments, but rebuilding might cause duplicate ping to others if your blog ping (Trackback) other MT blog.
Mark Pilgrim and Sam Ruby’s approach is to put up a comment policy and annotate on the un-welcomed comments (most of the time a <del> tag was applied on the flame phrases).
June 18, 2003 08:54 PM | MovableType & Blogging[ Trackback URL for this entry: http://www.yowkee.com/cgi-bin/mt-tb.cgi/116 ]
Thanks mate for the labour to search around to help me out. I will dabble on your config suggestion when I am more free.
Meanwhile, I called fora total shutdown of commentaries to past and future blogs via MySQL.
Thanks. But I believe your findings should work.
06:42 PM on June 19, 2003 · comment by Jeff Ooi · #
You're always welcome, dude.
08:08 PM on June 19, 2003 · comment by yowkee · #
lol!
04:59 AM on August 29, 2003 · comment by zip code · #
- A micro-payment experiment - May 30, 2003
- TrackBack auto-discovery problem? - May 29, 2003
- Search Engine of Blogland - May 29, 2003

