A set of instructions for adding features that are useful for a site that is using PmWiki as a Content Management System.
When I create a new PmWiki site I nearly always install a certain few of my customized recipe scripts. I started a project to bundle those scripts together and publish them along with the instructions here. The scripts can be useful individually, so I've uploaded some of them to pmwiki.org (usually with an accompanying post to the pmwiki-users list).
CMS Mode script
Documentation is on the CMS Mode recipe's page.
Addlink Bookmarklet script
Documented at CMSBundleAddLink.
Local configuration file
Adding the following to the end your configuration file (config.php) will turn PmWiki 2.1.10 or newer into a nice little CMS. (Global edit password required.)
This will cause the PmWiki-related content on the sidebar to disappear unless you are an author.
Customize the sidebar
First, let's hide Wiki-related content from non-authors. Underneath the top link, add an
(:if auth edit:) directive, as in
Next, let's add a Logout link. At the bottom of the sidebar page, add a "Log out" link. When you are done, it will look like this:
Customize the Page Actions
- Add a Login link.
- Remove the Print link.
- Add an AllRecentChanges link.
When you are an editor and want to become an administrator or an "uploader", it helps to have a link to take you to the login page. Also, I don't like the anachronistic Print link and often find a sitewide AllRecentChanges link handy. To that end, the
$SiteGroup.PageActions page gets this content:
When you are done, set new edit password of "
@_site_edit " on your
Customize the logo
Go to this site and create a logo. The background color is 247/247/247. A font with a slim upper margin looks best. Rename the file to something that makes sense, like site_logo.png, and configure PmWiki to use it by adding this line to your config.php file:
$PageLogoUrl = "$PubDirUrl/skins/pmwiki/site_logo.png";
You can adjust the position of the searchbox and make the "Search" link text text match the links in the sidebar with this:
- See CMSMode#release_notes for the CMS Mode script's release notes.
- See CMSBundleAddLink#release_notes for the Addlink Bookmarklet script's release notes.
- 20-6-09-14 - Moved AddLink script to its own recipe page.
- NeilHerber has donned his programmer's hat and provided helpful feedback and advice about the blocklist and addlink scripts.
See discussion at CMSBundle-Talk