- Thank you received: 0
image ordering on gallery
-
canda13
Inactive member - Topic Author
- New Member
Less
More
12 years 11 months ago #7342
by canda13
image ordering on gallery was created 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
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.
-
ivan.milic
Support Staff - Moderator
Less
More
- Thank you received: 1639
12 years 11 months ago - 12 years 11 months ago #7357
by ivan.milic
Replied by ivan.milic on 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;
}
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: 12 years 11 months ago by ivan.milic.
Please Log in to join the conversation.
Time to create page: 0.300 seconds