You are here

function glossary_help in Glossary 7

Same name and namespace in other branches
  1. 5.2 glossary.module \glossary_help()
  2. 5 glossary.module \glossary_help()
  3. 6 glossary.module \glossary_help()

Implements hook_help().

1 call to glossary_help()
glossary_search_results in ./glossary.module
Present the search results.

File

./glossary.module, line 11
Glossary terms will be automatically marked with links to their descriptions.

Code

function glossary_help($path, $args = array()) {
  $output = '';
  switch ($path) {
    case 'admin/help#glossary':
      return t('<p>Glossary helps newbies understand the jargon which always crops up when specialists talk about a topic. Doctors discuss CBC and EKG and CCs. Web developers keep talking about CSS, P2P, XSLT, etc. This is all intimidating for newbies.</p>
      <p>The Glossary module scans posts for glossary terms in the body. If found, the glossary indicator is inserted after the term, or the term is turned into an indicator link depending on the settings. By hovering over the indicator, users may learn the definition of that term. Clicking leads the user to that term presented within the whole glossary.</p>
      <p>Glossary terms are managed as vocabularies within the taxonomy.module. To get started with glossary, create a new vocabulary on the !taxonomy_admin page. The vocabulary need not be associated with any modules, although you can add detailed description to terms by attaching (story or other type of) nodes to them. Add a few terms to the vocabulary. The term title should be the glossary entry and the description should be its definition. You can make use of the hierarchy and related terms features. These features impact the display of the glossary when viewed in an overview.</p>
      <p>Next, you have to set up the input formats with which you want to use the glossary. On the !input_formats page, select an input format to configure. Select the Glossary filter checkbox and press "Save configuration". Now proceed to the !glossary page and select the tab for the input format and select the vocabulary and other settings.</p>
      <p>You can see how a vocabulary would function as a glossary by going to the !glossaries page and selecting the vocabulary to view.</p>
      <p>Administration of glossary requires %permissions permissions.</p>', array(
        '%permissions' => implode(', ', array(
          t('administer taxonomy'),
          t('access administration pages'),
          t('administer filters'),
        )),
        '!taxonomy_admin' => l(t('administer >> content >> taxonomy'), 'admin/structure/taxonomy'),
        '!input_formats' => l(t('administer >> site configuration >> input formats'), 'admin/config/content/formats'),
        '!glossary' => l(t('administer >> site configuration >> glossary'), 'admin/config/content/glossary'),
        '!glossaries' => l(t('glossaries'), 'glossary'),
      ));
    case 'admin/config/content/formats/%':
      return '<p>' . t("If the glossary input filter is processed before a filter that strips out 'dangerous' tags (e.g. the HTML, or WYSIWYG filters) then the output that this module attempts to produce may get changed or discarded.") . '</p>';
    case 'admin/config/content/glossary':
      return '<p><big>' . t('This page and its tabs allow you to control how the Glossary module functions.') . '</big></p>';
    case 'admin/modules#description':
      return t('Maintain one or more glossaries on your site.');
    case 'glossary':
      if (!$args[1]) {
        if (user_access('administer filters')) {
          return t('<a href="!url">Glossary settings page</a>', array(
            '!url' => url('admin/config/content/glossary'),
          ));
        }
      }
      break;
    case 'glossary_search#noresults':
      return t('<ul>
      <li>Check if your spelling is correct.</li>
      <li>Remove quotes around phrases to match each word individually: <em>"blue smurf"</em> will match less than <em>blue smurf</em>.</li>
      <li>Consider loosening your query with <em>OR</em>: <em>blue smurf</em> will match less than <em>blue OR smurf</em>.</li>
      </ul>');
  }
}