You are here

function webform_protected_downloads_help in Webform Protected Downloads 6

Same name and namespace in other branches
  1. 7 webform_protected_downloads.module \webform_protected_downloads_help()

Implementation of hook_help().

File

./webform_protected_downloads.module, line 345
This file contains hook declarations and functions for the Webform Protected Downloads module.

Code

function webform_protected_downloads_help($page, $arg) {
  $output = '';
  switch ($page) {
    case 'admin/help#webform_protected_downloads':
      $output = t("<h3>Purpose of this module</h3>\n      This module is based on the webform module and lets you configure protected downloads, meaning files of any type that can be accessed by a user only after the user has submitted a webform with a valid e-mail address.\n\n      <h3>How it works</h3>\n      This module operates on nodes that are used as webforms. A webform node that has been configured for protected downloads acts just like a normal webform survey, expect that the user must give a valid e-mail address. After the user submits the webform an e-mail will be sent to the given e-mail address. This e-mail contains a link to a download page where all protected files are listed and can be downloaded from.\n      In order to use a webform node for protected downloads this node must meet the following criteria:\n      <ul>\n      <li>at least one private file must have been attached to the node</li>\n      <li>the webform must have at least one mandatory e-mail component</li>\n      </ul>\n\n      <h3>Step-by-step guide to use this module</h3>\n      <ol>\n      <li>Enable core file uploads for the content type that you use as a webform</li>\n      <li>Check that the <a href='@private_upload_url'>private upload module</a> is configured correctly</li>\n      <li><a href='@webform_help_url'>Create a webform</a></li>\n      <li>Add a a mandatory mail component to the webform</li>\n      <li>Upload at least one file to the cretaed node and mark it as private</li>\n      <li>Go to the <em>Protected downloads</em> tab of the node and configure details like\n      <ul>\n      <li>how long should the download stay available for a given user</li>\n      <li>the mail text of the outgoing mail, including a placeholder for the download link</li>\n      <li>custom text that appears on the downloads page above the file listing</li>\n      <li>custom text for an access denied page</li>\n      </ul>\n      </li>\n      </ol>\n\n      <h3>How to send HTML formatted mails</h3>\n      The e-mails containing the access information for the protected files are send using default drupal mail functionality. That's why you should be able to use any mailengine that offers html support in order to send formatted mails. The only mailengine that has actively been tested in conjunction with this module is the <a href='@mimemail_project_url'>mimemail module</a>.\n      \n      <h3>Useful references</h3>\n      <ul>\n      <li><a href='@reference_files_url'>Working with files in Drupal 6</li>\n      </ul>", array(
        '@private_upload_url' => url('admin/settings/private_upload'),
        '@webform_help_url' => url('admin/help/webform'),
        '@mimemail_project_url' => url('http://drupal.org/project/mimemail'),
        '@reference_files_url' => url('http://drupal.org/documentation/modules/upload'),
      ));
      break;
    case 'node/%/edit/protected-downloads':
      $output .= '<p>' . t("This page displays files that are currently attached to this webform. You can select one or more of these files to be protected downloads. This means, that they won't be listed on the normal webform view page. Instead when the user submits the form, he receives an email to a given mail (you can choose any webform component of the type mail that you have already added to this webform) containing a link to download the protected file.") . '</p>';
      break;
  }
  return $output;
}