[pmwiki-users] quick php question

Tegan Dowling tmdowling at gmail.com
Wed Apr 25 12:06:03 CDT 2007


On 4/25/07, Tegan Dowling <tmdowling at gmail.com> wrote:
>
> On 4/25/07, Tegan Dowling <tmdowling at gmail.com> wrote:
>
> > Because I use clean URLs, I was previously unable to use the very nifty
> > WebAdmin recipe -- http://www.pmwiki.org/wiki/Cookbook/WebAdmin -- but
> > I've finally revisited it and now see that in January, Bill Reveile (Thanks,
> > Bill, if you're reading!) posted the solution, which is to disable clean
> > URLs for a single page on which a [[{$Name}?action=webadmin | Web Admin]]
> > link is placed.
> >
> > This works:
> > * I have a [[{$Name}?action=webadmin | Web Admin]] on a page
> > Admin.WebAdmin, which requires the admin password for read-access,
> > * I have a local/Admin.WebAdmin.php file, on which I have just:
> > <?php
> >     $EnablePathInfo = 0;
> >
> > * In local/config.php, I have the WebAdmin recipe enabled with
> >     include_once("$FarmD/cookbook/webadmin.php");
> >
> >
> > My question:
> > To eliminate the need for the extra Admin.WebAdmin.php file, how would I
> > write something that I could put directly into local/config.php that would
> > say:
> >
> > If group.page = Admin.WebAdmin Then $EnablePathInfo = 0;
> >
> > ?
>
>
> Never mind!
> Using an example from Hans's thread "including php files", I have this in
> config.php, and it works:
>
>     if($page == 'Admin.WebAdmin')  $EnablePathInfo = 0;
>     include_once("$FarmD/cookbook/webadmin.php");
>
>
> Thanks anyhow,
>

Whoops.  Never mind the never mind - that doesn't work after all.  I have

    if($page == 'Admin.WebAdmin')  $EnablePathInfo = 0;

That's no good.  What should I have?  Do I need some curly brackets in there
or something?

(Also, I can't use [[{$Name}?action=webadmin | Web Admin]] on the page
Admin.WebAdmin - that does bring the WebAdmin form up, but with cleanURLs
again, so that the links on the form don't work.  I have to use [[
Admin.WebAdmin?action=webadmin | Web Admin]])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20070425/23e9977d/attachment.html 


More information about the pmwiki-users mailing list