Révision d50a36e0
Ajouté par Assos Assos il y a presque 4 ans
drupal7/sites/all/modules/fivestar/README.txt | ||
---|---|---|
1 |
CONTENTS OF THIS FILE |
|
2 |
--------------------- |
|
3 |
|
|
4 |
* Introduction |
|
5 |
* Requirements |
|
6 |
* Installation |
|
7 |
* Configuration |
|
8 |
* Maintainers |
|
9 |
|
|
10 |
|
|
11 |
INTRODUCTION |
|
12 |
------------ |
|
1 | 13 |
|
2 | 14 |
The Fivestar voting module adds a clean, attractive voting widget to nodes and |
3 | 15 |
comments in Drupal. It features: |
4 | 16 |
|
5 |
* jQuery rollover effects and AJAX no-reload voting |
|
17 |
* jQuery (1.0 - 1.8) rollover effects and AJAX no-reload voting
|
|
6 | 18 |
* Customizable star sets |
7 |
* Graceful degradation to an HTML rating form when JavaScript is turned off |
|
8 |
* Per-nodetype configurability |
|
9 |
* Support for anonymous voters |
|
10 |
* Spam protection to keep users from filling your DB with bogus votes |
|
11 |
* Easy-to-use integration with Views module for lists sorted by rating, or filtered by min/max ratings |
|
12 |
* A Fivestar CCK field for use in custom node types |
|
19 |
* Graceful degradation to a HTML rating form when JavaScript is disabled |
|
20 |
* Configurability per node type |
|
21 |
* Anonymous voting support |
|
22 |
* Voting spam protection |
|
23 |
* Easy-to-use integration with Views for lists sorted by rating, or filtered |
|
24 |
by min/max ratings |
|
25 |
* A Fivestar field for use in custom node types |
|
13 | 26 |
* An easy-to-use Form API element type for use in other modules |
14 | 27 |
|
15 |
Fivestar was designed by Nate Haug and Jeff Eaton. |
|
28 |
* For a full description of the module, visit the project page: |
|
29 |
https://www.drupal.org/project/fivestar |
|
16 | 30 |
|
17 |
This Module Made by Robots: http://www.lullabot.com |
|
31 |
* To submit bug reports and feature suggestions, or track changes: |
|
32 |
https://www.drupal.org/project/issues/fivestar |
|
18 | 33 |
|
34 |
* For more information on module usage, visit the documentation guide: |
|
35 |
https://www.drupal.org/docs/7/modules/fivestar |
|
19 | 36 |
|
20 |
Dependencies |
|
37 |
|
|
38 |
REQUIREMENTS |
|
21 | 39 |
------------ |
22 |
* votingapi |
|
23 | 40 |
|
24 |
Fivestar also provides additional features for both the CCK and Views modules.
|
|
41 |
This module requires the following modules:
|
|
25 | 42 |
|
26 |
Install |
|
27 |
------- |
|
28 |
Installing the Fivestar voting module is simple: |
|
43 |
* Voting API (https://www.drupal.org/project/votingapi) |
|
29 | 44 |
|
30 |
1) Copy the fivestar folder to the modules folder in your installation. |
|
31 | 45 |
|
32 |
2) Enable the module using Administer -> Modules (/admin/build/modules) |
|
46 |
INSTALLATION |
|
47 |
------------ |
|
33 | 48 |
|
34 |
Note: Aggressive caching will complain that fivestar doesn't work, but it |
|
35 |
actually causes no problems. To improve performance, the module implements |
|
36 |
hook_init() -- and the caching advisor screen uses that as the only metric to |
|
37 |
determine whether a module will work with the caching system. Activate it |
|
38 |
without fear, friends -- Fivestar will continue to hum happily along. |
|
49 |
* Install as you would normally install a contributed Drupal module. Visit |
|
50 |
https://www.drupal.org/node/1897420 for further information. |
|
39 | 51 |
|
40 |
Upgrading from Drupal 5 |
|
41 |
----------------------- |
|
42 |
The Drupal 6 version of VotingAPI has been significantly improved for both |
|
43 |
efficiency and flexibility. Because Fivestar depends on VotingAPI for much of |
|
44 |
its functionality, these changes have affected Fivestar. |
|
45 | 52 |
|
46 |
The Fivestar Anonymous vote interval set in admin/settings/fivestar is no |
|
47 |
longer available. We use the same setting as defined in VotingAPI now, set at |
|
48 |
admin/settings/votingapi. It has the same effect as the previous Fivestar |
|
49 |
setting. |
|
53 |
CONFIGURATION |
|
54 |
------------- |
|
50 | 55 |
|
51 |
Configuration for Simple Rating |
|
52 |
------------------------------- |
|
56 |
Fivestar has two configuration modes: |
|
53 | 57 |
|
54 |
Fivestar has two completely separate modes of operation. The first is letting an |
|
55 |
end-user rate a piece of content. The settings for this are on the content type |
|
56 |
settings page. These settings let you expose a rating widget when viewing the |
|
57 |
node, not editing it. Clicking on the widget registers a vote for that node, and |
|
58 |
never anything else. |
|
58 |
* End-user rating a piece of content: These settings are located on the content |
|
59 |
type settings page. These settings let you expose a rating widget when |
|
60 |
viewing the node, not editing it. Clicking on the widget registers a vote for |
|
61 |
that node, and never anything else. |
|
59 | 62 |
|
60 | 63 |
The configuration for Fivestar is spread between the content type settings page, |
61 | 64 |
Fivestar site settings page, and access permissions. To configure: |
62 | 65 |
|
63 |
1) Configure the site-wide setting for Fivestar, Administer -> Settings ->
|
|
64 |
Fivestar.
|
|
66 |
1) Configure the site-wide setting for Fivestar, Administer -> Configuration ->
|
|
67 |
Fivestar (or go directly to /admin/config/content/fivestar)
|
|
65 | 68 |
|
66 | 69 |
2) Activate voting on each content type. For example, if you want Fivestar to |
67 |
appear on story nodes, use Administer -> Content Management ->
|
|
68 |
Content Types -> Story, and check the "Enable Fivestar rating" box under
|
|
70 |
appear on "Article" nodes, use Administer -> Structure -> Content Types ->
|
|
71 |
Article, and check the "Enable Fivestar rating" box under
|
|
69 | 72 |
the "Fivestar ratings" heading. Repeat for each content type desired. |
70 | 73 |
|
71 | 74 |
3) Enable anonymous voting. |
72 | 75 |
If you want to allow anonymous voting, you'll need to set permissions for |
73 |
that. Use Administer -> User Management -> Access Control, and check the |
|
74 |
"rate content" and "view ratings" checkboxes for the roles you'd like. |
|
75 |
You'll find these permission items under the "fivestar module" heading. |
|
76 |
that. Use Administer -> People -> Permissions, and check the |
|
77 |
"Use Fivestar to rate content" checkboxe for the role(s) you'd like. |
|
78 |
You'll find this permission under the "Fivestar" module heading. |
|
79 |
|
|
76 | 80 |
|
77 | 81 |
Configuration for Reviews of Content |
78 | 82 |
------------------------------------ |
... | ... | |
83 | 87 |
Visitors will not be rating the comments themselves. Fivestar does not allow for |
84 | 88 |
the rating of comments. |
85 | 89 |
|
86 |
1) If it's not already enabled, turn on comment module at Administer ->
|
|
87 |
Site Building -> Modules.
|
|
90 |
1) If it's not already enabled, turn on the comment module at
|
|
91 |
Administer -> Modules.
|
|
88 | 92 |
|
89 | 93 |
2) Visit the content type you want to enable reviews, such as Administer -> |
90 |
Content Management -> Content Types -> Story, and select an option under
|
|
94 |
Structure -> Content Types -> Article, and select an option under
|
|
91 | 95 |
the "Comment widget" section. |
92 | 96 |
|
97 |
|
|
93 | 98 |
Configuration as a CCK field / Advanced Rating |
94 | 99 |
---------------------------------------------- |
95 | 100 |
|
... | ... | |
109 | 114 |
|
110 | 115 |
To configure a CCK field for rating a node while creating a new 'review' node: |
111 | 116 |
|
112 |
1) Create a new node type called 'review' at Administer -> Content Management ->
|
|
117 |
1) Create a new node type called 'review' at Administer -> Structure ->
|
|
113 | 118 |
Content Types. Configure the type. Do NOT set any fivestar settings on the |
114 | 119 |
content type form! We don't want users to actually be able to rate the reviews |
115 | 120 |
themselves! |
... | ... | |
121 | 126 |
3) Configure the rating widget to your liking. Most field have help text which |
122 | 127 |
explain their purpose. The Node ID field is the most important field on the page |
123 | 128 |
which determines exactly what node will receive the value of the rating. In a |
124 |
realy simple case, you could just enter the value 10 to always rate on the same |
|
129 |
really simple case, you could just enter the value 10 to always rate on the same
|
|
125 | 130 |
node with nid = 10. |
126 | 131 |
|
127 | 132 |
A common scenario is using fivestar with nodecomments to make reviews. If using |
... | ... | |
131 | 136 |
Save your field. Now when making new nodes of type 'review', the user will |
132 | 137 |
select a star that will register a vote on the value of the Node ID field. |
133 | 138 |
|
139 |
|
|
134 | 140 |
Views Integration |
135 | 141 |
----------------- |
136 | 142 |
Fivestar depends on the views integration provided by VotinAPI, but adds some |
... | ... | |
143 | 149 |
Fivestar also provides handling for the display of Fivestar CCK fields, they are |
144 | 150 |
in the Field list under "Fivestar Rating: [Field name]". |
145 | 151 |
|
152 |
|
|
146 | 153 |
Creating a Fivestar Set |
147 | 154 |
----------------------- |
148 | 155 |
|
149 |
1. Open your favorite image editor and create an image that is 3 times as high as it is wide. |
|
150 |
The default size for Fivestar (and the easiest to work with) is 16x48 pixels. |
|
156 |
1. Open your favorite image editor and create an image that is 3 times as high |
|
157 |
as it is wide. The default size for Fivestar (and the easiest to work with) |
|
158 |
is 16x48 pixels. |
|
151 | 159 |
|
152 | 160 |
2. Setup guides at 16 pixels and 32 pixels. This splits your canvas into thirds. |
153 | 161 |
|
154 |
3. Create a star icon in the top third. When satisfied, copy it into the middle and bottom |
|
155 |
thirds of the image. Change the middle and bottom copies to your liking. Fivestar will |
|
156 |
use the top, middle, and bottom images for each state of the star. |
|
157 |
|
|
162 |
3. Create a star icon in the top third. When satisfied, copy it into the middle |
|
163 |
and bottom thirds of the image. Change the middle and bottom copies to your |
|
164 |
liking. Fivestar will use the top, middle, and bottom images for each state |
|
165 |
of the star. |
|
166 |
|
|
158 | 167 |
Top -> Off |
159 | 168 |
Middle -> On |
160 | 169 |
Bottom -> Hover |
161 | 170 |
|
162 |
4. Save your image as "star.png" in a new directory. The name of your directory will be the label
|
|
163 |
for your set of stars, spaces are not allowed. |
|
171 |
4. Save your image as "star.png" in a new directory. The name of your directory |
|
172 |
will be the label for your set of stars, spaces are not allowed.
|
|
164 | 173 |
|
165 |
5. Do the same thing for a cancel image, only there are only 2 states for a cancel image, so your |
|
166 |
image will be 16 pixels by 32pixels. Setup a guide at 16 pixels so your canvas is split in half. |
|
174 |
5. Do the same thing for a cancel image, only there are only 2 states for a |
|
175 |
cancel image, so your image will be 16 pixels by 32pixels. Setup a guide at |
|
176 |
16 pixels so your canvas is split in half. |
|
167 | 177 |
|
168 |
6. Create a cancel icon in the top half. Then duplicate it into the bottom half. The cancel states
|
|
169 |
are simply Off and Hover. |
|
178 |
6. Create a cancel icon in the top half. Then duplicate it into the bottom half. |
|
179 |
The cancel states are simply Off and Hover.
|
|
170 | 180 |
|
171 | 181 |
Top -> Off |
172 | 182 |
Bottom -> Hover |
173 | 183 |
|
174 | 184 |
7. Save your cancel image as "cancel.png" in the directory create in step 4. |
175 | 185 |
|
176 |
8. Create the CSS stylesheet. The easiest way to make this stylesheet is to copy an existing CSS |
|
177 |
file from another set of stars. The "Basic" set provides an excellent example for a 16x16 star, |
|
178 |
because it only changes the background image as necessary. If you're making a larger or smaller |
|
179 |
size for your stars than 16x16 pixels, the "Minimal" and "Outline" sets make for a good example. |
|
186 |
8. Create the CSS stylesheet. The easiest way to make this stylesheet is to copy |
|
187 |
an existing CSS file from another set of stars. The "Basic" set provides an |
|
188 |
excellent example for a 16x16 star, because it only changes the background |
|
189 |
image as necessary. If you're making a larger or smaller size for your stars |
|
190 |
than 16x16 pixels, the "Minimal" and "Outline" sets make for a good example. |
|
191 |
|
|
180 | 192 |
|
181 | 193 |
Contributing |
182 | 194 |
------------ |
183 | 195 |
Have a sweet set of stars you'd like to contribute to the Fivestar module? |
184 |
Post them to the Fivestar issue queue: http://drupal.org/project/issues/fivestar |
|
196 |
Post them to the issue queue: https://drupal.org/project/issues/fivestar |
|
197 |
|
|
185 | 198 |
|
186 | 199 |
Support |
187 | 200 |
------- |
188 | 201 |
If you experience a problem with fivestar or have a problem, file a |
189 | 202 |
request or issue on the fivestar queue at |
190 |
http://drupal.org/project/issues/fivestar. DO NOT POST IN THE FORUMS. Posting in |
|
191 |
the issue queues is a direct line of communication with the module authors. |
|
203 |
https://drupal.org/project/issues/fivestar. DO NOT POST IN THE FORUMS. Posting |
|
204 |
in the issue queues is a direct line of communication with the module authors. |
|
205 |
|
|
206 |
|
|
207 |
MAINTAINERS |
|
208 |
----------- |
|
209 |
|
|
210 |
Fivestar was designed by Nate Haug and Jeff Eaton. |
|
211 |
|
|
212 |
This Module Made by Robots: http://www.lullabot.com |
Formats disponibles : Unified diff
Weekly update of contrib modules