You are here

function user_badges_help in User Badges 6

Same name and namespace in other branches
  1. 8 user_badges.module \user_badges_help()
  2. 5 user_badges.module \user_badges_help()
  3. 6.2 user_badges.module \user_badges_help()
  4. 7 user_badges.module \user_badges_help()
  5. 7.2 user_badges.module \user_badges_help()
  6. 7.3 user_badges.module \user_badges_help()

Implements hook_help().

File

./user_badges.module, line 21
@brief User Badges module file

Code

function user_badges_help($path, $arg) {
  global $user;
  switch ($path) {
    case 'admin/modules#description':
    case 'admin/user/user_badges':
      return t('User badges are iconic images which can be assigned to users. They can represent accomplishments, status, or anything you\'d like. These badges will show up in the user\'s profile, and could also be used by a theme to appear with user postings on forums, comments, or nodes. Badges can be assigned manually by an administrator by visiting a user\'s profile. They also can be assigned automatically by role or ecommerce purchase (if ecommerce modules are installed). The excellent !link module can also be used to set and unset badges on a wide variety of conditions.', array(
        '!link' => l('Rules', 'http://drupal.org/project/rules', array(
          'absolute' => TRUE,
        )),
      ));
    case 'admin/user/user_badges/roles':
      return t("Select the badge that you'd like to associate with each role.");
    case 'admin/user/user_badges/images':
      return t("This is the user badges image library. Note that this area is not functional if you have private download active. Here you can upload images to display as a user badge, but you can also enter image URLs directly in the badge form, so this area is optional. The images can be anything you like, but it is recommended that you maintain a uniform icon size for all of your badges. Keep in mind that a user may have many badges displayed so you'll probably want to keep them as small as possible (like 16x16 pixels or smaller).");
    case 'user/%/badges':
    case 'user/%/badges/list':
      $showone = variable_get('user_badges_showone', 0);
      if (variable_get('user_badges_userweight', 0) && ($user->uid == $arg[1] || user_access('change badge assignments'))) {

        // Help messages for users who can reorder.
        if ($showone) {
          return t("You can reorder badges here. Some badges may not appear on the list; these badges cannot be reordered. Only the top !number badges will be shown publicly.", array(
            '!number' => $showone,
          ));
        }
        else {
          return t("You can reorder your badges here. Some badges may not appear on the list; these badges cannot be reordered.");
        }
      }
      else {

        // Either we don't support reordering, or this user lacks the permission to do it.
        //        return t("These are all the badges owned by this user.");
      }
  }
}