[Pmwiki-users] Re: Disabling WikiWords
bram brambring zonnet
bram.brambring
Thu Feb 12 03:08:57 CST 2004
>Finally, the $WikiWordReplaceFmt array allows special rendering rules
>to be associated with individual WikiWords, so the statement
> $WikiWordReplaceFmt['PmWiki'] = '<b>PmWiki</b>';
>would cause "PmWiki" to always be rendered in bold (and not a link).
>A customization such as:
> $name = FmtPageName('$Title_',$pagename);
> $WikiWordReplaceFmt[$name] = "<b class='selfreference'>$name</b>";
>would cause a page to always refer to itself in bold text.
Hi,
nice feature(s) indeed. Now I would like to have even more...
I created a cookbook module searchhighlight, which highlights searchwords
whenever the surfer comes from a searchpage. This module now parses the
wikitext after PrintText is finished. Instead of parsing the wikitext
afterwards I could use the WikiWordReplaceFmt:
$WikiWordReplaceFmt[$searchword]="<b class='highlight'>$searchword</b>";
This works already perfect whenever the searchword is a WikiWord and the
words in the text are WikiWords as well.
It would make the searchhighlight a very simple feature when
(Wiki)WordReplaceFmt allows to replace any word-any case. Or does pmwiki
have that already somewhere?
bram
More information about the pmwiki-users
mailing list