AutoLink Plugin for Movable Type

AutoLink provides users with a way of creating a list of "hot words." Whenever these words appear in a post, they are automatically linked to a designated URL. For example, if you were to frequently write about Movable Type, and anytime you mention the phrase "Movable Type" in a post you want it to be linked to http://www.movabletype.org/ without having to enter the link manually. This plugin will do that for you.

More advanced users could use AutoLink to setup linking rules that will turn Wiki formatted words into links into their internal/external wiki.

Prerequisites

Prior to installation, the following requirements must be satisfied:

  • User has MovableType 4.1 or later installed
    • it could work on 4.0, but it has not been tested

Download

Installation

To install this plugin follow the instructions found here:

http://tinyurl.com/easy-plugin-install

About AutoLink Rules

Users manage how AutoLink is to convert strings, phrases and patterns into linkified text through a set of "rules." Each rule has the following properties:

  • Label - a human readable description of the rule and its intention
  • Pattern - the string to convert into a link
  • Destination URL - the URL that the pattern will be linked to
  • Regular Expression? - Process the pattern specified as a regular expression, otherwise process it is a simple string or phrase
  • Link all occurrences? - Link all occurrences of the pattern, or just the first occurrence.
  • Case insensitive? - Make the pattern case insensitive.

Editing Your Rules

Each blog in your installation of Movable Type is allowed to manage its own unique set of AutoLink rules.

You can edit your list of AutoLink rules by clicking "AutoLink Rules" from the Manage menu in Movable Type.

Screenshots

AutoLink Rule Listing

Edit AutoLink Rule

See Also

36 Comments

Hi Byrne,

This looks awesome. I built something a little like this for WordPress years ago (Link Linker) but this is so much nicer!

What does the plugin do if "Link All Occurences" is unchecked?

--Steve

While I'm at it, an idea: add active/inactive status so we can turn links on/off w/o deleting them.

That's what I like to hear: Movable Type has quality plugins.

If "Link All Occurences" is unchecked, then AutoLink will link only the first occurrence.

Great idea. That will be in the next version. I need to also add support for link priorities and change AutoLink to apply only the first matching rule to the text.

My Todo list so far:

  • be able to disable/enable rules without deleting them
  • specify if you want links to go through a google redirect
  • specify if you want links to go through a google analytics click through tracker
  • specify rule priorities

Very nice!

Suggestion, though perhaps outside the scope of AutoLink: fold the Acronym plugin's functionality into this. Being able to easily edit the list of linked words is Acronym's shortcoming, and this may be a good solution to that.

@dan - that's a great idea re: acronyms, though I'd want the acronyms in a separate, managable list.

