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
    This is an auto-generated topic for GeSHI Syntax highlighter 0.1-RC2 by lossendae.

    Brief Description:

    • Removed the plugin parsing ability which don't play nicely with cached resources.
    • You need to use the snippet to highlight your content.
    • Added line numbers options (false by default)
      • 34123
      • 103 Posts
      Hi,

      Thanks for this great addon !

      I have an issue with the color syntax, when i use the bash class (or any class i’ve checked with vb too), my text is grey, there is no colored keyword

      [[!GeSHI? &highlight=`[[*content]]` &enable_line_numbers=`1` ]]


      Am i missing something ?

      Frost
        Configuration Apache + Modx + MSSQL 2008
        ===============================
        Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.8
        OS : Windows 2008 R2
        SGBDR : Microsoft SQL Server 2008 (express)
        • 17499 ☆ A M B ☆
        • 872 Posts
        Hi Frost,

        I think that they are some missing styles from the GeSHI package.
        You should try to get bash and vb functions from the original geSHI website.

        I’ll reintegrate them in further release if it’s the issue.
          • 34123
          • 103 Posts
          hi,
          thanks,
          it was my first impression, i ’ve downloaded the language folder from the geshi repo... but i don’t kwno where to put them !

          Frost

          Ps : j’ai vu que tu parles Français si tu as besoin de faire des tests avec un utilisateur je suis présent !
            Configuration Apache + Modx + MSSQL 2008
            ===============================
            Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.8
            OS : Windows 2008 R2
            SGBDR : Microsoft SQL Server 2008 (express)
            • 34123
            • 103 Posts
            Yeeeaaaah !!

            It works now !!!

            Excellent, I have updated Geshi Syn code source by downloading from Geshi Website, I unzip the Geshi folder (which contains the language files in core/components/geshi/lib/geshi) in the geshi subfolder

            And voilà !!!

            Now it’s time to tweak the CSS
              Configuration Apache + Modx + MSSQL 2008
              ===============================
              Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.8
              OS : Windows 2008 R2
              SGBDR : Microsoft SQL Server 2008 (express)
              • 3749
              • 24,544 Posts
              Nice. Have you tried having the plugin highlight PHP code in the Manager? I think it would be a nice alternative to CodeMirror.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 34123
                • 103 Posts
                Quote from: BobRay at Nov 10, 2010, 03:52 PM

                Nice. Have you tried having the plugin highlight PHP code in the Manager? I think it would be a nice alternative to CodeMirror.

                Hi,

                No i only try Geshi with my content, not in the manager, i think it could be possible with some tweaking, but i don’t have the knowledge to do it... sorry
                  Configuration Apache + Modx + MSSQL 2008
                  ===============================
                  Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.8
                  OS : Windows 2008 R2
                  SGBDR : Microsoft SQL Server 2008 (express)
                  • 17499 ☆ A M B ☆
                  • 872 Posts
                  GeSHI cannot highlight content in real time like CodeMirror since it’s based on PHP only.
                  Its only purpose is to highlight "static" code without javascript.

                  But CodeMirror is also not a code highlighter, it’s a code editing tool like Mozilla Bespin.
                    • 34123
                    • 103 Posts
                    Quote from: lossendae at Nov 11, 2010, 06:20 AM

                    GeSHI cannot highlight content in real time like CodeMirror since it’s based on PHP only.
                    Its only purpose is to highlight "static" code without javascript.

                    But CodeMirror is also not a code highlighter, it’s a code editing tool like Mozilla Bespin.

                    I looked in the forum about Geshi info, and i found something very interessant (in my opinion), after generating formated and colored code everything is tored inside the cache. http://modxcms.com/forums/index.php/topic,3651.msg29676.html#msg29676

                    I don’t know if it the same way for the revo package ?
                      Configuration Apache + Modx + MSSQL 2008
                      ===============================
                      Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.8
                      OS : Windows 2008 R2
                      SGBDR : Microsoft SQL Server 2008 (express)
                      • 17499 ☆ A M B ☆
                      • 872 Posts
                      As a matter of fact it is since this release.
                      Cached document are not retreived from the database, that is the reason why i don’t use plugin anymore. Content was parsed each page refresh if the resource was cached.
                      The snippet call is only executed once and then the page is pulled from the cache which means that geShi run only when the page is cleared from cache (create and update).