LazyWebLinks

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Goal

Make it easier for page authors to write links to external web pages.

Solution

Add the lines

    
    $LinkPatterns[310]["\\b(www\\.$UrlPathPattern)"] = 
        "<a class='urllink' href='http://$0'>$0</a>";
    

to a local customization file. This will cause PmWiki to recognise text starting with www. as a valid link, after it has processed the standard URL link syntax.

People often write www.pmwiki.org (for example) -- with this recipe, it 'just works'.

Contributors

  • jr, 16-Jun-2004

pmwiki-2.2.113 -- Last modified by {{jr}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons