[pmwiki-users] SiteAdmin.SiteAttributes

noskule noskule at gmx.net
Thu Jun 21 07:12:22 CDT 2007


Dominique Faure schrieb:
> On 6/21/07, Petko Yotov <5ko at free.fr> wrote:
>> Hello Patrick and all,
>>
>> Is there a way to have a special page Site.SiteAttributes like
>> Group.GroupAttributes, but for the whole site?
>>
>> Like: if one sets a read/edit password, or @lock on this page, the whole site
>> gets closed. Groups or Pages with the @nopass attribute will be visible, that
>> is, their attributes override the Site.SiteAttributes settings.
>>
>> The reason for wishing this is because, while in preparation, the site should
>> be password read-protected. When it is ready, the user can unlock it without
>> the need to modify any php ot htaccess file, just a setting in the wiki.
>>
> 
> BTW, this could be a perfect place to have some other global settings
> (for now only set via config.php), such as the $WikiTitle variable,
> no?
> 
> [cf. my previous unanswered post about group titles]
> 

I'm doing something like this, but is in a kind of ugly way. In
skin.tmpl I added:

<div style="display:none">
<!--wiki:Site.SiteAttributes-->
<!--wiki:{$Group}.GroupAttributes-->
<!--wiki:{$Group}.{$Name}-Attributes-->
</div>

Config Links somwhere:
(:if auth admin:)%item rel=nofollow%[[{$SiteGroup}.SiteAttributes|$[Site
Config]]]
rel=nofollow%[[{$Group}.GroupAttributes|$[Group Config]]]
rel=nofollow%[[{$Group}.{$Name}-Attributes|$[Page Config]]]

You can use templates for these config pages. For example to show/hide
skinsections. But also you can define wikistyles and probably more.
Example: http://netstreams.org/test/pmwiki/index.php/Zap/PageSections
(try Sidebar, Header, Footer)

The problem is that everything on these pages written in the html
sourcecode, but not displayed in the browser

If there is a way to parse these pages for directives (like (:noleft:) )
but not render the markup, it would work nice.

Any hints for how to do this would be great
grz nos





More information about the pmwiki-users mailing list