From: Pascal G. (QC/EMC) <Pas...@er...> - 2005-04-13 19:15:29
|
A while back, i wrote myself a plugin to do that. I believe it's not there on purpose... for security reasons. -Pascal -----Original Message----- From: php...@li... [mailto:php...@li...] Sent: April 13, 2005 11:42 AM To: 'php...@li...' Subject: [Phpwiki-talk] Server-side include Hello, I have just installed PhpWiki on our corporate intranet. Everyone who has started using it is really liking what they're seeing. I do have one question. Our intranet pages use Server-side include to bring in contents from template pages into all of the other pages with the following syntax: <!--#include virtual="/ssi/header.shtml" --> I have tried adding such links inside of the template (browse.html) but that did not work (probably because it's not a .shtml page or perhaps for some other reason that I don't comprehend at this point). For PHP templates, I've also done SSI include with the following syntax in the past:\ <?php include(" http://intranet/ssi/header.shtml <http://intranet/ssi/header.shtml> ") ?> But that did not work either in the templates. Does anyone have experience at using Server-side includes inside of PHPWiki templates? If so, what is the syntax to use? Thanks for any help that can be provided, Yannick |
From: Yannick L. <Yan...@en...> - 2005-04-14 00:45:42
|
Hello Reini, > Yannick Lefebvre schrieb: > > I have just installed PhpWiki on our corporate intranet. > Everyone who > > has started using it is really liking what they're seeing. > I do have one > > question. Our intranet pages use Server-side include to bring in > > contents from template pages into all of the other pages with the > > following syntax: > > > > <!--#include virtual="/ssi/header.shtml" --> > > > > I have tried adding such links inside of the template (browse.html) > > but > > that did not work (probably because it's not a .shtml page > or perhaps > > for some other reason that I don't comprehend at this point). > > Apache usually doesn't do shtml parsing after the php step, > because php can do much more. Actually, I'm running PhpWiki on IIS 6.0, not on Apache. > > For PHP templates, I've also done SSI include with the following > > syntax > > in the past:\ > > > > <?php include("http://intranet/ssi/header.shtml") ?> > > We use some safety measures against external code and > strings. Using the url_fopen feature is also not recommended. > > <?php readfile("/var/www/ssi/footer-start.shtml") ?> > <?= "Time: ". strftime("%x %X") ?> > <?php readfile("/var/www/ssi/footer-end.shtml") ?> > > works for me. Would I put these readfile calls inside of my template file where I want the SSI files to be loaded? I have tried putting them there and that did not put the contents of the file I listed. Thanks for the help, Yannick |
From: Yannick L. <Yan...@en...> - 2005-04-14 14:14:57
|
After taking a second look at your e-mail, I seem to understand that I would need to add these php readfile calls inside of some of the code of phpwiki. I did not find that <?= "Time: ". strftime("%x %X") ?> line anywhere. Can you point out where I should add these php calls to go and read some external files? Thanks, Yannick > -----Original Message----- > From: Reini Urban [mailto:ru...@x-...] > Sent: Wednesday, April 13, 2005 3:27 PM > To: Yannick Lefebvre > Cc: 'php...@li...' > Subject: Re: [Phpwiki-talk] Server-side include > > > Yannick Lefebvre schrieb: > > I have just installed PhpWiki on our corporate intranet. > Everyone who > > has started using it is really liking what they're seeing. > I do have one > > question. Our intranet pages use Server-side include to bring in > > contents from template pages into all of the other pages with the > > following syntax: > > > > <!--#include virtual="/ssi/header.shtml" --> > > > > I have tried adding such links inside of the template (browse.html) > > but > > that did not work (probably because it's not a .shtml page > or perhaps > > for some other reason that I don't comprehend at this point). > > Apache usually doesn't do shtml parsing after the php step, > because php can do much more. > > > For PHP templates, I've also done SSI include with the following > > syntax > > in the past:\ > > > > <?php include("http://intranet/ssi/header.shtml") ?> > > We use some safety measures against external code and > strings. Using the url_fopen feature is also not recommended. > > <?php readfile("/var/www/ssi/footer-start.shtml") ?> > <?= "Time: ". strftime("%x %X") ?> > <?php readfile("/var/www/ssi/footer-end.shtml") ?> > > works for me. > > > But that did not work either in the templates. Does anyone have > > experience at using Server-side includes inside of PHPWiki > templates? If > > so, what is the syntax to use? > -- > > Reini Urban > http://xarch.tu-graz.ac.at/home/rurban/ > http://phpwiki.org/ > |
From: Reini U. <ru...@x-...> - 2005-04-14 16:37:40
|
> After taking a second look at your e-mail, I seem to understand that I > would need to add these php readfile calls inside of some of the code of > phpwiki. > > I did not find that <?= "Time: ". strftime("%x %X") ?> line anywhere. > Can you point out where I should add these php calls to go and read some > external files? In any template. I put it into themes/default/bottom.tmpl at the end, before the ?> tag Those three lines of mine where my test, to print something useful. -- Reini Urban http://phpwiki.org/ http://xarch.tu-graz.ac.at/home/rurban/ |
From: Yannick L. <Yan...@en...> - 2005-04-14 16:45:09
|
I see. I had downloaded 1.2 since it said on sourceforge that it was a stable release. 1.3 just looked like a beta line. Is 1.3.x stable enough to run a production wiki? Would you recommend 1.3.10 or 1.3.11_rc3? Regards, Yannick > -----Original Message----- > From: Reini Urban [mailto:ru...@x-...] > Sent: Thursday, April 14, 2005 12:38 PM > To: Yan...@en... > Cc: php...@li... > Subject: RE: [Phpwiki-talk] Server-side include > > > > > After taking a second look at your e-mail, I seem to > understand that I > > would need to add these php readfile calls inside of some > of the code > > of phpwiki. > > > > I did not find that <?= "Time: ". strftime("%x %X") ?> line > anywhere. > > Can you point out where I should add these php calls to go and read > > some external files? > > In any template. > I put it into themes/default/bottom.tmpl > at the end, before the ?> tag > > Those three lines of mine where my test, to print something useful. > > -- > > Reini Urban > http://phpwiki.org/ http://xarch.tu-graz.ac.at/home/rurban/ > > |
From: Reini U. <ru...@x-...> - 2005-04-14 16:59:36
|
> I see. I had downloaded 1.2 since it said on sourceforge that it was a > stable release. 1.3 just looked like a beta line. Is 1.3.x stable enough > to run a production wiki? Would you recommend 1.3.10 or 1.3.11_rc3? The rc3 release note says that it is considered more stable than 1.3.10. Most wikis run the 1.3 line, some with 1.3.4 and most with 1.3.7, thanks to the debian release. Nowadays, with the spammers getting around phpwiki protection after all, they will switch to 1.3.11 sooner or later. If you want to know what is missing and in work search the wiki (official and demo) and the mailinglist archive. -- Reini Urban http://phpwiki.org/ http://xarch.tu-graz.ac.at/home/rurban/ |
From: Reini U. <ru...@x-...> - 2005-04-13 19:28:08
|
Pascal Giard (QC/EMC) schrieb: > A while back, i wrote myself a plugin to do that. > > I believe it's not there on purpose... for security reasons. Plugins can be abused by every nasty user out there. Templates can only be edited by the admin. Until we allow wiki template editing, somewhen in the future. See wikilens.org > -----Original Message----- > *From:* php...@li... > [mailto:php...@li...] > *Sent:* April 13, 2005 11:42 AM > *To:* 'php...@li...' > *Subject:* [Phpwiki-talk] Server-side include > > Hello, > > I have just installed PhpWiki on our corporate intranet. Everyone > who has started using it is really liking what they're seeing. I do > have one question. Our intranet pages use Server-side include to > bring in contents from template pages into all of the other pages > with the following syntax: > > <!--#include virtual="/ssi/header.shtml" --> > > I have tried adding such links inside of the template (browse.html) > but that did not work (probably because it's not a .shtml page or > perhaps for some other reason that I don't comprehend at this point). > > For PHP templates, I've also done SSI include with the following > syntax in the past:\ > > <?php include("http://intranet/ssi/header.shtml") ?> > > But that did not work either in the templates. Does anyone have > experience at using Server-side includes inside of PHPWiki > templates? If so, what is the syntax to use? > > Thanks for any help that can be provided, > > Yannick -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ http://phpwiki.org/ |