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

Reverse order joomla 2.5 admiror gallery 4.5
http://www.vasiljevski.com/forum/viewtopic.php?f=34&t=1234
Page 1 of 1

Author:  ledkam [ Sat Apr 12, 2014 11:01 am ]
Post subject:  Reverse order joomla 2.5 admiror gallery 4.5

Hi, how i can change sorting directories and photo images by name? Default sorting (arrange) is bad for me because first item is 1,2,3,4,5,6,7,8,9 (i want sorting reverse --- 9,8,7,6,5,4,3,2,1). I need sorting items with name: year-month-day-somethink and first item must be the youngest.

Very much for any idea.

.........Reverse order joomla 2.5 admiror gallery 4.5

Author:  Vasiljevski [ Tue Apr 22, 2014 6:51 pm ]
Post subject:  Re: Reverse order joomla 2.5 admiror gallery 4.5

You can change the way the list is ordered in agHelper.php, function:
Code:
 public static function array_sorting($array,$targetFolder,$arrange) {

Change : return $array; to
Code:
return array_reverse($array)

Author:  ledkam [ Tue Apr 22, 2014 6:58 pm ]
Post subject:  Re: Reverse order joomla 2.5 admiror gallery 4.5

Thank you for your answer, i try it.

Author:  kolesnikoff [ Sat Jul 05, 2014 7:27 pm ]
Post subject:  Re: Reverse order joomla 2.5 admiror gallery 4.5

Vasiljevski wrote:
You can change the way the list is ordered in agHelper.php, function:
Code:
 public static function array_sorting($array,$targetFolder,$arrange) {

Change : return $array; to
Code:
return array_reverse($array)


Hello... I have the same situation... I need change the order of albums names... default is ascending... i need descendigng...
i find this code in agHelper.php... but i do not understand what i must insert or replace...
can you explain? thank you very much!

Author:  Vasiljevski [ Sun Aug 17, 2014 2:27 am ]
Post subject:  Re: Reverse order joomla 2.5 admiror gallery 4.5

Well I'm not sure what is the default ordering, but anyway you just need to sort the image array the way you need before the gallery is rendered.

In your case, you could set ordering by name in the settings, and just apply the reverse order like explained above. This way you will get opposite ordering, in you case descending.

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