Commit 89f12126 authored by webchick's avatar webchick

#645802 by jhodgdon and arianek: Convert File module to new help standard.

parent ffbdf59c
......@@ -14,7 +14,7 @@ function field_ui_help($path, $arg) {
case 'admin/help#field_ui':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Field UI module provides an administrative user interface (UI) for adding custom fields to content types, users, comments, and other types of data. For more information, see the online handbook entry for <a href="@field-ui">Field UI module</a>.', array('field-ui' => 'http://drupal.org/handbook/modules/field-ui')) . '</p>';
$output .= '<p>' . t('The Field UI module provides an administrative user interface (UI) for adding custom fields to content types, users, comments, and other types of data. The field types are defined by other modules, and collected and managed by the <a href="@field">Field module</a>. For more information, see the online handbook entry for <a href="@field-ui">Field UI module</a>.', array('@field-ui' => 'http://drupal.org/handbook/modules/field-ui', '@field' => url('admin/help/field'))) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Defining custom fields') . '</dt>';
......
......@@ -6,6 +6,28 @@
* Defines a "managed_file" Form API field and a "file" field for Field module.
*/
/**
* Implements hook_help().
*/
function file_help($path, $arg) {
switch ($path) {
case 'admin/help#file':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The File module defines a <em>File</em> field type for the Field module, which lets you manage and validate uploaded files attached to content on your site (see the <a href="@field-help">Field module help page</a> for more information about fields). For more information, see the online handbook entry for <a href="@file">File module</a>.', array('@field-help' => url('admin/help/field'), '@file' => 'http://drupal.org/handbook/modules/file')) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Attaching files to content') . '</dt>';
$output .= '<dd>' . t('The File module allows users to attach files to content (e.g., PDF files, spreadsheets, etc.), when a <em>File</em> field is added to a given content type using the <a href="@fieldui-help">Field UI module</a>. You can add validation options to your File field, such as specifying a maximum file size and allowed file extensions.', array('@fieldui-help' => url('admin/help/field_ui'))) . '</dd>';
$output .= '<dt>' . t('Managing attachment display') . '</dt>';
$output .= '<dd>' . t('When you attach a file to content, you can specify whether it is <em>listed</em> or not. Listed files are displayed automatically in a section at the bottom of your content; non-listed files are available for embedding in your content, but are not included in the list at the bottom.') . '</dd>';
$output .= '<dt>' . t('Managing file locations') . '</dt>';
$output .= '<dd>' . t("When you create a File field, you can specify a directory where the files will be stored, which can be within either the <em>public</em> or <em>private</em> files directory. Files in the public directory can be accessed directly through the web server; when public files are listed, direct links to the files are used, and anyone who knows a file's URL can download the file. Files in the private directory are not accessible directly through the web server; when private files are listed, the links are Drupal path requests. This adds to server load and download time, since Drupal must start up and resolve the path for each file download request, but allows for access restrictions.") . '</dd>';
$output .= '</dl>';
return $output;
}
}
// Load all Field module hooks for File.
module_load_include('inc', 'file', 'file.field');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment