[pmwiki-users] make a PV which holds Public/Private Settings of each site
Hans
design5 at softflow.co.uk
Wed Jun 1 12:42:13 CDT 2011
Wednesday, June 1, 2011, 6:13:00 PM, Daniel Schulze wrote:
> we use AuthUser to produce "public" and "private" pages. For
> everybody who is not logged in , it's only possible to see the public pages.
> Now I found out that there is a field in the data test of wiki.d
> sites which is called public and has the value yes / no.
> Is it possible to make a PV out of it?
> I found an explanation in on the pmwiki.org page how to make Custom Page Variables.
> But couldn't figure out how to link the "public" field in the Group.Side-Text to the Variabel.
There is a conditional: (:if authid:)
"Displays following text only if user is authenticated, i.e. logged in
with a valid user name and password via optional AuthUser
authentication scheme."
You could use that to show/hide text for instance in a SideBar
for not logged in visitors, like for instance
(:if authid:)this is private(:else:)this is public(:endif:)
To define custom PV called {$Public} which is either 'Yes' or 'No'
you could do this in config:
if (@$GLOBALS["AuthId"] > "") $FmtPV['$Public'] = "No"
else $FmtPV['$Public'] = "Yes";
hope this helps!
~Hans
More information about the pmwiki-users
mailing list