setlocale(LC_TIME, "es_ES");
function bbcode($string)
{
$string = str_replace("monthvariable",strftime("%B"), $string);
return $string;
}
$e = &$modx->Event;
switch ($e->name) {
case "OnWebPagePrerender":
$o = &$modx->documentOutput; // get a reference of the output
$o = bbcode($o);
break;
default :
return; // stop here - this is very important.
break;
}