We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4095
    • 372 Posts
    I noticed that the the NewsFeed snippet is dislaying the created on date not the publish date.

    This is confussing to users as the feed arrives saying it was written a few days ago, yet only arrives today smiley

    I think I need to change the line of code below (unless it can be changed when you call the snippet?). Can I just change [’createdon’] to [’pub_date’]? What about the letters etc before hand?

    <pubDate>'.date("r", $ds[$i]['createdon']).'</pubDate>'."\n"


    Cheers.
      [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
      Admin Sandbox Login: sandbox Password: castle
      • 1764
      • 680 Posts
      Well that depends, pub_date is not really what it sounds like. pub_date is the field for the Publish date setting in the manager which is only set manually if you want a document to be published sometime in the future. So basically, you can use pub_date but you’ll have to set it manually.

      I’m working on a publishedon field for the next release that will work the same way as createdon and editedon.
        • 18397
        • 3,250 Posts
        NewsFeed is now only maintained for backwards compatibility and NewsListing has taken over the RSS capabilities. Please use the NewsListing snippet with &format=`rss`.
          • 4095
          • 372 Posts
          Fair call. I am still using NewsListing 6.1 I think so will update it.

          Always nervous altering that stuff as it links to feeds, so if something goes wrong, it could send the mistake it to everyone shocked
            [img]http://www.emanz.ac.nz/assets/images/logo/emanz-icon_16x16.gif[/img] Emergency Management Academy of New Zealand [br] http://www.emanz.ac.nz[br][br]MODx Sandbox Login: sandbox Password: castle [br]
            Admin Sandbox Login: sandbox Password: castle
            • 18397
            • 3,250 Posts
            To prevent this problem from happening I just duplicate the feed document and create a new snippet to go along with it. I can then take my time messing with it until all is perfect and then mirror my changes back to the origional document.