' . NL;
# set debug flag
\SDV($DebugMessagesDebug, false); # set default debug setting if not defined in an configuration file
$debugmessages_debugon = boolval ($DebugMessagesDebug); # if on generates a test page directive
# Version date
$RecipeInfo[DMSGNAME]['Version'] = '2024-01-14' . $DMsgNew; # PmWiki version numbering is done by date
# recipe version page variable
$FmtPV['$dmsgVersion'] = "'" . __NAMESPACE__ . " version {$RecipeInfo[DMSGNAME]['Version']}'"; // return version as a custom page variable
\SDV($HTMLStylesFmt[__NAMESPACE__], NL
. '.dmsgprefix {display:inline-block; font-style:italic; min-width:6rem;}' . NL
. '.dmsgpre {font-size:smaller;}' . NL);
//
# Markup is an internal PmWiki function that defines the custom markup for the wiki (see https://www.pmwiki.org/wiki/PmWiki/CustomMarkup)
# (:gpxstat optional by syntacically defined parameters:)
$MarkupDirectiveFunctions['debugmessages'] = __NAMESPACE__ . '\\DebugMessages_Parse';
//
return; # completed setting up the recipe
# see https://www.pmwiki.org/wiki/Cookbook/DebuggingForCookbookAuthors
##
function DebugMessages_Parse ($pagename, $directive, $args, $content = '') {
global $RecipeInfo;
$emptyVariable; # unassigned
$someHtml = 'some HTML
blue text HTML';
$associativeArray = array(
"Hua" => array("Āporo", "Maika", "Huakiwi"),
"Huawhenua" => array("Rīwai", "Kānga", "Pūhā", "Kūmara"));
dmsg('
' . NL . print_r($smsgdata, true) . '' . NL; break; case (is_string ($smsgdata)): $msgFmt .= "'" . \PHSC($smsgdata, ENT_NOQUOTES) . "'"; break; default: $msgFmt .= '"' . \PHSC(strval ($smsgdata)) . '"'; break; } # end switch $MessagesFmt[$dmsgKey] [] = $msgFmt; return $msgFmt; # also return HTML in case caller wants to use it } # end dmsg } # end namespace