MessagesReplacement
Questions answered by this recipe
Can I display selected debugging messages from $MessagesFmt.
Description
A drop in replacement for the PmWiki (:messages:) directive. Based on code from PITS:01368.
Differences are:
- comma or space separated parameters, with wildcards, can be supplied
- only messages for specified parameters are displayed
- parameters are case insensitive
- directive does not have to start at the beginning of a line
- placed within a HTML section of class=messages
Installation
- download
messagesreplacement-2022-01-22.phpΔ
- copy to the
/cookbook/
directory asmessagesreplacement.php
- add to
config.php
the lineinclude_once($FarmD/cookbook/
messagesreplacement
.php);
Usage
Place the directive, as described below, in your PmWiki page.
The recipe provides a page variable {$MessagesReplacementVersion}
which contains the current version, and page variable $
MessagesReplacement
for a (
:if enabled MessagesReplacement:)
recipe installation check.
Configuration
(:messages optional,list,of,names :)
Parameters are optional and case-insensitive.
config.php
settings
You can change the following in config.php
. For example
$
MessagesReplacementDebug = true; # results may vary
Change log / Release notes
2022-01-22 Initial version
See also
- PITS:01368 add parameter to
(:messages:)
page directive - (:messages:) directive.
- $MessagesFmt
Contributors
Special thanks to Petko
Comments
See discussion at MessagesReplacement-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.