[pmwiki-users] PmWiki in AJAX
Etienne Convié
etienne at convie.net
Mon Feb 9 09:21:24 CST 2009
Hi,
I'm new on the list, and I discover PmWiki. Sorry if my question is
frequently asked. I'm also a french-user speaking so sorry for my english.
Here is my problem.
I would like to integrate PmWiki to my site (homemade with php, mysql,...)
with AJAX requests. But I can't retrieve the informations I need in a
PmWiki page and JSON encode it and send it to the browser.
My "AJAX engine" (homemade also) should receive an array like this:
$myArray = array(
idOfTheTagOfTheBodyContent = array(
innerHTML = 'this is the body of the PmWiki page that corresponds to
<!--PageText--> in .tmpl file'
),
idOfTheTagOfTheTitleOfMyPage = array(
innerHTML = 'this is the title of the PmWiki page that corresponds to
$WikiTitle | {$Group} / {$Title} in .tmpl file'
)
)
This array must be JSON encoded and sent to the browser like this:
echo json_encode($myArray);
Here's my question:
How can I (in a php file like a "cookbook recipe") retrieve both elements
of my page like <!--PageText--> and $WikiTitle | {$Group} / {$Title} ????
It should be great just to add ?action=ajax in the url of a page and then
the output is my JSON string.
I have read a lot of documentation and tried to understand the php code of
the PmWiki engine, but I didn't find.
Could you help me?
Thanks a lot,
etco
More information about the pmwiki-users
mailing list