You are here

function glossary_help in Glossary 5.2

Same name and namespace in other branches
  1. 5 glossary.module \glossary_help()
  2. 6 glossary.module \glossary_help()
  3. 7 glossary.module \glossary_help()
2 calls to glossary_help()
glossary_filter in ./glossary.module
glossary_search_results in ./glossary.module

File

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

Code

function glossary_help($section, $args = NULL) {
  $output = '';
  switch ($section) {
    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 (and their synonyms) 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, synonym, and related terms features. These features impact the display of the glossary when viewed in an overview.</p>
      <p>Next, you have to setup the input formats you want to use the glossary with. At the !input_formats page select an input format to configure. Select the Glossary filter checkbox and press Save configuration. Now select the configure filters tab and select the vocabulary and apply 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' => join(', ', array(
          t('administer taxonomy'),
          t('access administration pages'),
          t('administer filters'),
        )),
        '!taxonomy_admin' => l(t('administer') . ' &raquo; ' . t('content') . ' &raquo; ' . t('categories'), 'admin/content/taxonomy', array(), NULL, NULL, FALSE, TRUE),
        '!input_formats' => l(t('administer') . ' &raquo; ' . t('site configuration') . ' &raquo; ' . t('Glossary'), 'admin/settings/glossary', array(), NULL, NULL, FALSE, TRUE),
        '!glossaries' => l(t('glossaries'), 'glossary'),
      ));
      break;
    case 'admin/settings/glossary':
      return '<p><big>' . t('This page and its tabs allow you to control how the Glossary module functions.') . '</big></p><p><small>' . GLOSSARY_VERSION . '</small></p>';
      break;
    case 'admin/modules#description':
      return t('Maintain one or more glossaries on your site.');
      break;
    case 'glossary':
      if (!arg(1)) {
        if (user_access('administer filters')) {
          return t('<a href="!url">Glossary settings page</a>', array(
            '!url' => url('admin/settings/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>');
  }
}