function imce_thumbnails_theme in IMCE 7
Same name and namespace in other branches
- 6.2 inc/imce.admin.inc \imce_thumbnails_theme()
- 6 inc/admin.inc \imce_thumbnails_theme()
Thumbnails form themed.
1 string reference to 'imce_thumbnails_theme'
- imce_theme in ./
imce.module - Implements hook_theme().
File
- inc/
imce.admin.inc, line 548 - Serves administration pages of IMCE.
Code
function imce_thumbnails_theme($variables) {
$form = $variables['form'];
$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', array(
'header' => $header,
'rows' => $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 these thumbnails on file upload no matter what the thumbnail permission is.</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_children($form);
return $output;
}