[pmwiki-devel] Execute post-PmForm & PmForm with url parameters

DaveG pmwiki at solidgone.com
Wed Jan 7 18:03:27 CST 2009


DaveG wrote:
> 1] Is it possible to execute a function (or some code) *after* PmForms 
> has executed?
Seems like PmForms calls HandleDispatch($pagename, 'browse'); So my 
current approach is to store the current browse handlers, replace with 
mine, and then reinstitute the original handler when mine is executed:

$oldBrowse=$HandleActions['browse'];
$HandleActions['browse']='my_HandleBrowse';
function my_HandleBrowse($pagename){
    Markup('textvar::', '<split',
      '/\(::\w[-\w]*:(?!\)).*?::\)/s', '');
    $GLOBALS['HandleActions']['browse']=$GLOBALS['oldBrowse'];
    HandleDispatch($pagename, 'browse');
}

This works fine. I'd be interested if there's a better approach though.

  ~ ~ Dave



More information about the pmwiki-devel mailing list