[pmwiki-users] Page action won't disappear

marc gmane at auxbuss.com
Wed Jan 17 14:18:54 CST 2007


marc said...
> marc said...
> > marc said...
> > > 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.
> > > 
> > > I've abandoned hope of this working within regular PmWiki, and turned to 
> > > the skin. However, as mentioned in another message:
> > > 
> > >   <!--PageActionFmt-->
> > >   <!--markup:(:if authedit:)(:div1 id=menubar:)(:div2 id=wikicmds:)
> > > (:include {$Group}.PageActions {$SiteGroup}.PageActions:)(:div2end:)  
> > > (:div1end:)-->
> > >   <!--/PageActionFmt-->
> > > 
> > > doesn't parse the second div, but outputs it verbatim as text, which is 
> > > a bummer.
> > 
> > Just to confirm that 2.2.0-beta22 fixed this.
> > 
> > I used:
> > 
> > <!--PageActionFmt-->
> > <!--markup:
> > (:if authedit:)
> > (:div1 id=menubar:)
> > (:div2 id=wikicmds:)
> > (:include {$Group}.PageActions {$SiteGroup}.PageActions:)(:div2end:)  
> > (:div1end:)-->
> > <!--/PageActionFmt-->
> 
> I was wrong - I was looking at the wrong test site :-o It doesn't work. 
> As soon as <!markup: contains a linebreak, the whole thing is treated as 
> an HTML comment.

To be a bit more specific:

  <div id="container">
  <!--PageActionFmt-->
  <!--markup:(:if authedit:)(:div1 id=menubar:)(:div2 id=wikicmds:)
(:div1end:)-->
  <!--/PageActionFmt-->
  <!--PageHeaderFmt-->

generates:

  <div id="container">
  <!--PageActionFmt-->
  <div id='menubar' >(:div2 id=wikicmds:)(:div1end:)
  </div>

<!--/PageActionFmt-->

and then:

  <div id="container">
  <!--PageActionFmt-->
  <!--markup:(:if authedit:)(:div1 id=menubar:)
  (:div2 id=wikicmds:)(:div1end:)-->
  <!--/PageActionFmt-->

generates:

  <div id="container">
  <!--PageActionFmt-->
  <!--markup:(:if authedit:)(:div1 id=menubar:)
  (:div2 id=wikicmds:)(:div1end:)-->
  <!--/PageActionFmt-->

So, the linebreak removes the generation of any HTML from <!markup:

-- 
Cheers,
Marc





More information about the pmwiki-users mailing list