From b85eb11e113396490720572d11d30cd83c772ba1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 23 Jan 2004 18:42:43 +0000 Subject: Patch 5287 by Stefan: multiline help texts should become inside a single $output. --- modules/statistics.module | 105 ++++++++++++++++++++++++---------------------- 1 file changed, 54 insertions(+), 51 deletions(-) (limited to 'modules/statistics.module') diff --git a/modules/statistics.module b/modules/statistics.module index 23ae79d2d..625f7c64e 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -98,57 +98,60 @@ function statistics_help($section = "admin/help#statistics") { switch ($section) { case 'admin/help#statistics': - $output .= "

Introduction

"; - $output .= "

The statistics module keeps track of numerous statistics for your site but be warned, statistical collection does cause a little overhead, thus everything comes disabled by default.

"; - $output .= "

The module counts how many times, and from where -- using HTTP referrer -- each of your posts is viewed. Once we have that count the module can do the following with it:"; - $output .= "

"; - $output .= "

Notes on using the statistics:

"; - $output .= ""; - $output .= "

As with any new module, the statistics module needs to be enabled before you can use it. Also refer to the permissions section, as this module supports four separate permissions.

"; - $output .= "

referrers log

This admin page shows you site-wide referrer statistics. You can see 'all' statistics, 'external' statistics or 'internal' statistics. Default is 'all'.

"; - $output .= "

access log

This admin page gives you an at-a-glance look at your most popular content. It is useful for understanding what content on your Drupal site is the most popular. Also on this page are links to the referrer statistics for each listed node.

"; - $output .= "

Configuring the statistics module

There are some configuration options added to the main administer » configuration section:

"; - $output .= ""; - $output .= "

Popular content block

"; - $output .= "

This module creates a block that can display the day's top viewed content, the all time top viewed content, and the last content viewed. Each of these links can be enabled or disabled individually, and the number of posts displayed for each can be configured with a drop down menu. If you disable all sections of this block, it will not appear.

"; - $output .= "

Don't forget to enable the block.

"; - - $output .= "

Popular content page

"; - $output .= "

This module creates a user page that can display summaries of the day's most popular viewed content, the all time most popular content, and the last content viewed. Each of these summaries can be enabled or disabled individually, and the number of posts displayed for each can be configured with a drop down menu. You can also assign a name for the automatically generated link to the user page. If no name is set, the link will not be displayed.

"; - $output .= "

Permissions

This module has four permissions that need to be configured in the permissions section.

"; - $output .= ""; - $output .= "

If 'administer statistics' and 'access statistics' are both enabled, the user will see a link from each node to that node's referrer statistics (if enabled).

"; - $output .= "

Statistics module (for developers)

Accessing statistics

To get a node's \"view statistics\" make a call to the function statistics_get(\$nid). When you pass in a Node ID (\$nid), the function returns an array with three entires: [0]=totalcount, [1]=daycount, [2]=timestamp. For example, you could use this function call to add node view counts to your theme.

"; - $output .= ""; - $output .= "

The module automatically adds '# reads' to each node's link section (if enabled).

"; - $output .= "

Most popular content

The statistics module provides a function 'statistics_title_list(\$dbfield, \$dbrows)' to return an array of links to any of the following: the top viewed content of all time, the top viewed content of today, and the last viewed content. You can pass in:

"; - $output .= ""; - $output .= "

\$dbrows is the number or rows you want returned in your array.

"; - $output = t($output, array("%modules" => url("admin/system/modules"), "%permissions" => url("admin/user/permission"), "%referers" => url("admin/statistics/referrers"), "%access" => url("admin/statistics/log"), "%configuration" => url("admin/system/modules/statistics"), "%block" => url("admin/system/block"))); + $output .= t(" +

Introduction

+

The statistics module keeps track of numerous statistics for your site but be warned, statistical collection does cause a little overhead, thus everything comes disabled by default.

+

The module counts how many times, and from where -- using HTTP referrer -- each of your posts is viewed. Once we have that count the module can do the following with it: +

+

Notes on using the statistics:

+ +

As with any new module, the statistics module needs to be enabled before you can use it. Also refer to the permissions section, as this module supports four separate permissions.

+

referrers log

+

This admin page shows you site-wide referrer statistics. You can see 'all' statistics, 'external' statistics or 'internal' statistics. Default is 'all'.

+

access log

+

This admin page gives you an at-a-glance look at your most popular content. It is useful for understanding what content on your Drupal site is the most popular. Also on this page are links to the referrer statistics for each listed node.

+

Configuring the statistics module

+

There are some configuration options added to the main administer » configuration section:

+ +

Popular content block

+

This module creates a block that can display the day's top viewed content, the all time top viewed content, and the last content viewed. Each of these links can be enabled or disabled individually, and the number of posts displayed for each can be configured with a drop down menu. If you disable all sections of this block, it will not appear.

+

Don't forget to enable the block.

+

Popular content page

+

This module creates a user page that can display summaries of the day's most popular viewed content, the all time most popular content, and the last content viewed. Each of these summaries can be enabled or disabled individually, and the number of posts displayed for each can be configured with a drop down menu. You can also assign a name for the automatically generated link to the user page. If no name is set, the link will not be displayed.

+

Permissions

This module has four permissions that need to be configured in the permissions section.

+ +

If 'administer statistics' and 'access statistics' are both enabled, the user will see a link from each node to that node's referrer statistics (if enabled).

+

Statistics module (for developers)

Accessing statistics

To get a node's \"view statistics\" make a call to the function statistics_get(\$nid). When you pass in a Node ID (\$nid), the function returns an array with three entires: [0]=totalcount, [1]=daycount, [2]=timestamp. For example, you could use this function call to add node view counts to your theme.

+ +

The module automatically adds '# reads' to each node's link section (if enabled).

+

Most popular content

+

The statistics module provides a function 'statistics_title_list(\$dbfield, \$dbrows)' to return an array of links to any of the following: the top viewed content of all time, the top viewed content of today, and the last viewed content. You can pass in:

+ +

\$dbrows is the number or rows you want returned in your array.

", array("%modules" => url("admin/system/modules"), "%permissions" => url("admin/user/permission"), "%referers" => url("admin/statistics/referrers"), "%access" => url("admin/statistics/log"), "%configuration" => url("admin/system/modules/statistics"), "%block" => url("admin/system/block"))); break; case 'admin/system/modules#description': $output = t("Logs access statistics for your site."); -- cgit v1.2.3