[pmwiki-users] self-registering for notification emails

Ben Wilson dausha at gmail.com
Mon Jun 5 09:11:24 CDT 2006


On 6/5/06, Américo Albuquerque <aalbuquerque at lanowar.sytes.net> wrote:

[snip]

> The (:if:) in the Site.PageListTemplates are not used when page list
> gets the intended text. In fact, (:pagelist:) gets the text with all the
> markup between the [[#labels]] marked by the fmt attribute. Is when the
> result is rendered to be displayed that those (:if:) and all other
> markup is executed. That's why you can hide parts of the list from
> direct view but the page still work as expected.
>
> In the Site.AuthUser I normally use (:if authid:) in normal users and
> (:if admin:) in admin users definitions. The script still gets the
> correct user and password but that info only is displayed when a user
> with the appropriate permissions logs in. That means that normal users
> won't see the definitions of admin users and non-authenticated viewers
> only see a empty page (or whatever is outside the (:if:) parts)

For what it's worth, I am beginning to take a different approach to
the same thing. When you use (:if:) conditionals to conceal text,
remember that if a user can ?action=source, then the concealed text is
available.

What I've done for administrative pages is put them in a separate
page, password protect that page, then include it in the original
page. For example, I used to have an "editor's" sidebar and a sidebar
for unauthenticated users. In the old days I used the (:if:) approach.
Now, I have Site.Sidebar and Site.EditSidebar. To get the latter page
into the former I (:include Site.EditSidebar:) So, in your case, you
may consider substituting the part in Site.AuthUser that is for
administrators only with a separate page. I admit, though, that
Site.AuthUser is not a page I would allow anybody other than admins to
view--I'd use some other page for them.

Since I have certain key administrative pages (e.g. Site.EditSidebar)
that belong in specific places, I went ahead and put the reference to
them in the Skin template. This way, even sourcing the Edit.SideBar
does not indicate there's a significant administration page there.

-- 
Ben Wilson
"Mundus vult decipi, ergo decipiatur"




More information about the pmwiki-users mailing list