[pmwiki-users] Fox / ShoutBox - integrate the feature in xmlrpc
Hans
design5 at softflow.co.uk
Wed Dec 17 16:48:10 CST 2008
Wednesday, December 17, 2008, 9:28:24 PM, Stéphane Heckel wrote:
> Implementing the feature on the server side is the best option. The concept
> works :
> // xmlrpc backend - $shoutmessage is the message sent by the desktop
> application
> ...
> $page = RetrieveAuthPage($pagename, "read", false, READPAGE_CURRENT);
> $content = $shoutmessage."\n\n".$page['text'];
> ...
> return BloggerXMLRPC::PostWikiPage($pagename, $content, $publish, true);
> // I have to transform $shoutmessage, to something like below, and this is
> where I fail
> "'''[[{$PageAuthId}|{$AuthId}]]''': {$$shout} - [-''{(ftime fmt="%d/%m
> %H:%M")}''-] [[<<]]"
> ie : final output would be
> '''[[Profiles.Steph|Steph at acme.com]]''': Welcome ! - [-''01/12 09:58''-]
> [[<<]]
> So I don't know how to translate the fox/markup syntax and implement the
> equivalent in the php function.
perhaps something like this:
$page = RetrieveAuthPage($pagename, "read", false, READPAGE_CURRENT);
$shoutmessage = "'''[[".$PageAuthId."|".$AuthId."]]''': $shoutmessage - [-''"
.strftime('%d/%m %H:%M', time() )."''-] [[<<]]";
$content = $shoutmessage."\n\n".$page['text'];
...
return BloggerXMLRPC::PostWikiPage($pagename, $content, $publish, true);
if this is in a function, you also need to set in it (at the
beginning):
global $PageAuthId,$AuthId;
~Hans
More information about the pmwiki-users
mailing list