Recent Changes - Search:



For a large wiki, is there a way to automatically make it so only a certain group of people can create/edit groupname.groupheader/footer and sidebar pages?

A: All PmWiki pages, whether the wiki is large or small, or the page is a groupheader, footer, or sidebar, can be password protected. One easily maintained approach is to set the pages' attributes to a site-wide password that you reference as @_site_poweruser (or similar text). You then set and change the actual password assigned to @_site_poweruser through a configuration file. Of course, then you have to tell the users that password, whenever you change it. Another approach is to create groups of users through activating AuthUser, and allow only members of selected groups of users to create/edit the header/footer/sidebar pages you are restricting. Then the users just have to log in. See PmWiki:Passwords for more information.

  • Thanks a lot for the answer. I was wondering, if I created a group called "moderators", is there anyway to make them the only people that can create and edit header/footer/sidebar pages without manually sifting through every group/individual page? Right now the wiki is set so that everyone who registers is able to read, edit, and create pages. I want to keep them at that level, but I also want to deny them the ability to create the sidebar, groupheader/footer pages. I can't find a solution for this, unless I manually restrict every page, which would be very tedious for huge wikis with hundreds of groups. Any help on this? I might try playing with the blacklist plugin and ban those words? I'm a lost noob :P Mike December 09, 2013, at 11:16 AM

You can have something like this in config.php:

  if ($action=='edit')
    if(preg_match('/\\.(SideBar|GroupFooter|GroupHeader)$/', $pagename))
      $DefaultPasswords['edit'] = crypt('shared_pass'); # or '@moderators'

Please note that this will only work for the 'edit' action where the $pagename is the actual page being edited. It will be insecure to try to 'read' protect pages this way, because this will not deny inclusion of such protected pages inside unprotected pages. --Petko December 09, 2013, at 05:50 PM

  • That is perfect, thank you Petko. Mike December 12, 2013, at 01:48 AM

See also this thread on the mailing list. --Petko December 12, 2013, at 03:49 AM

The main page for Group Headers assumes a certain level of expertise implementing Group headers/footers. Here is how I added a simple footer to my wiki. My wiki has a handful of Groups, with sub-topics. Within a Group, I wanted the first-level topics to have a footer linking to the other first-level topics. The sub-topic pages should have a footer linking to other pages within that sub-topic.

  1. For a given Group, such as CatsMeow (the name of my boat), I went to the main page, http://.../pmwiki.php?n=CatsMeow.CatsMeow(approve links) as a convenience for changing the URL to, ...CatsMeow.GroupFooter, allowing me to create the Group Footer page within the PmWiki interface.
  2. The contents of my GroupFooter look like:
    %notetitle% [[CatsMeow]] topics%%\\
  3. Now every page in the CatsMeow Group will have that footer.
  4. For the subpages under the main topics, Topic1, Topic2, Topic3, ..., I made up a special page that will be used as the footer for that topic. For Topic1, for example, I used the address bar to create a new page, ...CatsMeow.Topic1Footer to create the page. The contents are arranged similar to the GroupFooter. I am using CamelCase to make the pages look related, but as far as PmWiki is concerned, any page name will do.
    %notetitle% [[Topic1]] topics%%\\
  5. These Topic footers will not show up on their own. They are not special pages to PmWiki. In each Subtopic page, I added the lines,
    [:include CatsMeow.Topic1Footer:)\\
    (:nogroupfooter:) that the custom Footer page is included and the GroupFooter page is not included.

This is a talk page for improving PmWiki.GroupHeaders.

Edit - History - Print - Recent Changes - Search
Page last modified on December 12, 2013, at 03:49 AM