[pmwiki-users] Controlling the format of wikiwords

John Rankin john.rankin at affinity.co.nz
Thu May 29 00:15:40 CDT 2008

I am seeking an easy way to change the output of wikiword links 
and in particular changing <span class='wikiword'> ... </span> 
to something else. This is currently hard-coded.

What if scripts/wikiwords.php did something like this:

SDV($LinkWikiWordsFmt, '<span class="wikiword">$WikiLink</span>');

Markup('wikilink', ... "Keep(WikiLink(\$pagename,'$0'),'L')");

function WikiLink($pagename, $word) {
  global $LinkWikiWordsFmt;
  ... return str_replace('$WikiLink',$word,$LinkWikiWordsFmt);
  return str_replace('$WikiLink',
                     (($MarkupFrame[0][$word]-- < 1) ? $text : MakeLink($pagename, $word, $text)),

Then a local customisation could simple redefine 
$LinkWikiWordsFmt, like any other link variable.

Currently, I have to jump through hoops to achieve a 
result, basically redefining the markup rule and
wikilink function as set out above.

Any suggestions?
John Rankin

More information about the pmwiki-users mailing list