Hello everyone,
I would like to display the *creation date (M/Y) * of the *most recently added photo* of an album on the album overview page (homepage). So for example if I have an album in which there are a lot of photos taken in September 2016 with the most recent being September 21st, 2016, I would like to display the text "September 2016" below the album name.
(How) is this possible?
Furthermore, is there a website with an overview of all the template tags (e.g. {$cat.DESCRIPTION})? I couldn't find any on here yet..
Piwigo version: 2.9.4
PHP version: 5.5.38
MySQL version: 5.7.21
Offline
Hi adastra,
In your local configuration (you can modify it with plugin LocalFiles Editor), add:
<?php $conf['display_fromto'] = true; ?>
Depending on your theme, it "may" work :-)
Offline
Thanks! But how do I add it to my template now?
Offline
If nothing happens on your gallery, it means your theme is not compatible :-/ If you want to modify the templates of your theme, check how it's implemented on the "default" theme, template mainpage_categories.tpl :
{if isset($cat.INFO_DATES) } <p class="dates">{$cat.INFO_DATES}</p> {/if}
Offline
That did the trick, thanks! :)
However, currently it display a text like this: "from Tuesday 29 September to Monday 5 October 2015"
How can i display it only the month and year of the latest photo, so e.g. "October 2015"? Or how can I customize it in general, e.g. making it show "29 Sep - 5 Oct 2015"?
Also, it's not displayed on albums with sub-albums, any way to add it there?
Last edited by adastra (2018-07-22 19:18:04)
Offline