Commit a7325fae authored by Dries's avatar Dries

- Patch #80944 by Dave Reid, swentel, ChrisKennedy: move the statistics...

- Patch #80944 by Dave Reid, swentel, ChrisKennedy: move the statistics settings to a more logical place.
parent 9e2540ee
......@@ -180,7 +180,7 @@ function statistics_access_log($aid) {
* @ingroup forms
* @see system_settings_form()
*/
function statistics_access_logging_settings() {
function statistics_settings_form() {
// Access log settings:
$options = array('1' => t('Enabled'), '0' => t('Disabled'));
$form['access'] = array(
......
......@@ -14,19 +14,19 @@ function statistics_help($path, $arg) {
case 'admin/help#statistics':
$output = '<p>' . t('The statistics module keeps track of numerous site usage statistics, including the number of times, and from where, each of your posts is viewed. These statistics are useful in determining how users are interacting with each other and with your site, and are required for the display of some Drupal blocks.') . '</p>';
$output .= '<p>' . t('The statistics module provides:') . '</p>';
$output .= '<ul><li>' . t('a counter for each post on your site that increments each time the post is viewed. (Enable <em>Count content views</em> on the <a href="@accesslog">access log settings page</a>, and determine if the post access counters should be visible to any user roles on the <a href="@permissions">permissions page</a>.)', array('@accesslog' => url('admin/reports/settings'), '@permissions' => url('admin/user/permissions'))) . '</li>';
$output .= '<ul><li>' . t('a counter for each post on your site that increments each time the post is viewed. (Enable <em>Count content views</em> on the <a href="@statistics-settings">statistics settings page</a>, and determine if the post access counters should be visible to any user roles on the <a href="@permissions">permissions page</a>.)', array('@statistics-settings' => url('admin/settings/statistics'), '@permissions' => url('admin/user/permissions'))) . '</li>';
$output .= '<li>' . t('a <a href="@recent-hits">recent hits</a> log that displays information about the latest activity on your site, including the URL and title of the page accessed, the user name (if available) and IP address of the accessing party.', array('@recent-hits' => url('admin/reports/hits'))) . '</li>';
$output .= '<li>' . t('a <a href="@top-referrers">top referrers</a> log that displays the referring parties for your site visits (where your visitors came from).', array('@top-referrers' => url('admin/reports/referrers'))) . '</li>';
$output .= '<li>' . t('a <a href="@top-pages">top pages</a> log that displays site content in descending order by number of views.', array('@top-pages' => url('admin/reports/pages'))) . '</li>';
$output .= '<li>' . t('a <a href="@top-visitors">top visitors</a> log that displays the most active users on your site.', array('@top-visitors' => url('admin/reports/visitors'))) . '</li>';
$output .= '<li>' . t('a <em>Popular content</em> block that displays the day\'s most viewed content, the all-time most viewed content, and the last content viewed. (Enable the <em>Popular content</em> block on the <a href="@blocks">blocks administration page</a>.)', array('@blocks' => url('admin/build/block'))) . '</li></ul>';
$output .= '<p>' . t('Configuring the statistics module') . '</p>';
$output .= '<ul><li>' . t('When the <em>Enable access log</em> setting on the <a href="@accesslog">access log settings page</a> is enabled, data about every page accessed (including the remote host\'s IP address, referrer, node accessed, and user name) is stored in the access log. The access log must be enabled for the <a href="@recent-hits">recent hits</a>, <a href="@top-referrers">top referrers</a>, <a href="@top-pages">top pages</a>, and <a href="@top-visitors">top visitors</a> log pages to function. Enabling the access log adds one additional database call per page displayed by Drupal.', array('@accesslog' => url('admin/reports/settings'), '@recent-hits' => url('admin/reports/hits'), '@top-referrers' => url('admin/reports/referrers'), '@top-pages' => url('admin/reports/pages'), '@top-visitors' => url('admin/reports/visitors'))) . '</li>';
$output .= '<li>' . t('The <em>Discard access logs older than</em> setting on the <a href="@accesslog">access log settings page</a> specifies the length of time entries are retained in the access log before they are deleted. Automatic access log entry deletion requires a correctly configured <a href="@cron">cron maintenance task</a>.', array('@accesslog' => url('admin/reports/settings'), '@cron' => url('admin/reports/status'))) . '</li>';
$output .= '<li>' . t('The <em>Count content views</em> setting on the <a href="@accesslog">access log settings page</a> enables a counter for each post on your site that increments each time the post is viewed. This option must be enabled to provide post-specific access counts. Enabling this option adds one additional database call per each post displayed by Drupal.', array('@accesslog' => url('admin/reports/settings'))) . '</li></ul>';
$output .= '<ul><li>' . t('When the <em>Enable access log</em> setting on the <a href="@statistics-settings">statistics settings page</a> is enabled, data about every page accessed (including the remote host\'s IP address, referrer, node accessed, and user name) is stored in the access log. The access log must be enabled for the <a href="@recent-hits">recent hits</a>, <a href="@top-referrers">top referrers</a>, <a href="@top-pages">top pages</a>, and <a href="@top-visitors">top visitors</a> log pages to function. Enabling the access log adds one additional database call per page displayed by Drupal.', array('@statistics-settings' => url('admin/settings/statistics'), '@recent-hits' => url('admin/reports/hits'), '@top-referrers' => url('admin/reports/referrers'), '@top-pages' => url('admin/reports/pages'), '@top-visitors' => url('admin/reports/visitors'))) . '</li>';
$output .= '<li>' . t('The <em>Discard access logs older than</em> setting on the <a href="@statistics-settings">statistics settings page</a> specifies the length of time entries are retained in the access log before they are deleted. Automatic access log entry deletion requires a correctly configured <a href="@cron">cron maintenance task</a>.', array('@statistics-settings' => url('admin/settings/statistics'), '@cron' => url('admin/reports/status'))) . '</li>';
$output .= '<li>' . t('The <em>Count content views</em> setting on the <a href="@statistics-settings">statistics settings page</a> enables a counter for each post on your site that increments each time the post is viewed. This option must be enabled to provide post-specific access counts. Enabling this option adds one additional database call per each post displayed by Drupal.', array('@statistics-settings' => url('admin/settings/statistics'))) . '</li></ul>';
$output .= '<p>' . t('For more information, see the online handbook entry for <a href="@statistics">Statistics module</a>.', array('@statistics' => 'http://drupal.org/handbook/modules/statistics/')) . '</p>';
return $output;
case 'admin/reports/settings':
case 'admin/settings/statistics':
return '<p>' . t('Settings for the statistical information that Drupal will keep about the site. See <a href="@statistics">site statistics</a> for the actual information.', array('@statistics' => url('admin/reports/hits'))) . '</p>';
case 'admin/reports/hits':
return '<p>' . t("This page displays the site's most recent hits.") . '</p>';
......@@ -87,6 +87,10 @@ function statistics_perm() {
'title' => t('Access statistics'),
'description' => t('View content access statistics.'),
),
'administer statistics' => array(
'title' => t('Administer statistics'),
'description' => t('Configure statistics settings.'),
),
'view post access counter' => array(
'title' => t('View post access counter'),
'description' => t('View the total number of times a piece of content has been accessed.'),
......@@ -152,14 +156,12 @@ function statistics_menu() {
'access arguments' => array('access statistics'),
'type' => MENU_CALLBACK,
);
$items['admin/reports/settings'] = array(
'title' => 'Access log settings',
'description' => 'Control details about what and how your site logs.',
$items['admin/settings/statistics'] = array(
'title' => 'Statistics',
'description' => 'Control details about what and how your site logs access statistics.',
'page callback' => 'drupal_get_form',
'page arguments' => array('statistics_access_logging_settings'),
'access arguments' => array('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
'weight' => 3,
'page arguments' => array('statistics_settings_form'),
'access arguments' => array('administer statistics'),
);
$items['user/%user/track/navigation'] = array(
'title' => 'Track page visits',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment