You are here

function imce_thumbnails_theme in IMCE 6

Same name and namespace in other branches
  1. 6.2 inc/imce.admin.inc \imce_thumbnails_theme()
  2. 7 inc/imce.admin.inc \imce_thumbnails_theme()

Thumbnails form themed.

1 string reference to 'imce_thumbnails_theme'
imce_theme in ./imce.module
Implementation of hook_theme().

File

inc/admin.inc, line 419

Code

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;
}