It’d be really nice if there was a way to assign captions to the images that you upload… possible?
Whilst I definitely don’t want to knock this extension as I have used it on many an occasion, nowadays I tend to use the FieldFrame extension along with the Ngen File Field field type.
This will allow you to do exactly what you need and a whole heap more too!! 😊
I would definitely advise looking into this combination if you haven’t already. It must also be noted that Mark (creator of the File extension) has already stated that he doesn’t have any intention of updating this extension to work with ExpressionEngine 2.0 when it arrives.
There is an altered version on one of the pages of this thread though I believe which does allow you to have captions with each image but really there is so much more you can do now using FieldFrame and the Ngen File field that I would seriously recommend that avenue.
Best wishes,
Mark
Anything is possible, you’d have to hack into the code, I don’t think Mark will be updating this extension any further and more and more users are moving over to nGen File Field, which can support what you’re after if used with FF Matrix (so create a FF Matrix field, with a field for nGen File, and a text entry field for caption, etc).
Edit: got to type faster or refresh before posting! 😊
Edit: got to type faster or refresh before posting! 😊
Well I cheat a little bit as I have a direct link to my cerebral cortex so I only have to think the words and they appear in the forums 😉
Thanks Mark, Twobelowzero. I’ve installed the two plugins you both suggested and will work from there. Best regards.
Hope it all goes well for you. Any problems then you know where we all are 😊
Best wishes,
Mark
I’m using this extension to create a slideshow using javascript on the page. I have everything working they way I want except for one thing. I need a conditional to display the controls only if there is more than 1 image being uploading using the extension. Something like: {if total_results > 1}{/if} Is there anyway to do this?
I’m getting a 403 Forbidden error when uploading files using the latest version of this extension. Files seem to get 600 permissions instead of 644. Any ideas? …<snip>… You might also add some error messages by checking the return value of the chmod function and also add surpress warning by superceeding it with a @, but in my case that was not neccessary.
The above fix worked for me. The line numbers changed slightly though:
File: ext.mh_file_ext.php
Changed:
foreach($file_tmp_names as $file_key=>$file_tmp_name)
{
if(@move_uploaded_file($file_tmp_name, $server_path.$file_names[$file_key]) === FALSE)
{
$errors[] = str_replace(array('%{field}', '%{file}'), array($file_field['field_label'], $file_names[$file_key]), $LANG->line('error_transfer'));
}
}
Line(s): #867 - #873
Added:
foreach($file_tmp_names as $file_key=>$file_tmp_name)
{
if(@move_uploaded_file($file_tmp_name, $server_path.$file_names[$file_key]) === FALSE)
{
$errors[] = str_replace(array('%{field}', '%{file}'), array($file_field['field_label'], $file_names[$file_key]), $LANG->line('error_transfer'));
}
// If all went well, set the permissions on the uploaded + moved file:
else
{
@chmod($server_path.$file_names[$file_key], 0644);
}
}
Line(s): #874 - #885
Info: http://ellislab.com/forums/viewthread/38997/P486/#389993
I’m using this extension to create a slideshow using javascript on the page. I have everything working they way I want except for one thing. I need a conditional to display the controls only if there is more than 1 image being uploading using the extension. Something like: {if total_results > 1}{/if} Is there anyway to do this?
Not sure if you solved this, but it should work - it needs to be wrapped in the custom field pair and you may need to try wrapping total_results in additional curly brackets
{[custom_field]}
{if {total_results} > 1} ... {/if}
{/[custom_field]}
Alternatively where you want the controls to appear duplicate the custom field loop and use count:
{[custom_field]}
display image using {file_url}
{/[custom_field]}
{[custom_field]}
{if count == 2} display controls {/if}
{/[custom_field]}
There’s been a couple of fixes to the plugin mentioned in this thread which haven’t been incorporated into the plugin download - one of these may have rectified the issue if total_results isn’t working - I can’t remember what fixes I’ve now made to the plugin locally!
Yes. Exactly that, although your closing tag is mis-spelt. :cheese:
{[custom_field]}…{/[custom_field]} — When used as a pair the contained code will loop, outputting all the uploaded files. count — Numeric number of each file total_results — Total number of files uploaded to the custom field file_name — Filename of the uploaded file. file_url — URL to the uploaded file. file_thumb_name — Filename of the uploaded thumbnail. file_thumb_url — URL to the uploaded thumbnail.
This should work fine as the code previous. I’ve noticed that problems can appear when you mix a single tag with a tag pair, for example:
Total Images: {my_image_field}{total_results}{/my_image_field}
This is my Image URL: {my_image_field}
So instead do something like this:
Total Images: {my_image_field}{total_results}{/my_image_field}
This is my Image URL: {my_image_field}{file_url}{/my_image_field}
Also I made a modification to the extension based on code previously supplied in this thread regarding “single” which made it more unstable - so ensure you’re using the correct version.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.