[pmwiki-users] UserAuth question

Waylan Limberg waylan at gmail.com
Thu Jan 19 12:12:32 CST 2006


On 1/19/06, rene beekman <r at raakvlak.net> wrote:
> hi,
> i've been playing around with an installation of pmwiki for a few days
> now and have found it by far the easiest wiki installation that i've
> tried.
> even with my extremely limited skills in php
> very impressive!
>
> i'm setting up a website where i don't want regular visitors to be able
> to, or even see the edit, page history, etc links
> i've installed UserAuth for user-based access control and that all
> seems to work fine.
> __seems, because i can get the "edit sideBar" link to disappear when i
> logout, but i cannot do the same trick to the footer of the actual
> page...
>
> searching the archive i found the solution that hagan suggested a few
> days ago:
> > Maybe use <!--markup:--> in your template.  Try this (unwrapped so
> > it's on one line) :
> >
> >     <<!--markup:(:if ! auth edit :)[[({$Name}?action=)login]](:if auth
> > edit:)[[({$Name}?action=)logout]]-->
> >
> > or
> >
> >     <!--markup:(:if loggedin true:) [ [[{$Name}?action=edit|Edit]] ] [
> > [[{$Name}?action=edit|View]] ] (:if:)-->
>
> which does work, but ends up being a bit of a pain when the list of
> links to be hidden gets too long
> (also, why are the links formatted in <pre></pre> pairs????????? )
> getting the original (:if loggedin true:) HiddenLink (:if:) to work
> would be more elegant and flexible - and it would respect my layout as
> a bonus.... :)
> any suggestions on why (:if loggedin true:)(:if:) would work in the
> sideBar but doesn't when it's wrapped in a div in a page?
>

Take a close look at that markup. Each of the links is wrapped in an
extra set of brackets padded with a space [
[[{$Name}?action=edit|Edit]] ]. I'm assuming that is giving you the
<pre> tags. Try removing those and see what happens. Then again, maybe
there was a reason Hagan had them that way. I don't know, but that was
the first thing I noticed.


--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list