OrdaSoft forum
Welcome, Guest
Please Login or Register.    Lost Password?
OS Gallery: Random ordering on front-end (0 viewing) 

Joomla Gallery Support

Go to bottom Favoured: 0

OS Gallery: Random ordering on front-end

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 Years, 10 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.
admin (Admin)
Admin
Posts: 8230
graph
User Offline Click here to see the profile of this user
Re:OS Gallery: Random ordering on front-end 5 Years, 10 Months ago
Karma: 101  
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.
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 5 Years, 10 Months 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.
admin (Admin)
Admin
Posts: 8230
graph
User Offline Click here to see the profile of this user
Re:OS Gallery: Random ordering on front-end 5 Years, 10 Months ago
Karma: 101  
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
»