Hello everyone.
For those interested, I've released a proof-of-concept plugin that improves the syntax for
external links in DokuWiki. The "
linkbonus plugin" (tentative name) imitates the external link syntax (
[[htp://some-server.com/some/path|Link Name]]) but adds specific features and works within regulated input.
Current features include:
*
Link title/tooltip: one can set up the text to appear as link tooltip in the same way one sets up the text for link name. This feature specifically addresses the issues in
Bug Tracker #1735: Add possibility to edit link titles.
*
Name/Title fetching: by adding the
fetchname parameter, DokuWiki will try to retrieve the remote page's
actual <title> and use it as the link name. If that's not possible, the plugin will default to the standard method of link name (the second parameter of the normal syntax).
*
Pipes: pipe characters (
|[/m]) are used to separate parameters. If for some reason one needs/wants/fancies a pipe as part of the title or name, one can simply escape C-like: [m]sometext\|somemoretext.
*
Links only: the plugin ignores "media links" ie, links where the name is a
{{media link}} and thus those are left for DokuWiki to handle as usual.
*
Dead or Alive mode: if an external link points to an unreachable page (ie.: it has been 404'd or something like that), the plugin will display some sort of notification -- be it a small icon, strike-through, added message....
*
An actual page at DokuWiki's plugins section... if only for completeness
*
Server base syntax: a syntax mode that creates links always relative to the server root, regardless of virtual hosts, aliases or protocols.
Possible future features:
* Ability to fetch the
favicon and use it as link icon.
** ... and possibly a method to cache favicons? So that they won't have to be requested every time, after all they're not likely to change in the short term...
* Ability to set some standard link options: class, id, target, ...
* Information for non-page links.
* An option to
always fetch external names, even if the fetchname parameter is not used (and maybe, a corresponding "nofetchname" parameter?).
* Interwiki syntax.
* Respect all configured schemes.
*
A better name...
----
How to use it:
Set up a link like this:
[[http://www.cnn.com/|CNN.com|Some news|fetchname]]
And it will show like this (note the mouseover tooltip):
----
Want to test the plugin? -- Be warned, this is the
first third release and offers only basic functionality; what's more, the plugin's syntax, name or inner workings may change in the future.
Not yet deterred? Then check the link below with your DokuWiki's plugin manager.
*
Demo page and information
**Credentials:
user=visitor; pass=doku-visitor will let you play in the Playground
*
Download for plugin manager Updated 2010-04-09
Want to comment on the development? -- Use this thread or, better yet, comment on the plugin page's Discussion section.
When will the major release be ready? -- Short answer: Kittens. Long answer: it depends on what features I think are the minimum for an acceptable, usable release and whether I'm happy with the internal workings of the plugin, in particular how does it request external stuff.
Bye everyone!