Last modified by Simon Urli on 2020/10/16 13:44

Show last authors
1 {{warning}}
2 This page contains the documentation of the Ratings Application before the changes performed in 12.9RC1.
3 {{/warning}}
4
5 {{box cssClass="floatinginfobox"}}
6 {{toc/}}
7 {{/box}}
8
9 = Description =
10
11 This app allows users to rate Wiki pages.
12
13 {{info}}
14 Starting with XWiki 6.4, this extension's sources have been integrated into a module of the XWiki Platform. Thus the jump in the version number.
15 {{/info}}
16
17 == Screenshots ==
18 Rating stars displayed in XWiki pages.
19 {{image reference=RatingsApplication.png/}}
20
21 Rating stars displayed in Extension Manager.
22 {{image reference=stars.png/}}
23
24 == UI Extension point ==
25
26 The javascript that injected the ratings html after the breadcrumb (id="hierarchy") has been replaced by a UI Extension Point.
27 This change has the advantage that it allows ratings to be displayed in the flamingo skin.
28 The problem with the old approach was that in flamingo there is no html element with the id "hierarchy".
29
30 == Ratings are disabled by default ==
31
32 By default, the ratings are disabled.
33 You can activate them either globally or at space level.
34 Please see below how to do that.
35
36 == New configuration source ==
37
38 As opposed to the older versions, since 6.4 the ratings configuration can now be done via XWiki objects.
39 This means that it is possible to configure the application on a space basis.
40
41 The main configuration source is located at **XWiki.RatingsConfig**. From the **XWiki.RatingsConfig** page select Edit > Objects and set the "Display ratings" to Yes, then Save & View.
42
43 {{image reference=Ratings.jpg/}}
44
45
46 In order to have separate configurations for each space you need to attach a **XWiki.RatingsConfigClass** object to the **WebPreferences** document of that space. Unfortunately, at the moment there is no UI for editing the configuration so it has to be done by editing the objects manually.
47
48
49
50 A important thing to note is that a fallback to xwiki.[cfg|preferences] has been kept.
51
52 The precedence order is as follows:
53 1. *.WebPreferences
54 1. XWiki.RatingsConfig
55 1. xwiki.cfg
56 1. xwiki.preferences
57
58
59 === XWiki.RatingsConfigClass ===
60
61 |=Property|=Description|=Values|=Default
62 |displayRatings|Display the ratings or not|boolean|true
63 |excludedPages|Pages on which ratings should not be displayed|comma separated list of documents|-
64 |managerHint|The ratings manager to use. This defines where the ratings are stored|default=same page,separate=different space|default
65 |storageSpace|In case of using the separate ratings manager, specify in which space to save the rating information|space name|-
66 |storageSeparateSpaces|Store the ratings for each space individually (only takes effect at global level, on space level use storageSpace)|boolean|false
67 |storeAverageRating|Store the average rating in an object or keep it in memory|boolean|false
68 |reputation|Calculate the user's reputation|boolean|false
69 |reputationStored|Store the user reputation in an object or keep it in memory|boolean|false
70 |reputationMethod|Name of the methods used for calculating a user's reputation|comma separated list of values|-
71 |reputationAlgorithm|The algorithm used to calculate the reputation|default,simple,custom|default
72 |reputationCustomAlgorithm|When the reputationAlgorithm property is set to "custom" a reference to the algorithm must be provided|Document containing the groovy script|-
73
74 == Available Stores ==
75
76 Ratings can store the information in different places.
77
78 {{version before="12.7RC1"}}
79 Two store were available:
80 - default: store the ratings directly on the rated pages
81 - separate: store each rating in a separate page
82 {{/version}}
83
84 {{version since="12.7RC1"}}
85 A new store is available:
86 - solr: store the ratings in a dedicated Solr Core.
87 {{/version}}
88
89 Note that if it's possible to change from one store to another by modifying Ratings configuration, we currently do not support migrating the existing ratings from one store to another.
90
91 = Installation Instructions =
92
93 * For 1.3+
94 ** Install using Extension Manager
95 * For 1.1. and 1.2 only
96 ** This application relies on the [[Extension.Ratings Plugin]]. Please make sure you have successfully installed this plugin first.
97 ** Add ##XWiki.RatingsTranslations## as an internationalization document bundle
98 ** Visit the Ratings section of the administration UI to activate or deactivate ratings

Get Connected