[pmwiki-users] Embedding a pmwiki inside a site

Patrick R. Michaud pmichaud at pobox.com
Thu Jan 19 12:49:04 CST 2006


On Thu, Jan 19, 2006 at 04:12:33AM +0100, Ali Baba wrote:
> Hi,
> 
> 	I would like to completely embed PmWiki inside a website. For this, I 
> have a simple php script that :
> #1: prepares and outputs some some html for the top of the page, 
> manages sessions, etc.;
> #2: includes PmWiki for embedding inside the page;
> #3: prepares and outputs some some html for the bottom of the page, 
> closes sessions, etc.
> 
> 	This doesn't work, because of headers already sent. 

...and the need for the headers is part of the reason it's difficult 
to embed PmWiki inside of other pages.

I've often thought about making pmwiki.php something that could
be easily embedded inside of other pages, but it's very difficult
to get edits to work properly, and PmWiki expects certain things
to be set in urls and other places.  So, I've generally foregone
trying to support this mode of operation.

However, it might be doable.  First, I think your best bet is
to turn off PmWiki's skins entirely, by setting $EnableSkinLayout = 0; .
Then you can set custom values for $PageStartFmt and $PageEndFmt
directly.  

In fact, a very good start might be to just try (in local/config.php):

    $EnableSkinLayout = 0;
    $PageStartFmt = '';
    $PageEndFmt = '';

which will tend to turn off everything surrounding the wiki markup
output, and disable the generation of headers.  Then you can
start adding things to $PageStartFmt and $PageEndFmt as needed
to surround the wiki markup with other items needed.

If you try this, let me know how it goes and if you have any
questions -- the more I think about it the more I think it
could be easily done.

Pm




More information about the pmwiki-users mailing list