[pmwiki-users] Re: Supporting different modes in default pmwiki

Hans design at flutesong.fsnet.co.uk
Sun Aug 7 07:57:27 CDT 2005


Before creating special 'modes' for user interfaces according to the
'audience' let me try to point out what is already possible.

We got an (:if auth .... :) conditional markup for wiki pages.
This can be used to show or hide certain actions in the skin.
If the skin uses separate wiki pages to configure the actions (action
lists) then that is very easily done. For skins which have the action
lists inside the template it is a little more tricky, but still
possible. For instance by using <!--markup:.............--> to include
wiki markup in the skin template.

It is up to the admin to determine what action links are being
displayed, and for what 'audience'.

We can also show a different skin using markup.
The following adds a (:skin skin-name:) markup:

Markup('skin', 'fulltext',
  '/\\(:skin\\s+([-\\w]+)\\s*:\\)/e',
  "PZZ(SetSkin(\$pagename,'$1'))");

Combined with conditional markup we can show different skins for
different 'audiences'.

Now this should be possible to set also in config.php, rather than
markup on the pages or the GroupHeader pages. But I have not found out
how it can be done. $Author and $AuthId don't work in config.php as
{$Author} and {$AuthId} work on a wiki page. I can't use
      if($AuthId == 'idname') ..... ;
all I could do was
    if($AuthId>'') ......
i.e check if $AuthId is set, but not to what. Obviously I am missing
something here.
And I don't know what the equivalent is to (:if auth admin:) ... etc.
in config.php. If we know this we would have the required 'mode'
switch.


Best, 
~Hans                           





More information about the pmwiki-users mailing list