Smart link plugin for WordPress, beta

43
Comments

In resources — The smart links plugin for WordPress lets you insert links in your posts using natural language rather than urls. The resulting increase in usability is positively spectacular. Such, in fact, that you might never want to insert an html anchor again.

This plugin is likely to addict all but the most nerdy software grunt.

Filed under Blog, WordPress by

Comments on Smart link plugin for WordPress, beta

April 11th, 2005

Carla
12:32 am #

Punk rock! Nice job. Looking forward to playing with it. :)

Andreas
12:59 am #

Lots of interesting plugins here! And I just got my site online, thinking that I had it all configured and ready for take-off. Very well, I guess I'm in for a new round of plugin-testing…

April 12th, 2005

Monkeypup
11:48 am #

Can't wait to see this one when it's released!

May 6th, 2005

Uh, yeah, what Monkeypup said!!!!!!

Nice work.

May 17th, 2005
May 18th, 2005

Ivens Branco
2:37 am #

It looks good. I'm gonna try.

task
4:13 am #

hi, i was wondering is ther's eny way of maiking links open in a new page when they are external…

tnkz :)

Suman
9:42 pm #

I was looking for a simple solution to add links in my posts, your plugin fits in nicely to my needs. Awesome stuff.

I noticed that some autolinks to the post slugs don't appear when they are viewed from the index page. They do appear to work properly when that single post is viewed. I had one test post at my site which if you want I can publish again to demonstrate the problem.

Sorry about my English, I'm not very good at it.

May 19th, 2005

mike
3:27 am #

very very cool! thanks!

monkeypup
12:32 pm #

Single. Greatest. Plugin. Ever.

You rock.

May 20th, 2005

tyler
1:07 pm #

Looks good. Installing it right now! Will let you know if I come across anything odd. I don't expect to though.

May 21st, 2005

Orlando
3:03 am #

Wonderful plugin. Something special.

Martin Geisler
10:55 am #

The plugin is a cool idea! Some comments:

* External links would be more useful if they retained the description as given when the link was added to the database.

* The "search engine" isbn.nu could be added to the list — it's nice for referencing books in a somewhat neutral way (that is, without sending everybody directly to Amazon).

Martin Geisler
11:10 am #

There's some problem with links made in comments, please [see my post about it][1]. Could this have something to do with the use of `$wp_version != '1.5'` instead of something more robust like `version_compare($wp_version, '1.5') == -1` — given that the meaning of that test is to find version such as 1.2. I'm running the latest SVN (version 1.5.1.1 at the moment).

[1]: http://mgeisler.net/2005/05/21/now-using-smart-links/

Martin Geisler
12:37 pm #

Ahh okay, then I'll leave that version check in place :-)

task
5:35 pm #

@Denis de Bernardy:

tnkz for your reply..

maybe an option, like add "->external" or "->ext"

or at list be able of adding class="external" or something so we can customize the output, to external links…

May 22nd, 2005

task
3:36 am #

yep, i have installed http://txfx.net/2005/03/24/wp-identify-external-links/
but doesn't seem to work with your plugin, maybe something is not working between the one with the other… :(

monkeypup
4:01 pm #

Maybe this is a silly question (I'm code illiterate, I'm afraid), but is there a way to add functionality to this to link to an amazon search?
The reason I ask is, it would be nice to mention a book or movie, and link it as such `[The Great Gatsby->@amazon]`

Is this something that can be added to future versions, or something I can adjust myself?
Again, this plugin is simply the best I've come across, and it is changing the way I post.
Thanks again!
Monkeypup

task
6:59 pm #

@Denis de Bernardy:

cool, making that fix the problem…

but when using `[etc->@]` (searching in the same blog) the plugin thinks is a external one… :(

May 23rd, 2005

inky
6:05 am #

fascinating plugin. it sounded useful to start with, but as i read the documentation i became more and more impressed. i like that it simplifies adding search engine queries - and the "mutating links" thing is brilliant. it almost adds wiki-like functionality…

bravo.

May 24th, 2005

task
3:41 am #

maybe a problem?

http://wearemad.weblogs.us/2005/05/18/smart-link/

for some reason adds a "/" after the term…

http://wearemad.weblogs.us/search/El+Rey+Tut/ (does not work)

http://wearemad.weblogs.us/search/El+Rey+Tut (works ok) :|

Martin Geisler
8:41 am #

I think I've found the real reason why I couldn't get the smart links to work in [my comments][1]: they `$comments` variable isn't defined as global by `comments.php`. The variable is a local variable in the `comments_template()` and when this function includes `comments.php` it is still just a local variable.

So when your plugin does

if ( !$comments_to_cache )
{
global $comments;
$comments_to_cache = $comments;
}

then it doesn't work.

[1]: http://mgeisler.net/2005/05/21/now-using-smart-links/#comment-230

Martin Geisler
9:56 am #

@Denis: yes they use the `$comments` array, but this isn't global, it's a local variable in the function that includes the `comments.php`file. So there are no way for the `sem_smart_link_cache_comments()` function to access it.

monkeypup
11:52 am #

Hey, thanks for throwing in the Amazon link function. As always, you rock, Denis.

monkeypup
11:54 am #

Oh, one other thing. If this doesn't win the Wordpress Plugin competition (you have entered it, right?), something is wrong with the world.

May 30th, 2005

philippe
1:11 pm #

salut bernard,
ne parlons pas du non d'hier. ici berlin, comme partout, les francais expatriés ont voté massivement oui…
aurais-tu une doc en francais sur ce plugin, mon anglais laisse un peu désirer.
a+
philippe

Martin Geisler
1:46 pm #

@Denis: Sorry about the wait — I've now tested your plugin with the standard Kubrick theme (without the nested-comments plugin) and your change isn't quite enough to make it work.

Instead one has to do

$GLOBALS['comments'] = $comments;

for there are actually no global `$comments` variable at all. The above creates it and gives it the right value. Maybe one should use `=&` instead, but I find that construct very annoying so I left it out.

Martin Geisler
2:45 pm #

@Denis: Yes, well, it seems very open-ended: you just attach some code to a hook, and then do what you want. But at the same time it's limited because you have to rely on the right things to be in score when your hook is executed. So without careful planning, you end up having a needed variable be inaccessible from a plugin.

June 2nd, 2005

monkeypup
1:45 am #

Denis-
Hate to bother you, since you were nice enough to add an Amazon function to the plugin, but I noticed that the Amazon link takes you to a book search, rather than an overall Amazon search. Is it possible to change this? Just curious. I find I get more use out of this plugin everyday. Still the best plugin around.
Thanks!
MP