Anyone know the way to do this.
Thanks so much
that is an interesting request. In admin/controller/common/filemanager.php file,
find:
Code: Select all
$directories = glob($directory . '/' . $filter_name . '*', GLOB_ONLYDIR);
Code: Select all
usort($directories, create_function('$a,$b', 'return filemtime($a) - filemtime($b);'));
Code: Select all
usort($directories, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
Source: http://stackoverflow.com/questions/1249 ... rt-by-date
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Code: Select all
$directories = glob($directory . '/' . $filter_name . '*', GLOB_ONLYDIR);
Code: Select all
$directories = glob(rtrim(DIR_IMAGE . 'data/' . str_replace('../', '', $this->request->post['directory']), '/') . '/*', GLOB_ONLYDIR);
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I have same problem. I have many folders named 1501 , 1502 .... 1550.. I upload new products images on folder and when i add products photo go to last page, select folder....
I want change sort order to desc. If i see last folder in first i add very easy.
Straighlight this fix not working in 2.0.0.31
can you help me ?
Thanks
straightlight wrote:Hi,
that is an interesting request. In admin/controller/common/filemanager.php file,
find:
add after:Code: Select all
$directories = glob($directory . '/' . $filter_name . '*', GLOB_ONLYDIR);
Reversed order (if needed):Code: Select all
usort($directories, create_function('$a,$b', 'return filemtime($a) - filemtime($b);'));
This should resolved the ordering list.Code: Select all
usort($directories, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
Source: http://stackoverflow.com/questions/1249 ... rt-by-date
Yes, by describing exactly what you mean by not working, a possible solution could be provided on that end.Straighlight this fix not working in 2.0.0.31
can you help me ?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
find:
Code: Select all
$files = glob($directory . '/' . $filter_name . '*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}', GLOB_BRACE);
Code: Select all
usort($files, create_function('$a,$b', 'return filemtime($a) - filemtime($b);'));
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Code: Select all
usort($files, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
straightlight wrote:Reversed order ...Code: Select all
usort($files, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
Dear straightlight ;
Thanks again, but nothing change. still the files and folders sort by name , sort order asc .
You try this code ? is that work ?
Whats wrong can you look ? filemanager.php attach.
Thanks.
Attachments
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Exactly what I need also. Any news?rmandiga wrote:Worked for me. changed the code and clicked on modifications for refresh.
Now images showing up in reverse order.
Looking to remove pagination to have all images to scroll down.
Thanks Straight !!!
Thank you mate it worksstraightlight wrote:For 1.5x releases, this would be the line to track on the same controller file:
Code: Select all
$directories = glob(rtrim(DIR_IMAGE . 'data/' . str_replace('../', '', $this->request->post['directory']), '/') . '/*', GLOB_ONLYDIR);
Cool Gadgets - Kitchen Gadget - Travel Gadgets - Pet Gadgets - Car Gadgets - Camping gear - Smartwatch on sale - Smart home gadgets
Users browsing this forum: No registered users and 17 guests