[Pmwiki-users] Hooks in PmWiki

Nils Knappmeier nk
Sat Feb 28 11:04:54 CST 2004


Patrick R. Michaud wrote:

>On Thu, Feb 26, 2004 at 12:11:42PM +0100, Nils Knappmeier wrote:
>  
>
>>Hi,
>>
>>I was thinking about developing some modules for PmWiki myself. Only 
>>thing, I don't know how.
>>I would appreciate somehing like a list of hooks of somehow a 
>>documentation about how it is possible to
>>modify PmWiki. Is there something like that? I couldn't find it.
>>    
>>
>
>Depends on what sort of things you want to add to PmWiki.  
>
>If you want to add a new action (e.g., ?action=feature), then you 
>generally want to load $HandleActions with the name of the subroutine
>to call for your feature (e.g., "HandleFeature"):
>
>   $HandleActions['feature'] = 'HandleFeature';
>
>If you want to add new markup, you generally add entries to the 
>$DoubleBrackets, $LinkPatterns, or $InlineReplacements arrays
>(see http://www.pmichaud.com/wiki/PmWiki/CustomMarkup).
>
>  
>
>If you want to intercept an existing action such as 'edit', you can either
>1.  check for ($action=='edit') and do your stuff there, or
>2.  Replace $HandleActions['edit'] with your own function, which could
>    potentially contain a call ot the previously defined function.
>
>  
>
That's what I meant. Thanks

 Nils

>Beyond that, you'd have to ask or look at some of the existing Cookbook
>or other scripts for examples.  There's a lot of hooks built-in to PmWiki
>but it's very hard to document or describe them all.
>
>Pm
>
>
>  
>




More information about the pmwiki-users mailing list