You are here

function birthdays_help in Birthdays 6

Same name and namespace in other branches
  1. 5 birthdays.module \birthdays_help()
  2. 7 birthdays.module \birthdays_help()

Implementation of hook_help().

File

./birthdays.module, line 136
The Birthdays module allows users to add their birthday to their profile. It lists birthdays on a seperate page and in different blocks. Users can receive an e-mail on their birthday automatically, and the administrator can receive daily reminders of…

Code

function birthdays_help($path, $arg) {
  global $_birthdays_field;
  switch ($path) {
    case 'admin/help#birthdays':
      $output = '<p>' . t("The Birthdays module allows a user to put in their birthday and display it in their profile, on a separate Birthdays page and in a block. It also has the option to send out e-mails on users's birthdays, and to notify the administrator periodically about upcoming birthdays via e-mail.") . '</p>';
      $output .= '<p>' . t('Some basic information about this module can be found below. For more information, support questions, feature requests and bug reports please visit the <a href="@project_url">Birthdays project page</a> and the <a href="@documentation_url">online documentation</a>.', array(
        '@project_url' => 'http://drupal.org/project/birthdays',
        '@documentation_url' => 'http://drupal.org/node/315658',
      )) . '</p>';
      $output .= '<h2>' . t('Configuring the module') . '</h2>';
      $output .= '<p>' . t('Configuring the module is done on a number of pages.') . '</p>';
      $output .= '<h3>' . t('Birthdays administration pages') . '</h3>';
      $output .= '<p>' . t('The <a href="@birthdays_admin">Birthdays administration pages</a> are where the actual features of the birthdays module are set. Some of the options are described below.', array(
        '@birthdays_admin' => url('admin/settings/birthdays'),
      )) . '</p>';
      $output .= '<ul><li><strong>' . t('Profile field') . '</strong>: ' . t('here you set which "date" field of the Profile module you want the Birthdays module to use.') . '</li>';
      $output .= '<li><strong>' . t('Show star signs') . '</strong>: ' . t('select whether you want to display the star sign icons on the profile and on the Birthdays page, and, if so, whether it should link to Yahoo Horoscopes.') . '</li>';
      $output .= '<li><strong>' . t('Hide year and age') . '</strong>: ' . t("some sites might want to protect the user's privacy by hiding their age and year of birth. The options are 'No', 'Yes' and 'User optional, defaults to No', where the latter gives the user the option to  select whether he or she wants this information to be hidden. If enabled it still requires them to put the full date of birth in, but only the day and month will be displayed.") . '</li>';
      $output .= '<li><strong>' . t('Set Birthdays page settings') . '</strong>: ' . t('this influences how the listing of the Birthdays page is shown. Sorted by user name of date of birth (year not included) and users without a birthday shown or not.') . '</li>';
      $output .= '<li><strong>' . t('Show filter options') . '</strong>: ' . t("determine whether the buttons to filter by specific month and/or year should be displayed. When 'Hide year and age' is set to 'Yes', filtering by year is not possible.") . '</li>';
      $output .= '<li><strong>' . t('Send upcoming birthdays to admin') . '</strong>: ' . t("this one has 4 values 'Disabled', 'Dayly', 'Weekly, on the first day of the week' and 'Monthly'. This will send an e-mail to your site e-mail address at the given intervals, listing users that will have their birthday in that period. The first day of the week is controlled by the <a href=\"@date_settings\">date and time settings</a>.", array(
        '@date_settings' => url('admin/settings/date-time'),
      )) . '</li>';
      $output .= '<li><strong>' . t('Send user e-mail on day of birth') . '</strong>: ' . t("set whether users should receive an e-mail when they are having the birthday. Either 'No', 'Yes' or 'User optional, 'Yes' by default', where the latter leaves the decision up to the user.") . '</li></ul>';
      $output .= '<h3>' . t('Permissions') . '</h3>';
      $output .= '<p>' . t('To allow users to view birthdays of other people, the "access birthdays" <a href="@permissions_page">permissions</a> needs to be set for the appropriate role. This allows them to access the <a href="@birthdays_page">Birthdays page</a>, see activated blocks with birthdays and view the birthdays of users in the profiles.', array(
        '@birthdays_page' => url('birthdays'),
        '@permissions_page' => url('admin/user/permissions', array(
          'fragment' => 'module-birthdays',
        )),
      )) . '</p>';
      $output .= '<h3>' . t('Profile field settings') . '</h3>';
      $output .= '<p>' . t("Several things can be adjusted to the assigned profile field. To do so please visit the !profile_admin, and edit the field in question or add one if you haven't done so already. The following settings require extra attention.", array(
        '!profile_admin' => l('Profile settings', 'admin/user/profile'),
      )) . '</p>';
      $output .= '<ul><li><strong>' . t('The user must enter a value') . '</strong>: ' . t('force the user to fill in their date of  birth. A once set birthday can not be deleted.') . '</li>';
      $output .= '<li><strong>' . t('Visible in user registration form') . '</strong>: ' . t('give new users the option to add their date of birth when registering to your website. If combined with the option above, they can not register without putting their date of birth.') . '</li>';
      $output .= '<li><strong>' . t('Visibility') . '</strong>: ' . t("this will influence the visibility of the field as described there, but the behavior might become erratic if not set to 'Public field, content shown on profile page but not used on member list pages'. So it is recommended to leave this as is.") . '</li></ul>';
      $output .= '<p>' . t('The other options on this page behave as described on the settings page.') . '</p>';
      $output .= '<h3>' . t('Date format') . '</h3>';
      $output .= '<p>' . t('The way the birthdays are formatted (e.g. <em>11 may 1934</em> or <em>5/11/1934</em>) is controlled by the <a href="@date_settings_page">date and time settings</a>. The Birthdays module uses the short date format as basis for displaying days and months in the blocks and the medium date format is used in the profile and on the Birthdays page.', array(
        '!date_settings_page' => url('admin/settings/date-time'),
      )) . '</p>';
      $output .= '<h2>' . t('Synchronizing') . '</h2>';
      $output .= '<p>' . t('The birthdays are saved to two different database tables. This is because the profile module saves the dates in a format which limits the ability to perform calculations on the dates. These two tables need to be in sync with each other.') . '</p>';
      $output .= '<p>' . t('Normally this is the case, but sometimes not. For example when you already collected birthdays with the Profile module, but later decided to switch to the birthdays module. Or when you accidentally (on intentionally) completely uninstalled the profile module, but left birthdays module merely disabled. To perform the synchronization you can use the <a href="@sync_pages">synchronization form</a>.', array(
        '@sync_page' => url('admin/settings/birthdays/sync'),
      )) . '</p>';
      $output .= '<p>' . t('In the first case you need to copy the Profile data to the (most likely empty) Birthdays table, which is done with the top button. In the latter you need the copy the birthdays in the Birthdays table back to the Profile module with the bottom button.') . '</p>';
      $output .= '<p>' . t('Please note that with a large amount of users this might take some time.') . '</p>';
      return $output;
    case 'admin/settings/birthdays':
      return t('Use this page to alter the settings of the Birthdays module.');
  }
}