• Resolved mobetman2

    (@mobetman2)


    I want to display time since an image was uploaded on the frontend of my website. For example, when a photo is displayed using your plugin, it would show “X minutes since this photo was uploaded”.

    I know you can do date/time queries with your plugin but after reading the documentation, I’m not sure if it’s possible to do what I want with MLA.

    Any suggestions on how to accomplish my goal?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for an interesting question. The current MLA production version does not have this ability but I was able to modify an existing option/format code to give you a possible solution.

    I have uploaded a new MLA Development Version dated 20190302 that contains the new feature. You can find step-by-step instructions for using the Development Version in this earlier topic:

    PHP Warning on media upload with Polylang

    With the Development Version you can use the [mla_gallery] shortcode to display the “age” of an item. For example, you can code something like:

    
    [mla_gallery post_parent=all posts_per_page=10 orderby="date" order="DESC" mla_caption="{+upload_date,date('%s',age)+} since this photo was uploaded"]
    

    This will display the ten most recent items with an appropriate caption. The date('%s',age) option/format value converts the uploaded on date to a human readable age.

    It would be great if you can install the Development Version and let me know if it works for you. I will leave this topic unresolved until I hear back from you. Thanks for inspiring this new MLA feature and for your interest in the plugin.

    Thread Starter mobetman2

    (@mobetman2)

    Just tested it and it works perfectly!

    Thanks for this plugin and all your work to support and improve it. I really appreciate you adding this functionality and doing it so quickly.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 2.79, which contains the new features for your application.

    I am marking this topic resolved, but please update it if you have any trouble with the new version. Thanks again for your help with this MLA improvement.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Time Since Image Upload’ is closed to new replies.