diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-13 02:04:14 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-12-13 02:04:14 +0000 |
commit | 3dd7a193ae91dba9c47391b112113614600aa000 (patch) | |
tree | 38d50c97915e24fcbb2abc5f1e5c19ed68edec51 /modules | |
parent | 5a0ea2d5c3e9c76e96291cfd916c2e2a3bb8a3aa (diff) | |
download | brdo-3dd7a193ae91dba9c47391b112113614600aa000.tar.gz brdo-3dd7a193ae91dba9c47391b112113614600aa000.tar.bz2 |
#645776 by jhodgdon, arianek, tobiasb, and matason: Update Field modules to new help standard.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/field/field.module | 35 | ||||
-rw-r--r-- | modules/field/modules/field_sql_storage/field_sql_storage.module | 4 | ||||
-rw-r--r-- | modules/field/modules/list/list.module | 13 | ||||
-rw-r--r-- | modules/field/modules/options/options.module | 13 | ||||
-rw-r--r-- | modules/field/modules/text/text.module | 13 |
5 files changed, 63 insertions, 15 deletions
diff --git a/modules/field/field.module b/modules/field/field.module index 2861841a4..c87cb0363 100644 --- a/modules/field/field.module +++ b/modules/field/field.module @@ -147,20 +147,27 @@ function field_help($path, $arg) { $output .= '<h3>' . t('Uses') . '</h3>'; $output .= '<dl>'; $output .= '<dt>' . t('Enabling field types') . '</dt>'; - $output .= '<dd>' . t('The Field module provides the infrastructure for fields and field attachment, but the field types themselves are provided by additional modules. Some of the modules are required; the optional modules can be enabled from the <a href="@modules">Modules administration page</a>. Drupal core includes the following field type modules:', array('@modules' => url('admin/config/modules'))); - $output .= '<dl>'; - $output .= '<dt>' . t('Number (required)') . '</dt>'; - $output .= '<dd>' . t('Fields for storing numbers, in integer, decimal or floating point form. You may define a set of allowed inputs, or specify an allowable range of values. Several common formats for displaying numeric data are available.') . '</dd>'; - $output .= '<dt>' . t('Text (required)') . '</dt>'; - $output .= '<dd>' . t( "Fields for storing text. A text field may contain plain text only, or optionally, may use Drupal's input format filters to securely manage HTML output. Text input fields may be either a single line (text field), multiple lines (text area), or for greater input control, a select box, checkbox, or radio buttons. If desired, the field can be validated, so that it is limited to a set of allowed values.") . '</dd>'; - $output .= '<dt>' . t('List (required)') . '</dt>'; - $output .= '<dd>' . t('Fields for storing a list of items. Usually these items are inputted through a select list, checkboxes, or radio buttons.') . '</dd>'; - $output .= '<dt>' . t('Image') . '</dt>'; - $output .= '<dd>' . t('Fields for storing images.') . '</dd>'; - $output .= '<dt>' . t('File') . '</dt>'; - $output .= '<dd>' . t('Fields for attaching files to content.') . '</dd>'; - $output .= '</dl></dd>'; - $output .= '<dd>' . t('Additional fields may be provided by contributed modules, which you can find in the <a href="@contrib">contributed module section of drupal.org</a>.', array('@contrib' => 'http://drupal.org/project/modules')) . '</dd>'; + $output .= '<dd>' . t('The Field module provides the infrastructure for fields and field attachment; the field types and input widgets themselves are provided by additional modules. Some of the modules are required; the optional modules can be enabled from the <a href="@modules">Modules administration page</a>. Drupal core includes the following field type modules: Number (required), Text (required), List (required), Taxonomy (optional), Image (optional), and File (optional); the required Options module provides input widgets for other field modules. Additional fields and widgets may be provided by contributed modules, which you can find in the <a href="@contrib">contributed module section of Drupal.org</a>. Currently enabled field and input widget modules:', array('@modules' => url('admin/config/modules'), '@contrib' => 'http://drupal.org/project/modules', '@options' => url('admin/help/options'))); + + // Make a list of all widget and field modules currently enabled, in + // order by displayed module name (module names are not translated). + $items = array(); + $info = system_get_info('module'); + $modules = array_merge(module_implements('field_info'), module_implements('field_widget_info')); + $modules = array_unique($modules); + sort($modules); + foreach ($modules as $module) { + $display = $info[$module]['name']; + if (module_hook($module, 'help')) { + $items['items'][] = l($display, 'admin/help/' . $module); + } + else { + $items['items'][] = $display; + } + } + $output .= theme('item_list', $items) . '</dd>'; + $output .= '<dt>' . t('Managing field data storage') . '</dt>'; + $output .= '<dd>' . t('Developers of field modules can either use the default <a href="@sql-store">Field SQL storage module</a> to store data for their fields, or a contributed or custom module developed using the <a href="@storage-api">field storage API</a>.', array('@storage-api' => 'http://api.drupal.org/api/group/field_storage/7', '@sql-store' => url('admin/help/field_sql_storage'))) . '</dd>'; $output .= '</dl>'; return $output; } diff --git a/modules/field/modules/field_sql_storage/field_sql_storage.module b/modules/field/modules/field_sql_storage/field_sql_storage.module index c7c7d7b10..a7bbd6637 100644 --- a/modules/field/modules/field_sql_storage/field_sql_storage.module +++ b/modules/field/modules/field_sql_storage/field_sql_storage.module @@ -12,7 +12,9 @@ function field_sql_storage_help($path, $arg) { switch ($path) { case 'admin/help#field_sql_storage': - $output = '<p>' . t('The Field SQL Storage module stores Field API data in the database. It is the default field storage module, but other field storage modules may be available in the contributions repository.') . '</p>'; + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('The Field SQL storage module stores field data in the database. It is the default field storage module; other field storage mechanisms may be available as contributed modules. See the <a href="@field-help">Field module help page</a> for more information about fields.', array('@field-help' => url('admin/help/field'))) . '</p>'; return $output; } } diff --git a/modules/field/modules/list/list.module b/modules/field/modules/list/list.module index 0b8496f44..9838f0a72 100644 --- a/modules/field/modules/list/list.module +++ b/modules/field/modules/list/list.module @@ -7,6 +7,19 @@ */ /** + * Implements hook_help(). + */ +function list_help($path, $arg) { + switch ($path) { + case 'admin/help#list': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('The List module defines various fields for storing a list of items, for use with the Field module. Usually these items are entered through a select list, checkboxes, or radio buttons. See the <a href="@field-help">Field module help page</a> for more information about fields.', array('@field-help' => url('admin/help/field'))) . '</p>'; + return $output; + } +} + +/** * Implements hook_field_info(). */ function list_field_info() { diff --git a/modules/field/modules/options/options.module b/modules/field/modules/options/options.module index 74573b4fd..f3d945014 100644 --- a/modules/field/modules/options/options.module +++ b/modules/field/modules/options/options.module @@ -7,6 +7,19 @@ */ /** + * Implements hook_help(). + */ +function options_help($path, $arg) { + switch ($path) { + case 'admin/help#options': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('The Options module defines checkbox, selection, and other input widgets for the Field module. See the <a href="@field-help">Field module help page</a> for more information about fields.', array('@field-help' => url('admin/help/field'))) . '</p>'; + return $output; + } +} + +/** * Implements hook_theme(). */ function options_theme() { diff --git a/modules/field/modules/text/text.module b/modules/field/modules/text/text.module index 06609fcd9..6f6112c18 100644 --- a/modules/field/modules/text/text.module +++ b/modules/field/modules/text/text.module @@ -7,6 +7,19 @@ */ /** + * Implements hook_help(). + */ +function text_help($path, $arg) { + switch ($path) { + case 'admin/help#text': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t("The Text module defines various text field types for the Field module. A text field may contain plain text only, or optionally, may use Drupal's <a href='@filter-help'>text filters</a> to securely manage HTML output. Text input fields may be either a single line (text field), multiple lines (text area), or for greater input control, a select box, checkbox, or radio buttons. If desired, the field can be validated, so that it is limited to a set of allowed values. See the <a href='@field-help'>Field module help page</a> for more information about fields.", array('@field-help' => url('admin/help/field'), '@filter-help' => url('admin/help/filter'))) . '</p>'; + return $output; + } +} + +/** * Implements hook_field_info(). * * Field settings: |