SP Easy Image Gallery => Sort Albums In Frontend By Creation Date And Time - Question | JoomShaper

SP Easy Image Gallery => Sort Albums In Frontend By Creation Date And Time

MS

Markus Stamm

Extension 2 years ago

Hello

A few photos are uploaded to the website in albums for sporting events. I haven't figured out what setting to do to make the most recent event appear at the top of the album list. Unfortunately, new albums are always displayed at the end of the list. In the display "SP Easy Image Gallery: Albums", I cannot sort the list using drag and drop. The albums should be able to be displayed by creation date and time (descending or ascending) in the frontend. The album "Tour3" should be in the first place in the "Bilder / Skitouren" => "Images / Ski tours" menu, because it was the last one to be created.

Many thanks for the feedback: Markus Stamm

-1
9 Answers
MS
Markus Stamm
Accepted Answer
2 years ago #58670

Hello Are you still there ? Sorting in descending order is important! Could it be an idea to sort the albums by their ID in ascending order? That would be the solution for me! Greeting: markus

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #58340

Hello Markus Stamm

Please go to this location: components/com_speasyimagegallery/models and replace albums.php file with the attached file. You need to unzip the file and then replace.

albums.php.zip

Best regards

0
MS
Markus Stamm
Accepted Answer
2 years ago #58358

Hello Ofi Sorry, your change has no effect. I see that the PHP line has now been changed to $query->order('a.ordering DESC'); However, the albums are still not sorted by creation date and time in descending order. The last album created must always be displayed first. How can I adjust that ? As I wrote, drag and drop sorting doesn't work. Greeting: Markus

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #58676

Apology for the inconvenience. Please share your FTP Details here to investigate the issue. Use the Hidden Content box to share the credentials. Make sure that you have a full site backup with you before sharing.

0
MS
Markus Stamm
Accepted Answer
2 years ago #58686

As you can see, there are four albums in the Ski Touring (Skitouren) category. the 1st album has ID 4, the second has ID 5, the 3rd has ID6 and the last created has ID7. The album with the ID7 should now appear first on the frontend. You can easily replicate this on your own. However, I would be happy to give you my access data so that you can analyze it. Regards: Markus

0
MS
Markus Stamm
Accepted Answer
2 years ago #59808

Hello Ofi Khan, are you still there? Sorting in descending order is important! I sent you the access data 1 week ago. Haven't heard from you since then!! As you can see, there are four albums in the Ski Touring category. the 1st album has ID 4, the second has ID 5, the 3rd has ID6 and the last created has ID7. The album with the ID7 should now appear first in the frontend. You can easily replicate this yourself. I hope you've done that in the meantime. Otherwise, this component is free but worth nothing. Greetings: Markus

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 2 years ago #61325

Apology for the delay. I have added a menu item SP Gallery (currently unpublished). I have changed the query to $query->order('a.id DESC'); Now it works.

0
P
Pedros
Accepted Answer
3 months ago #147473

Hello, I have the same problem, how to sort the gallery so that it is displayed from the newest one?

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 3 months ago #147491

Hello Pedros

Please post a new question regarding your issue. We will check and help you.

Best regards

0