[pmwiki-users] pagelist
Petko Yotov
5ko at 5ko.fr
Fri Jun 3 16:21:22 CDT 2011
On Thursday 02 June 2011 19:29:46, Daniel Schulze wrote :
> We use AuthUser to restrict read rights for certain pages.
> Our wikipages have a read password by default set to 'id:*' an can be set
> to '@nopass' to make them visibel to the public. So users that are not
> logged in, can only see a couple of "public" pages.
>
> Now we're displaying data with a pagelist directive.
> But pagelist is displaying only when you are logged in.
> BUt we want to display certain information also for the public.
If you want to display content from pages, the pages need to be readable.
Including whole pages, page sections, PageTextVariables or other data from
other pages, requires read permissions for the visitor for that other pages.
> Set $EnablePageListProtect=0 doesn't changed anything.
$EnablePageListProtect = 0; allows only the page "names" to be displayed in
searches or pagelists. It doesn't enable opening, reading and displaying
content from the protected pages to visitors without proper permissions. It
only makes it possible to have "links" to the pages that contain the requested
information, and the visitors can easily follow these links and enter their
passwords.
You can use a workaround, at the same time allowing PageTextVariable or
section extraction, but preventing un-authenticated users from seeing the
content. The workaround is to leave the data pages open for reading, but to
hide all the content.
First, you can use this type of PageTextVariables which are invisible when a
page is read, but visible when a page is edited:
(:VariableName:Some value 3.1415926536:)
(:OtherPTVar:Cool:)
Second, you can wrap your data pages with (:if auth edit:)
(:if auth edit:)
This will be shown to visitors, only if they have "edit" permissions.
SomeVariable:Value
[[#section1]]
This can be included from other pages or from pagelists.
[[#section1end]]
(:endif:)
The following pages contain more information. If something is not clear
enough, feel free to improve it (or tell us on the talk pages):
http://www.pmwiki.org/wiki/PmWiki/ConditionalMarkup
http://www.pmwiki.org/wiki/PmWiki/PageTextVariables
http://www.pmwiki.org/wiki/PmWiki/IncludeOtherPages
And about how to read-unprotect a group with @nopass in GroupAttributes:
http://www.pmwiki.org/wiki/PmWiki/Passwords
Now, in case you cannot leave the data pages read-unprotected, pagelists
cannot extract data from them (except for the pagename, see above).
Thanks,
Petko
More information about the pmwiki-users
mailing list