Announcement

#1 2016-08-02 01:05:09

Knitter
Member
Denmark
2016-05-26
89

Recent Pics

Greetings,

Would it be possible to choose the sort criteria for each album separately?

For the "Recent Pics" to be sorted by "date uploaded", and other albums by something else.

And would it be possible to remove the function completely, when I choose "uninstall"

I found that it is still functioning, but just hidden from new visitors. A regular visitor, who does not empty his cache or delete history in his browser, will still be able to go to recent picks, and it is updated, so it is not deactivated or uninstalled, just hidden. (Like some other plugins too)
And when you click on one of the pics, then click next, and you will get some pics totally irrelevant to recent pics.
That's why I created an album "Nyeste fotos", and deleted the "Recent Pics" to get around this - to no avail. :-(

Try it yourself: http://www.soejberg.com/index.php?/recent_pics

My newly created album http://soejberg.com/index.php?/category/335




Piwigo version:2.8.2
PHP version: 5.6.24
MySQL version:10.0.26 - MariaDB
Piwigo URL: http://soejberg.com

Offline

 

#2 2016-08-09 20:15:31

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: Recent Pics

Hi Knitter,

You can define a specific order for each album separately. Edit any album and got on tab "photos sort order".

What annoys me in your message is that you say "recent pics" section provides irrelevant results. So I took a look and I think I understand what's wrong.

For example you have :

* 000243 (id = 8710, date available = 2016-08-02 15:12:13)
* 000244 (id = 8711, date available = 2016-08-02 15:12:13, same as 000243)
* 000242 (id = 8709, date available = 2016-08-02 15:12:12)
* 000240 (id = 8707, date available = 2016-08-02 15:12:11)
* 000241 (id = 8708, date available = 2016-08-02 15:12:11, same as 000240)

Of course the appropriate sort order should be 000244, 000243, 000242, 000241, 000240.

On the "recent_pics" section, the order is only by date_available. In case of equal value, you get random result. So we need to fix that : [Github] Piwigo file include/section_init.inc.php@L440 we should replace:

Code:

          'ORDER BY date_available DESC,',

by

Code:

          'ORDER BY date_available DESC, id DESC',

Can you test that and tell us if it produces better results?

And would it be possible to remove the function completely, when I choose "uninstall" [...] I found that it is still functioning, but just hidden from new visitors.

Is that "really" a problem?

Offline

 

#3 2016-08-23 16:22:26

Knitter
Member
Denmark
2016-05-26
89

Re: Recent Pics

Sorry for my belated answer. Real life needed my attention.

I have gone back to the original "recent pics", to try again.
What I experienced the first time was that some of the pics I uploaded, showed up among other pics which I uploaded days ago.

Furthermore, when I would go through the recent uploaded pics, I sometimes ended up in a different album that had nothing to do with recent pics.

This time, so far, it is functioning as it should.
It doesn't matter that pics uploaded at the same time are not in alphabetical order - on the contrary - I upload them in categories e.g. first butterflies, then wasps etc. and I would prefer them to stay in that order.
Again - sorry I'm late.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact