[pmwiki-users] Page action won't disappear

Petko Yotov 5ko at free.fr
Sat Jan 13 15:30:14 CST 2007


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):

(:if auth edit:)
(:div1 id=menubar:)
(:div2 id=wikicmds:)
* [[{*$FullName} | $[View] ]]
* [[{*$FullName}?action=edit | $[Edit] ]]
* [[{*$FullName}?action=diff | $[History] ]]
* [[{*$FullName}?action=upload | $[Attach] ]]
* [[{*$FullName}?action=print | $[Print] ]]
(:div2end:)
(:div1end:)
(:if:)

and outputs correct HTML:
 
<div id='menubar' >
<div id='wikicmds' >
<ul><li ><a ... >View</a>
</li><li ><a ... >Edit</a>
</li><li ><a ... >History</a>
</li><li ><a ...>Attach</a>
</li><li ><a ... >Print</a>
</li></ul></div>
</div>

Petko






More information about the pmwiki-users mailing list