Looking good, and well done!
One ques, when I set a thumb size in upload settings, it makes a thumb, but there seems to be no thumb width or height setting in the code or docs? One can just as easily set a fixed height in the code just like in upload dir settings though…
thanks
This is not a drop in replacement for Mh File. I worked hard to make this “in addition to” rather than “instead of.” I have a tweaked version of the MH_File sitting around here though, with a few of my bug fixes in, if you want it, PM me and I’ll email it to you. There might be something I could do to make this work as an upgrade, but it’s not something I’ve experimented with yet, though I probably should.
This works just like the old File, in that the upload settings panel controls the file cleaning & renaming. This does however add the ability to add a title & description to the file, which could be used in the alt or title attribute. I could envision a method to rename files, but I don’t think it’ll be high on my list for now.
Nice job! I do have a couple of suggestions:
The ability to reorder the images would be really helpful.
A few of the sites I work on are news sites. They require the ability to add photo credits and captions. The 2 available fields could work for that, but it would be great to be able to change the field titles over the input boxes (reporters are easily confused 😉 ).
Thanks and great work.
Just downloaded and played with this awsome extension !
Have it even working in a SAEF adding rows or not depending on member group being logged in. However it throws a warning at me used to display the images in combination with the imagesizer extension.
Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in /home/www/vhosts/…/httpdocs/system/extensions/ext.mh_gfile_gal_ext.php on line 1447
Is this something which can be overcome by modifying the extention. Or should I drop a request with my host to enable URL file-access?
The code I use with imagesizer to loop uploaded files:
{multifile}{exp:imgsizer:size src="{file_url}" width="150"}{sized}{/exp:imgsizer:size}{/multifile}
Edit: Using it as a single field it does not throw the warning.
{exp:imgsizer:size src="{multifile}" width="150"}{sized}{/exp:imgsizer:size}
I made a minor modification that should suppress the E_WARNING message you had Ruud L. Heerkens. This fix won’t make the width & heights available to you though, if getimagesize function can’t read the filename. This should also suppress other errors & warnings for non-image files.
See the following note from the PHP docs:
http://us.php.net/getimagesize
If accessing the filename image is impossible, or if it isn’t a valid picture, getimagesize() will generate an error of level E_WARNING. On read error, getimagesize() will generate an error of level E_NOTICE.
Updated file in the top post.
I’m almost done rebuilding. Though I think it’ll be about 1 more week to complete. Since I’m rebuilding from scratch I need to test a bit before I release. I’d rather not replace one thing with bugs with another thing with more bugs.
I’m also hoping to add in support for reordering & renaming files, though I’m going to first just release an extension that can replace the existing one. I should be able to add in the reordering pretty quick without too much trouble. The renaming though might take a bit longer to make sure it’s bug free.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.