[pmwiki-users] Page action won't disappear

marc gmane at auxbuss.com
Wed Jan 17 12:41:19 CST 2007


Dominique Faure said...
> On 1/13/07, Petko Yotov <5ko at free.fr> wrote:
> > On Saturday 13 January 2007 19:48, marc wrote:
> > > Petko Yotov said...
> > >
> > > > On Saturday 13 January 2007 17:04, marc wrote:
> > > > > marc said...
> > > > >
> > > > > > In many places with non-user-editable text, I want:
> > > > > >
> > > > > >   (:if ! auth admin:)(:noaction:)(:ifend:)
> > > > > >
> > > > > > This works fine in local/Site.php and other places.
> > > > > >
> > > > > > However, when authorisation is required and the login form appears, I
> > > > > > can't find a way to stop PageActions from being displayed.
> > > > > >
> > > > > > Is this possible?
> > > > >
> > > > > I'm still stuck trying to find a way to stop page actions appearing
> > > > > when the login handler exit()s.
> > > >
> > > > [cut]
> > > >
> > > > > I've abandoned hope of this working within regular PmWiki, and turned
> > > > > to the skin.
> > > >
> > > > [cut]
> > > >
> > > > > As mentioned previously, adding (:noaction:) to Site.AuthForm doesn't
> > > > > have any visible affect.
> > > > >
> > > > > In a separate attempt, I've even tried:
> > > >
> > > > [cut]
> > > >
> > > > > to no avail.
> > > > >
> > > > > Any ideas, however seemingly unlikely to work, would be appreciated.
> > >
> > > Hi Petko,
> > >
> > > > Did you try to do it inside the page Site.PageActions?
> > > >
> > > > (:if auth admin:)
> > > >
> > > > Here the previous content with the line "(:if auth upload:)" REMOVED
> > > >
> > > > (:if:)
> > >
> > > I have tried this, but it requires moving the whole of the surrounding
> > > two divs in there too. In this case, I fell over the same (:divn:)
> > > parsing probem that I mentioned. Even so, it's not an ideal solution,
> > > although anything that works will do.
> >
> > You need to start each (:div1:) on a new line. This works for me (from
> > PageActions):
> >
> 
> ... or in order to keep your divi definition on a single line, you may
> use the (:nl:) separator as in:
> 
> (:if auth edit:)(:nl:)(:div1 id=menubar:)(:nl:)(:div2 id=wikicmds:)
> * [[{*$FullName} | $[View] ]]
> * [[{*$FullName}?action=edit | $[Edit] ]]
> * [[{*$FullName}?action=diff | $[History] ]]
> * [[{*$FullName}?action=upload | $[Attach] ]]
> * [[{*$FullName}?action=print | $[Print] ]]
> (:div2end:)(:nl:)(:div1end:)(:nl:)(:if:)

Thanks, Dom, but the (:nl:)s blow the layout. Cool tip, though, that I'm 
sure will come in handy elsewhere ;-)

-- 
Cheers,
Marc





More information about the pmwiki-users mailing list