Multilink

Summary: How to create multilinks
Version:
Prerequisites: PmWiki version 2.0.beta48; Mozilla Firefox 1.0.6 or Camino 0.8.4
Status:
Maintainer: Julian I. Kamil
Categories: Links, Editing
Discussion: Multilink-Talk?

Edit Page

About Multilinks

A multilink, or {mlink|multilink}, is a link that goes to one or more target destinations. A multilink is rendered as a popup menu that presents the targets as a list of menu items. An item can be selected from the menu to follow the {URL|Uniform Resource Locator} of the target, or a special item called "edit" can be selected to add, remove, or modify the targets of the multilink.

Many researchers have discussed and proposed similar multilink features, but browser implementations are rare and have not been widely available due to various technical reasons. As far as I know, thanks to this plugin code, PmWiki is the first wiki to have a full-featured multilink capability.

My multilink plugin code adds a full support for this feature to Camino and Firefox browsers, but only a partial support to any recent versions of Internet Explorer due to its {CSS|Cascading Style Sheets} implementation shortcomings (full support may be upcoming if there is any user demand). In the meantime, I would recommend that you switch to the better browser, Firefox, or Camino if you use Mac OS X, and while at it, also switch to one of the superior operating systems, Mac OS X and GNU/Linux.

Live Demo

http://www.madhckr.com/project/mlink/index.php?n=Main.HomePage

Why This Is Cool

By adding the multilink capability to a wiki, it makes it tremendously easy for anybody to create and maintain multilinks. Creating a new multilink is a matter of marking up a term with a very simple markup. Targets are not embedded in the markup, but rather, stored in an external metafile linked to but exists independently from the page where the multilinks are defined. The wiki system maintains and manages the metafile independently from the context pages.

Each multilink is like a bookmark menu on a particular subject that can be placed anywhere on a web page. Future improvements could add attribution and election methods, click-through tracking, and other metadata on each multilink that can be used to influence the view of the multilink. Presently, you can enable shading, from bright to dark, to indicate the ranking of the targets of a multilink.

A web page with multilinks can express and record information in a very compact and dense fashion. It also allows information authors to add the right amount of context around bookmarks that is presently not possible to accomplish with the built-in browser functions.

The Multilink Markup

Once this feature is enabled, you can create a multilink using the following markup:

    [[ text = * ]]

The text will be decorated as a multilink and a popup menu will be available when the cursor hovers on the decorated text.

Enabling Multilink

  • Download the following plugin, and place it in your cookbook subdirectory:
mlink.phpΔ (updated on July 21, 2005)
  • Include the plugin by adding the following line in your local/config subdirectory:
    include_once("$FarmD/cookbook/mlink.php");

Optional Multilink Features

  • The variable $MlinkShade, if set to TRUE, will cause the menu items to be displayed in shades of gray according to the ranking of the targets assigned by the end user.
  • The variables $MlinkGoogle and $MlinkWikipedia, if set to the appropriate strings, will cause additional menu items to automatically appear in the menu allowing a lookup for the link title using Google and Wikipedia, respectively.
  • Here is an example:
    $MlinkShade = TRUE;
    $MlinkGoogle = "http://www.google.com/search?q=";
    $MlinkWikipedia = "http://en.wikipedia.org/wiki/Special:Search?search=";

Notes

  • This recipe was last tested on PmWiki version: 2.0.beta48
  • This recipe requires at least PmWiki version: 2.0.beta48

Problems

  • The linkname always has an "(edit)" besides it. Can I change this, so it only shows up, when a user is logged in?
    • Agreed! the appearance of the edit option to unauthorized users can be confusing, I hope this option comes in a future enhancement. Great feature, though, thanks!
  • What did you mean by "[[ text = * ]]" ? Can you give an example ? Thanks FidelioEspoir 16/1/6
  • Hi Julian, great idea and it works using the right browsers. But - most of the people (hence most people who use the wiki) will be crippled a bit. Could you make it work in IE? That'll be really cool. (The hint to use a better browser can be left unchanged, imho :))) Have a nice day! Axel 09.08.2006 9:41 AM
  • What a buggy program

Author

Other Contributions

  • SimpleSkin - A very simple but good looking skin
  • To Do - A PmWiki plugin for managing to do lists

Comments

See discussion at Multilink-Talk?