imce_thumbnails_theme

Definition

imce_thumbnails_theme($form = array())
imce/inc/admin.inc, line 393

Description

Thumbnails form themed.

Code

<?php
function imce_thumbnails_theme($form = array()) {
  $header = array(t('Name'), t('Dimensions'), t('Prefix'), t('Suffix'));
  $rows = array();

  foreach (element_children($form) as $key) {
    $rows[] = array(
      drupal_render($form[$key]['name']),
      drupal_render($form[$key]['dimensions']),
      drupal_render($form[$key]['prefix']),
      drupal_render($form[$key]['suffix']),
    );
  }

  $output = '<h3 class="title">'. t('Thumbnails') .'</h3>';
  $output .= theme('table', $header, $rows);
  $output .= '<div class="form-item"><div class="description">'. t('You may create a list of thumbnail options that users can choose from.
<ul>
  <li>Use alphanumeric characters as thumbnail names.</li>
  <li>Specify dimensions as <strong>WidthxHeight</strong>.</li>
  <li>Prefix and suffix are strings that are added to original file name to create the thumbnail name.</li>
  <li>An example thumbnail: Name = <strong>Small</strong>, Dimensions = <strong>80x80</strong>, Prefix = <strong>small_</strong></li>
</ul>
<p>Note that users will always be able to create thumbnails on file upload no matter what the thumbnail permission is. To disable thumbnail creation on file upload you should not define any thumbnails here.</p>
<p>If you need more fields, just fill all and save, and you will get two more on the next page.</p>') .'</div></div>';
  $output .= drupal_render($form);
  return $output;
}
?>