[pmwiki-users] [PATCH] Issue with pmwiki and PHP virtual() function (SSI)

Mikael Nilsson mini at nada.kth.se
Thu Nov 10 04:45:19 CST 2005

Patrick R. Michaud wrote:
> On Thu, Nov 10, 2005 at 12:57:35AM +0100, Mikael Nilsson wrote:
>>>>To illustrate: in the header I use <!--function:includemeta -->, which
>>>>is defined in config.php:
>>>>function includemeta($x) {
>>>Faster/easier is to just use  <!--file:/path/to/kmr/meta.html--> and 
>>>avoid the includemeta function (and the virtual call) altogether.
>>Yeah, that would work in general. However, in my case, the header.html 
>>contains another virtual include of a PHP page generating a sidebar from 
>>an RSS feed (using magpierss), so I'm currently relying on apache 
>>processing the included page... and file: does not do that for me, now 
>>does it :-)
> Okay, then try this for your includemeta($x) function:
>     function includemeta($x) {
>       $cwd = getcwd();                   # get current working dir
>       virtual("/kmr/meta.html");
>       chdir($cwd);                       # change back
>     }

Ok, this works fine. I agree it's much cleaner than my tries.

I still wonder if it would be better if pmwiki.php stored cwd at the top 
of the file and then used the stored value later, but that's your choice...


The one remaining thing I had to do was to was to remove the 
"clear:both" CSS directive in pagerev.php. Otherwise the changes would 
not show until under my left sidebar (my site is CSS-based, so my 
sidebar uses margins and floats). Is that directive really needed for 
anything? To me it looks ok without...

Anyway, thanks for the help, and for a great piece of software! I'm 
really getting to like pmwiki for its flexibility.


Plus ça change, plus c'est la même chose
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mini.vcf
Type: text/x-vcard
Size: 244 bytes
Desc: not available
Url : /pipermail/pmwiki-users/attachments/20051110/9d16da3e/attachment.vcf 

More information about the pmwiki-users mailing list