You are here

function front_page_help in Front Page 5

Same name and namespace in other branches
  1. 8 front_page.module \front_page_help()
  2. 6.2 front_page.module \front_page_help()
  3. 6 front_page.module \front_page_help()
  4. 7.2 front_page.module \front_page_help()
  5. 7 front_page.module \front_page_help()
  6. 9.1.x front_page.module \front_page_help()

Implementation of hook_help().

File

./front_page.module, line 24

Code

function front_page_help($section) {
  switch ($section) {
    case 'admin/modules#description':

      // This description is shown in the listing at admin/modules.
      return t('Allows you to setup custom front pages for your site.');
    case 'admin/settings/front':
      $roles = "";
      $roles = user_roles();
      if (count($roles) >= 3) {
        krsort($roles);
        $special_note .= "<fieldset><legend>front page by role usage</legend><p><strong>Note:</strong>When using the front pages by role option, please note that if a user has multiple roles the first role match will determine which front page they see. Here is the order that the roles will be checked (from left to right).</p><p>";
        foreach ($roles as $role_id => $role_name) {
          $special_note .= "<strong>" . $role_id . "</strong> " . $role_name . " |  ";
        }
        $special_note .= '</fieldset>';
      }
      return t('<p>Setup custom front pages for your site. Click on the option to expand the form and customise your settings.</p><P><em>Anonymous User</em> = visitor not logged in  | <em>Authenticated User</em> = visitor who is logged in</p>!special_note</p>', array(
        '!special_note' => $special_note,
      ));
  }
}