Optional-Redirect v0.1

I upgraded to MT 2.661 now, but I was not too sure about whether I wanted to use the new redirect "feature" for the MTCommentAuthorLink, so I wrote up this little plugin. Install it like any other plugin, and the MTCommentAuthorLink tag now takes a new argument, redirect. If set to 1, the redirect feature is used, otherwise, the old style behavior is used (I ripped the code directly out of MT 2.64).

37 TrackBacks

David Raynes pone a nuestra disposición Optional Redirect, un plugin de MovableType que permite eligir si empleamos o no la... Read More

David Raynes' new Optional Redirect plugin adds a new attribute to <$MTCommentAuthorLink$> so that you can control whether it redirects or posts the URL as normal. Read More

MT Optional-Redirect from JayAllen - The Daily Journey on January 22, 2004 5:29 AM

David Raynes helps us get the old (and preferred in my opinion) MTCommentAuthorLink funtionality back.... Read More

Optional Redirect Plugin from ETC. Indulging my inner geek on January 22, 2004 10:12 AM

If you're like me and you've been on the fence about upgrading MT to 2.661, this new plugin might make the difference. David Raynes: Optional-Redirect v0.1 allows you to opt in or out of the comment author link redirect feature.... Read More

MT-Blacklist v1.63 beta from MT-Blacklist/Comment Spam Clearinghouse on January 22, 2004 3:50 PM

MT-Blacklist v1.63 beta (release cadidate 1) is ready for download. The following changes were made: Fully compatible with Movable Type version 2.661 Added arbitrary text/regexp to despam search Added NO FILTER to despam search to get LastN comments/tr... Read More

If you're wanting to upgrade to MT 2.66, but don't dig the sound (or look) of redirecting links in comments, you might want to check out Snowblink's patch, which adds an on/off switch. Oh, and be warned that the ThrottleSeconds... Read More

Choice is good. from Live in the Delirious Cool on January 24, 2004 8:34 AM

Want to upgrade to MT 2.661, but don't like the idea of your commenters' site links passing through a redirect? Read More

David Raynes: Optional-Redirect v0.1 for MT... Read More

I'm not a fan of the new redirecting feature of MT 2.661 (there are now no direct links to websites when people make comments, only redirects). Mainly because I like to mouseover people's names and see the websites they've supplied.... Read More

I have just installed David Raynes' Optional-Redirect Plugin for Movable Type. Comment author links no longer behave in the 2.661 way. They work as they should---that is, they link directly. While I understand the nature of this change that Six... Read More

I have just installed David Raynes' Optional-Redirect Plugin for Movable Type. Comment author links no longer behave in the 2.661 way. They work as they should---that is, they link directly. While I understand the nature of this change that Six... Read More

Actually, I upgraded to MT 2.661, and noticed that the a new redirecting feature isn't to my liking, as I... Read More

Actually, I upgraded to MT 2.661, and noticed that the new redirecting feature isn't to my liking, as I like... Read More

Actually, I upgraded to MT 2.661, and noticed that the new redirecting feature isn't to my liking, as I like... Read More

In the last few weeks, I've been hit not only by comment spammers, but a new player who doesn't seem to like our party: the crapflooders, people who use automated applications (you may have heard of MTFlood or some variation) to literally flood comment... Read More

Hi. I’m Bill Turner. I’m 32, married, and a father of two (1,2). I work for a big internet portal, and I’ve recently started going back to school to finish the bachelors degree I left hanging about 10 years ago. If you’d like to... Read More

In the last few weeks, I've been hit not only by comment spammers, but a new player who doesn't seem to like our party: the crapflooders, people who use automated applications (you may have heard of MTFlood or some variation) to literally flood comment... Read More

edited In the last few weeks, I've been hit not only by comment spammers but a new player who doesn't seem to like our party: the crapflooders, people who use automated applications (you may have heard of the program called "MTFlood" or some variation)... Read More

MT Plugin makes comment redirects optional... Read More

OptionalRedirect from MT Plugin Directory on February 1, 2004 8:45 PM

... Read More

Plugging in from Tao of Dowingba on February 3, 2004 2:05 AM

I currently use, and have used in the past, several Movable Type plugins. Here's the list: Optional-Redirect v0.1: A very useful plugin that allows you to turn off the annoying 'redirect' feature on MT 2.661 comment author links. MT-Blacklist: Let's... Read More

OptionalRedirect from MT Plugin Directory on February 8, 2004 4:46 AM

... Read More

OptionalRedirect from MT Plugin Directory on February 8, 2004 4:46 AM

... Read More

movable type from a coma trail on February 8, 2004 8:20 AM

It's after five in the morning and I am still up and restless. My sleep schedule is pretty much screwed. I've taken this time to thank more people responsible for various functionalities installed on my blog, and for their contributions to the blogosph... Read More

David Raynes: Optional-Redirect v0.1 Got tired of the new 2.661 feature that hides the URL of commenters behind a redirect-url. The feature was made to prevent comment spammers from getting google pagerank points, but I think we all like to mouse-over ... Read More

