| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * @file 5 * Theme functions for the videoftp module. 6 */ 7 8 /** 9 * FormAPI theme function. Theme the output of an video ftp field. 10 */ 11 function theme_videoftp_widget($element) { 12 return theme('form_element', $element, $element['#children']); 13 } 14 15 function theme_videoftp_widget_item($element) { 16 // Put the upload button directly after the upload field. 17 $element['ftpselect']['#field_suffix'] = drupal_render($element['videoftp_attach']); 18 $output = '<div class="filefield-element clear-block">'; 19 20 if ($element['fid']['#value'] != 0) { 21 $output .= '<div class="widget-preview">'; 22 $output .= drupal_render($element['preview']); 23 $output .= '</div>'; 24 } 25 26 $output .= '<div class="widget-edit">'; 27 $output .= drupal_render($element); 28 $output .= '</div>'; 29 $output .= '</div>'; 30 31 return $output; 32 } 33 34 /** 35 * Custom theme function for VideoFTP upload elements. 36 * 37 * This function allows us to put the "Attach" button immediately after the 38 * select field by respecting the #field_suffix property. 39 */ 40 function theme_videoftp_widget_file($element) { 41 $output = '<div class="filefield-upload clear-block">'; 42 if (isset($element['#field_prefix'])) { 43 $output .= $element['#field_prefix']; 44 } 45 $size = $element['#size'] ? ' size="'. $element['#size'] .'"' : ''; 46 _form_set_class($element, array('form-select')); 47 $multiple = $element['#multiple']; 48 $output .= '<select name="'. $element['#name'] .''. ($multiple ? '[]' : '') .'"'. ($multiple ? ' multiple="multiple" ' : '') . drupal_attributes($element['#attributes']) .' id="'. $element['#id'] .'" '. $size .'>'. form_select_options($element) ."</select>\n"; 49 if (isset($element['#field_suffix'])) { 50 $output .= $element['#field_suffix']; 51 } 52 $output .= '</div>'; 53 54 return theme('form_element', $element, $output); 55 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |