We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33175
    • 711 Posts
    Hi Mark !!

    I have a little problem with NewsListing. Could you fix it ? grin
    Then, my problem is date formatting with localization.

    I want display a date like "jeudi 16 février 2006" (textually Thursday 16 February 2006). The date is displayed "jeudi 16 f?vrier 2006".
    I use UTF-8 (a cause of my problem). strftime() is used in the snippet to format date but this PHP function return date in ISO-8859-1. A solution is to use utf8_encode(). Ideal is to test Modx charset to use this function or not.

    I have written a snippet (FormatDate) which resolve this problem. You can copy and paste this code wink

    Thanks for this
      Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
      • 18397
      • 3,250 Posts
      Looking at your snippet code, are you saying all I need to do is wrap the date functions output in
      utf8_encode()
      ?
        • 33175
        • 711 Posts
        Not exactly : you need to wrap the date functions output in utf8_encode() only if charset of Modx is UTF-8.
          Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
          • 18397
          • 3,250 Posts
          NL 6.3.4 meet UTF-8 dates! Could you please add this to the NewsListing bugtracker? (Link earlier in this thread...somewhere!)
            • 33175
            • 711 Posts
            I didn’t know that NewsLilsting has a bugtracker undecided
            I have add this to the bugtracker : http://modxcms.com/bugs/task/306

            Thanks Mark.
              Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
              • 25663 MODX Staff
              • 12,272 Posts
              There is a projec in our tracker specifically for newslisting. It’s one of your choices you make when creating a bug / feautre / support request post.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 33175
                • 711 Posts
                Hi Mark !!

                Could you add in your documentation after this line
                * &startID - the folder containing the posts [the document called from]
                , this or something like :
                &startid=`0` for all website

                Thanks for newbie as me smiley
                  Sorry for my english. I'm french... My dictionary is near me, but it's only a dictionary !
                  • 18397
                  • 3,250 Posts
                  Sure! This weekend I plan on re-doing the NewsListing documentation anyways, so I’ll make sure that gets in there.
                    • 3763
                    • 155 Posts
                    Hello!

                    Well, this thread is quite looong rolleyes
                    I have searched for an answer to my question, but did not found it. Maybe it was asked but ... here it is:

                    Can I use something like this?
                    [[NewsListing? &startID=`4,8,10,20` ...]]


                    I would like to get articles just of some folders (IDs). Or maybe is there another parameter I have to use? I know I can use the root ID of these folders, but I don’t want them all shown.

                    Thank you!
                    Boby
                      ...my Photo Gallery on Flickr...
                      • 18397
                      • 3,250 Posts
                      Yes, but you need to set multilevel=1 for that to work at the moment.

                      I still need to add a check to say if there are commas in the list, use the advanced method...