Hi debussy,
Thank you for the snippet. I will give it a try.
Just briefly looked to it, and I noticed that your are not closing your php-script at the end (?>)
Is this intentional? or a little copy/paste fault.
Regards,
If you named the snippet "randomImage" then the call would look like:
[[!randomImage? &path=`my/path/in/parent/folder`]]
I suggest adding a "path" variable to the snippet’s default property set. If you do that, then specifying the path in the snippet call is only necessary if you want to override the default.
This is cool.
Does anybody know how to edit the snippet, to exclude the (automatically created) thumbnails?
For example, if i add with fck editor an image to a folder:
mypic.jpg
my folder will also contain a file called:
.thumb_mypic.jpg,
and I would like the snippet to exclude the thumbnails.
I guess it shouldn't be too difficult, but i can't find a way to do it. Thanks!
Thanks Lucas -- it works perfectly
This is really useful....but would it be possible to have it return all the image urls of the specified folder, and then output them into a tpl parameter? Then you could use a chunk template with one [+url+] placeholder for use with other plugins?