We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4310
    • 2,310 Posts
    That’s exactly what I have huh
      • 20084
      • 25 Posts
      there shouldn’t be to much difference between 1.0.4 and 1.0.5 right??
        • 4310
        • 2,310 Posts
        Just tried it on a 1.0.4 site and it works.
        Plugin code :
        // plugin.fixedpre.tpl -- implements <fixedpre> tag -- Rahul Dhesi
        // 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 "&"
        }
        
        $e = &$modx->Event;
        if ($e->name == "OnLoadWebDocument") {
          $modx->documentObject['content']=
            preg_replace_callback("#(<fixedpre>)(.*?)(</fixedpre>)#s",
            "quote_meta", $modx->documentObject['content']);
        }

        System Event = OnLoadWebDocument
        Call in page content = <fixedpre>[!Wayfinder? &startId=`0`!]</fixedpre>
          • 20084
          • 25 Posts
          hmmm, its good to know that it does work in the version I’m using, thanks for testing that for me.
          I just tried it again using the code you posted up, I also stripped all other javascript / plugins etc from the template just to make sure it wasn’t a conflicting element, and still no luck.