Cookbook /
FixmeMarkup
Summary: Implement "FIXME" markup in PmWiki.
Version: 2020-03-19
Prerequisites: Requires at least PmWiki version: ??; last tested on PmWiki version: pmwiki-2.2.126 (compatible with PHP 5.5, PHP 7.2)
Status: Stable
Maintainer: Robert Riebisch
Categories: Markup
Discussion: FixmeMarkup-Talk?
Questions answered by this recipe
- How can I easily mark parts of a page for later fixing?
- How can I make those markings stand out, when viewing and editing a page?
Description
DokuWiki provides the markup "FIXME" to allow authors rapid "prototyping" of new wiki pages. This recipe shows how to mimic this behaviour in PmWiki.
Sample screenshots:
Installation
At first, put the following lines to your local/config.php file:
$ROEPatterns["/( \\(:FIXME:\\) # existing | # or (?<![\t]) # not preceded by tab \\bFIXME\\b # between non-word characters )/x"] = '(:FIXME:)';
Markup('FIXME', 'directives', '/\\(:FIXME:\\)/', "$PubDirUrl/fixme.gif\"FIXME\"");
Next, put the following line to your pub/css/local.css file:
img[src$="fixme.gif"] { vertical-align: middle; }
Finally, get and place it to your pub/ folder.
Usage
- Just type
FIXME
(all upper case) anywhere you like on a page. - You can have as many FIXMEs on a single page as you want.
- Clicking buttons "Preview", "Save", or "Save and edit" will change
FIXME
to(:FIXME:)
. - When you view a page, you will see a FIXME icon, everywhere you wrote
FIXME
. - To see all your wiki's FIXMEs, simply use PmWiki's search function to search for "FIXME".
- Then replace every
(:FIXME:)
with your intended change step by step.
Change log / Release notes
- 2020-03-19: Initial release.
See also
For more detailed explanations on how this works:
If you want to avoid introducing a new markup to your PmWiki installation, you may use the [[!UpdateMe]]
category instead.
Contributors
- Robert Riebisch: Initial recipe.
- Petko: Help with regular expressions, PHP, CSS.
- Simon's profile: For the UpdateMe category hint.
Comments
See discussion at FixmeMarkup-Talk?
User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.