We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4041
    • 788 Posts
    I’m not quite sure how that could be accomplished so its probably outta my league wink If you have any ideas I am all ears.

    My reasoning for putting the highlighter showing first was really out of necessity while debugging snippets, and if you look at the way the code parts were added to the core files it keeps 90% of the code in the external files.

    Anything I can do to make this better or if anyone has better ways to accomplish this please let me know.
      xforum
      http://frsbuilders.net (under construction) forum for evolution
      • 6726
      • 7,075 Posts
      This is a GREAT one, really amazing I have been dreaming of this, not knowing that it would come to reality so fast smiley

      I even tend to think that if there are no performance issues or bugs, and if you could turn it into a module (or if the core team decides that it’s something which could go in SVN for next rev), this could be a candidate for bundled module/new feature, I’d like to see MODx ship with that one !

      I’ll install it right away !
      It will be so nice not switching and copy pasting from TextMate -> MODx and MODx -> TextMate laugh

      Edit : Waow I didn’t notice there was highlighting for MODx tags, awesome grin
      I definitely want this !!!

      Edit 2 : I have a problem with line numbering... instead, I have MODx bullets. here is the screen capture :



      which file would you say did not upload properly when I installed the mod ?

      Also, I was wondering how hard it would be to have code highlighting enabled when editing documents in html mode (i.e not using WYSIWYG) ?

      Anyway, again, thanks A LOT for this !

        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 7145
        • 4 Posts
        Superb modification!! Great work, breezer!

        Perhaps it’s a good idea to wrap the code in a fixed-height div, so that it is displayed the same way as in the General - textarea tab?
        <div style="height:370px; overflow:auto;">
        <?php
        // print the highlighted code
         echo $geshi->parse_code(); ?>
        </div>

        Again, this is more or less a usability thing: I would expect all tabs to be equally in height, so...
          • 16610
          • 634 Posts
          This looks incredible good! grin
            Mikko Lammi, Owner at Maagit
            • 4041
            • 788 Posts
            grin

            -> davidm: looks like you didn’t upload or use the included manager/media/style/MODx/style.css file. I had to modify the li class (the part I changed is commented in the code) so I think that is your issue.
            highlight documents - I already have my other editor set to highlight documents too, I just didn’t think anyone else would like that feature. Over this weekend I’ll put together another version and revamp the zip wink

            -> DesignationAlpha: have a look at the top of the files in the geshi/manager_files/ folder - find this setting:
            $code_div_style ="class='sectionbody'";

            just empty it out like this:
            $code_div_style ="";

            and it will take away the extra border and background


            The response to this has been very uplifting, I really appreciate it folks!

            edit: the modx specific tags are colored by a custom template I made so you can go and change the colors around a bit if you like. Open up the geshi/modx_template.php file and look at lines 163 - 208 to adjust the colors...

            and to adjust the fonts or whatever used in the highlighter, look in the manager/media/style/MODx/style.css file at the top and see what I added for the highlighter ( .div1 )



              xforum
              http://frsbuilders.net (under construction) forum for evolution
              • 6726
              • 7,075 Posts
              Quote from: breezer at Jul 07, 2006, 12:28 PM
              -> davidm: looks like you didn’t upload or use the included manager/media/style/MODx/style.css file. I had to modify the li class (the part I changed is commented in the code) so I think that is your issue.
              highlight documents - I already have my other editor set to highlight documents too, I just didn’t think anyone else would like that feature. Over this weekend I’ll put together another version and revamp the zip wink

              Funny, I have re-uploaded the style.css file and it didn’t change things...
              I’ll look into it.

              Thanks in advance for the revamped zip !
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l&#39;outil id
                • 33175
                • 711 Posts
                Thanks very much for this great module smiley
                It is very useful smiley
                It is already adopted wink
                  Sorry for my english. I&#39;m french... My dictionary is near me, but it&#39;s only a dictionary !
                  • 4041
                  • 788 Posts
                  davidm, are you putting the included style.css into the MODx folder on the server? Perhaps since there are 2 sets of manager theme files (regular and MODX) try replacing the style.css in the main media/style/ folder and see if that works...
                    xforum
                    http://frsbuilders.net (under construction) forum for evolution
                    • 7963
                    • 67 Posts
                    Amazing, going to install that very usefull plugin wink

                    Thanks a lot
                      • 4041
                      • 788 Posts
                      Ok, since this seems to be widely accepted I am currently putting everything else aside to get the newest updates and tweaks done so I can add this to the repository. I have reworked a few bits of the code so everybody that installs this version (think of it as beta-testing laugh) will have to do a total re-install... but it is worth it trust me!

                      I have already finished highlighting the plugins, and the documents are next.

                      I added an option you can set in the top of each plugin page that allows you to style the code container with any style you want - classes or inline style.

                      Again I want to thank you folks for the great comments and support...

                      Look for the new model late tonight in the repository wink
                        xforum
                        http://frsbuilders.net (under construction) forum for evolution