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 Hot Photo Gallery Joomla plugin.

Topic-icon image ordering on gallery

More
6 years 1 month ago #7342 by canda13
canda13 created the topic: image ordering on gallery
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 to join the conversation.

More
6 years 1 month ago - 6 years 1 month ago #7357 by ivan.milic
ivan.milic replied the topic: Re: image ordering on gallery
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: 6 years 1 month ago by ivan.milic.

Please Log in to join the conversation.

Time to create page: 0.118 seconds

Links, Partners and Social Media