[pmwiki-devel] using another app to call pmwiki

Hans design5 at softflow.co.uk
Fri Nov 6 14:26:27 CST 2009


Friday, November 6, 2009, 8:01:02 PM, Daniel wrote:

> Here's an example:
> $no_print = 1; #or whatever variable is needed so pmwiki.php doesn't
> print by default
> include_once("/path/to/pmwiki.php");
> $page = RetrieveAuthPage($pagename, $level, $authprompt=false,
> $since=0); #you can also use ReadPage($pagename, $since=0)
> $html_of_page = MarkupToHTML($pagename, $page['text']);

> Does anyone know if such a no_print variable exists?

$EnableActions = 0; might do the trick.
If no action is used pmwiki uses default action=browse
but with $EnableActions = 0; HandleDispatch() will not be called.
(ca line 359 pmwiki.php)

Otherwise the default calls HandleDispatch(),
which calls HandleBrowse(), which calls PrintFmt(),
which is where the print occurs (as php echo).


Hans




More information about the pmwiki-devel mailing list