SimpleLink

SimpleLink is a plugin that extends the linking syntax with automagical search and image link generation (to make linking to things easier). It plays well with Markdown, and is based on my previous plugin MagicLinks.

Download

The current version is stable for my own uses, even though it’s a hacked port of a Perl-based plugin I developed for , , and . I’ll get around to improving it sometime.

New Features in .05/.06

  • Fixed parsing problems with common uses in pre/code blocks
  • Fixed wiki formats (| and ‘ ‘ for mediawiki emulation)

New Features in .04

  • Fixed _ parsing bug
  • Added open links in new window for pkzip.

New Features in .03

  • Added tag='rel' attribute to all text links, which allows semantic scraping by and .
  • Fixed img generation for product links for fixed-size images with overflow (fixed dimension thumbnails without scaling thumbnail).
  • Added search links with techo: and tag: targets, which generates links to Technocrati searches and tag searches.
  • Added image linking with flickr: target, making it easier to embed to Flickr images on your site

Help

Here’s a quick list of various ways to link to things with SimpleLink:

MarkupResulting text
[http://warpedvisions.org]
[http://warpedvisions.org|test]
[flickr: 9720590 e8a76cc90c]
[tag: warpedvisions]
[techno: warpedvisions]
[test google search]
[google: more google]
[foldoc: usb]
[imdb: star wars IV]
[perldoc: cgi]
[here: Google be gone]
[wiki: tsunami]
Image linking
[asin: 0898799279]
[0898799279]
[image: trees.png]trees.png
Special text
[abbr: CSS - Cascading Style Sheets]CSS
[note: You are here.]
You are here.
[comment: Test comment.]
Test comment.
[warning: Don't!]
Don’t
[tip: A tip.]
A tip.

Special text styling

The special text boxes are styled entirely using css. Example:

.note    {background: url(/images/snote.png) no-repeat 8px 8px;}
.note, .comment, .tip, .warning {
  padding-left: 70px;
  margin: 4px;
  height: 64px;
  width: 128px;
  overflow: auto;
  border: 1px solid #CCC;
  color: #666;
  float: right;
  font-size: smaller;
}

This lets you pick how your callouts will look.

Installation

There is a small amount of configuration in the plugin that requires you edit it by hand. The section is highlighted in comments, and the variables are fairly obvious. A future version of the plugin will store its configuration in the WP database, and will provide an interface to edit it.