[]RSS

About Archives Artwork Comic Contact Philosophy Projects Tags

Planning SimpleLink .5

June 7th, 2005 in Design. Projects. Weblog

I’m reworking my plugin based on some feedback and code contributed by a few users. This release will also fix a sticky bug found by a developer at , where search-based links do not form useful semantic tags. The main goal of the release will be to make the link generation configurable and to properly reflect the of the links.

Tagspaces

Tagged links are used by tools like to figure out what weblog articles are about, based on tagged s in the content. Tagged urls are elements that use the rel="tag" attribute to indicate that the url portion of the href has meaning. The tagspace of an article then, is defined by all of the tagged links found in the content. Tagged links are automatically generated by the plugin.

Unfortunately, many targets (like ) produce useless , as the generated urls are crusty. For example, the [!!this is a test] markup generates a link to a search with the terms this+is+a+test. The url is crusty, though, as it contains words and characters that are not related to the search terms. Notice all of the line noise before, between, and after the search terms:

http://google.com/search?q=this%20is%20a%20test&btnI=

Instead, a useful tagged link would look more like:

http://google.com/feelinglucky/search/this+is+a+test

Most search-based links are crusty, making them useless as tagged links (even though it’s a really handy way to write an article).

Approach

This version of the plugin will split the plugin into two parts: a simplified plugin and a link proxy. Splitting the functionallity allows for a few neat improvements:

  • Tagspaces can be represented for any type of link, as the proxy can normalize all urls and redirect them to the right search
  • We can move the messy (and expensive) parts of the processing out of the WordPress rendering loop, as all links will point to the local proxy script. This allows us to delay database lookups for targets (and other magic) until the user actually clicks a link
  • It will allow for a new JavaScript injection target that will allow using the local proxy as a site interface for accessing other objects (like pictures, downloads, etc.)
  • It also allows the linking logic to be used from other Weblogging systems (and some of my non-weblog sites), as the proxy contains the useful logic

The proxy will be a simple script and rewrite rule. The rewrite rule will transmogrify a clean url into the required Php script parameters as follows:

http://site-url.domain/tags/google/term1+term2+term3

Will be converted to:

/simplelink-proxy.php?target=google&terms=term1+term2+term3

The plugin portion will translate the SimpleLink syntax into html or javascript that references the proxy. Search links will reference the proxy directly, and content links will either generate html directly or generate Javascript injection code to grab data from the proxy. The js injection method will be useful for images and thumbnails, especially for Flickr images.

The target definitions will move from code to the database, and a simple administration panel will be added to the WP admin tools.

 

Leave a Reply

Subscribe to comments