Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Here's a statement of the obvious: The opinions expressed here are those of the participants, not those of the Mutual Fund Observer. We cannot vouch for the accuracy or appropriateness of any of it, though we do encourage civility and good humor.

    Support MFO

  • Donate through PayPal

Commentary Archives on the commentary page

edited September 2011 in Technical Questions

At the upper right corner of the commentary lies a box for Commentary Archives. There is only one (which happens to be the latest) commentary. I believe the box should list the previous commentaries (or at least a few of of them)


  • Hi, Investor.

    I know. There's a glitch in the program, so that it wants to alphabetize the commentaries (April, August, February, January, July, June ...) and then show on the main page only the "latest" commentary. That wasn't a problem in August since August was, alphabetically, at the head of the list. When Chip tried to post September, though, the system reshuffled the archives list to put September at the bottom and, yet again, displayed August.

    She's trying to figure out how to reset, or rewrite, the program to get around that. If you've got a suggestion, she'll open to the assistance.

  • There might be an easier fix if I saw the code but I suspect you can fix it this way without modifying the code but modifying the name of the link.

    Precede the name of the link (possibly the title also) with a number like 0001-August..... in the order you want or better yet....

    put a computed number in front of it that will sort out by date.


    year * 100 = 2011 * 100 = 201100
    month * 10 = September = 9 * 10 = 90
    day * 1 = 1 * 1 = 1

    so September 2011 archive would be 201191
    august would be 201181
    july 1 2012 would be 201271

    these would probably sort out correctly this way.

  • Reply to @Accipiter: The Japaneese date format YYYYMMDD would sort OK and would be human readable and would not require a computation.

    If these are kept in a SQL table, adding another column and apply a SORT BY would solve the problem very easily.

    I agree, I need to see the code to suggest a solid fix.
  • Actually, as the code stands now, it sorts in ascending order by the title that's displayed for the commentary. So, any of the date formats (I often use the YYYYMMDD myself) wouldn't work well, without rewriting the page to look at another field. Further complicating things, is the fact that the pages are actually fed through an RSS feed from WordPress. I'll try to share some code tomorrow.
Sign In or Register to comment.