You are here

function signup_help in Signup 7

Same name and namespace in other branches
  1. 5.2 signup.module \signup_help()
  2. 5 signup.module \signup_help()
  3. 6.2 signup.module \signup_help()
  4. 6 signup.module \signup_help()

Implements hook_help().

Related topics

File

./signup.module, line 223
The Signup module (http://drupal.org/project/signup) manages replies to nodes. In particular, it's good for event management. Signup supports sending reminder emails and automatically closing signups for nodes with a start time, via the Event…

Code

function signup_help($path, $arg) {
  switch ($path) {
    case 'admin/help#signup':
      return '<p>' . t('Signup allows users to sign up (in other words, register) for content of any type. The most common use is for events, where users indicate they are planning to attend. This module includes options for sending a notification email to a selected email address upon a new user signup (good for notifying event coordinators, etc.) and a confirmation email to users who sign up. Each of these options are controlled per node. When used on event nodes (with <a href="@event_url">event.module</a> installed) or nodes that have a date field (with <a href="@date_url">date.module</a>) and regular cron runs, it can also send out reminder emails to all signups a configurable number of days before the start of the event (also controlled per node) and to automatically close signups 1 hour before their start (general setting). Settings exist for resticting signups to selected roles and content types.', array(
        '@event_url' => url('http://drupal.org/project/event'),
        '@date_url' => url('http://drupal.org/project/date'),
      )) . '</p><p>' . t('To use signup, you must enable which content types should allow signups in administer->settings->content types, and you must also grant the %sign_up_for_content permission to any user role that should be able to sign up in administer->access control. Each signup-enabled node will now have a place for users to sign up.', array(
        '%sign_up_for_content' => 'sign up for content',
      )) . '</p><p>' . t('There are two ways for a user to have administrative access to the signup information about a given node: either the user has the %administer_signups_for_own_content permission and they are viewing a node they created, or the user has the global %administer_all_signups permission. Administrative access allows a user to view all the users who have signed up for the node, along with whatever information they included when they signed up.  Signup administrators can also cancel other user\'s signups for the node, and can close signups on the node entirely (meaning no one else is allowed to sign up).', array(
        '%administer_signups_for_own_content' => 'administer signups for own content',
        '%administer all signups' => 'administer all signups',
      )) . '</p><p>' . t('Default settings for notification email address, reminder emails and confirmation emails are located in administer->settings->signup. These will be the default values used for a signup node unless otherwise specified (to configure these options per node, visit \'edit\' for that node and make the adjustments in the \'Sign up settings\' section).') . '</p><p>' . t('Signups can be manually closed for any node at the %signup_overview page, or on the \'signups\' tab on each node.', array(
        '%signup_overview' => t('Signup overview'),
      )) . '</p><p>' . t('The user signup form is fully themable -- form fields may be added or deleted. For more details see the instructions in signup.theme, where a sample user form is included.') . '</p>';
  }

  // If we're still here, consider the URL for help on various menu tabs.
  if (($node = menu_get_object()) && arg(2) == 'signups') {
    switch (arg(3)) {
      case 'broadcast':
        return '<p>' . t('This page allows you to send an email message to every user who signed up for this %node_type.', array(
          '%node_type' => node_type_get_name($node->type),
        )) . '</p>';
      case 'add':
        return '<p>' . t('This page allows you to sign up another user for this %node_type.', array(
          '%node_type' => node_type_get_name($node->type),
        )) . '</p>';
    }
  }

  // See if we need to add our extra checking and validation while configuring
  // CCK node types for signup.  We only want to do this if the $path
  // doesn't contain 'help#' since hook_help() is invoked twice on admin
  // pages.
  if (!empty($arg[0]) && $arg[0] == 'admin' && $arg[1] == 'content' && function_exists('signup_date_check_node_types')) {
    if ($arg[2] == 'types' && $arg[3] != 'add') {
      signup_date_check_node_types();
    }
    elseif ($arg[2] == 'node-type') {

      // Thanks to stupid core handling of node types with underscores, we
      // need to convert this back to the actual machine-readable type name.
      signup_date_check_node_types(str_replace('-', '_', $arg[3]));
    }
  }
}