[Pmwiki-users] IncludeAble hack needs help
Patrick R. Michaud
pmichaud at pobox.com
Sat Jun 14 09:35:41 CDT 2003
Hmm. IncludeAble is good, but a simpler approach that avoids setting
all of the variables might be to simply do
$HandleBrowseFmt = array('function:PrintText');
in the local.php file. This turns off all of PmWiki's HTTP headers,
HTML headers, footers, etc., and just leaves the wiki content. You can
<?php $pagename='Main.HomePage'; include("pmwiki.php"); ?>
from another php file and PmWiki will only output the text.
Also, rather than having wiki.d symlinked, it might be a good idea to
$cwd = getcwd(); chdir("path/to/pmwiki"); # change to pmwiki dir
include("pmwiki.php"); # run pmwiki.php
chdir($cwd); # return back
This also resolves problems with pmwiki locating things in the scripts and
All of this can be done w/o having to modify pmwiki.php itself (I think).
I have no idea what will be involved in having the edit or other functions
embedded in another page. I'd suggest setting $HTMLStartFmt and $HTMLEndFmt
to be empty--this will get rid of the HTTP headers, doctype, etc. See
http://www.pmichaud.com/wiki/PmWiki/PageLayout for more details.
And if enough people want this feature, rather than trying to document
kludges around PmWiki, what would make it straightforward? I.e., how
do you *wish* it would work?
On Sat, Jun 14, 2003 at 08:49:18AM +0200, Joris wrote:
> I'd like point some attention to
> It's a hack to make the wiki go-along instead of stand-alone, integrate
> in another php site.
> I need some help with what happens after you hit the 'save' button, the
> wiki isn't displayed then. Also, I meight have done some stupid things.
> I invite everyone to take a look...
> The paragraph "After editing" describes the biggest problem in detail.
> joris at linux.be UIN: 25569167
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
More information about the pmwiki-users