Page 1 of 1

Reverse order albums in AG 5.0

Posted: Mon Feb 09, 2015 2:23 pm
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

Re: Reverse order albums in AG 5.0

Posted: Thu Mar 19, 2015 4:54 pm
by Vasiljevski
I'm not sure, but it seems to me that you fixed the issue :)

Re: Reverse order albums in AG 5.0

Posted: Sat Mar 28, 2015 5:01 pm
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.

Re: Reverse order albums in AG 5.0

Posted: Sun Sep 27, 2015 8:07 am
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);
            }
        }