Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

LazyWebLinks

Summary: Cause markup text beginning with "www." to be automatically converted into a link to an external site
Version:
Prerequisites:
Status:
Maintainer:
Categories: Links, Editing

Goal

Cause markup text beginning with "www." to be automatically converted into a link to an external site.

Solution

Add the following code to a local customization file:

Markup('lazyweb','<wikilink', "/\\bwww\\.[^\\s$UrlExcludeChars]*[^\\s.,?!$UrlExcludeChars]/e", "Keep(MakeLink(\$pagename,'http://$0','$0'),'L')");

Discussion

This recipe causes any text beginning with "www.", such as www.pmwiki.org, to be automatically converted to an http-link to an external site. This recipe has been enabled on this page to allow experimentation.

Contributors

  • jr, Jun-16-2004
  • Pm, Jun-16-2004

Sandbox

Edit - History - Print - Recent Changes - Search
Page last modified on March 24, 2007, at 05:54 PM