/[drupal]/contributions/modules/rotor/rotor.module
ViewVC logotype

Diff of /contributions/modules/rotor/rotor.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2.2.18.2.31, Thu Nov 5 10:27:29 2009 UTC revision 1.2.2.18.2.32, Thu Nov 5 10:55:18 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: rotor.module,v 1.2.2.18.2.30 2009/11/05 10:22:34 mrfelton Exp $  // $Id: rotor.module,v 1.2.2.18.2.31 2009/11/05 10:27:29 mrfelton Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 87  function rotor_help($section) { Line 87  function rotor_help($section) {
87   * Node form hook   * Node form hook
88   */   */
89  function rotor_form($node, &$param) {  function rotor_form($node, &$param) {
90      global $user;
91    
92    $form['title'] = array(    $form['title'] = array(
93      '#type' => 'textfield',      '#type' => 'textfield',
94      '#title' => t('Tab Text'),      '#title' => t('Tab Text'),
# Line 120  function rotor_form($node, &$param) { Line 122  function rotor_form($node, &$param) {
122      '#description' => 'The rotor image.',      '#description' => 'The rotor image.',
123      '#collapsible' => TRUE,      '#collapsible' => TRUE,
124    );    );
125    
126    
127      if (module_exists('upload')) {
128        $upload_uploadsize_default = variable_get('upload_uploadsize_default', 1) * 1048576;
129        $max_size = variable_get('upload_uploadsize_'. $user->rid, $upload_uploadsize_default);
130      }
131    
132    $form['image']['rotor_image'] = array(    $form['image']['rotor_image'] = array(
133      '#type' => 'upload_element',      '#type' => 'image_upload_element',
134      '#title' => t('Rotor image'),      '#title' => t('Rotor image'),
135      '#default_value' => $node->fid,      '#default_value' => $node->fid,
     '#image_formatter' => 'upload_element_image_preview',  
     '#image_preview_size' => '100x100',  
136      '#file_validators' => array(      '#file_validators' => array(
137        'file_validate_size' => array(1048576),        'file_validate_size' => !empty($max_size)? array($max_size) : NULL,
       'file_validate_extensions' => array('jpg jpeg png gif'),  
138      ),      ),
139    );    );
140    $form['image']['alt_text'] = array(    $form['image']['alt_text'] = array(

Legend:
Removed from v.1.2.2.18.2.31  
changed lines
  Added in v.1.2.2.18.2.32

  ViewVC Help
Powered by ViewVC 1.1.2