From: Platonides <Platonides(a)gmail.com>> Ron
Laufer wrote:> >>> 2) Is it possible to use SSI in MW without it being
stripped out? I've tried commenting out the "removeHTMLcomments" function in
Sanitizer.php, but the HTML comment with the SSI in it still doesn't show up when I
view source on the wiki display page in my browser. Even if it did, since the page
doesn't have an shtml extension, I'm fairly sure it won't work.> > Has
anyone done this and can you talk a n00b through it?> > No.> Implement whatever
you want to get with a Server Side Include directly> in php, or via an extension.>
> OK, then do you have a suggestion of how I can do the following in php or in an
extension?> > I have a dbman database, it's written in perl and accessible via
CGI. I would like to have each wiki page display the info on the associated record in the
database (if it exists) at the top of the page, above the user generated content.> >
I wrote a script that combs the xml dump of the wiki and the dbman database and matches up
wiki pages to database records, inserts an SSI link to the database for pages that match
up, and creates wiki pages for database records that don't have them. It's output
is an xml that I was successfully able to import into MW, except that all the SSI got
stripped out. (In fact, all comments got stripped out. I'd like to be able to keep
them to note when the last import is and tell users not to edit the database link)>
> I was able to add comments manually via the wiki, but as mentioned, they don't
show up when I view source on the final product, only when I edit the page via MW.>
> I'm new to MW and php, but a fairly competent hacker in general. Any help that at
least points me in the right direction would be much appreciated.> > That's not
too easy, since you want to perform a web server subrequest.> You can do that with
virtual(<filename>); but that will only work if you> are using apache with
mod_php.> A more portable way would be trying to launch the perl interpreter from>
php, on the lines of system("/usr/bin/perl <filename>"); but that may
or> may not work, depending on the script.
OK, apologies if this is a stupid question, but where would that "system" line
go? (my host doesn't support mod_php) In the wiki page? or in a php file somewhere?
and if so, how do I get the wiki software to call this php file?
Thanks,
Ron
--
Ron Laufer