README.txt 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. <p>Post count: <?php print user_stats_get_stats('post_count', $node->uid); ?></p>
  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