- if($GLOBALS['opt_display']) {
- switch($input) {
- case 'textarea':
- $tem->show('display_multiline');
- break;
- case 'html':
- $tem->show('display_html');
- break;
- default:
- $tem->show('display_short');
+ $display_fields[] = array($display_type => array(
+ 'name' => $name, 'caption' => format_caption($name)));
+
+ if(show_in_listing($type, $input, $format, $sql)) {
+ $listing_headers[] = array('caption' => format_caption($name));
+ $listing_field = array('name' => $name);
+ if($format == 'bool' || $format == 'yesno') {
+ $listing_field['enc'] = 'yesno';
+ } elseif($input == 'date') {
+ $listing_field['enc'] = 'mmddyyyy';
+ } elseif($type == 'thumb') {
+ $listing_field['thumb'] = true;
+ } else {
+ $listing_field['enc'] = 'html';