Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: ufku commentedput this at the bottom of imce-content.tpl.php
Change YOUR_THUMBNAIL_NAME.
Comment #5
thomasmeadows CreditAttribution: thomasmeadows commentedok that worked great thanks
Comment #6
dooug CreditAttribution: dooug commented#277293: Force thumbnail creation for every image?
Comment #7
mshepherd CreditAttribution: mshepherd commentedTake a look at http://drupal.org/node/277293#comment-2635072