You are here

function countryicons_help in Country Icons 7

Same name and namespace in other branches
  1. 6.2 countryicons.module \countryicons_help()
  2. 6 countryicons.module \countryicons_help()
  3. 7.2 countryicons.module \countryicons_help()

Implements hook_help().

File

./countryicons.module, line 34
A collection of country icons, and an API for retrieving them.

Code

function countryicons_help($path, $arg) {

  // @todo: update help text when all functions is done and has it's parameters set.
  switch ($path) {
    case 'admin/help#countryicons':
      $output = '<p>' . t('This module provides a collection of country icons, and an API for retrieving them.') . '</p>';
      $output .= '<h3>' . t('API') . '</h3>';
      $output .= '<p>' . t('The following functions are provided:') . '</p>';
      $output .= '<dl>';
      $output .= '<dt><strong>countryicons_get_iconsets()</strong></dt>';
      $output .= '<dd>' . t('Returns an array with all iconset info keyed on path.') . '</dd>';
      $output .= '<dt><strong>countryicons_get_iconset($iconset)</strong></dt>';
      $output .= '<dd>' . t('Returns an array with requested iconset info keyed on path.') . '</dd>';
      $output .= '<dt><strong>countryicons_get_icon_path($code, $iconset = "shiny")</strong></dt>';
      $output .= '<dd>' . t('Returns a string with the absolute path to an icon.') . '</dd>';
      $output .= '<dt><strong>theme_countryicons_icon($variables)</strong></dt>';
      $output .= '<dd>' . t('Theme a country icon.') . '</dd>';
      $output .= '<dd>$variables ' . t('An associative array containing:') . '<ul>';
      $output .= '<li>code: ' . t('A two letter ISO3166 country code.') . '</li>';
      $output .= '<li>iconset: ' . t('The icon set to use ("shiny" is the default).') . '</li>';
      $output .= '<li>alt: ' . t('The alternative text for text-based browsers (the two letter ISO3166 country code is the default).') . '</li>';
      $output .= '<li>title: ' . t('The title text is displayed when the image is hovered in some popular browsers.') . '</li>';
      $output .= '<li>attributes: ' . t('Associative array of attributes to be placed in the img tag.') . '</li>';
      $output .= '</ul></dd>';
      $output .= '<dd>' . t('Returns a string containing the image tag.') . '</dd>';
      $output .= '<dt><strong>theme_countryicons_icon_sprite($variables)</strong></dt>';
      $output .= '<dd>' . t('Theme a country icon using a css spriting technique adapted from this <a href="!css_url">list apart article</a>.', array(
        '!css_url' => 'http://www.alistapart.com/articles/sprites',
      ));
      $output .= t('The css sprite and some css was generated using the <a href="!sprite_generator_url">Project Fondue CSS Sprite Generator</a>.', array(
        '!sprite_generator_url' => 'http://spritegen.website-performance.org/',
      )) . '</dd>';
      $output .= '<dd>$variables ' . t('An associative array containing:') . '<ul>';
      $output .= '<li>code: ' . t('A two letter ISO3166 country code.') . '</li>';
      $output .= '<li>iconset: ' . t('The icon set to use ("shiny" is the default).') . '</li>';
      $output .= '</ul></dd>';
      $output .= '<dd>' . t('Returns a string containing the image tag rendered using a css sprite techniquie.') . '</dd>';
      $output .= '</dl>';
      $output .= '<h3>' . t('Icon sets') . '</h3>';
      $output .= '<p>' . t('Additional icon sets may be provided... [More documentation to follow]') . '</p>';
      return $output;
  }
}