We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17499 ☆ A M B ☆
    • 872 Posts
    Since there are no colors, i’m not sure that the geshi.css file i loaded.
    Have you verified it using firebug ?
      • 27408
      • 33 Posts
      Quote from: lossendae at May 27, 2011, 07:15 AM

      Since there are no colors, i’m not sure that the geshi.css file i loaded.
      Have you verified it using firebug ?

      Yup, its loaded, and applied aswell. I find that this if statement:
      if(preg_match("/<pre class=\"(.*)\"\>(.*)<\/pre>/Uis", $output)){
            $output = preg_replace_callback("/<pre class=\"(.*)\"\>(.*)<\/pre>/Uis", array(&$geshiLoader,'setLanguage'), $output);
          }

      doesn’t work, neither does the next. Atleast, if I echo a test string inside the if, its not visible, outside the if it is. I tested the regex, but can’t seem to figure out if thats the culprit.
        • 13144
        • 5 Posts
        I got the same problem. 0.1 rc2
        It does recognize the <pre> and apply line numbers, but the color highlighting doesn’t work.
        Yes, the css is loaded correctly, but the code itself gets no classes applied that would do the coloring.

        Oh, and line numbers are on by default (not false like it says in the docu).

        EDIT:
        Ok i’ve found the problem, as mentioned by Frost, you’ll need to download the package from GeSHi website. http://qbnz.com/highlighter/index.php

        Inside there’s a "geshi" folder containing all the language definition php files. Uploaded that "geshi" folder to the /core/components/geshi/lib directory and the coloring now works.

        Why aren’t those included in the modx package? Since they’re essential for the extra to work correct.

        Thanks anyway for your time and the nice extra.