You are here

function linkchecker_help in Link checker 5.2

Same name and namespace in other branches
  1. 8 linkchecker.module \linkchecker_help()
  2. 5 linkchecker.module \linkchecker_help()
  3. 6.2 linkchecker.module \linkchecker_help()
  4. 7 linkchecker.module \linkchecker_help()

Implementation of hook_help().

File

./linkchecker.module, line 63
This module periodically check links in given node types, blocks, cck fields, etc.

Code

function linkchecker_help($section) {
  switch ($section) {
    case 'admin/help#linkchecker':
      return '<p>' . t('This module provides an aid to finding broken links on your site. It periodically checks contents of all public nodes, tries to find any html links and check for their validity. It reports broken links through the admin interface. For more information about status codes see <a href="@rfc">Status Code Definitions</a>.', array(
        '@rfc' => 'http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html',
      )) . '</p>';
    case 'admin/logs/linkchecker':
      $links_unchecked = db_result(db_query('SELECT COUNT(1) FROM {linkchecker_links} WHERE last_checked = %d AND status = %d', 0, 1));
      if ($links_unchecked > 0) {
        $links_all = db_result(db_query('SELECT COUNT(1) FROM {linkchecker_links} WHERE status = %d', 1));
        drupal_set_message(strtr(format_plural($links_unchecked, 'There is 1 unchecked link of about @links_all links in the database. Please be patient until all links have been checked via cron.', 'There are @count unchecked links of about @links_all links in the database. Please be patient until all links have been checked via cron.'), array(
          '@links_all' => $links_all,
        )), 'warning');
      }
  }
}