No Comment.

It’s time to make the bad man stop.

I promised a script to make it easy to close comments in Movable Type 2.x a few days ago, and I’ve finally found a few minutes to finish it off. It’s written in PHP and it’s available right here. My working installation is here (but you need the login and pass to use it). It’s still in beta phase. Here are the requirements for use:

  • You don’t hold me responsible if something horribly bad happens
  • You’re using Movable Type 2.x. (I don’t yet know if this works with MT 3.x. Anyone wanna take a look? It should be easy to make it work unless they changed the database structure a lot.)
  • You’re using a MySQL database (version 4.x?) on the back end (Movable Type supports other kinds too, but MySQL is probably the most popular database for MT).
  • You know the login and password to your MySQL database. Note: This is not necessarily your MT login. This is the login and pass used to access your MySQL database directly. If you’re not in charge of your database, you may need to ask your database admin to run this for you.
  • You must put this script on the server that hosts the database it will be run against. (Translated into Geekish: this script assumes you want to use “localhost”).

I’ve already used the script on this blog, and it worked flawlessly. It’s ridiculous how easy it is to use. Just go through the script, and rebuild your blog. Done. The whole process takes far less than a minute.

This script asks you to select which database you want to query if you have multiple databases in your MySQL installation. It also asks you which blogs you want to affect if you have multiple blogs. I would love it if a few geeks out there with knowledge of PHP and MySQL could help me test this thing out. Just comment out line #130 (at least in the script’s current iteration) and the script won’t do a thing to your database, so it’ll be safe to test. It’s well-commented, so you should be able to follow it. I especially need someone to test this that has multiple databases in their installation of MySQL, and has different MT installations in each database. I don’t have the setup to test that scenario.

I look forward to hearing your feedback! Tell your friends about this (after you’ve seen a few success messages aside from mine, of course) if you think it might be useful to them.

7 thoughts on “No Comment.

  1. Gee, I guess it’s appropriate that the script is called No Comment, cuz I can’t seem to get anyone to talk about it. See, it’s not supposed to stop comments until the comments are closed. That’s how it works. These are still open. See? Open? Yes.

  2. Well, in all fairness I should also mention that there are other folks with similar solutions out there for MT 2.x and 3.x. You can go here to read about other alternatives.

  3. I think it’s partially some of the geek audience uses other stuff, or we’d just do it other ways. I actually directed someone at this entry when he was commenting about spam (it was hitting his machine to the point of mt being unusable, and it was a reasonably fast machine just doing the web site at the time). As soon as he saw the comment on the other entry about just doing it in the database his reaction was “why would I install something if it’s that simple?”, and 2 seconds later he had it done. It’s sorta a weird balance – people need to be techie enough to install MT, but not so much that they’re comfortable executing a command in a database.

  4. That’s a really good point Jeremy. I hadn’t figured on the fact that using MT means you’re already up to X level of technical proficiency, and my script only really applies to people who might be exactly at that level, and no higher.

    Well, it was fun to write either way. I’ve used it, and Steph has used it on her site too. It works quite well.

Leave a Reply

Your email address will not be published. Required fields are marked *