[pmwiki-users] $IMapLinkFmt (was: Getting an URL from a cookbook recipe)
Patrick R. Michaud
pmichaud at pobox.com
Thu Jan 26 12:19:29 CST 2006
On Thu, Jan 26, 2006 at 07:13:00PM +0100, Sebastian Siedentopf wrote:
> Am 26.01.2006 um 14:37 schrieb Patrick R. Michaud:
> >LinkIMap() then uses the value of $UrlLinkFmt to generate the link;
> >it defaults to:
> > "<a class='urllink' href='\$LinkUrl' rel='nofollow'>\$LinkText</a>"
> >There's also an $IMapLinkFmt array that allows each scheme to have
> >its own custom formatting default, but AFAICT PmWiki isn't using this
> >capability yet (although I think some recipes may be doing so).
> Maybe stupid question, just to be shure: If I use $IMapLinkFmt in a
> cookbook recipe, I'm responsible for restoring the original value of
> $IMapLinkFmt afterwards, because it can be set by the user in
> config.php for example. Right?
The general rule is that if an admin sets a variable in config.php,
then a recipe or PmWiki should honor the admin's setting in lieu of
Thus if an admin has set an entry in $IMapLinkFmt in config.php,
the recipe should probably use that value and not change it at all.
If a recipe absolutely needs a specific format and doesn't want to
use the default, then it should explicitly supply its own $fmt argument
(which overrides any settings of $IMapLinkFmt or $UrlLinkFmt).
More information about the pmwiki-users