[pmwiki-users] hot to execute php recipe code after Save button clicked

JB jbit at ev1.net
Mon Aug 21 02:28:06 CDT 2006

> > What makes an included file run immediately after someone
> > clicks the SAVE button while editing a pmwiki page?
> I guess you probably found out by now...

No, I have no clue.

> The answer: When the user clicks to edit, the url 
> indeed requests &action=edit, so the recipy above will run.
> Now as long as you stay within the edit mode, up until the 
> final Save, pmwiki will continue to request pages using 
> &action=edit. But upon a Save, an additional parameter is 
> passed: post. When set to true, the page is saved. So while 
> saving, action==edit and post==true, so the above script will run.
> I don't use the specific recipe, but sometimes pmwiki seems 
> to do things backwards. This generally allows the admin to 
> configure the wiki thorugh config.php.

I don't know how to check to see if the post is set to true.
Can someone please show me some code to do this?

> New users may quickly get lost in pmwiki, because core scripts 
> run without pmwiki.php directly referencing them. They are 
> loaded by scripts/stdconfig.php

This will probably be very helpful to me in the future.

I think I might have gotten it working and in the process
I may have found a bug in the current MTBlackList recipe which 
was caused from a PMWiki version change.   I could not see
any message.  I stumbled accross this:

It currently uses 


Which was changed to 


Version 2.0.beta44 (10-Jul-2005)
    * Changed $EditMessageFmt to $MessagesFmt array, added (:messages:)

To fix this in mt-blacklist.php I added 2 lines under the 
$EditMessageFmt assignment (near the end of the file):

    global $MessagesFmt;
    $MessagesFmt[] = $EditMessageFmt;



More information about the pmwiki-users mailing list