| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: audiofield_widget.inc,v 1.3 2010/11/23 19:45:37 tamerzg Exp $ 3 4 /** 5 * @file 6 * audiofield widget hooks and callbacks. 7 */ 8 9 /** 10 * Implementation of CCK's hook_widget_settings($op = 'form'). 11 */ 12 function audiofield_widget_settings_form($widget) { 13 $form = module_invoke('filefield', 'widget_settings', 'form', $widget); 14 15 $form['file_extensions'] = array( 16 '#type' => 'textfield', 17 '#title' => t('Permitted upload file extensions'), 18 '#default_value' => is_string($widget['file_extensions']) ? $widget['file_extensions'] :'mp3', 19 '#size' => 64, 20 '#description' => t('Extensions a user can upload to this field. Separate extensions with a space and do not include the leading dot. Leaving this blank will allow users to upload a file with any extension.'), 21 '#weight' => 1, 22 ); 23 24 return $form; 25 } 26 27 /** 28 * Implementation of CCK's hook_widget_settings($op = 'save'). 29 */ 30 function audiofield_widget_settings_save($widget) { 31 $filefield_settings = module_invoke('filefield', 'widget_settings', 'save', $widget); 32 33 return $filefield_settings; 34 } 35 36 /** 37 * Element #value_callback function. 38 */ 39 function audiofield_widget_value($element, $edit = FALSE) { 40 $field = filefield_widget_value($element, $edit); 41 42 return $field; 43 } 44 45 /** 46 * FormAPI theme function. Theme the output of an image field. 47 */ 48 function theme_audiofield_widget($element) { 49 50 $z=theme('form_element', $element, $element['#children']); 51 52 return $z; 53 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |