[pmwiki-users] AuthUser, Groups and other questions

Petko Yotov 5ko at 5ko.fr
Tue Nov 24 17:03:51 CST 2009


On Tuesday 24 November 2009 04:07:55 ~Jami wrote:
> I have my wiki using authuser for editing permissions. 
>    (1)  I would like the edit links/buttons to only show on a page when
> someone is logged in, and readers/visitors not to see them.  I've read a
> lot about this at pmwiki, but it's still a little confusing. Don't have my
> pm-legs yet I guess.  Can anyone simplify this for me?

You can go to your own wiki page [[Site.PageActions]]. Edit the page. You have 
list items (lines) starting with "*" like:

* %item...% [[{*$FullName} | $[View] ]]
* %item...% [[{*$FullName}?action=edit   | $[Edit] ]]

The page may actually look scary, but it just contains some comments and one 
bulletted list (heavily formatted).

What you need to do is insert a line containing (:if authid:) before the first 
list item, and another line (:if end:) after the last list item.

For more information about the PageActions page, please see
  http://www.pmwiki.org/wiki/PmWiki/SitePageActions

> (2)  I want to add 
> to a new-page that the link to only appeares to those logged in?

I'm not sure I understand this phrase. If you want to have links or any text 
that is only visible to logged-in users, wrap the text with 
  (:if authid:) hidden text, may be multiline (:ifend:)

For more information about conditional expressions, see:
  http://www.pmwiki.org/wiki/PmWiki/ConditionalMarkup


>  I was wondering if there is a way to override the url link for the logo in
> PMwiki?  I want the $script url to stay what it is (root dir), but this
> isn't what I want for the logo-link (wiki- sub dir).  This change to the
> $script was made for clean URLs, but now my logo goes to the root and not
> the wiki home page, as I would like.

Yes, you can modify the default PmWiki skin template (copy it first to a 
different name, so that you don't lose your changes if you upgrade). You 
could also install a different skin, but I believe most will use the 
$ScriptUrl variable, so they may need a tweak too. For more information about 
skins, see :
  http://www.pmwiki.org/wiki/PmWiki/Skins
  http://www.pmwiki.org/wiki/Cookbook/Skins

>  And I've set up a couple of log-in accounts I'd like to give admin
> permissions to.  I know this is backwards from how the wiki likes to deal
> with accounts, but when I tired the recipe for more than one admin it broke
> the authuser feature, and anyone could edit+.  So is there anything else I
> can do?

Such a problem may appear if your config.php has some included recipes or 
configurations in the wrong order. The recommended order is outlined at the 
bottom of the page http://www.pmwiki.org/wiki/PmWiki/LocalCustomizations .

To give admin rights to more than one user, you should just add to config.php, 
before including the authuser.php script, 
   $DefaultPasswords['admin'] = array(crypt("MyOwnPass"), 'id:alice,carol');

where "MyOwnPass" is your own supersecret password, and alice and carol are 
the users who can, when they are logged in, edit any page just like the 
admin.

For more information about passwords and AuthUser, please see
  http://www.pmwiki.org/wiki/PmWiki/PasswordsAdmin
  http://www.pmwiki.org/wiki/PmWiki/AuthUser

If something in the documentation is missing or not clear enough, you can 
suggest improvements.

Thanks,
Petko



More information about the pmwiki-users mailing list