[pmwiki-users] PmWiki 2.2-beta12 - UpdatePage() released

The Editor editor at fast.st
Wed Oct 4 06:44:02 CDT 2006


On 10/4/06, Crisses <crisses at kinhost.org> wrote:
>
> Module maintainers and programmers should be very happy to know that PM has
> released -beta12 yesterday with UpdatePage() capabilities.
>
> This function allows you to update pages in the wiki with full and proper
> updating of the wiki -- RecentChanges, Diffs, or auto-adding Categories (see
> other changes in the Release Notes) for example.
>
> Usage:
>
> UpdatePage($pagename, $oldpage, $newpage);
>
> In this case $oldpage is the array format pulled from
> ReadPage($pagename);
> $newpage should be a similar array.  Note that $newpage['text'] would be the
> new text to be the full body of the page.
> A diff will be calculated between $oldpage['text'] and $newpage['text']
>
> Example use:
> $pagename = "Group.PageName";
> $text ="I want to completely change the page body and replace it with this
> text.";
> XESReplacePage($pagename,$text);
> function XESReplacePage($pagename, $text){
>  $oldpage = ReadPage($pagename);
>  $newpage = $oldpage;
>  $newpage['text'] = $text;
>  UpdatePage($pagename, $oldpage, $newpage);
> }
>
> Please report any problems to PM.  I didn't have anything to do with this,
> except being the first person to try it out after he added it to the core.
> I noticed that the beta was released silently and wanted to inform the other
> module maintainers and document this since some people have certainly been
> waiting for it.
>
> I would LOVE to see this used by xmlrpc, FastData, and hopefully an upcoming
> email-to-wiki CLI code that could be called by Fetchmail->Procmail
> (something I could possibly write!  yippee!! :) ), although I now find
> xmlrpc to be incredible for maintaining my wikis.
>
> Any questions?  I may not be able to answer them ;)
>
>
> Crisses


Great news, Crisses.  Thanks for the announcement!

I will add it to FAST Data with the next release, which will include
several other changes--mostly to enhance it's flexibility.  Probably
in a few days still as I'm being a bit more thorough with testing this
time.  It's coming along great though--with Pm's code snippet for the
templates working like a charm!

As for an email to wiki recipe, I would be extremely interested in
that!  Please do if you can find a minute. I think it would allow for
some exciting possibilities.

Cheers,
Caveman




More information about the pmwiki-users mailing list