Summary: A drop in replacement for the PmWiki (:messages:) directive
Version: 2022-01-22
Prerequisites: PmWiki 2.2.131 (PHP 7.4 compatible)
Status: beta
Maintainer: simon
Licence: GPL3#
Users: (view? / edit)

Questions answered by this recipe

Can I display selected debugging messages from $MessagesFmt.


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


  • download messagesreplacement-2022-01-22.phpΔ
  • copy to the /cookbook/ directory as messagesreplacement.php
  • add to config.php the line


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.


(: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


Special thanks to Petko


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.