You are here

function front_page_help in Front Page 6

Same name and namespace in other branches
  1. 8 front_page.module \front_page_help()
  2. 5 front_page.module \front_page_help()
  3. 6.2 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 17

Code

function front_page_help($section) {
  switch ($section) {
    case 'admin/settings/front':
      $roles = user_roles(FALSE, 'access frontpage');
      $special_note = '';
      if (count($roles) >= 3) {
        krsort($roles);
        $special_note = '<fieldset>' . t('<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 .= '</p>' . t('<p>The default setting for new roles is SAME AS AUTHENTICATED USERS.</p>') . '</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>Only roles with the \'access frontpage\' permission will show up here.</p><p><em>Anonymous User</em> = visitor not logged in  | <em>Authenticated User</em> = visitor who is logged in</p>') . $special_note;
  }
}