Thoughts on Comments

Megnut writes on the much abused or disused – depending on blog popularity – commenting feature in her post On comments and weblogs. She advocates a bit more thought and flexibility in the use of the commenting feature. I have thought about it before but usually – hoping for any feedback at all 🙂 – I left the comments turned on even though sometimes it was clear that whatever comments could be made on an article they would not be of the type I’d appreciate.

So now I played around with the entry database a bit and closed off most postings and I’ll be trying to be more selective hoping that when comments are allowed there will be some 🙂

So how do you change all that for your blog if you have more than a dozen posts that you can edit by hand? If you have shell access to your database it is rather easy but be careful when you try this at home – especially with multiple blogs on the same movable type installation.

The mt_entry..entry_allow_comments column contains the flag you might want to change where 0 – none, 1 – open, 2 – closed. 0 – corresponds to the MTEntryIfCommentsAllowed tag while 2 – corresponds with the MTEntryIfCommentsOpen tag. For me it was rather easy because I don’t get a lot of comments I could set the field to 0 for all fields and then go through those that had comments (those are in the mt_comments table), I could set the field to 2.

update mt_entry set entry_allow_comments=0 where entry_blog_id=2 and entry_created_on like '2003%';

update mt_entry,mt_comments set entry_allow_comments=2 where entry_id=comment_entry_id and entry_blog_id=2 and entry_created_on like '2003%';

Be carefule the first will disallow comments on all postings made in 2003! The second statement should fix this by setting the flag to ‘closed’ on all postings that have any comments. Sadly the second statement is not working. I wonder why? The mysql manual is not very clear at this point. Can anybody help me with this? How do I only update those entries that have any comments in the mt_comment table?

By Yashima

Writer of code and stories