@byrne - how does AutoLink track clicks right now? (I noticed the "clicks" column in the manager...

It's a great plugin! Thank you!

Hi,

I receive an error message each time I save a posting:

Can't call method "stash" on an undefined value at /var/www/internet/yvesluther-name/live/cgi-bin/mt/plugins/AutoLink/lib/AutoLink/Plugin.pm line 102.

Any help is welcome!

Yves

Hey Byrne--just noticed something odd: The "created" time for any autolink rule is four hours off.

I noticed that too. I will be getting a new version out soon that will fix this, and also add support for dynamic publishing.

I had a problem as Yves Luther, besides, this plugins can't create Chinese character link automatically, I am not mean Chinese URL, but Chinese tags.

Good hint from @jackie: Though my blog is UTF-8 I use those pesky German special chars.

Maybe this is a valuable information for Byrne. Is it?

weird. i'm getting this error.

Publish error in template 'list.tmpl': Error in tag: No MT object class for type 'autolinkrules'.

I get this when i select "autolink rules" - i'm running the latest beta5

I need to use expression entered in "Pattern" to assembly a part of "Destination URL".

Is there a possibility?

Fantastic plugin, Byrne. If you're taking feature requests, I'd love for this to work on comments, too. And have the ability for rules to only target comments and not body text.

thanks boy.it is a good plugin

Fantastic plugin, Byrne.

Byrne,

Is there a way to include a href title in links as well (same text as anchor text)?

Thanks for the great plugin, Byrne! Just installed in and looking forward to using it.

I've got following error when using batch edit:

Can't call method "stash" on an undefined value at /var/www/vhosts/futurelab.net/cgi-bin/mt/plugins/AutoLink/lib/AutoLink/Plugin.pm line 103.

On a single entry everything's fine.

Hi Byrne,

This is a very worthy successor to QuickLink. The interface is much, much cleaner and easier to manage.

But QuickLink had one functionality that AutoLink seems to lack (or maybe I'm missing something).

In QuickLink, I could do this:

Text to replace:

\bxBBCx\b

Link:

<a href="http://www.bbc.co.uk/" title="BBC" target="_blank">British Broadcasting Corporation</a>

What this allowed me to do was:

  1. to expand a particular acronym used while writing ("BBC") to its full form ("British Broadcasting Corporation");

  2. Add the URL

  3. Specify a link title

  4. specify a target window/frame

Is there any way to do that with AutoLink? I found that functionality incredibly useful.

Thanks,

Gautam

I'm getting the same Can't call method of "Stash" error as others.

Did anyone find a fix to this?

Very nice!

Suggestion, though perhaps outside the scope of AutoLink: fold the Acronym plugin's functionality into this. Being able to easily edit the list of linked words is Acronym's shortcoming, and this may be a good solution to that

I'm having problem changing the display settings on the Autolink Rules page. I can set and save them but when the page redraws after the save the page appears the same and the settings are back to their defaults.

Any help would be appreciated. I would even be happy if someone could tell me how to tweak the database to alter the default 20 links per page to a bigger number.

Thanks - Neil

I love this plugin!

Is there anyway you can get AutoLink to work "globally". Instead of managing lists on individual blogs I could manage one master list and all blogs would use AutoLink?

I am afraid not. Not yet anyways. But that makes perfect sense, doesn't it. Let me add that to my list of things to do.

Is there anyway to make it so that an entry won't link to itself. For example, in an entry called 'Movable Type' I don't want to create links to every instance of the phrase 'Movable Type' in the Movable Type entry. I hope that makes sense.

Byrne

I'm getting a very unhelpful error:

"Can't call method "stash" on an undefined value "

Pity, as it sounded like it could have been really useful

Michele

Regarding "stash error", is it helpful to just replace the $ctx->stash('blog')->id with the real blog id, say 1, in my case?

This plugin is not support non-English characters, will it be updated?

Great Plugin! Important Notes:

1) The Plugin only works for new/existing entries that you edit in the Edit Entry Screen, then Save and Publish.

It does apply the links to already published entries by simply clicking Republish site. (I tried it.)

2) The URL displayed in the Auto-Link page is missing the "h" in the beginning of http. The "h" correctly appears when user clicks to edit the AutoLink Rule.

3) Rule-Created Time is 4 hours behind schedule (as noted by other Commenters).

1) CORRECTION: I meant to write-- It does NOT apply the links to already published entries by simply clicking Republish site. (I tried it.)

2) The STASH error is apparently not solved. Byrne, please help!

Just posted a few updates to AutoLink. 0.92 should fix the stash error and the date display error. Still working on how I could get this work when publishing directly from the listing screen.

Hi Bryne,

MT-Notifier died with: Can't call method "var" on an undefined value at /home/697/domains/design-ist.com/cgi-bin/mt/p lugins/AutoLink/lib/AutoLink/Plugin.pm line 103.

You may already know this issue but just in case, using mt4.25pro

I just released AutoLink 0.93 to fix this. Please let me know if it doesn't work.

Leave a comment

what will you say?

Support Open Source

Do you like this software? Do you need help? Please show your support with a small token of appreciation:

Please consider donating $10 to say "thank you." If you would need help getting an issue resolved, or would like a feature implemented, consider donating $35 or more.

badge-iheartmelody-white.png

Close