• Resolved reraymond

    (@reraymond)


    This plugin is EXACTLY what I was looking for–simple listing of files residing in a designated directory, with links.

    For date reasons alluded to in the plugin introductory information, I code my root filenames thus: standard_default_nameyyyymmdd. As you can see, all files with the same default name would be grouped by (coded) date in a sorted list. However, I need to be able to display my list (not a table) with the most recent file at the top, which requires a descending sort.

    Any chances of implementing this? Perhaps this can already be done in some undocumented manner?

    Regards,
    Richard Raymond

    https://www.ads-software.com/plugins/mmm-file-list/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Adam Bissonnette

    (@mmanifesto)

    Hey Richard,

    Have you tried using the orderby=”date” parameter? This should display the files in a descending order (newest to oldest).

    Thread Starter reraymond

    (@reraymond)

    Thank you for the VERY fast response!

    I am aware that sorting by date will allow this–at least once–but there are times when I post an updated version of an existing file, and for reasons you allude to, I’m not sure I’ll always get a descending sort order that I desire, which is actually by the file name, then by (descending) date. I understand the difference is a bit esoteric, but I’ve had problems relying on the date in the past. That’s why I’ve resorted to coding the date in the actual file name.

    Regards,
    Richard Raymond

    Plugin Author Adam Bissonnette

    (@mmanifesto)

    Hey Richard,

    It looks like I must not have hit send on my earlier response. I had updated the plugin to version 1.6 which includes the “order” parameter which should allow you to arrange your files ascending (z-a) by name which will effectively give you the effect you’re looking for.

    If this change works for you then please consider filling out a review of the plugin ??

    Cheers,

    MManifesto

    Thread Starter reraymond

    (@reraymond)

    THANK YOU!

    I’ve been around the block, and your support response has been phenomenal. This is destined to become one of my “go to” plugins.

    One minor glitch, however. To me-and probably a lot of other people-ascending means a-z. You seem to have defined ascending as z-a. In fact, that’s how the plugin functions. So, for now, when I want a descending sort, I’m specifying order: ‘asc’. Not a deal breaker in any sense, but a bit discomfiting.

    Suggestions:
    (1) make the ‘asc’ parameter in fact produce an ascending sort, and vice versa for the ‘desc’ parameter
    (2) make the default sort in fact an ascending sort, which is probably what most people expect. Actually, that’s what is produced now, but with the ‘desc’ parameter

    Thanks again for such an elegant little plugin.

    Richard Raymond

    Plugin Author Adam Bissonnette

    (@mmanifesto)

    Hey Richard –

    I get what you’re saying. I was pretty conflicted about it but I wanted something that made sense for both filenames and dates without changing their defaults (and potentially causing a flurry of upset reviewers).

    By default the filenames are ordered a-z (desc doesn’t make sense since we don’t descend through the alphabet) and dates are ordered newest to oldest (desc makes sense since we don’t ascend back in time).

    I really wish I just added a parameter like reverse_list=”true|false”.

    If you prefer “asc” over “desc” I’ll update quickly now to version 1.7 with that change and hopefully won’t have thrown many people off since (hopefully) they won’t be using the “order” parameter yet.

    Thread Starter reraymond

    (@reraymond)

    I, too have struggled with this during my past coding days. Nonetheless, here’s how I settled on things: an ascending sort goes from a lower numeric value to a higher numeric value. Think, for example how dates are coded in Excel and other programs. They are represented by the number of seconds from some set start time. Consequently, a date with a larger number (a more current date, mind you) will sort to the bottom of an ascending sort. This works for any text or numeric value, be it the numeric value of a text string or the numeric value of a date.

    I guess that’s a long way of saying I’d vote for both the name and file date to be treated the same: ascending produces a list with lower text/date values at the top, and larger values at the bottom. Then, let the poster determine at the time of writing which to use with his MMM shortcode, which would be a function of whether they were sorting their list by file name or by file date–it’s easy to determine with a quick “preview’ whether the sort is acting as the poster desires. If not, we just revise the shortcode order parameter and we’re home free.

    Thanks,
    Richard

    Plugin Author Adam Bissonnette

    (@mmanifesto)

    That makes a lot of sense. I’ve got the change made so you should be able to update to version 1.7 with “ascending” set at the default.

    Feel free to let me know if there is anything else I can help with or if you need a simple plugin made when all the other alternatives are a bit too clunky.

    Cheers,

    Adam ([email protected])

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘descending sort order based on filename…not date’ is closed to new replies.