We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14605
    • 40 Posts
    hmmm @lossendae

    can you tell me where i might have gone wrong here? The plugin is printing out everything, including the span tags etc... within the pre statement.

    http://www.websystemsgo.com/index.php?id=10

    My GeSHI call looks like this...

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


    and i then use

    <pre class="php">
      php code here...
    </pre>


    Have I missed something... I now have the latest, 0.1 RC1 installed.
      • 17499 ☆ A M B ☆
      • 872 Posts
      You have to use the manual highlighter when the content is retreived trough another snippet like getResources so that GeSHI can highlight the content placeholder

      [[GeSHI? &highlight=`[[+myplaceholder]]`]]
      


      On the other hand, you don’t have to manually highlight the content field ([[*contentfield]] with tags like a TV) unless you have disabled the plugin.

      To make it work, just use the content field without the snippet call to GeSHI:

      [[*content]]
      
        • 14605
        • 40 Posts
        Oh ok, i’ve got it now, and have it working...

        I look forward to the tutorial on setting GeSHI options through the plugin, especially line numbers etc...

        Many thanks for your help with this.

        Jon
          • 14605
          • 40 Posts
          I think there may be a bug with this plugin...

          if you go to this document...

          http://www.websystemsgo.com/generate-thumbnail-image-from-website-webpage-url-using-php.html

          on the first view, it looks fine, but if you do a refresh of the page (ctrl + F5) then you see all the formatting information within the pre statement (you see all the span classes printed on the page).

          tested in firefox 3.6.10

          Cheers

          Jon

            • 17499 ☆ A M B ☆
            • 872 Posts
            You’re right!

            I’ve take a debugging session with a fellow modx user and we came to the same conclusion.

            Until i find a way to know when the content from a cached resource with the plugin, you can:

            - use the plugin with uncached resource
            - Modify the plugin to just load the settings and manually highlight what you want

            Since my quesion about this matter remain unanswered, i’ll release an update of GeSHI with the plugin only loading the theme for GeSHI and the snippet for highlighting whatever you want which work with either cached or uncached resource.

            Thanks for you feedback.
              • 14605
              • 40 Posts
              No Problem, glad to help

              I shall await the new release, thanks for your quick response

              Jon