Tweaking MTCommentAuthorIdentity

There are several features of the <MTCommentAuthorIdentity> that annoys me.

target="_blank"

I absolutely hate links opening in new windows/tabs without my permission. My view on this is that if I want something to open in a new window/tab I will instruct it to do so! A bug with the developers (#1313) to remove the target="_blank" but its still not happened. So, in lib/MT/Template/Context.pm and php/lib/function.MTCommentAuthorLink.php search for

<a target="_blank" title="%s" href="%s%s?__mode=red;id=%d">%s</a>

and

<a target="_blank" title="%s" href="%s">%s</a>

and remove the target="_blank"

Redirecting

With MT-Blacklist protecting my Movable Type blogs, I really don't need the redirection of the comments anymore. It was originally implemented to control comment spam (which I haven't seen decrease since 2.66) so I'm removed it permanently! So, in lib/MT/Template/Context.pm and php/lib/function.MTCommentAuthorLink.php search for

return sprintf(qq(<a target="_blank" title="%s" href="%s%s?__mode=red;id=%d">%s</a>),
$url, $cgi_path, $comment_script, $c->id, $name);

and replace it with

return sprintf(qq(<a target="_blank" title="%s" href="%s">%s</a>),
$url, $url, $name);

If you don't want to completely get rid of the redirection but would like some regular commenters urls bypass the redirection have a look at the friend or foe script written by Neil Turner

3 Comments

Neil T. said:
on Oct 22, 2004 4:17 PM | Reply

Can't you just use <$MTCommentAuthorLink no_redirect="1"$> ? It's what I use in my friend-or-foe script.

Arvind Satyanarayan said:
on Oct 22, 2004 4:18 PM | Reply

Heh, guess I should've looked at the docs first :-P Thanks Neil!

dennis said:
on Nov 2, 2004 5:38 AM | Reply

I thought about this a few days ago, as well. For the (generally) few spam comments/trackbacks that slip through MT-Blacklist, I don't want these bozos to get the satisfaction of being indexed if I don't get to 'despam' in time.

Leave a comment

Preview