You are here

function yandex_services_auth_help in Yandex Services Authorization API 8

Same name and namespace in other branches
  1. 6 yandex_services_auth.module \yandex_services_auth_help()
  2. 7 yandex_services_auth.module \yandex_services_auth_help()

Implements hook_help().

File

./yandex_services_auth.module, line 50
Main file for the Yandex Services Authorization API module.

Code

function yandex_services_auth_help($path, $arg) {
  switch ($path) {
    case 'admin/help#yandex_services_auth':
      $output = '';
      $output .= '<h3>' . t('Overview') . '</h3>';
      $output .= '<p>' . t('This project is the common authorization API for all Yandex services which support Yandex OAuth method.') . '</p>';
      $output .= '<dl>';
      $output .= '<dt><b>' . t('Authorization') . '</b></dt>';
      $output .= '<dt>' . t('To authorize your site you should register Yandex application at !app_register_link. Then enter your application Client ID and Client Secret in the appropriate fields on !settings_page. The list of your Yandex applications is located !app_list_link.', array(
        '!app_register_link' => l('https://oauth.yandex.ru/client/new', 'https://oauth.yandex.ru/client/new', array(
          'attributes' => array(
            'target' => '_blank',
          ),
        )),
        '!app_list_link' => l(t('here'), 'https://oauth.yandex.ru/client/my', array(
          'attributes' => array(
            'target' => '_blank',
          ),
        )),
        '!settings_page' => l(t('the module settings page'), 'admin/config/system/yandex_services_auth'),
      )) . '</dt>';
      $output .= '</dl>';
      return $output;
    case 'admin/config/system/yandex_services_auth':
      $output = '<p>' . t('To authorize your site you should register Yandex application at !app_register_link. Then enter your application Client ID and Client Secret in the appropriate fields on this page. The list of your Yandex applications is located !app_list_link.', array(
        '!app_register_link' => l('https://oauth.yandex.ru/client/new', 'https://oauth.yandex.ru/client/new', array(
          'attributes' => array(
            'target' => '_blank',
          ),
        )),
        '!app_list_link' => l(t('here'), 'https://oauth.yandex.ru/client/my', array(
          'attributes' => array(
            'target' => '_blank',
          ),
        )),
        '@reports-url' => url('admin/reports/yandex_metrics_summary'),
      )) . '</p>';
      $output .= '<p>' . t('Your Yandex application Callback URI: @callback-uri', array(
        '@callback-uri' => url('yandex_services_auth/oauth', array(
          'absolute' => TRUE,
        )),
      )) . '</p>';
      return $output;
  }
}