On Sun, Jan 28, 2007 at 09:11:10AM -0000, Crisp, Steve [UK] wrote:

> I'm still trying to integrate PmWiki and phpBB2 so users think its the

> same site.  The site has a simple structure, header, sidebar, content

> and footer.  The idea is to use PmWiki as the main site and switch out

> to phpBB2 when users click 'forum' in the sidebar.  Sounds simple, but

> the things I've done so far (see below) are not working well and I'm

> looking for advice.

 

I now a great solution (for me) that integrates PmWiki and phpBB2 as a single 
(looking) site.  Basically I've added an 'action=hmtl' to return the raw html 
of any particular page.  In my case, _all_ I wanted to do was get the Wiki 
sidebar in to the forum.  I went down this route to keep the interface between 
PmWiki and phpBB2 as minimalistic as possible and in a format that the forum 
skin (style) can deal with.  Additionally it's dynamic so updates to the 
sidebar in the Wiki are reflected in the forum.

 

I've ended up with something that works very well. See 
http://www.enginuity.org/ for the Wiki and click the 'Forums' link in the 
sidebar - they look very similar.

 

Before I can create a mini recipe I could do with some advice on how to 
'unplug' my changes from pmwiki.php.  Basically I've added a new function 
called HandleHTML, see below:  

 

function HandleHTML($pagename, $auth = 'read') {
  if (PageExists($pagename)) {
    $page = RetrieveAuthPage($pagename, $auth, true, READPAGE_CURRENT);
    if (!$page) Abort('?cannot read $pagename');
    PCache($pagename,$page);
    $text = @$page['text'];
    $text = '(:groupheader:)'[EMAIL PROTECTED]'(:groupfooter:)';
    print MarkupToHTML($pagename, $text);
  }
  else {
    Abort('?$pagename does not exist');
  }
}


... and extended the $HandleActions array accordingly, see below:

 

$HandleActions = array(
  'html' => 'HandleHTML',
  ....

 

So back to my question ... how can I unplug the above changes from pmwiki.php 
into perhaps a new cookbook/gethtmlpage.php file?

 

Obviously any other recommendations/improvements to my abortion of an attempt 
to code php (copying what I saw around that did similar)!

 

Regards,

-Steve.

 

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to