You are here

README.txt in User Stats 7

Same filename and directory in other branches
  1. 6 README.txt
CONTENTS OF THIS FILE
---------------------

  - Introduction
  - Installation
  - Configuration
  - Accessing statistics from a theme


INTRODUCTION
------------

Current Maintainer: Liam McDermott.
Contact via: http://www.intermedia-online.com/#contact

The primary goal of User stats is to provide commonly requested user statistics
for themers. These are:

  - days registered;
  - join date;
  - days since last login;
  - days since last post;
  - post count;
  - login count;
  - user online/offline;
  - IP address;

The module has also been improved to integrate with the Rules (http://drupal.org/project/rules)
and Views (http://drupal.org/project/views) modules. Finally, it also provides
IP address to assist with catching spammers on community sites.


INSTALLATION
------------

User stats is installed in the same way as most other Drupal modules.
Here are the instructions for anyone unfamiliar with the process:

1. Copy this user_stats/ directory to your sites/SITENAME/modules directory.

2. Back in your Web browser, navigate to Administer -> Site building -> Modules
   then enable the User Stats module.


CONFIGURATION
-------------

The configuration page for User Stats can be found by browsing to
Administer -> Site configuration -> User Stats settings

If IP address tracking is enabled (and Views is installed),
'IP address tracking' will appear under the Administer -> Reports section.

Integration with Rules and Views happens automatically, see these modules'
configuration pages for functionality provided by User Stats.


ACCESSING STATISTICS FROM A THEME
---------------------------------

Some knowledge of theme authoring is needed for this task. For more information
on theme authoring, see: http://drupal.org/theme-guide/6 Alternatively the
Advanced Forum (http://drupal.org/project/advanced_forum) module assists with
this and provides lots of helpful documentation.

User Stats are accessed from a theme using the user_stats_get_stats() function.
For example:

<p>Post count: <?php print user_stats_get_stats('post_count', $node->uid); ?></p>

Placed in node-forum.tpl.php would print the user's post count. The first argument
is a string indicating which statistic should be retrieved, the second is an
integer user id who's statistics should be retrieved. Following is a list of the
statistics it is possible to retrieve:

  - ip_address -- IP Address of the user that posted the node;

  - join_date -- time stamp representing when the user joined;

  - login_count -- number of times the user has logged-in;

  - login_days -- number of days since the user was last logged-in to the site;

  - post_count -- number of nodes and comments created by the user (the type of
    posts to count is configurable in the User stats settings page);

  - post_days -- number of days since the user last posted;

  - reg_days -- number of days since the user registered on the site;

  - online -- whether the user is online (basically whether they have done
    anything in the last 15 minutes);

For more information, and examples, see: http://www.apaddedcell.com/an-introduction-user-stats-module-drupal

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. - Introduction
  4. - Installation
  5. - Configuration
  6. - Accessing statistics from a theme
  7. INTRODUCTION
  8. ------------
  9. Current Maintainer: Liam McDermott.
  10. Contact via: http://www.intermedia-online.com/#contact
  11. The primary goal of User stats is to provide commonly requested user statistics
  12. for themers. These are:
  13. - days registered;
  14. - join date;
  15. - days since last login;
  16. - days since last post;
  17. - post count;
  18. - login count;
  19. - user online/offline;
  20. - IP address;
  21. The module has also been improved to integrate with the Rules (http://drupal.org/project/rules)
  22. and Views (http://drupal.org/project/views) modules. Finally, it also provides
  23. IP address to assist with catching spammers on community sites.
  24. INSTALLATION
  25. ------------
  26. User stats is installed in the same way as most other Drupal modules.
  27. Here are the instructions for anyone unfamiliar with the process:
  28. 1. Copy this user_stats/ directory to your sites/SITENAME/modules directory.
  29. 2. Back in your Web browser, navigate to Administer -> Site building -> Modules
  30. then enable the User Stats module.
  31. CONFIGURATION
  32. -------------
  33. The configuration page for User Stats can be found by browsing to
  34. Administer -> Site configuration -> User Stats settings
  35. If IP address tracking is enabled (and Views is installed),
  36. 'IP address tracking' will appear under the Administer -> Reports section.
  37. Integration with Rules and Views happens automatically, see these modules'
  38. configuration pages for functionality provided by User Stats.
  39. ACCESSING STATISTICS FROM A THEME
  40. ---------------------------------
  41. Some knowledge of theme authoring is needed for this task. For more information
  42. on theme authoring, see: http://drupal.org/theme-guide/6 Alternatively the
  43. Advanced Forum (http://drupal.org/project/advanced_forum) module assists with
  44. this and provides lots of helpful documentation.
  45. User Stats are accessed from a theme using the user_stats_get_stats() function.
  46. For example:
  47. Post count: uid); ?>

  48. Placed in node-forum.tpl.php would print the user's post count. The first argument
  49. is a string indicating which statistic should be retrieved, the second is an
  50. integer user id who's statistics should be retrieved. Following is a list of the
  51. statistics it is possible to retrieve:
  52. - ip_address -- IP Address of the user that posted the node;
  53. - join_date -- time stamp representing when the user joined;
  54. - login_count -- number of times the user has logged-in;
  55. - login_days -- number of days since the user was last logged-in to the site;
  56. - post_count -- number of nodes and comments created by the user (the type of
  57. posts to count is configurable in the User stats settings page);
  58. - post_days -- number of days since the user last posted;
  59. - reg_days -- number of days since the user registered on the site;
  60. - online -- whether the user is online (basically whether they have done
  61. anything in the last 15 minutes);
  62. For more information, and examples, see: http://www.apaddedcell.com/an-introduction-user-stats-module-drupal