« Reading, Random RSS links | Main | Funkidator »

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 /lib/MT/App/Comments.pm:


#$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 ]
Comments/Trackback

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 · #

Related entries in yowkee essential
Related blogs from Waypath
Waypath
[Neil's World] - Wednesday, September 24, 2003
After a prompt from Chris , I decided to hack MT so that trackbacks appear instantly on archive pages when someone sends a ping. ... However, the hack in question is considerably more yummy than that - it also lets you configure how often index templates are rebuilt. ... So in theory, the slowdown caused by the archive pages being rebuilt each time a ping is sent will be offset by the speed increase caused by some of the index templates not being rebuilt. ... I d appreciate the odd ping to this entry to let me know if it works, and, in ...
[Perfectionism] - Tuesday, August 19, 2003
Making MT into a CMS I've been thinking I ought to give MovableType a fair trial before switching to a different tool , as many others seem to use it successfully. ... Here's a few articles I turned up: Beyond the Blog and other links on making MovableType a Content Managment System Beyond the blog - a whole lot of information Doing your whole site with MTMy main gripes with MT were the way it generated content - having a CGI essentially rewrite your HTML to the server's disk felt like a horrible kludge - and the fact that it had no easy ...
[webgraphics] - Monday, September 1, 2003
no comments made add comment Reported by Nate It s now over a month, but finally I think the new site is almost ready to go live. ... A small highlight of some of the changes: Added comment subscription feature for individual posts The sort-by-how-current blogroll feature should be nearly ready (just need to decipher a persistent bug) The resources page is now it s own blog in MT, this will allow any author to add more resources - the categories are true MT categories, so if it get s too much for 1 page, we will have many display options to ...