PmWiki Contributions

Light Skin page
Plain Skin page

Open Source Project

Qdig web site

I have a GPL-licensed open-source software project called Qdig (Quick Digital Image Gallery). Qdig is a PHP script that automagically generates galleries from image files in a directory tree on your web server.

See the Audit Images recipe for information on how to use Qdig to see if someone has uploaded some undesirable images to your wiki.

I use PmWiki as a "lightweight Content Management System (CMS)" to maintain the Qdig project Home Page and it has been working very well.

Some Items I'm Watching

  • PITS:00946 - CondAuth() enables publish authorization level?
  • I'm waiting for Pm to audit Cookbook.ThumbnailLinkToImage and enable the recipe on its page. I wrote it to demonstrate a feature I think should be part of the core.
  • One of these days there should be a PmWiki.UsersAndGroups? documentation page.
  • Site.UploadQuickReference and Site.EditQuickReference need to be re-written so they use class= attributes and stylesheet CSS selectors.
  • It would be nice to have a way to get a complete list of categories.
  • There should be different style applied to the preview area to visually cue the author that the page isn't saved. (See the "Lost Edits" thread.)
  • The SourceForgeServers recipe needs a backup script.
  • There should be title links for images and separate alt and title links for images.
  • More...

Hardly-Asked Questions (HAQs)

This is a development space for some Question/Answer pairs I think might be useful, however they may not be Frequently Asked enough to merit inclusion on the FAQ page.

Now that the new FAQ scheme is in effect, I'll gradually move these out of here.

--------------------------------------- Newest Q/A pairs go on top. This page isn't for asking questions. ---------------------------------------

How do I ban certain passwords?

Use the following in your local/config.php:

## Invalidate particular password(s)
$ForbiddenPasswords = array('secret', 'hushhush');
if (in_array(@$_POST['authpw'], $ForbiddenPasswords)) {

Why doesn't the PmWiki default skin include a link to AllRecentChanges?

For most of the wikis I run, the wikigroups are almost entirely disconnected -- i.e., each department or student organization has its own group. In these situations the per-group RecentChanges makes a lot more sense than AllRecentChanges.

(Yes, for me as the admin I tend to use AllRecentChanges, but the vast majority of people browsing the site are interested only in a single wikigroup, and probably don't even realize that the separate groups are all part of the same wiki. At least, that's what led me to create wikigroups to begin with.) --Pm

How do I add a Google searchbox to my wiki?

Use the following Custom Markup:

Markup('googlesearch', 'directives', '/\\(:googlesearch:\\)/e',
  "'<:block>'.Keep(\"<a href='http://www.google.com'><img
  src='http://www.google.com/logos/Logo_40wht.gif' border='0'
  alt='Google' title='Google' /></a><form class='wikisearch'
  style='margin:0px; margin-bottom:20px;'
  action='http://www.google.com/search' method='get'><input
  type='text' class='wikisearchbox' title='Search Google' name='q'
  size='20' maxlength='255' value='' /><input type='hidden' name='hl'
  value='en' /><input type='submit' class='wikisearchbutton'
  name='btnG' value='Go' /></form>\")");

This will add a (:googlesearch:) directive.

(English version converted from original German version by .)

How do I add a Google searchbox to my wiki that returns search results for my site?

Use the following Custom Markup:

Markup('googlesearch', 'directives', '/\\(:googlesearch:\\)/e',
  "'<:block>'.Keep(\"Search Google: <form class='wikisearch'
  style='margin:0px; margin-bottom:20px; display:inline; '
  action='http://www.google.com/custom' method='get'><input
  type='text' class='wikisearchbox' title='Search Google' name='q'
  size='20' maxlength='255' value='' /><input type='hidden' name='hl'
  value='en' /><input type='hidden' name='sitesearch'
  value='www.pmwiki.org' /><input type='submit' class='wikisearchbutton'
  name='btnG' value='Go' /></form>\")");

Of course you'll need to change the value of sitesearch to your site.

How do I disable the "!" (single-bang) markup for Level-1 Headings (<h1>)?

Use the following in your local/config.php:

Markup('^!', 'block',
  "'<:block><div class=\"someclass'.strlen('$1').PSS('\">$2</div>')");

How do I hide a comment block within some wiki markup.

The %comment% wikistyle sends your comment text to the browser in a block with a "display:none;" attribute, meaning the comment can be viewed in the page's source. To keep your block of text from being sent to the browser at all, you can use conditional markup:

(:if false:)
This line doesn't get rendered on the page.
Nor does this one.

What cookies does PmWiki set? How can I clear PmWiki has set?

Typically PmWiki just sets two cookies; one for the browsing session and one for the Author Name. PmWiki also comes with a script that uses a cookie to identify the location of a preferences page. Some cookbook recipes and skins also use cookies.

You can view the cookies a site has set using the "View Cookies" bookmarklet here:


You can clear a site's cookies using the "Zap Cookies" bookmarklet here:


What is the "order" parameter? Is it a query string parameter? What are valid order values?

It's a pagelist parameter, which means it can be part of a search query, specified in the (:pagelist:) directive, or given as a url (query string) parameter.

Inside a wiki page, one can do

(:pagelist group=Cookbook order=-time count=10:)

and get a list of the ten most recently modified Cookbook pages.

Then, url query string parameters can be used to override the settings in the (:pagelist:) directive, thus the url


overrides the (:pagelist:) settings and displays the first five pages in the Cookbook group in alphabetical sequence.

Finally, one can use these in a search box, thus entering a search query of

"Cookbook/ order=-time"

returns all of the pages in the cookbook, ordered by last modification time.

Any page attribute can be used as an order value; the common ones are

order=name         page's name
order=title        page's title
order=time         last modification time
order=ctime        page creation time
order=author       last author
order=size         size of markup in bytes

I want to have a "Today" link on my site's Home Page, like [[D2006/20060206|Today]]

You would need pmwiki version 2.1.beta15 or higher for this:

Define a page variable in config.php:

# Add a page variable w/ today's date formatted as YYYYMMDD. $FmtPV['$Today'] = 'strftime("m%d", time() )';

Then you can write your link as


Solved by HansB on the pmwiki-users list.