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

Diff of /contributions/modules/computed_field/computed_field.module

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

revision 1.17, Tue Aug 26 05:25:38 2008 UTC revision 1.18, Tue Oct 7 17:26:12 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: computed_field.module,v 1.16 2008/04/22 01:07:49 nterbogt Exp $  // $Id: computed_field.module,v 1.17.2.3 2008/09/29 04:08:21 moonshine Exp $
3    
4  /**  /**
5   * Implementation of cck hook_field_info()   * Implementation of cck hook_field_info()
# Line 40  function computed_field_field_settings($ Line 40  function computed_field_field_settings($
40        $form['display_format'] = array(        $form['display_format'] = array(
41          '#type' => 'textarea',          '#type' => 'textarea',
42          '#title' => t('Display Format'),          '#title' => t('Display Format'),
43          '#description' => t('This code should assign a string to the $display variable, which will be printed as the value of the field. The stored value of the field is in $node_field_item[\'value\'].  Note: this code has no effect if you use the "Raw Value" formatter option.'),          '#description' => t('This code should assign a string to the $display variable, which will be printed as the value of the field. The stored value of the field is in $node_field_item[\'value\'].  Note: this code has no effect if you use the "Computed Value" formatter option.'),
44          '#default_value' => !empty($field['display_format']) ? $field['display_format'] : '$display = $node_field_item[\'value\'];',          '#default_value' => !empty($field['display_format']) ? $field['display_format'] : '$display = $node_field_item[\'value\'];',
45        );        );
46        $form['store'] = array(        $form['store'] = array(
# Line 127  function computed_field_field_settings($ Line 127  function computed_field_field_settings($
127          $table_alias = content_views_tablename($field);          $table_alias = content_views_tablename($field);
128    
129          // Swap the filter handler to the 'in' operator.          // Swap the filter handler to the 'in' operator.
130          $data[$table_alias][$field['field_name'] .'_value']['filter']['handler'] = 'views_handler_filter_many_to_one_content';          $data[$table_alias][$field['field_name'] .'_value']['filter']['handler'] = 'content_handler_filter_many_to_one';
131          return $data;          return $data;
132        }        }
133    }    }
# Line 227  function computed_field_theme() { Line 227  function computed_field_theme() {
227      'computed_field_formatter_markup' => array(      'computed_field_formatter_markup' => array(
228        'arguments' => array('element' => NULL),        'arguments' => array('element' => NULL),
229      ),      ),
230      'computed_field_formatter_raw_value' => array(      'computed_field_formatter_computed_value' => array(
231        'arguments' => array('element' => NULL),        'arguments' => array('element' => NULL),
232      ),      ),
233    );    );

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.2