Categories
Code Talking

MT-Moderate and SimpleComments

A number of you have mentioned that you would like to use MT-Moderate, specifically to moderate trackbacks, but are unable to do so because you also use SimpleComments. Because of the way in which I'm making trackbacks moderated, they will still appear in SimpleComments lists of trackbacks. Now,…

A number of you have mentioned that you would like to use MT-Moderate, specifically to moderate trackbacks, but are unable to do so because you also use SimpleComments.

Because of the way in which I’m making trackbacks moderated, they will still appear in SimpleComments lists of trackbacks.

Now, thanks to Jayaprakash (JP), those of you using dynamic publishing are now able to get around this limitation.

First, you’ll need to find the PHP code responsible for the rendering of the comment listing, which you can find in the plugins folder under the php folder in your Movable Type installation.

Within this folder, you will have a file called block.MTSimpleComments.php. In this file, locate line 154, which reads:

  and tbping_tb_id = trackback_id

And add this line immediately following it:

  and tbping_created_by != '1'

Your dynamic archives will then process these moderated trackbacks appropriately. That is to say, they will be ignored by the container, and not displayed on your blog.

Similarly, you can update SimpleComments.pl to do the same thing. There are actually two versions of this file included with the 1.32 distribution of SimpleComments – one in the root directory and one in the plugins directory. You will need to update whichever you are using on your site.

On line 83 of the one in the root directory, or line 88 of the one in the plugins directory, locate this line:

  my @allComments = (@comments, @pings);

Immediately before this line, insert this code:

  @pings = grep { !$_->created_by } @pings;

And then the Perl version will work as well as the PHP version. No more moderated trackbacks in your SimpleComments listing. I have attempted to contact Adam (the author of SimpleComments), but have heard nothing back from him, so I do not know if this will ever be integrated into the base code. Luckily, it’s not a difficult change to make. Enjoy!

5 replies on “MT-Moderate and SimpleComments”

No, as mentioned in the readme file, you need MT 3.1. It’s possible that it will work with MT 3.0D, but I suspect you’ll have problems with 2.661. You really should upgrade. In fact, you should upgrade to 3.2. It’s well worth it.

MT-Moderate isn’t designed to work with dynamic publishing. That’s not to say that it couldn’t, just that it hasn’t been done at this point (unless you are using SimpleComments, as described).

The best solution would probably be to donate to the development of the product. This could be done through one of the Paypal links at the Movable Type Solutions page or by sending an item from the wish list (linked at the top of every page). With your contribution, include your request for this feature.

On MT 3.15, dynamic publishing for archives is on, running MT-blacklist as well, no simple commnets. I set config to -1 to moderate all trackbacks and comments. Comments are moderated properly, yet trackbacks show up immediately in individual entry archives. What would I have to change to get trackbacks immediately moderated? Super stuff otherwise.

Comments are closed.