David Raynes: Optional-Redirect v0.1 Got tired of the new Movable Type 2.661 feature that hides the URL of commenters behind a redirect-url. The feature was made to prevent comment spammers from getting google pagerank points, but I think we all like t... Read More

David Raynes: Optional-Redirect v0.1 Got tired of the new Movable Type 2.661 feature that hides the URL of commenters behind a redirect-url. The feature was made to prevent comment spammers from getting google pagerank points, but I think we all like t... Read More

Moveable type no redirect plugin Read More

I finally upgraded to MT 2.661. Wanna know why? Because of David Raynes's Optional-Redirect v0.11 That's right. You can mouse over your commenter's names again, without seeing your own url. I know there was a good reason for that feature... Read More

I'm slightly behind in my techie updates, which I'm attempting... Read More

My background I started mucking around with an IBM PC in ‘84 when my employer bought a unit with a 10MB hard drive. Migrated from there to mainframe COBOL and CICS, and rode the consulting boom through the 90s. This... Read More

Plugin problem? from Mind of Knowledge on May 11, 2004 3:10 PM

Blog problems and optional redirect plugin. Read More

URLTitles from Tao of Dowingba on May 19, 2004 9:50 PM

I, for one, have been greatly annoyed by Movable Type 2.66x's comment author redirect script since the day it was released. I positively hate not being able to look at the browser's status bar to predict where that link will take me; and this is why I ... Read More

MT 3.0 and a new iBook. Read More

I meant to fix this for a long time. With 2.66 SixApart applied a new feature that should discourage the use of comments to obtain Googe juice. However most spammers put their links directly into the comments body. Since I weed them out anyway mit MT-B... Read More

I meant to fix this for a long time. With MovableType 2.66 SixApart changed the behavior of the CommentAuthorLink tag. Instead of adding an href to the site of the comment author, it linked to a cgi-script that redirected to the site. This change was d... Read More

I meant to fix this for a long time. With MovableType 2.66 SixApart changed the behavior of the CommentAuthorLink tag. Instead of adding an href to the site of the comment author, it linked to a cgi-script that redirected to the site. This change was d... Read More

28 Comments

Thanks David, this is fantastic. :)

We shouldn't have NEEDED this plugin but we do and I thank you - now I can upgrade.

Thanks! I was just about to post a feature request in the MT forums for this exact feature. Thanks again.

Thanks! I was just about to post this exact feature request in the MT Forums, when I saw your post about this plugin. Thanks!

I was just about to hack this feature for myself. I'm glad to see it has already been done. Thanks!

I was just about to hack this feature for myself. I'm glad to see it has already been done. Thanks!

Thanks for saving me a round tuit. One little thing: in the non-redirect block, you've got a second "my($ctx, $args) = @_;".

am i the only person who is getting this error when i try to rebuild?

+++
An error occurred:

Undefined subroutine &MT::spam_protect called at /usr/www/users/sisyphus/cgi-bin/plugins/optional_redirect.pl line 40.
+++

i have three blogs; one if them has the comments in pup-up windows, and it rebuilds with no problem after installing this plug-in.

