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

ufku’s picture

You can do this by adding a piece of js code in imce-content.tpl.php.
$('#edit-thumbnails-YOUR_THUMBNAIL_NAME').click();

pauline_perren’s picture

It would be if it could be an option in the IMCE settings that controls whether the thumbnail checkboxes are selected by default.

thomasmeadows’s picture

the 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.

ufku’s picture

put this at the bottom of imce-content.tpl.php

<script type="text/javascript">
$('#edit-thumbnails-YOUR_THUMBNAIL_NAME').click();
<script>

Change YOUR_THUMBNAIL_NAME.

thomasmeadows’s picture

ok that worked great thanks

dooug’s picture

Status: Active » Closed (duplicate)
mshepherd’s picture