[pmwiki-devel] read, edit and save a page
Patrick R. Michaud
pmichaud at pobox.com
Fri Nov 24 14:19:19 CST 2006
On Fri, Nov 17, 2006 at 12:57:54PM -0200, Guillermo Calderon - INCO wrote:
> Patrick R. Michaud wrote:
> > On Tue, Nov 14, 2006 at 06:18:32PM -0200, Guillermo Calderon - INCO wrote:
> >
> >>I want to write php code to do the following:
> >>
> >> 1) read a page (by name) and store it in a variable (say $text)
> >> 2) modify $text (I known how to do this)
> >> 3) save the page with $text as the new content
> >
> >
> > $page = ReadPage($name)
> > $text = $page['text'];
> > # ...
> > $text = modify($text); # you do this part
> > # ...
> > $newpage = $page;
> > $newpage['text'] = $text;
> > UpdatePage($name, $page, $newpage);
> >
> > Pm
>
> Thanks all for your answers.
> Pm, I cant't find the function "UpdatePage". Where is it?
> (I'm using pmwiki 2.1.24)
UpdatePage only exists in pmwiki 2.2.0-beta, sorry.
Pm
More information about the pmwiki-devel
mailing list