Search Form and Social Buttons

HotThemes Logo and Top Menu

To request a forum account, please login here and open support ticket. Only customers with active order(s) can open forum account!

× Discussion about "Photo Portfolio" Joomla template.

Topic-icon Sorting of pictures with Photo Gallery Plugin

More
5 years 11 months ago #8409 by jpmdejonge
jpmdejonge created the topic: Sorting of pictures with Photo Gallery Plugin
Dear support,

Thankk you for the great template and extensions, awesome!

I have one question. How could I change the order of the pictures displayed in the article and the lightbox when using the Photo Gallery plugin?

I have tried to discover how it is sorted by default but I was not able to find out.

Your help is most appreciated!

Jean-Paul

Please Log in to join the conversation.

More
5 years 11 months ago - 5 years 11 months ago #8419 by ivan.milic
ivan.milic replied the topic: Re: Sorting of pictures with Photo Gallery Plugin
The simple reason is that there is no sorting at all , so that is left to server hosting your site to do that.

Open plugins\content\photogallery.php

Find this:
....
$image_files = get_files($images_dir);
if(count($image_files)) {
$index = 0;
foreach($image_files as $index=>$file) {
....


and add sort statement before foreach loop:

....
$image_files = get_files($images_dir);
if(count($image_files)) {
$index = 0;
sort($image_files);
foreach($image_files as $index=>$file) {
....

This way sorting will be by image name.
Last Edit: 5 years 11 months ago by ivan.milic.

Please Log in to join the conversation.

More
5 years 11 months ago #8424 by jpmdejonge
jpmdejonge replied the topic: Re: Sorting of pictures with Photo Gallery Plugin
Hi Ivan,

As usual you have been of great help.

Thanks, you guys rock!

JP

Please Log in to join the conversation.

Time to create page: 0.128 seconds

Links, Partners and Social Media