[pmwiki-users] "Wrapping" a markup rule

Patrick R. Michaud pmichaud at pobox.com
Sat Apr 16 17:10:54 CDT 2005


On Sat, Apr 16, 2005 at 11:32:06PM +0200, Joachim Durchholz wrote:
> Sorry for following up to myself. I just found a far better hook for 
> what I'm trying to do: $LinkFunctions. Simply replace 
> LinkFunctions['mailto:'] with the name of the function of my choice...
> 
> However, I'm unsure about the parameters for my link function. The 
> parameters look like
>   $pagename
>   $imap
>   $path
>   @$title
>   $txt
>   $fmt=NULL
> but I'm entirely unsure what each does.
> 
> Patrick, could you fill in the blanks?

LinkFunctions($pagename, $imap, $path, $title, $txt, $fmt)

   $pagename -- the name fo the current page being rendered
   $imap -- the particular prefix that trigged this call (e.g., 'mailto:')
   $path -- everything that follows the colon
   $title -- any optional title=attribute (primarily for images)
   $txt -- the text of the link
   $fmt -- a format string to be used instead of the markup's default
           (primarily for images)

By the time you've reached this point, PmWiki has already handled things
like parens in [[(Wiki)Sandbox]], extracting the target/text from
[[target | text]] and [[text -> target]], finding any image alt-text,
etc.

Pm



More information about the pmwiki-users mailing list