<HTML dir=ltr><HEAD><TITLE>Re: [pmwiki-users] Integrating PmWiki and phpBB2 - site aggregation</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText6431 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>OMG!&nbsp; That's way too simple!&nbsp; Thanks very much.&nbsp; PmWiki rocks ... again.</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> pmwiki-users-bounces@pmichaud.com on behalf of Patrick R. Michaud<BR><B>Sent:</B> Fri 02/02/2007 20:09<BR><B>To:</B> Crisp, Steve [UK]<BR><B>Cc:</B> pmwiki-users@pmichaud.com<BR><B>Subject:</B> Re: [pmwiki-users] Integrating PmWiki and phpBB2 - site aggregation<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>On Fri, Feb 02, 2007 at 07:47:47PM -0000, Crisp, Steve [UK] wrote:<BR>&gt;&nbsp;&nbsp;&nbsp; Before I can create a mini recipe I could do with some advice on how to<BR>&gt;&nbsp;&nbsp;&nbsp; 'unplug' my changes from pmwiki.php.&nbsp; Basically I've added a new function<BR>&gt;&nbsp;&nbsp;&nbsp; called HandleHTML, see below:&nbsp;<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; function HandleHTML($pagename, $auth = 'read') {<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<BR>&gt;&nbsp;&nbsp;&nbsp; }<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; ... and extended the $HandleActions array accordingly, see below:<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; $HandleActions = array(<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'html' =&gt; 'HandleHTML',<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ....<BR>&gt;<BR>&gt;&nbsp;&nbsp;&nbsp; So back to my question ... how can I unplug the above changes from<BR>&gt;&nbsp;&nbsp;&nbsp; pmwiki.php into perhaps a new cookbook/gethtmlpage.php file?<BR><BR>Your question almost answers itself!&nbsp; :-)&nbsp; Simply create<BR>cookbook/gethtmlpage.php as follows:<BR><BR>&nbsp;&nbsp;&nbsp; &lt;?php if (!defined('PmWiki')) exit();<BR><BR>&nbsp;&nbsp;&nbsp; ##&nbsp; Add ?action=html<BR>&nbsp;&nbsp;&nbsp; SDV($HandleActions['html'], 'HandleHTML');<BR><BR>&nbsp;&nbsp;&nbsp; ##&nbsp; function to handle ?action=html<BR>&nbsp;&nbsp;&nbsp; function HandleHTML($pagename, $auth = 'read') {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...<BR>&nbsp;&nbsp;&nbsp; }<BR><BR>That's all you'd need to do to de-couple it from PmWiki and<BR>make it a cookbook recipe.<BR><BR>Pm<BR><BR>_______________________________________________<BR>pmwiki-users mailing list<BR>pmwiki-users@pmichaud.com<BR><A href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users">http://www.pmichaud.com/mailman/listinfo/pmwiki-users</A><BR></FONT></P></DIV></BODY></HTML>