We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33337
    • 3,975 Posts
    Hi all !

    As Mark asked me, and me too, willing to have a single snippet with all functionality inside.

    As for now, various NewsListing snippets are out in the market (market wink ).

    Thought ?

    regards,

    zi
      Zaigham R - MODX Professional | Skype | Email | Twitter

      Digging the interwebs for #MODX gems and bringing it to you. modx.link
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I need the functionalities I’ve put in NewsListingPlus; I’ll be happy to add anything anybody else has that I’ve missed, and anybody who wants can have mine and I’ll withdraw mine as long as it’s got what I need wink

      *  Snippet parameters [default] :
       *      &startID       - the folder containing the posts [the document called from]
       *      &summarize     - number of posts to list partially/fully [3]
       *      &total         - max number of posts to retrieve [100] 
       *      &singleRandom  - show single random post? [false]
       *                     
       *      &trunc         - truncate to summary posts? if set to false, shows entire post [true]
       *      &truncSplit    - use the special "splitter" format to truncate for summary posts [true]
       *      &truncAt       - the split-point splitter itself [<!-- splitter -->]
       *      &truncLen      - if you don't have a splitter or you turn that off explicitly, the number 
       *                       of characters of the blog to show for summary if not using splitter [450] 
       *                       However, if you have a summary of the post, it will use that instead. 
       *                       DEPRECATED ... see below...
       *      &truncText     - text for the summary "show more" link
       *                     
       *      &comments      - whether or not the posts have comments [false]  
       *      &commText      - comments link text ["Read Comments"]  
       *                     
       *      &tpl           - name of the chunk to use for the summary view template  
       *      &dateformat    - the format for the summary date (see http://php.net/strftime ) [%d-%b-%y %H:%M]
       *      &pubOnly       - only show Published posts [true]
       *      &menuOnly      - only show docs with "show in menu" checked [true] TO BE IMPLEMENTED
       *      &emptytext     - text to use when no news items are found
       *      &showarch      - show archive listing? [true]
       *      &archivetext   - text to use for the Post Archives listing ["Older Items"]
       *      &sortby        - field to sort by ["createdon"]
       *      &sortdir       - direction to sort by ["desc"]
      
      


      And

      $fields = array('[+title+]', '[+longtitle+]', '[+description+]', '[+summary+]', '[+link+]', '[+author+]', '[+date+]', '[+id+]');
      
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 33337
        • 3,975 Posts
        actually, I am not intended to force withdrawal of your modifications, but for an organization purpose I like to see all modifications merged inside one snippet.

        As new members come inside, they will confuse with resemblance in names and even in code, to avoid this we can put all our efforts into one snippet having all functions inside.

        I dont know from coding point of view if it is applicable.

        I think now i am clear and hopefully answered the right thing wink

        regards,

        zi
          Zaigham R - MODX Professional | Skype | Email | Twitter

          Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • 25663 MODX Staff
          • 12,272 Posts
          Hi Susan,

          I think your mods are great and look forward to incorporating them myself. I’ll make sure Mark grabs them and merges them into the "official" distribution. Thanks for making them!

            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Be my guest! I just put in stuff that I found I needed, with as little disruption of the original code as possible. Mostly I’ve just added optional arguments and code to validate where necessary, then changed the existing code as little as possible to use the variables.

            Actually the main reason I put it up in the forums is because I keep losing my stuff, and at least here I know where I can get it again when I can’t find it on my machine!
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org