You are here

function views_calc_help in Views Calc 5

Same name and namespace in other branches
  1. 6.3 views_calc.module \views_calc_help()
  2. 6 views_calc.module \views_calc_help()
  3. 7 views_calc.module \views_calc_help()

Implementation of hook_help().

File

./views_calc.module, line 12
This module will allow you to add calculated fields to views tables and compute (SUM, COUNT, AVG, etc) columns of numeric data in a views table.

Code

function views_calc_help($section) {
  switch ($section) {
    case 'admin/settings/views_calc':
    case 'admin/settings/views_calc/fields':
    case 'admin/settings/views_calc/columns':
      return t('<p>Set up calculation fields and column total fields. Calculation fields will be displayed in the views fields list and can be added to any view. ' . 'Column totals can be created for any view with a page type of \'Views Calc Table\'.</p>');
    case 'admin/settings/views_calc/settings':
      return t('Put one operator on each line. To avoid the possibility of SQL injection, calculation text will only allow these values, numbers, and field names. Make sure this list includes any text other than field names that should be allowed in the calculation fields.');
    case 'admin/help#views_calc':
      return t('<ul> <li>Go to admin/settings/views_calc to create calculations.</li> <li>The \'Fields\' tab will allow you to create calculated fields that can be inserted into any view. The calculations can include the value of any Views field, combined with numbers, arithmatic operations, and common SQL functions like ROUND() or MIN(). Each available field has a shortcut name like %Node:Title. Create SQL snippets like (%Node:Field1 + 84600) or ROUND(%Node:Field2 / 3). </li> <li>The \'Columns\' tab allows you to set column calculations. The column totals only work on views which have been given a page type of \'Views Calc Table\'.</li> <li>The \'Settings\' tab allows you to add new functions to the list of allowable functions. </ul>');
  }
}