Quote from: BobRay at Aug 26, 2014, 06:35 PMYou need to comment out line2 (by adding // at the beginning), and remove the // from the beginning of line 3 to uncomment it.
Since you're sending the folder value as a property, it won't be in the $_GET array, so you need to get it from the $scriptProperties array with $modx->getOption().
Thank you for this suggestion. I tried, but it returned 0 image.
Removing the &getImages_Paging =`0` parameters now results in showing: 9 Photos - Page of. But no image is displayed. I will try to modify the templates to get it going.
array_multisort(array_map('filename', $allImages)
One quick tip: it would be nice to have an option to change the image sorting.
By default it is by filemtime.
I changed it to filename, which is easier to handle, but it could be an option for the snippet
array_multisort(array_map('filename', $allImages)
[[!getImages? &getImages_Folder=`[[*folder_casestudies]]` &getImages_Paging =`0` &getImages_Image_Tpl =`getimages_thumb` &getImages_Ext =`jpg,jpeg,gif,png,JPG,JPEG,GIF,PNG` ]]
@DIRECTORY assets/media/images/case_studies
@DIRECTORY /assets/media/images/case_studies
Hello,
sorry for disturbing You, but I have problem with getImages (2.3.1). Im newbie to modx and dont have programing skills at all, so a cant handle it by my self.
Error log:
shortened path.../core/cache/includes/elements/modsnippet/43.include.cache.php : 92) PHP warning: array_map() [<a href="function.array-map">function.array-map</a>]: Argument #2 should be an array
shortened path.../core/cache/includes/elements/modsnippet/43.include.cache.php : 92) PHP warning: array_multisort() [<a href="function.array-multisort">function.array-multisort</a>]: Argument #1 is expected to be an array or a sort flag
shortened path.../core/cache/includes/elements/modsnippet/43.include.cache.php : 96) PHP warning: array_slice() expects parameter 1 to be array, boolean given
shortened path.../core/cache/includes/elements/modsnippet/43.include.cache.php : 103) PHP warning: Invalid argument supplied for foreach()
shortened path.../core/model/modx/modx.class.php : 1830) PHP warning: Missing argument 2 for modX::parseChunk(), called in /data/web/virtuals/12505/virtual/www/work/MODXhacienda/core/cache/includes/elements/modsnippet/43.include.cache.php on line 143 and defined
shortened path.../core/cache/includes/elements/modsnippet/43.include.cache.php : 92) PHP warning: array_map() [<a href="function.array-map">function.array-map</a>]: Argument #2 should be an array
shortened path.../core/cache/includes/elements/modsnippet/43.include.cache.php : 92) PHP warning: array_multisort() [<a href="function.array-multisort">function.array-multisort</a>]: Argument #1 is expected to be an array or a sort flag
shortened path.../core/cache/includes/elements/modsnippet/43.include.cache.php : 96) PHP warning: array_slice() expects parameter 1 to be array, boolean given
shortened path.../core/cache/includes/elements/modsnippet/43.include.cache.php : 103) PHP warning: Invalid argument supplied for foreach()
shortened path.../core/model/modx/modx.class.php : 1830) PHP warning: Missing argument 2 for modX::parseChunk(), called in /data/web/virtuals/12505/virtual/www/work/MODXhacienda/core/cache/includes/elements/modsnippet/43.include.cache.php on line 143 and defined
I found this solution for parseChunk:
http://forums.modx.com/thread/91148/getimages-missing-argument-in-modx-parsechunk
But cant fix rest.
Can you help me?
Thanks a lot.