rss feed not in chronological order.

Max Steel
  • Max Steel
    Max Steel

    I just realized that when someone uses a rss reader to view my wiki, the entries are not in chronological order (sorted by date, with the newest entry at the top of the list).

    How can I fix this?

    • Can you give your URL? And which entries? I want to look at it.


      S. B. Lisesivdin

    • Max Steel
      Max Steel

      The Wiki is here:

      The RSS feed (that's our of order) is here:

      It's a non-profit organization that I created a site for.

      Thanks for any help, in advance!

      • Hi again,

        I think the problem is caused by the creation dates of those pages. Wikepage is use the real unix dates to order the entries. So if your file creation dates are somehow mixed, the problem  arises.

        Now,.. you can copy the files with ftp again, mostly it will upload the files in name order (name order is also consistent with the chronological order) so automaticly, your file's creation dates will be in order. Or try to copy them to another folder one by one in name order (oldest first).

        I wish these will work.

        Good luck.

    • Max Steel
      Max Steel

      The filenames match the correct system date:

      Entry-2008-02-08_12-48-27 has a system file date of 08/02/2008 12:48  --  They match!

      It is weird that the blog is in order, but the rss feed is not.

      It is the rss feed that I would like to fix.

      Any other ideas?

    • Max Steel
      Max Steel

      see new wiki entry here:

      The first one is titled: "CN Pensioners Golf - June 10th, 2008"

      but on the RSS feed:

      The first one is titled: "January 2008 General Meeting Rescheduled"

      They wiki and the rss feed have different orders.  The wiki is correct.  The rss feed is wrong (out of order).

    • Max Steel
      Max Steel

      oops typo for the previous post here is the correct link:

      see new wiki entry here:

      (not )

    • Max Steel
      Max Steel

      I figured it out!!

      Here's the fix:

      In index.php find this section:

      <rss version="0.91">
      <title><?php echo $pagevars["sitename"]; ?></title>
      <link><?php echo $pagevars["url"]; ?></link>
      <description><?php echo $pagevars["siteheader"]; ?></description>
      <language><?php echo $langu; ?></language>
      if ($rssname=="blog" or $rssname=="Blog"){
      while( $newfile=readdir($handle) )
          if(preg_match("/(Entry-[\w]+)/",$newfile) )
      //add this sort function right here:
      ---end code---

      This is the section that creates the RSS feed, what is missing is the "sort" function..  So after the last line add "sort($allpages);" (see the comment // above in the code and the line directly after) and it fixes the out of order rss feed!