Reverse order albums in AG 5.0

Admiror Gallery is free extension for Joomla! 1.6. Joomla! 1.7 and Joomla! 2.5 based websites. Admiror Gallery is all in one, a simple and instant solution for rendering image gallery from folder with images, but very flexible and adaptable.
Post Reply
Message
Author
Koudehand
Posts: 3
Joined: Tue Jul 29, 2014 5:18 am

Reverse order albums in AG 5.0

#1 Post by Koudehand »

Hello, I tried to change the settings in agHelper.php in order to see tot it that the newest album is the first in the list. And it worked for the albums. But in an album I like the pictures to be displayed bij name: picture-001.jpg ; picture-002.jpg ; etc. etc.
In my case I like to present pictures of a yearly event (theater play) in a wat that you see the lart event (2015) as the first album, but pictures taken during the play in chronological order. What else could I do please?
F.i.: My album-system contains more than 20.000 pictures. http://www.grolloo.com/fotoalbum?AG_MK= ... an&AG_MK=0

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Reverse order albums in AG 5.0

#2 Post by Vasiljevski »

I'm not sure, but it seems to me that you fixed the issue :)
Help Admiror Gallery become even better,
give us a review on JED

Koudehand
Posts: 3
Joined: Tue Jul 29, 2014 5:18 am

Re: Reverse order albums in AG 5.0

#3 Post by Koudehand »

Hello,

No, I am sorry, but the main-Albums are OK, because I want them in alphabetic order. (http://www.grolloo.com/fotoalbum)
When I than choose f.i. Crescendo (http://www.grolloo.com/fotoalbum?AG_MK= ... do&AG_MK=0)
You can see that the serie starts with "2002 Aa en Hunze" and so on. Here it whould be nice if I could change things in a way that you see the latest added album was shown first.

When I make changes in agHelper.php than the main-Album is in the wrong way.
I hope I made my self clair.

So, maybe it is not possible. But I like to be sure.

Thanks in advance.

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Reverse order albums in AG 5.0

#4 Post by Vasiljevski »

I see your point.

But it's a bit tricky to do that and keep the original behavior for other galleries.

What you could do is add an extra parameter inline, and than check for that parameter in ag_gallery.php so if it exists reverse order else do nothing.
This would be a nice way, if you had a separated gallery's, but I see that in your case you have one and the rest are derived.

The only possible solution that comes to my mind is to check the album name, so if it is "Crescendo" reverse the order, if not do as expected.

In the code that would look like:

Code: Select all

    /**
     *  Loads images array, sorted as defined bu parametar.
     */
    private function loadImageFiles() {
        $this->images = agHelper::ag_imageArrayFromFolder($this->imagesFolderPhysicalPath);
        if (!empty($this->images)) {
            $this->images = agHelper::array_sorting($this->images, $this->imagesFolderPhysicalPath,$this->params['arrange']);
            if(strcmp($imagesFolderName,"Cresendo") == 0) {
                $this->images = array_reverse($this->images);
            }
        }
Help Admiror Gallery become even better,
give us a review on JED

Post Reply