We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1800
    • 52 Posts
    Right now everything works on my site except the rss. I want to publish everything in advanced so it automaticaly updates the homepage and rss when the page self publishes.. it all works except i cannot get the publish date to show up in the rss correctly...

    I use ditto to create the rss and this is the template ditto uses
    <item>  
    <title>[+answer+]</title>
      <link>[(site_url)][~[+id+]~]</link>
      <description>[+introtext+]</description> 
     <pubDate>[+rss_date+]</pubDate> 
     <guid isPermaLink="false">[(site_url)][~[+id+]~]</guid>  
    <dc:creator>[(site_name)]</dc:creator>
      [+tagLinks+] </item> 


    Problem is that [+rss_date+] outputs the date the page was created and if i throw in [+pub_date+] it wont format the date correctly for rss.. and it says the year was 1992 in some random month... etc..

    So.. how do I input the publish date in the rss format and letting it be automatic..?

    (the site is centered around the use of rss.. so your help is very appreciated! http://arezombiesattacking.com/feed.rss)
      Minneapolis Web Design <-- where i work
      MODx Templates <-- new project im working on
      • 31227
      • 198 Posts
      great question, something ive been meaning to tackle for a while now.
      I think that you have to edit rss.format.inc.php located in the formats folder of ditto
        Pure MODx sites
        Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
        • 7231
        • 4,205 Posts
        You can add &dateSource=`pub_date` to your ditto call as you would if it was not a RSS format, Ditto will do the rest.
        From the code:
        $GLOBALS["dateSource"] = isset($dateSource) ? $dateSource : "createdon";
        	// date type to display (values can be createdon, pub_date, editedon)
        	
        // set tpl rss placeholders
        $placeholders['rss_date'] = array($GLOBALS["dateSource"],"rss_date");
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 31227
          • 198 Posts
          brilliant grin grin grin
            Pure MODx sites
            Viriko.ru & Viriko.com - Multilingual and running on 1 MODx
            • 1800
            • 52 Posts
            Thanks for the help! I cant express how grateful I am for this! I sort of jumped the gun on letting this thing out and getting a lot of hits and couldnt have it set wrong.....


            THANKS!!!
              Minneapolis Web Design <-- where i work
              MODx Templates <-- new project im working on