Here’s the Revolution version:
<?php
// plugin.fixedpre.tpl -- implements <fixedpre> tag -- Rahul Dhesi
//Revolution version by Bob Ray
// http://rahul.rahul.net/modx-hints/fixedpre-tag.html
function quote_meta($a) {
$lhs = array("<", ">", "[", "]", "!", "{", "}", "`");
$rhs = array("<", ">", "[", "]", "!", "{", "}", "`");
$b = str_replace("&", "\255", $a[2]); //save "&"
$lhs_preg = array('|<!(!*)fixedpre>|', '|<!(!*)/fixedpre>|');
$rhs_preg = array('<$1fixedpre>', '<$1/fixedpre>');
$b = preg_replace($lhs_preg, $rhs_preg, $b);
$b = str_replace($lhs, $rhs, $b);
return str_replace("\255", "&", $b); // restore "&"
}
$modx->resource->set('content',
preg_replace_callback("#(<fixedpre>)(.*?)(</fixedpre>)#s",
"quote_meta", $modx->resource->getContent() ));
?>
BTW, the if statement identifying the event is unnecessary even in the Evo verision because the code is only linked to one event.