on the other two blogs, i have it configured to see the entire post with comments when someone clicks the 'comments (2)' link (basically i have replaced the opencomments tag with the permalink tag. on these two blogs i get the above error. thanks.

Hi, thanks for the great plugin! I also hate those redirects. However, although I see the target = "_blank" line in your plugin, I don't seem to have that functionality. When I click on a link in the popup or my individual archive, it still opens in the same window, not a new one.

Anyone out there know how to fix that easily?

For the spam_protect error: the best thing you can do is replace spam_protect="1" in your template with show_email="0" so you'll never show an email address. The "spam protection" is trivial to get around, and there probably isn't a single harvester left working that doesn't know how. But, if you really want to show email links, find the line

use MT::Util qw( remove_html );

and add spam_protect inside the parentheses, so you have

use MT::Util qw( remove_html spam_protect );

and the rebuild errors will stop.

Thanks Phil, that's great.

Thanks Phil, that's great.

Sorry to be a pain, but "install like a normal plug in" means nothing to me.

Is there a place to find instructions to install this?

geoffrey, just download and unzip the file, then upload the .pl file to your 'plugins' directory in your cgi-bin with your ftp application. if you don't already have a plugins directory you may have to create it. good luck.


i also have a question about rebuilding errors:

i have installed the optional-redirect plugin. when i rebuild my site by logging onto mt, i have no problems. however, i have a cron job to rebuild the site every six hours (for a feed that is included), and when that rebuild occurs, i get an email with this message:

+++
Cron $HOME/public_html/cgi-bin/mt-rebuild.pl -mode=all -blog_id=2

"my" variable $ctx masks earlier declaration in same scope at /usr/home/sisyphus/public_html/cgi-bin/plugins/optional_redirect.pl line 26.
"my" variable $args masks earlier declaration in same scope at /usr/home/sisyphus/public_html/cgi-bin/plugins/optional_redirect.pl line 26.
+++

the site seems to look the same, but it is annoying to get this message 12 times a day (3 times every 6 hours...), and i wonder if it is a security or spam risk? thanks.

geoffrey, just download and unzip the file, then upload the .pl file to your 'plugins' directory in your cgi-bin with your ftp application. if you don't already have a plugins directory you may have to create it. good luck.


i also have a question about rebuilding errors:

i have installed the optional-redirect plugin. when i rebuild my site by logging onto mt, i have no problems. however, i have a cron job to rebuild the site every six hours (for a feed that is included), and when that rebuild occurs, i get an email with this message:

+++
Cron $HOME/public_html/cgi-bin/mt-rebuild.pl -mode=all -blog_id=2

"my" variable $ctx masks earlier declaration in same scope at /usr/home/sisyphus/public_html/cgi-bin/plugins/optional_redirect.pl line 26.
"my" variable $args masks earlier declaration in same scope at /usr/home/sisyphus/public_html/cgi-bin/plugins/optional_redirect.pl line 26.
+++

the site seems to look the same, but it is annoying to get this message 12 times a day (3 times every 6 hours...), and i wonder if it is a security or spam risk? thanks.

Geoffrey, within your installation folder (usually called "mt"), create a folder called plugins; upload the plugin in ASCII format, and rebuild. David, thanks so much (and thank you,Phil for the spam_protect headsup) - it works beautifully!

Thanks ashley! I had to change the MT::util also, but it appears to be working now. Something messed up my SCode, but I think that is a blacklist issue.

ashley, that's what I was saying up in #11. Both line 17 and line 26 are "my ($ctx, $args) = @_;" and even with regular rebuilds, your error.log is getting that same message. Just comment out the second one (*not* the first) by putting a # at the start of the line, and it'll be fine.

hi phil. sorry, i missed that; i will try that fix right now. also, i apologize for posting the same comment twice. thanks for your help.

hi phil. sorry, i missed that; i will try that fix right now. also, i apologize for posting the same comment twice. thanks for your help.

Thanks for this plugin - I couldn't figure out what was up with the new redirect "feature".

thank you very much! that helps a bunch. i'd been looking for something like this to solve this problem i didn't like. :D

I installed the plug in.

I inserted redirect="0" in my tag

And when I rebuild I get

MT::App::CMS=HASH(0x17529c0) Subroutine _hdlr_comment_author_link redefined at c:\inetpub\wwwroot\MT\lib/MT/Template/Context.pm line 1173.

And still I have the redirect.

Any ideas?

Thanks

Think simple. Learn different.

Someone posted with this exact same problem almost a month ago, but I haven't been able to find any word on a fix yet. I uploaded the plugin into my plugins directory in ASCII mode and put the redirect="0" tag in, and when I rebuild I get this:

MT::App::Comments=HASH(0x810aa80) Subroutine _hdlr_comment_author_link redefined at lib/MT/Template/Context.pm line 1173.

Both in my little rebuilding window and in my comments window. I'm really sorry if this is me being a big stupidhead and not doing something that's really obvious to people who know more about installing these things, but any help would be greatly appreciated.

Nice idea. But to avoid those "subroutine redefined" errors, I would replace the entire plugin initialisation code (including those curly braces) with:

use MT::Template::Context;
MT::Template::Context->add_tag(CommentAuthorLink => \&author_link);
MT::Template::Context->add_tag(CommentPreviewAuthorLink => \&author_link);

And then in the author_link subroutine, you can change the code which calls the 2.661 behaviour to this:

if ($redirect) {
return MT::Template::Context::_hdlr_comment_author_link (@_);
}

i get the same exact error that rachel does... nothing at all is working for me as far as turning this annoying redirect thing off. :(

I've been using this plugin for awhile, and still use it with MT3 because I appreciate that it just flips the redirect off by default. I would like to report one bug, however -- under MT3 (and maybe this is just for typekey commenters -- I haven't checked), if there is not url or email provided, MTCommentAuthorLink still creates a mailto: link which points to a long string of hexadecimal digits (eg: mailto:28a939cdef399201bb83ac).

Just FYI. And thanks!

Leave a comment

Recent Entries

  • Must Be Doing Something Right

    It’s not because they say please and thank you so often (and appropriately). It’s not that they hug each other and say they’re sorry (eventually)...

  • Because tests and bugs are fun

    A colleague of mine just shared this particular frustration: yargh. my test passes if all of the objects are created within the same second, but...

  • Upgraded to MT 4.23

    So, yeah, it’s a month late or so, but I’ve been really busy. I finally upgraded this site to Movable Type 4.23. Maybe I’ll even...

  • I apologize about the feed updates

    I’m deploying a development version of my MediaConsumer plugin and a number of entries might appear as updated in feed readers as I start applying...

  • Plugin Writing 101

    So, I’m planning on writing up some entries about various aspects of plugin development. While I have a couple topics already in mind, I thought...

Close