AutoLink Suggestions

Sep 23, 2007 at 7:52 PM
I've been playing with Autolink - it's nothing short of excellent.

However, I've some suggestions for improvement... But they need more input, since it's not easy...

Currently you have to bare careful not to enter anything that'd be used in the middle of a word, eg. if I entered "blogsformoney" as a term, any hyperlinks or images with this in would get screwed up. I think it'd be cool if we could set a list of tags that supported text content and the replacement would only be done if the text is inside a tag of those types (replacement should never be done inside an attribute).

Allowed Tags: div, p, td

With code like:

<p>This is blogsformoney!</p> // This would be replaced fine because the texts immediate parent is a p tag
<p><img src="http://blogsformoney.com/something" /></p> // This would be ignored because it's inside a tag (angle brackets)
<p><a href="#">blogsformoney</a></p> // This would be ignored because the texts immediate parent is not an allowed tag

I know this isn't a trivial task and there may be no guarantee the markup is valid xml, but if there's a way to do something like this, it'd make Autolinks much much cooler (and I'd put them into comments too!).
Coordinator
Sep 23, 2007 at 10:11 PM
The AutoLinks extension is not being a part of the 1.2 release. It was in the source code because we didn't know what to do with it. We have decided to make it a separate download and not bundle it with the release.
Sep 24, 2007 at 7:48 AM
I see - are there plans for anything like what I've posted above or are you going to release it much like it is?
Sep 24, 2007 at 3:54 PM
It was intended to take short hand, ie. abreviations, and turn them into readible text. Not entire lexicon of human readible words and make them into shortcuts. Writing out blogsformoney is a lot longer than say, BFM. Use shortcuts that are unique and you should never run into this problem.

The beauty of the extension model is that you can make what ever changes you want to suite your needs. Make your changes and share them with us if you would. Thanks.



dannytuppeny wrote:
I've been playing with Autolink - it's nothing short of excellent.

However, I've some suggestions for improvement... But they need more input, since it's not easy...

Currently you have to bare careful not to enter anything that'd be used in the middle of a word, eg. if I entered "blogsformoney" as a term, any hyperlinks or images with this in would get screwed up. I think it'd be cool if we could set a list of tags that supported text content and the replacement would only be done if the text is inside a tag of those types (replacement should never be done inside an attribute).

Allowed Tags: div, p, td

With code like:

<p>This is blogsformoney!</p> // This would be replaced fine because the texts immediate parent is a p tag
<p><img src="http://blogsformoney.com/something" /></p> // This would be ignored because it's inside a tag (angle brackets)
<p><a href="#">blogsformoney</a></p> // This would be ignored because the texts immediate parent is not an allowed tag

I know this isn't a trivial task and there may be no guarantee the markup is valid xml, but if there's a way to do something like this, it'd make Autolinks much much cooler (and I'd put them into comments too!).

Sep 24, 2007 at 7:08 PM
I understand that wasn't the plan, but it'd be a cool change for affiliate links.

I'm prepared to do the work myself - I just wanted to check it wasn't already on the cards. When I get time I'll look into it - though I might have to only do it for valid XML content, since the regex's might be a bit dodgey on invalid content :/