[pmwiki-users] update PTV value in a PHP function
Stéphane Heckel
hsteph at club-internet.fr
Thu Aug 7 08:48:01 CDT 2008
Greetings, ...
I need your help as it is _really_ beyond my skills, ...:)
I would like to update the PTV value of a page through a php function.
- Input parameters are pagename, ptvname, ptvvalue
- The function does ...
* read the page (it must exists) and create and/or update the existing PTV
value
* write the page
The skelton of this php looks like this, ... the missing part is the PTV
update.
Could someone switch the light on please ?
Thanks
SH
***********************************************************************
function updatePTVpage($pagename, $ptvvalue) {
if(!PageExists($pagename)) {
return new xmlrpcresp(0, 101, "Page not found");
}
$Now=time();
define('READPAGE_CURRENT', $Now+604800);
$page = RetrieveAuthPage($pagename, "read", false, READPAGE_CURRENT);
############ UPDATE ptvname with ptvvalue - example of code ###############
############ $content = ????? #################"
return BloggerXMLRPC::PostWikiPage($pagename, $content, $publish, true);
return new xmlrpcresp($myStruct);
}
More information about the pmwiki-users
mailing list