We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4266
    • 70 Posts
    I’d like to modify NewsListing using template variables in order to show in a news listing a small preview image and separate RichText description (I don’t like not smart truncate function).

    May be there is the more simple way to show a RichText summary in the new MODx 3.2?

    Hope to find answer with your help, people rolleyes
      • 32963
      • 1,732 Posts
      You most certainly can smiley

      Add your rich text to the Summary field when creating your news documents

        xWisdom
        www.xwisdomhtml.com
        The fear of the Lord is the beginning of wisdom:
        MODx Co-Founder - Create and do more with less.
        • 4266
        • 70 Posts
        Quote from: xwisdom at Aug 31, 2005, 02:31 PM

        Add your rich text to the Summary field when creating your news documents

        There is just Plain Text summary window when creating new document in MODx 3.2. So, how can I make it Rich Text in order to place image and text? 

        I’ve found that NewsListing snippet has changed in MODx 3.2:
        Modified by Raymond Irving on 19-April-2005 to use introtext field
        What is this introtext field and how to make it appear when creating new documents? Does this field support Rich Text input? I suppose the new TV "introtext" should be created, but I don’t know exactly how.

        Please, help :’(
        • Have you had a chance to ook at the Word Doc for the snippet which was also updated. It does a good job of explaining exactly what you’re trying to accomplish.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 32963
            • 1,732 Posts
            Quote from: bugaev at Sep 01, 2005, 10:55 AM

            Quote from: xwisdom at Aug 31, 2005, 02:31 PM

            Add your rich text to the Summary field when creating your news documents

            There is just Plain Text summary window when creating new document in MODx 3.2. So, how can I make it Rich Text in order to place image and text? 

            Ok the Summary text box is really where you can paste your html code but I now understand that you want rich text input.

            The are many ways you can approve this but here’s two that came to mind:
            A) You could create TV and then Modify the NewsListing snippet (give it a new name) to use that TV
            B) Create plugin to convert the Summary textbox into a RichText editor.

            I prefer B since it’s very very easy to do. Here’s how it can be done:

            1) Create called RichText News Summary
            2) Add the following code inside the code area of the plugin:
            global $replace_richtexteditor;
            $replace_richtexteditor[] = "introtext";

            3) Attach the plugin to the OnDocFormRender event
            4) Save the plugin

            That’s it you’re done!

            Note: The FCKEditor does not auto size the RichText box to match the width and height of the original texbox. This means that the RichText Summary will have a height of 400px by default but you can however and code to the plugin to rectify this problem. Use the $modx->event->output() function to output text to the browser.

            Disclaimer: The above provides an easy way to "hack" into the system without touching core code. Future versions of the manager might break this hack.



              xWisdom
              www.xwisdomhtml.com
              The fear of the Lord is the beginning of wisdom:
              MODx Co-Founder - Create and do more with less.
              • 4266
              • 70 Posts
              Raymond, BIG thank you! I see God gives you enough wisdom  smiley

              Quote from: xwisdom at Sep 01, 2005, 03:58 PM

              Disclaimer: The above provides an easy way to "hack" into the system without touching core code. Future versions of the manager might break this hack.
              The B variant is elegant and smart. I think it must work in feature versions!

              Thank you again!
              kiss MODx.

              P.S. I’m going to finish russian language pack today. Hope it will be usefull.
                • 32963
                • 1,732 Posts
                Hi bugaev,

                Many thanks for the kind words smiley

                We’ll try to maintain such features in future versions
                  xWisdom
                  www.xwisdomhtml.com
                  The fear of the Lord is the beginning of wisdom:
                  MODx Co-Founder - Create and do more with less.
                  • 18397
                  • 3,250 Posts
                  How would I go about doing this:
                  The FCKEditor does not auto size the RichText box to match the width and height of the original texbox. This means that the RichText Summary will have a height of 400px by default but you can however and code to the plugin to rectify this problem. Use the $modx->event->output() function to output text to the browser.

                  Also, is there any way to alter the toolbar layout (say use a custom toolbar) only for the summary?
                    • 32963
                    • 1,732 Posts
                    I’ll take a look at it but remember that this is only for the FCKEditor. If you’re using other editor it adjust those.

                      xWisdom
                      www.xwisdomhtml.com
                      The fear of the Lord is the beginning of wisdom:
                      MODx Co-Founder - Create and do more with less.
                      • 18397
                      • 3,250 Posts
                      Only using FCK editor.