Projet

Général

Profil

Paste
Télécharger (3,07 ko) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / modules / user_stats / README.txt @ a5572547

1

    
2
CONTENTS OF THIS FILE
3
---------------------
4

    
5
  - Introduction
6
  - Installation
7
  - Configuration
8
  - Accessing statistics from a theme
9

    
10

    
11
INTRODUCTION
12
------------
13

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

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

    
20
  - days registered;
21
  - join date;
22
  - days since last login;
23
  - days since last post;
24
  - post count;
25
  - login count;
26
  - user online/offline;
27
  - IP address;
28

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

    
33

    
34
INSTALLATION
35
------------
36

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

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

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

    
45

    
46
CONFIGURATION
47
-------------
48

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

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

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

    
58

    
59
ACCESSING STATISTICS FROM A THEME
60
---------------------------------
61

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

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

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

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

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

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

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

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

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

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

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

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

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