You are here

function pagestyle_help in Page Style 5

Same name and namespace in other branches
  1. 6 includes/pagestyle.admin.inc \pagestyle_help()
  2. 7 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($section) {
  $path_pagestyle = base_path() . drupal_get_path('module', 'pagestyle');
  $abbr_php = '<abbr lang="en" xml:lang="en" title="' . t('PHP: Hypertext Preprocessor') . '">PHP</abbr>';
  $abbr_php_small = '<abbr lang="en" xml:lang="en" title="' . t('PHP: Hypertext Preprocessor') . '">php</abbr>';
  $abbr_mysql = '<abbr title="' . t('My Structured Query Language') . '">MySQL</abbr>';
  $abbr_xhtml = '<abbr lang="en" xml:lang="en" title="' . t('Extensible Hypertext Markup Language') . '">XHTML</abbr>';
  $abbr_css = '<abbr lang="en" xml:lang="en" title="' . t('Cascading Style Sheets') . '">CSS</abbr>';
  $abbr_css_small = '<abbr lang="en" xml:lang="en" title="' . t('Cascading Style Sheets') . '">css</abbr>';
  $abbr_wcag = '<abbr lang="en xml:lang="en" title="' . t('Web Content Accessibility Guidelines') . '">WCAG</abbr>';
  $abbr_bitv = '<abbr lang="de" xml:lang="de" title="' . t('Barrierefreie Informationstechnik-Verordnung') . '">BITV</abbr>';
  $abbr_png = '<abbr lang="en" xml:lang="en" title="' . t('Portable Network Graphics') . '">PNG</abbr>';
  $abbr_gif = '<abbr lang="en" xml:lang="en" title="' . t('Graphic Interchange Format') . '">GIF</abbr>';
  $abbr_svg = '<abbr lang="en" xml:lang="en" title="' . t('Scalable Vector Graphics') . '">SVG</abbr>';
  $abbr_xcf_small = '<abbr lang="en" xml:lang="en" title="' . t('eXperimental Computing Facility') . '">xcf</abbr>';
  $abbr_id = '<abbr lang="en" xml:lang="en" title="' . t('Identification') . '">ID</abbr>';
  $link_wcag = l(t('Web Content Accessibility Guidelines'), 'http://www.w3.org/TR/WCAG/', $attributes = array(
    'title' => t('External link to:') . ' ' . t('Web Content Accessibility Guidelines'),
  ));
  $link_bitv = l(t('Barrierefreie Informationstechnik-Verordnung'), 'http://bundesrecht.juris.de/bitv/anlage_8.html', $attributes = array(
    'title' => t('External link to:') . ' ' . t('Barrierefreie Informationstechnik-Verordnung'),
  ));
  $link_ff = l(t('Mozilla Firefox'), 'http://www.mozilla.com/en-US/firefox', $attributes = array(
    'title' => t('External link to:') . ' ' . t('Mozilla Firefox'),
  ));
  $link_ps_perm = l(t('Access control'), 'admin/user/access', $attributes = array(
    'title' => t('Access control') . ' ' . t('Page Style') . ' ' . t('module'),
  ), $query = NULL, $fragment = 'module-pagestyle');
  $link_block = l(t('Blocks'), 'admin/build/block', $attributes = array(
    'Page Style configuration',
  ));
  $link_ps_config = l(t('Page Style configuration'), 'admin/settings/pagestyle', $attributes = array(
    'title' => t('Page Style configuration'),
  ));
  $link_po_import = l(t('Import'), 'admin/settings/locale/language/import', $attributes = array(
    'title' => t('Localization') . ', ' . t('Import'),
  ));
  $link_ps = l(t('Download Themes') . ': ' . t('Page Style home page'), 'http://www.zwahlendesign.ch/pagestyle', $attributes = array(
    'title' => t('External link to:') . ' ' . t('Page Style home page'),
    'class' => 'ps_download_button',
  ));
  $link_jquery_cookie = l('jQuery Cookie plugin', 'http://plugins.jquery.com/project/Cookie');
  $link_footnote_1 = l('1', 'admin/help/pagestyle', $attributes = array(
    'title' => t('Footnote') . ' 1',
  ), $query = NULL, $fragment = 'footnote-1');
  $link_footnote_2 = l('2', 'admin/help/pagestyle', $attributes = array(
    'title' => t('Footnote') . ' 2',
  ), $query = NULL, $fragment = 'footnote-2');
  switch ($section) {
    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 menue 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/3.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="ps_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,
        '!javascript' => '<em lang="en">JavaScript</em>',
      )) . '</span></p>' . "\n";
      $output .= '<hr />' . "\n";

      // Drupal version specific
      $output .= '<h3>' . t('Requirements') . '</h4>' . "\n";
      $output .= '<ol>' . "\n";
      $output .= '  <li>Drupal 5.</li>' . "\n";
      $output .= '  <li><em lang="en">jQuery plugin: ' . $link_jquery_cookie . '.</em></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('User management') . '", "' . $link_ps_perm . '" ("<em lang="en">admin/user/access#module-pagestyle</em>"). ' . t('Set the different roles.') . '</li>' . "\n";
      $output .= '  <li>' . t('Go to:') . ' "' . t('Administer') . '", "' . t('Site building') . '", "' . $link_block . '" ("<em lang="en">admin/build/block</em>"). ' . t('Make the block "Page Style" visibile.') . '</li>' . "\n";
      $output .= '  <li>' . t('Go to:') . ' "' . t('Administer') . '", "' . t('Site configuration') . '", "' . $link_ps_config . '" ("<em lang="en">admin/settings/pagestyle</em>"). ' . t('Change the settings if you want.') . '</li>' . "\n";
      $output .= '  <li>' . t('Go to:') . ' "' . t('Administer') . '", "' . t('Site building') . '", "' . t('Translate interface') . '", "' . $link_po_import . '" ("<em lang="en">admin/settings/locale/language/import</em>"). ' . t('Import your language file (for German "!de_po") if it is necessary.', array(
        '!de_po' => '<em lang="en">' . drupal_get_path('module', 'pagestyle') . '/translations/<abbr lang="de" title="Deutsch">de</abbr>.<abbr title="PO translation file">po</abbr></em>',
      )) . '</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.' . $abbr_css_small . '</li>' . "\n";
      $output .= '      <li lang="en">' . 'images' . '</li>' . "\n";
      $output .= '    </ol>' . "\n";
      $output .= '  </li>' . "\n";
      $output .= '  <li>' . t('Copy the code oft the functions in your template.!abbr_php_small file:', array(
        '!abbr_php_small' => $abbr_php_small,
      )) . "\n";
      $output .= '    <ol>' . "\n";
      $output .= '      <li lang="en">' . 'theme_pagestyle_text()' . '</li>' . "\n";
      $output .= '      <li lang="en">' . 'theme_pagestyle_image()' . '</li>' . "\n";
      $output .= '      <li lang="en">' . 'theme_pagestyle_form($form)' . '</li>' . "\n";
      $output .= '    </ol>' . "\n";
      $output .= '  </li>' . "\n";
      $output .= '  <li>' . t('Rename the functions to the name of your theme ("mytheme") or use "phptemplate":') . "\n";
      $output .= '    <ol>' . "\n";
      $output .= '      <li lang="en">' . 'mytheme_pagestyle_text()' . '</li>' . "\n";
      $output .= '      <li lang="en">' . 'mytheme_pagestyle_image()' . '</li>' . "\n";
      $output .= '      <li lang="en">' . 'mytheme_pagestyle_form($form)' . '</li>' . "\n";
      $output .= '    </ol>' . "\n";
      $output .= '  </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="ps_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;
  }
}