Progress! I've installed the new package and parsechunk errors are all gone. Thank you!OK. I see a few things wrong. The getImages_Sort parameter requires a PHP Filesystem Function so filename will not work. You could use basename. You would most likely need to remove the "SORT_DESC," from line 96 or it would sort in reverse order. I should look into fixing the sort so that it works more intuitively. Also getImages_Tpl should read getImages_Image_Tpl otherwise it will be ignored. Since you are using the default name you don't need that line at all.
I'm still getting these.modsnippet/3 is the getImages snippet
[2016-11-07 23:26:31] (ERROR @ /home/xxxxxx/public_html/core/model/modx/modx.class.php : 991) `0` is not a valid integer and may not be passed to makeUrl() [2016-11-07 23:26:31] (ERROR @ /home/xxxxxx/public_html/core/cache/includes/elements/modsnippet/3.include.cache.php : 96) PHP warning: array_map() expects parameter 1 to be a valid callback, function 'filename' not found or invalid function name [2016-11-07 23:26:31] (ERROR @ /home/xxxxxx/public_html/core/cache/includes/elements/modsnippet/3.include.cache.php : 96) PHP warning: array_multisort(): Argument #1 is expected to be an array or a sort flag
This is my call
[[!getImages? &getImages_Folder=`assets/images/hamline` &getImages_Tpl =`getImages_Image_Tpl` &getImages_Sort=`filename` ]]
If this would be easier for you, I can give you manaqger access. Just PM me.
OK, I've have resolved all the getImages errors. Whew!basename is one of the PHP File Functions just like filemtime and can be found here http://php.net/manual/en/ref.filesystem.php Like I said earlier, I should look into fixing the sort so that it works more intuitively or just rename it so that it more closely matches what it actually does. Instead of sorting it sets a parameter that you can sort on. By default it sets the first parameter of array_map to the last modified time of the file. Using basename would set it to the name of the file. Commenting out line 96 would simply remove the sort from the array altogether and while that might do what you want, it might not. To keep the sort but not have it in reverse order just remove the SORT_DESC from the line or change it to SORT_ASC (the Default behavior)for array_multisort. When I get a chance I think I will dig into that code a bit and try to make a sort parameter with several good sorting options(just added to my To Do list).
So what is basename? Where would I have found this option? While I see all the default options in the snippet comments, I don't see anything that tells me what the other options might be for any of the call parameters. Am I not seeing something I should be?
And the sort was in reverse order so I commented out line 96. Of course this will be over written with the next update.
Having troubles getting it to work too! Any help would be greatly appreciated.. I'm sure its something minor in my calls.What does your getImages_Page_Tpl look like?
Snippet Call:
[[!getImages?
&getImages_Folder=`assets/img/facility`
&getImages_Tpl=`facilityGalleryTPL`
&getImages_Ext=`jpg,png,JPG,PNG`
]]
TPL Chunk:
<div>
<a href="[[+imgLink]]">
<img src="[[+imgLink]]" title="[[+image]]" alt="[[+image]]" class="img-responsive">
</a>
</div>
Error Log:
[2016-11-17 21:29:26] (ERROR @ xxx/www/core/cache/includes/elements/modsnippet/33.include.cache.php : 117) PHP warning: array_reverse() expects parameter 1 to be array, null given
[2016-11-17 21:29:26] (ERROR @ xxx/www/core/cache/includes/elements/modsnippet/33.include.cache.php : 118) PHP warning: implode(): Argument must be an array
Tried a bunch of things but I am not really sure what to do next haha.
Should be &getImages_Image_Tpl=`facilityGalleryTPL`
[[!getImages?
&getImages_Folder=`assets/img/facility`
&getImages_Tpl=`facilityGalleryTPL`
Oops, okay I am still getting these errors though.&getImages_Ext=`*.jpg,*.gif,*.png,*.JPG,*.GIF,*.PNG`
[2016-11-23 16:31:24] (ERROR @ /xxx/www/core/cache/includes/elements/modsnippet/33.include.cache.php : 117) PHP warning: array_reverse() expects parameter 1 to be array, null given
[2016-11-23 16:31:24] (ERROR @ /xxx/www/core/cache/includes/elements/modsnippet/33.include.cache.php : 118) PHP warning: implode(): Argument must be an array
[[!getImages?
&getImages_Folder=`assets/img/facility`
&getImages_Image_Tpl=`facilityGalleryTPL`
&getImages_Ext=`*.jpg,*.gif,*.png,*.JPG,*.GIF,*.PNG`
]]
<div>
<a href="[[+imgLink]]">
<img src="[[+imgLink]]" title="[[+image]]" alt="[[+image]]" class="img-responsive">
</a>
</div>