[pmwiki-users] PmWiki 2.2-beta12 - UpdatePage() released
IchBin
weconsul at ptd.net
Wed Oct 4 09:25:11 CDT 2006
Crisses 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
> ----
> "The trouble with so many of us is that we have sought directions,
> answers, values, and beliefs from the important people in our world.
> Rather than trusting ourselves to search within and find our own answers
> to the conflicts in our life, we sell out by becoming what others expect
> of us. Our being becomes rooted in their expectations, and we become
> strangers to ourselves."
> -- Gerald Corey, Theory and Practice of Counseling & Psychotherapy
> (Sixth Ed.), p. 148, on existential therapy
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
Sorry but where will this be documented once 2.2 goes live. Also will
there be an index, for the release of 2.2, of all the changes and details?
Just new here and do not know these things for a new release.
--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
More information about the pmwiki-users
mailing list