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)$/',
$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
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.
- For a given Group, such as CatsMeow (the name of my boat), I went to the main page,
[(approve links) edit diff]as a convenience for changing the URL to,
...CatsMeow.GroupFooter, allowing me to create the Group Footer page within the PmWiki interface.
- The contents of my GroupFooter look like:
>>frame<< %notetitle% [[CatsMeow]] topics%%\\ *[[Topic1]]\\ *[[Topic2]]\\ *[[Topic3]]\\ .\\ .\\ .\\ >><<
- Now every page in the CatsMeow Group will have that footer.
- 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.Topic1Footerto 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.
>>frame<< %notetitle% [[Topic1]] topics%%\\ *[[Topic1Sub1]]\\ *[[Topic2Sub2]]\\ *[[Topic3Sub3]]\\ .\\ .\\ .\\ >><<<
- 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:)