Admiror Joomla! Community
http://www.vasiljevski.com/forum/

Reverse order albums in AG 5.0
http://www.vasiljevski.com/forum/viewtopic.php?f=34&t=1428
Page 1 of 1

Author:  Koudehand [ Mon Feb 09, 2015 2:23 pm ]
Post subject:  Reverse order albums in AG 5.0

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=0&AG_form_paginInitPages_0=1&AG_form_albumInitFolders_0=/93%20TOG/2015%20Opa%20Ziedspan&AG_MK=0

Author:  Vasiljevski [ Thu Mar 19, 2015 4:54 pm ]
Post subject:  Re: Reverse order albums in AG 5.0

I'm not sure, but it seems to me that you fixed the issue :)

Author:  Koudehand [ Sat Mar 28, 2015 5:01 pm ]
Post subject:  Re: Reverse order albums in AG 5.0

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.

Author:  Vasiljevski [ Sun Sep 27, 2015 8:07 am ]
Post subject:  Re: Reverse order albums in AG 5.0

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:
    /**
     *  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);
            }
        }

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/