× Discussion about Hot Photo Gallery Joomla plugin.

Topic-icon image ordering on gallery

More
7 years 3 weeks ago #7342 by canda13
Hi,

I am trying to order my images published in the following gallery:

www.greatorexfinearts.com/index.php?opti...cle&id=28&Itemid=120

as you can see the different sizes are all mixed, even though I have named the images 01, 02, 03 etc

Please advise how I can sort the images into the order that I want

Many thanks,

Chris

Please Log in or Create an account to join the conversation.

More
7 years 3 weeks ago - 7 years 3 weeks ago #7357 by ivan.milic
Hi,

open file

plugins\content\photogallery.php

find next function and add red marked line:

function get_files($images_dir,$exts = array('jpg')) {
$files = array();
if($handle = opendir($images_dir)) {
while(false !== ($file = readdir($handle))) {
$extension = strtolower(get_file_extension($file));
if($extension && in_array($extension,$exts)) {
$files[] = $file;
}
}
closedir($handle);
}
asort($files);
return $files;
}
Last edit: 7 years 3 weeks ago by ivan.milic.

Please Log in or Create an account to join the conversation.

Time to create page: 0.099 seconds