Fixing the Comment Links

Some thing that has bothered me for quite some time is how Movable Type does it’s comment links. Instead of just a normal link to a website, it does this weird internal redirect. I’m sure the software does this to help prevent spam but with all of the protection built in, there’s really no need for something like that.

It’s easy to fix.  Here’s the code for the Comment Detail template.  You’ll find it under Design -> Templates -> Quickfilters -> Template Modules.

<div class="comment"<MTIfArchiveTypeEnabled archive_type="Individual"> id="comment-<$MTCommentID$>"</MTIfArchiveTypeEnabled>>
    <div class="inner">
        <div class="comment-header">
            <$MTCommentAuthorLink default_name="Anonymous" show_email="0"$> <MTIfNonEmpty tag="CommentAuthorIdentity"><$MTCommentAuthorIdentity$></MTIfNonEmpty> said:
        <div class="comment-content">
        <div class="comment-footer">
            <a href="#comment-<$MTCommentID$>" title="Permalink to this comment"><$MTCommentDate format="%x %X"$></a>

See the line up there with $MTCommentAuthorLink? That’s where the “Commenter bla-bla says:” get generated along with the link. All you have to do to get rid of the weird redirect link is add in no_redirect=”1″ to the line.

So the new line will look like this:

<$MTCommentAuthorLink default_name="Anonymous" show_email="0" no_redirect="1"$> <MTIfNonEmpty tag="CommentAuthorIdentity"><$MTCommentAuthorIdentity$></MTIfNonEmpty> said:

Why am I posting this? Because it’s missing from the docs. Rather annoying actually. Almost like reading WordPress’ codex once again. There used to be a plugin for this but it’s no longer needed.

Hopefully this will help someone else out. (And maybe get the docs edited to show this feature.)

Now I’m off to regenerate about 200 comments. 🙂

edit: Also considering that I don’t use nofollow on this blog, I think it’s important for folks to get credit for their comments.

reedit: You have to do the same to the Recent Comments widget.

Leave a Reply

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