You are here

function yamaps_help in Yandex.Maps 7

Implements hook_help().

File

./yamaps.module, line 148
Yandex Maps module main file.

Code

function yamaps_help($path, $arg) {
  if ($path == 'admin/help#yamaps') {
    $output = '<h3>' . t('About') . '</h3>';
    $about = [
      t('Project contains a set of modules for Drupal 7 that use Yandex.Maps service available at !link.', [
        '!link' => l(t('http://maps.yandex.com/'), 'http://maps.yandex.com/'),
      ]),
      t('Uses !api (API 2.x).', [
        '!api' => l(t('http://api.yandex.ru/maps/'), 'http://api.yandex.ru/maps/'),
      ]),
      t('Project page: !link.', [
        '!link' => l(t('https://drupal.org/project/yamaps'), 'https://drupal.org/project/yamaps'),
      ]),
      t('To submit bug reports and feature suggestions, or to track changes: !link.', [
        '!link' => l(t('https://drupal.org/project/issues/yamaps'), 'https://drupal.org/project/issues/yamaps'),
      ]),
    ];
    $output .= yamaps_wrap_items($about, '<p>', '</p>');
    $output .= '<h3>' . t('Modules') . '</h3>';
    $modules = [
      t('<strong>Yandex Maps</strong> (main module, description provided below).'),
      t('<strong>Yandex Maps Example</strong> (submodule). Feature-based module which demonstrates example content type containing "Yandex Map" field and view to output maps.'),
      t('<strong>For demo purposes only!</strong>'),
      t('<strong>Yandex Maps Views</strong> (submodule). Enables integration with Views for "Yandex Map" field and provides "Yandex Maps" display plugin.'),
    ];
    $output .= theme('item_list', [
      'items' => $modules,
    ]);
    $output .= '<h3>' . t('Options') . '</h3>';
    $options = [
      t('Map can be displayed as interactive object ("dynamic map") or image ("static map").'),
      t('Map can be displayed by click on the "button" with configurable text.'),
      t('Change the type, size and center of the map.'),
      t('Add placemarks, select label color, change texts, add labels using the search string.'),
      t('Draw polylines, chose colors, transparency, line width, text.'),
      t('Draw polygons, chose colors and line width, fill color, transparency, texts.'),
      t('Add a route.'),
      t('Displays traffic jams.'),
      t('Auto zoom.'),
      t('Use clusterer.'),
    ];
    $output .= theme('item_list', [
      'items' => $options,
    ]);
    $output .= '<h3>' . t('Requirements, installation and uninstallation') . '</h3>';
    $reqirements = [
      t('Requires core "block" and "field" modules.'),
      t("Modules doesn't contain specific installation / uninstallation instructions."),
      t('Installing Drupal module: !link.', [
        '!link' => l(t('https://drupal.org/documentation/install/modules-themes/modules-7'), 'https://drupal.org/documentation/install/modules-themes/modules-7'),
      ]),
    ];
    $output .= yamaps_wrap_items($reqirements, '<p>', '</p>');
    $output .= '<h3>' . t('Configuration and usage') . '</h3>';
    $config_fields = [
      t('Module provides configurable "Yandex Maps" field, which can be added to any type of Drupal content.'),
      t('Field may accept "Dynamic" or "Static" formats.'),
      t('"Dynamic" format means that map is displayed as interactive object.'),
      t('"Static" format means that map is displayed as regular image.'),
      t('To add "Yandex Maps" field perform following steps:'),
    ];
    $output .= yamaps_wrap_items($config_fields, '<p>', '</p>');
    $config_fields_options = [
      t('Navigate to !content_type and select content type.', [
        '!content_type' => l(t('"Content Types" page'), 'admin/structure/types'),
      ]),
      t('Navigate to admin/structure/types/manage/{CONTENT-TYPE}/fields ("Manage Fields" page) of the selected content type.'),
      t('Configure and add field of "Yandex map" type.'),
      t('Navigate to admin/structure/types/manage/{CONTENT-TYPE}/display ("Manage Display" page) of the selected content type.'),
      t('Configure field format.'),
    ];
    $output .= theme('item_list', [
      'items' => $config_fields_options,
    ]);
    $config_blocks = [
      t('Module also provides configurable amount of "Yandex Maps" blocks to display maps in any regions of the website.'),
      t('Block may also present map as a "Dynamic" (interactive object) or "Static" (image).'),
      t('To add "Yandex Maps" block perform following steps:'),
    ];
    $output .= yamaps_wrap_items($config_blocks, '<p>', '</p>');
    $config_blocks_options = [
      t('Navigate to !yamaps_admin and set required amount of "Yandex Maps" blocks.', [
        '!yamaps_admin' => l(t('"Yandex Maps" configuration page'), 'admin/config/services/yamaps'),
      ]),
      t('Navigate to !blocks_page, scroll down to find "Disabled" section and find block called "Yandex Map #{NUMBER}".', [
        '!blocks_page' => l(t('"Blocks" page'), 'admin/structure/block'),
      ]),
      t('Configure the block and pull it into the required region.'),
    ];
    $output .= theme('item_list', [
      'items' => $config_blocks_options,
    ]);
    $output .= '<h3>' . t('Information') . '</h3>';
    $information = [
      t('Demo: !link.', [
        '!link' => l(t('http://yandex.xyz.tom.ru/'), 'http://yandex.xyz.tom.ru/'),
      ]),
      t('Blog post: !link.', [
        '!link' => l(t('http://yandex.xyz.tom.ru/'), 'http://yandex.xyz.tom.ru/'),
      ]),
    ];
    $output .= theme('item_list', [
      'items' => $information,
    ]);
    return $output;
  }
}