You are here

function pagestyle_help in Page Style 7

Same name and namespace in other branches
  1. 5 includes/pagestyle.admin.inc \pagestyle_help()
  2. 6 includes/pagestyle.admin.inc \pagestyle_help()

Implement hook_help().

File

includes/pagestyle.admin.inc, line 11
Provides the Page Style administrative interface.

Code

function pagestyle_help($path, $arg) {
  $path_pagestyle = base_path() . drupal_get_path('module', 'pagestyle');
  $abbr_php = '<abbr title="' . t('PHP: Hypertext Preprocessor') . '">PHP</abbr>';
  $abbr_php_small = '<abbr title="' . t('PHP: Hypertext Preprocessor') . '">php</abbr>';
  $abbr_mysql = '<abbr title="' . t('My Structured Query Language') . '">MySQL</abbr>';
  $abbr_xhtml = '<abbr title="' . t('Extensible Hypertext Markup Language') . '">XHTML</abbr>';
  $abbr_url = '<abbr title="' . t('Uniform Resource Locator') . '">URL</abbr>s';
  $abbr_ajax = '<abbr title="' . t('Asynchronous JavaScript and XML') . '">AJAX</abbr>';
  $abbr_css = '<abbr title="' . t('Cascading Style Sheets') . '">CSS</abbr>';
  $abbr_css_small = '<abbr title="' . t('Cascading Style Sheets') . '">css</abbr>';
  $abbr_wcag = '<abbr title="' . t('Web Content Accessibility Guidelines') . '">WCAG</abbr>';
  $abbr_bitv = '<abbr lang="de" xml:lang="de" title="Barrierefreie Informationstechnik-Verordnung">BITV</abbr>';
  $abbr_png = '<abbr title="' . t('Portable Network Graphics') . '">PNG</abbr>';
  $abbr_gif = '<abbr title="' . t('Graphic Interchange Format') . '">GIF</abbr>';
  $abbr_svg = '<abbr title="' . t('Scalable Vector Graphics') . '">SVG</abbr>';
  $abbr_xcf_small = '<abbr title="' . t('eXperimental Computing Facility') . '">xcf</abbr>';
  $abbr_id = '<abbr title="' . t('Identification') . '">ID</abbr>';
  $abbr_tpl_php = '<abbr title="' . t('PHP: Hypertext Preprocessor Template') . '">tpl.php</abbr>';
  $link_wcag = l(t('Web Content Accessibility Guidelines'), 'http://www.w3.org/TR/WCAG/', array(
    'attributes' => array(
      'title' => t('External link to:') . ' ' . t('Web Content Accessibility Guidelines'),
    ),
  ));
  $link_bitv = l('Barrierefreie Informationstechnik-Verordnung', 'http://www.gesetze-im-internet.de/bitv_2_0/index.html', array(
    'attributes' => array(
      'title' => 'Externer Link zu: Barrierefreie Informationstechnik-Verordnung',
      'lang' => 'de',
    ),
  ));
  $link_ff = l(t('Mozilla Firefox'), 'http://www.mozilla.com/en-US/firefox', array(
    'attributes' => array(
      'title' => t('External link to:') . ' ' . t('Mozilla Firefox'),
    ),
  ));
  $link_ps_perm = l(t('Permissions'), 'admin/people/permissions', array(
    'attributes' => array(
      'title' => t('Page Style configuration'),
    ),
    'fragment' => 'module-pagestyle',
  ));
  $link_block = l(t('Blocks'), 'admin/structure/block', array(
    'attributes' => array(
      'title' => t('Page Style configuration'),
    ),
  ));
  $link_ps_config = l(t('Page Style configuration'), 'admin/config/user-interface/pagestyle', array(
    'attributes' => array(
      'title' => t('Page Style configuration'),
    ),
  ));
  $link_po_import = l(t('Import'), 'admin/config/regional/translate/import', array(
    'attributes' => array(
      'title' => t('Translate interface') . ', ' . t('Import'),
    ),
  ));
  $link_ps = l(t('Download Themes') . ': ' . t('Page Style home page'), 'http://www.zwahlendesign.ch/pagestyle', array(
    'attributes' => array(
      'title' => t('External link to:') . ' ' . t('Page Style home page'),
      'class' => 'ps_download_button',
    ),
  ));
  $link_jquery_cookie = l(t('jQuery plugins'), 'http://drupal.org/project/jquery_plugin');
  $link_footnote_1 = l('1', 'admin/help/pagestyle', array(
    'attributes' => array(
      'title' => t('Footnote') . ' 1',
    ),
    'fragment' => 'footnote-1',
  ));
  $link_footnote_2 = l('2', 'admin/help/pagestyle', array(
    'attributes' => array(
      'title' => t('Footnote') . ' 2',
    ),
    'fragment' => 'footnote-2',
  ));
  switch ($path) {
    case 'admin/help#pagestyle':
      $output = '<p><img src="' . $path_pagestyle . '/images/pagestyle_list.png" alt="' . t('Screenshot of block:') . ' ' . t('Page Style') . ', ' . t('Select menu') . '." class="ps_float_right" /></p>' . "\n";
      $output .= '<p>' . t('This module display a style changer on the page and in the browser menu for a better web accessibility.') . '</p>' . "\n";
      $output .= '<h3>' . t('Advantages') . '</h4>' . "\n";
      $output .= '<ol>' . "\n";
      $output .= '  <li><strong>' . t('Lesser effort.') . '</strong> ' . t('No building of extra themes required!') . ' ' . t('Black') . '/' . t('White') . ', ' . t('White') . '/' . t('Black') . ' ' . t('and') . ' ' . t('Yellow') . '/' . t('Blue') . '.</li>' . "\n";
      $output .= '  <li><strong>' . t('Style changer in the browser available.') . '</strong></li>' . "\n";
      $output .= '  <li><strong>' . t('One click function.') . '</strong> ' . t('No tutorial required.') . '</li>' . "\n";
      $output .= '  <li>' . t('Same handling in any browser (shortcuts).') . '</li>' . "\n";
      $output .= '  <li>' . t('Adjustable.') . '</li>' . "\n";
      $output .= '  <li>' . t('Select menu availabe.') . '</li>' . "\n";
      $output .= '  <li>' . t('Display current page style.') . '</li>' . "\n";
      $output .= '  <li>' . t('Browser independent.') . '</li>' . "\n";
      $output .= '</ol>' . "\n";
      $output .= '<hr />' . "\n";
      $output .= '<h3>' . t('Features') . '</h4>' . "\n";
      $output .= '<p><img src="' . $path_pagestyle . '/images/pagestyle_select.png" alt="' . t('Screenshot of block:') . ' ' . t('Page Style') . ', ' . t('Select menu') . '." class="ps_float_right" /></p>' . "\n";
      $output .= '<ul>' . "\n";
      $output .= '<li>' . t('!abbr_wcag and !abbr_bitv conform. More Information on: !link_wcag and !link_bitv.', array(
        '!abbr_wcag' => $abbr_wcag,
        '!abbr_bitv' => $abbr_bitv,
        '!link_wcag' => $link_wcag,
        '!link_bitv' => $link_bitv,
      )) . ' ' . t('Keep the conditions:') . ' ' . "\n";
      $output .= '  <ol>' . "\n";
      $output .= '    <li>' . t('!abbr_wcag/!abbr_bitv 1.1: Short text equivalents for images.', array(
        '!abbr_wcag' => $abbr_wcag,
        '!abbr_bitv' => $abbr_bitv,
      )) . '</li>' . "\n";
      $output .= '    <li>' . t('!abbr_wcag/!abbr_bitv 3.1: Standard links with text without images in the source code.', array(
        '!abbr_wcag' => $abbr_wcag,
        '!abbr_bitv' => $abbr_bitv,
      )) . '</li>' . "\n";
      $output .= '    <li>' . t('!abbr_wcag/!abbr_bitv 6.3: No !javascript required.', array(
        '!abbr_wcag' => $abbr_wcag,
        '!abbr_bitv' => $abbr_bitv,
        '!javascript' => '<em lang="en">JavaScript</em>',
      )) . '</li>' . "\n";
      $output .= '    <li>' . t('!abbr_wcag/!abbr_bitv 11.1: Open and standard code.', array(
        '!abbr_wcag' => $abbr_wcag,
        '!abbr_bitv' => $abbr_bitv,
      )) . '</li>' . "\n";
      $output .= '    <li>' . t('!abbr_wcag/!abbr_bitv 13.6: Links in a list.', array(
        '!abbr_wcag' => $abbr_wcag,
        '!abbr_bitv' => $abbr_bitv,
      )) . '</li>' . "\n";
      $output .= '  </ol>' . "\n";
      $output .= '</li>' . "\n";
      $output .= '<li>' . t('No !javascript required. !jquery suppport.', array(
        '!javascript' => '<em lang="en">JavaScript</em>',
        '!jquery' => '<em lang="en">jQuery</em>',
      )) . '</li>' . "\n";
      $output .= '<li>' . t('No !abbr_css required.', array(
        '!abbr_css' => $abbr_css,
      )) . '</li>' . "\n";
      $output .= '<li>' . t('Style display settings') . '.</li>' . "\n";
      $output .= '<li>' . t('Caching mode: "Normal" and "Aggressive" compatible.') . '</li>' . "\n";
      $output .= '<li>' . t('Uniform markin of menu, based on the open source browser Firefox 2.0 (!link_ff).', array(
        '!link_ff' => $link_ff,
      )) . '</li>' . "\n";
      $output .= '<li>' . t('Block type') . ': ' . "\n";
      $output .= '<a href="' . $path_pagestyle . '/images/pagestyle_list.png" title="' . t('Screenshot of block:') . ' ' . t('Page Style') . ', ' . t('Text links') . '." >' . t('Text links') . '</a> [' . $link_footnote_1 . '], ';
      $output .= '<a href="' . $path_pagestyle . '/images/pagestyle_img.png" title="' . t('Screenshot of block:') . ' ' . t('Page Style') . ', ' . t('Image links') . '." >' . t('Image links') . '</a> [' . $link_footnote_2 . '], ';
      $output .= '<a href="' . $path_pagestyle . '/images/pagestyle_select.png" title="' . t('Screenshot of block:') . ' ' . t('Page Style') . ', ' . t('Select menu') . '." >' . t('Select menu') . '</a>.';
      $output .= '  </li>' . "\n";
      $output .= '<li>' . t('Themable.') . '</li>' . "\n";
      $output .= '</ul>' . "\n";
      $output .= '<p id="footnote-1">[1] ' . t('Images are showed with !abbr_css.', array(
        '!abbr_css' => $abbr_css,
      )) . ' <span class="ps_ok">' . t('Ideal for Web Accessibility.') . '</span></p>' . "\n";
      $output .= '<p id="footnote-2">[2] ' . t('No Link text, only images in the !abbr_xhtml source code with standard 0 pixel margin.', array(
        '!abbr_xhtml' => $abbr_xhtml,
      )) . ' <span class="warning">' . t('Warning') . ': ' . t('Not for: !abbr_wcag/!abbr_bitv 3.1! If JavaScript is not activated: No image change action if the cursor move over the images!', array(
        '!abbr_wcag' => $abbr_wcag,
        '!abbr_bitv' => $abbr_bitv,
      )) . '</span></p>' . "\n";
      $output .= '<hr />' . "\n";

      // Drupal version specific
      $output .= '<h3>' . t('Requirements') . '</h4>' . "\n";
      $output .= '<ol>' . "\n";
      $output .= '  <li>Drupal 7.</li>' . "\n";
      $output .= '</ol>' . "\n";
      $output .= '<hr />' . "\n";
      $output .= '<h3>' . t('Settings') . '</h4>' . "\n";
      $output .= '<p><img src="' . $path_pagestyle . '/images/pagestyle_img.png" alt="' . t('Screenshot of block:') . ' ' . t('Page Style') . ', ' . t('Image links') . '." class="ps_float_right" /></p>' . "\n";
      $output .= '<ol>' . "\n";
      $output .= '  <li>' . t('Go to:') . ' "' . t('Administer') . '", "' . t('Configuration') . '", "' . t('People') . '", "' . $link_ps_perm . '" ("<em lang="en">admin/people/permissions#module-pagestyle</em>"). ' . t('Set the different roles.') . '</li>' . "\n";
      $output .= '  <li>' . t('Go to:') . ' "' . t('Administer') . '", "' . t('Structure') . '", "' . $link_block . '" ("<em lang="en">admin/structure/block</em>"). ' . t('Make the block "Page Style" visibile.') . '</li>' . "\n";
      $output .= '  <li>' . t('Go to:') . ' "' . t('Administer') . '", "' . t('Configuration') . '", "' . t('User interface') . '", "' . $link_ps_config . '" ("<em lang="en">admin/config/user-interface/pagestyle</em>"). ' . t('Change the settings if you want.') . '</li>' . "\n";
      $output .= '  <li>' . t('Go to:') . ' "' . t('Administer') . '", "' . t('Configuration') . '", "' . t('Regional and language') . '", "' . t('Translate interface') . '", "' . $link_po_import . '" ("<em lang="en">admin/config/regional/translate/import</em>"). ' . t('Import your language file (!po) if it is necessary.', array(
        '!po' => '.<abbr title="PO translation file">po</abbr>',
      )) . '</li>' . "\n";
      $output .= '</ol>' . "\n";
      $output .= '<hr />' . "\n";
      $output .= '<h3>' . t('Theming') . '</h3>' . "\n";
      $output .= '<h4>' . t('Create Themes') . '</h4>' . "\n";
      $output .= '<p><img src="' . $path_pagestyle . '/images/pagestyle_img2.png" alt="' . t('Screenshot of block:') . ' ' . t('Page Style') . ', ' . t('Image links, not in a list') . '" class="ps_float_right" /></p>' . "\n";
      $output .= '<ol>' . "\n";
      $output .= '  <li>' . t('Copy the files/directorys in your theme:') . "\n";
      $output .= '    <ol>' . "\n";
      $output .= '      <li lang="en">pagestyle-text.' . $abbr_tpl_php . '</li>' . "\n";
      $output .= '      <li lang="en">pagestyle-image.' . $abbr_tpl_php . '</li>' . "\n";
      $output .= '      <li lang="en">pagestyle-form.' . $abbr_tpl_php . '</li>' . "\n";
      $output .= '      <li lang="en">pagestyle.' . $abbr_css_small . '</li>' . "\n";
      $output .= '      <li lang="en">images' . '</li>' . "\n";
      $output .= '    </ol>' . "\n";
      $output .= '  </li>' . "\n";
      $output .= '  <li>' . t('Add the following code in the .info file of your Drupal theme:') . ' <code>stylesheets[all][] = pagestyle.css</code>.' . '</li>' . "\n";
      $output .= '  <li>' . t('Edit the !abbr_php and !abbr_css code in the files.', array(
        '!abbr_php' => $abbr_php,
        '!abbr_css' => $abbr_css,
      )) . ' ' . t('Example:') . ' ' . t('Image links, not in a list') . ': ' . t('Change the following elements:') . ' <del>&#060;ul&#062;/&#060;/ul&#062;</del> ' . t('to') . ': <ins>&#060;p&#062;/&#060;/p&#062;</ins><br /> <del>&#060;li&#062;&#060;/li&#062;</del> ' . t('to') . ': <ins>&#060;span class="display_hidden"&#062;&#160;&#124;&#160;&#060;/span&#062;</ins>.<br /><span class="info">' . t('!abbr_wcag/!abbr_bitv 10.5: Adjacent hyperlinks have to be separated by printable characters surrounded by spaces.', array(
        '!abbr_wcag' => $abbr_wcag,
        '!abbr_bitv' => $abbr_bitv,
      )) . '</span> <span class="warning">' . t('Warning') . ': ' . t('Not for: !abbr_wcag/!abbr_bitv 13.6! Links are not in a list.', array(
        '!abbr_wcag' => $abbr_wcag,
        '!abbr_bitv' => $abbr_bitv,
      )) . '</span></p>' . "\n";
      $output .= '  <li>' . t('Edit the images. Create your own icons. The source file is in the directory:') . ' "<em lang="en">/images/source/pagestyle.' . $abbr_xcf_small . '</em>". ' . t('!abbr_png images are for new browsers and !abbr_gif images for old browsers (!internet_explorer 6).', array(
        '!abbr_png' => $abbr_png,
        '!abbr_gif' => $abbr_gif,
        '!internet_explorer' => '<em lang="en">Internet Explorer</em>',
      )) . '</li>' . "\n";
      $output .= '</ol>' . "\n";

      // Drupal version specific end
      $output .= '<h4>' . t('Download Themes') . '</h4>' . "\n";
      $output .= '<p>' . t('Edited templates are available from the developers website:') . ' ' . $link_ps . '</p>' . "\n";
      $output .= '<hr />' . "\n";
      $output .= '<h3>' . t('Screenshots') . '</h3>' . "\n";
      $output .= '<p><img src="' . $path_pagestyle . '/images/pagestyle.png" alt="' . t('Page Style') . ' ' . t('Screenshots') . '." />' . '</p>' . "\n";
      $output .= '<hr />' . "\n";
      return $output;
      break;
  }
}