Hello,
I'm using piwigo as a personal photo gallery, and I found the memories plugin really useful.
I would like to suggest a feature :
- Extend the date range to N days before or after the target date.
For example, instead of having photos from exactly 1 year ago, have the photos range a couple days around 1 year ago (+/- 5 days for example).
I'm more of a embedded developer, but I managed the following modification in main.inc.php to achieve kind of what I wanted :
```
- $daydate=date("Y-m-d", strtotime('-1 year'));
+ $date_min=date("Y-m-d", strtotime('-1 year -5 days'));
+ $date_max=date("Y-m-d", strtotime('-1 year +5 days'));
```
and
```
- $query .= '
- and DATE ('.$datepfoya.') ="'.$daydate.'";';
+ $query .= '
+ and DATE ('.$datepfoya.') >="'.$date_min.'"';
+ $query .= '
+ and DATE ('.$datepfoya.') <="'.$date_max.'";';
```
I think anyone with actual php knowledge could do this cleanly in a heartbeat, with a parameter in the plugin admin page.
Thanks in advance !
Offline
Memories extension is a great enhancement, thanks!
Extended range would be good, perhaps pictures from the same week (number)?
Another wish is to get notified by email when Memories are available.
Memories feature would be nice in mobile App too!
Offline
This extension is (almost) exactly what I was looking for for a few years, thanks ! (Until now, I was using an excel file to create a link for each year for the day‘s date)
Just maybe two suggestions :
1– In the drop down menu, would it be possible to hide the the « empty » years (i e : years with no photos on this date) ?
2- Could we have an option for « all years » ? This de-activable option could display all photos created/added on this date for all years.
Offline
Hi :-)
ychemineau wrote:
1– In the drop down menu, would it be possible to hide the the « empty » years (i e : years with no photos on this date) ?
other users wanted all years ...
ychemineau wrote:
Could we have an option for « all years » ? This de-activable option could display all photos created/added on this date for all years.
All the photos of the date without the year on a single page that's it
Offline
ddtddt wrote:
Hi :-)
ychemineau wrote:
1– In the drop down menu, would it be possible to hide the the « empty » years (i e : years with no photos on this date) ?
other users wanted all years ...
Or maybe just as an option to the add-on ? :)
Photos on my gallery were shot since 2007, so displaying a 15 years drop down menu is quite annoying when only 4 or 5 dates are not empty.
Not a big issue as I‘ve edited the menubar_pfoya.tpl file myself as follows, for my own use :
{foreach from=$pfoyasblock item=pfoya} {if ($pfoya.NB_IMAGES>0)} <a class="dropdown-item" {if isset($pfoya.NB_IMAGES)} title="{$pfoya.NB_IMAGES|@translate_dec:'%d photo':'%d photos'}"{/if} href="{$pfoya.URL}">{$pfoya.LABEL} <span class="badge badge-secondary ml-2">{if isset($pfoya.NB_IMAGES)}{$pfoya.NB_IMAGES}{/if}</span> </a> {/if} {/foreach}
My programming years are quite far away, so I did not take time to edit the other files to include some $PFOYA_EMPTY variable in the configuration files, but I will probably give it a try one day…
ddtddt wrote:
ychemineau wrote:
Could we have an option for « all years » ? This de-activable option could display all photos created/added on this date for all years.
All the photos of the date without the year on a single page that's it
Exactly :)
(and this one may be too complex for my dev skills yet :) )
Last edited by ychemineau (2022-08-03 11:10:14)
Offline
Hi :-)
it's my hollidays, can you send me email for this
Offline
ddtddt wrote:
Hi :-)
it's my hollidays, can you send me email for this
Pas de souci ;)
Edit :
Sorry, doesn’t work.
No worries… Nothing urgent. The only change would be to add a $pfoya.empty variable, set as 1 by default (show empty years) and have a possibility to set it to 0 on the admin menu.
The only change in the menubar_pfoya.tpl files would be this :
{foreach from=$pfoyasblock item=pfoya} {if ($pfoya.NB_IMAGES==0 AND $pfoya.empty==1)} <li><span>{$pfoya.LABEL}</span> </li> {else}
Anyway, only if this matter is of any interest for other users. Otherwise, I‘d be the only one interested :)
Last edited by ychemineau (2022-08-04 23:21:02)
Offline