Closed (duplicate)
Project:
IMCE
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2009 at 20:18 UTC
Updated:
23 Feb 2010 at 11:34 UTC
I have tried to edit the code to no avail. lol.
Can you add an option to make the default for thumbnail creation options under the file upload field to be checked by default?
Or possibly tell me how I would go about modifying the code. I believe the code is in page.inc at imce_upload_form.
if (!empty($imce['thumbnails'])) {
$form['thumbnails'] = array(
'#type' => 'checkboxes',
'#title' => t('Create thumbnails'),
'#options' => imce_thumbnail_options($imce['thumbnails']),
);
I tried '#default_value' => 1; as well as '#default_value' => array('thumbnail[Preview]' => 1);
Comments
Comment #1
ufku commentedYou can do this by adding a piece of js code in imce-content.tpl.php.
$('#edit-thumbnails-YOUR_THUMBNAIL_NAME').click();Comment #2
pauline_perren commentedIt would be if it could be an option in the IMCE settings that controls whether the thumbnail checkboxes are selected by default.
Comment #3
thomasmeadows commentedthe java code did not work for me. I tried to use drupal_add_js() but did not work correctly, I also try to add it alone. Unfortunately I don't know JS at all so I don't know how to enter it.
Comment #4
ufku commentedput this at the bottom of imce-content.tpl.php
Change YOUR_THUMBNAIL_NAME.
Comment #5
thomasmeadows commentedok that worked great thanks
Comment #6
dooug commented#277293: Force thumbnail creation for every image?
Comment #7
mshepherd commentedTake a look at http://drupal.org/node/277293#comment-2635072