OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
OS Responsive Image Gallery module Support
Go to bottom Favoured: 0
TOPIC: OS Gallery: Random ordering on front-end
#38094
bobalexx (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
OS Gallery: Random ordering on front-end 5 Months ago Karma: 0  
Good evening.

Is it possible to have random ordering of the gallery images on the front-end every time when somebody opens the page?

I couldn't find any setting to do this.

Thank you in advance.

Alex
 
Logged Logged  
  The administrator has disabled public write access.
#38120
admin (Admin)
Admin
Posts: 5923
graph
User Offline Click here to see the profile of this user
Re:OS Gallery: Random ordering on front-end 4 Months, 3 Weeks ago Karma: 68  
Dear Alex

In OS Joomla gallery ordasoft.com/os-image-gallery.html
Now you manual set reordering the images in time edit gallery. Next, gallery every time will show this ordering.

if you need show images from gallery is random.

Please in file
{your site}/components/com_osgallery/helpers/osGalleryHelperSite.php

find row
Code:

                            "n ORDER BY gim.ordering ASC " ;


and replace it to

Code:

                            "n ORDER BY  RAND()  " ;


also
Code:

                            usort($imageArr, "self::sortByOrdering");


and replace it to

Code:

                            //usort($imageArr, "self::sortByOrdering"); 



Please back up this file first

This will not work for Load more

Regards
Andrew
OrdaSoft team
 
Logged Logged  
  The administrator has disabled public write access.
#38200
bobalexx (User)
Fresh Boarder
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
Re:OS Gallery: Random ordering on front-end 4 Months, 2 Weeks ago Karma: 0  
Dear Andrew!

Thank you very much for your answer. This solution worked for me.

Keep up the good work.

Kind regards.

Alex
 
Logged Logged  
  The administrator has disabled public write access.
#38203
admin (Admin)
Admin
Posts: 5923
graph
User Offline Click here to see the profile of this user
Re:OS Gallery: Random ordering on front-end 4 Months, 2 Weeks ago Karma: 68  
You are welcome.

We will be happy if you can help us too and you put excellent review and 100 hits
on Joomla.org for our Responsive gallery
extensions.joomla.org/extension/os-responsive-image-gallery

If you would like any further information or need some customization service,
please do not hesitate to contact us too.

Best Regards,
Andrew
OrdaSoft team
P.S. Please do site backup 2 times per month
 
Logged Logged  
  The administrator has disabled public write access.
Go to top
What are you looking for?
Anti-spam question: How many eyes has a typical person?