HaganFox
PmWiki Contributions
- Some contributions to various pages of pmwiki.org.
- Some PmWiki 2 skins (newest-to-oldest)
- Adapt - Adapts to display size, with a mobile-friendly Hamburger Menu
- DefaultSkinWithoutTable - The default skin without using a <table> for layout.
- Blog - Blog skin designed to be easy on the eyeballs
- Plain - Designed to be easy on older eyeballs
- Light - Like Lean, but a bit more fancy-schmancy and Content Management oriented
- Lean - Ported, improved original no-nonsense skin from PmWiki 1
- Some PmWiki 2 recipes and such
- Skin Test Assortment - Assorted markup to use for testing skins
- Skin Test-Compact - Rewrite with trickier markup and it fits in a smaller browser viewport
- Clean Urls - Rewrote it from scratch. The old one was awful.
- Cookbook Basics - Created this when refactoring the Cookbook page.
- Skin Guidelines - I wrote a lot of the content, starting long ago. It needs more work.
- InstaWiki - Install an uploads-enabled wiki quickly using a shell script.
- Underline Text - Use HTML 5's <u> tag to display underlined text.
- Highlight Text - Use HTML 5's <mark> tag to display highlighted text.
- Feed Links - Simple one to add <link> tags for feed autodiscovery.
- CMS Bundle - Use PmWiki as a Content Management System for a non-wiki site.
- CMSBundleAddLink - Easily add pre-marked-up links to wiki pages using a bookmarklet.
- Thumbnail Link To Image - Written to demonstrate a requested core feature
- Audit Images - Use Qdig to monitor uploaded images.
- SwitchToSSLMode - Serve pages using HTTPS instead of HTTP.
- FarmSecurity - Explores some WikiFarm security concerns.
- FarmSetupByExample - My attempt to de-mystify setting up a farm of wikis.
- DirectoryAndFilePermissions - Explains which dirs/files need to be readable, writable, and servable.
- ModuleGuidelines - Significant rewrite April, 2007. Now using my proposed "simpler approach".
- Author Contribution - Rewrote the recipe, IIRC. The old one was much more complex.
- Simple Discuss Link - This one morphed into a recipe from a note on another recipe's page.
- Per-Group and Per-Page Customizations in config.php - Someone had to write it.
- Occasional posts to the pmwiki-users list.
- Some PmWiki 1 skins (Lean, Bare).
- A PmWiki 1 Cookbook recipe for switching to (and from) SSL mode.
Open Source Project
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.
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)) { unset($_POST['authpw']); }
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', '/^(!{1,6})\\s?(.*)$/e', "'<: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. (:if:)
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:
http://www.squarefree.com/bookmarklets/misc.html
You can clear a site's cookies using the "Zap Cookies" bookmarklet here:
http://www.squarefree.com/bookmarklets/zap.html
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
http://www.pmwiki.org/wiki/Test/PageListOrder?order=name?count=5
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
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
[[D2006/{$Today}|Today]]
Solved by HansB on the pmwiki-users list.