Standard Rating Panel
To display a rating panel, using the builder theme and a default title of "Rate Article", use the following:
Before voting, the panel will look like this:
When you move your mouse over an emoticon, while voting, it will light up like this:
The small chart button (
) on the left allows the user to see the current rating (or "score") before casting their vote as shown below:
Clicking the green arrow (
) will take them back to the voting panel as shown earlier.
After casting their vote, the panel will change to show the new score, as shown below:
The blue curved arrow (
) allows them to retract their vote should they have made a mistake or change their mind at a later date.
You will also have noticed the delete button (
) - if you have sufficient privileges to edit the content in which the macro is used, you will see this button which allows you to clear down all votes. If you don't have sufficient privileges, that button will not appear.
Changing the title
The default "Rate Article" title is useful when rating pages or news items, but if you are rating a user, comments or something else you'll need a custom title:
The title will appear prior to voting:
And also after voting (or if you display the results prior to voting):
Because the same title is used for the voting panel and the results panel, you should make sure it works both as a question (eg. "User Rating?") and as a statement (eg. "User Rating:"). The "?" and ":" are automatically appended to the title by the macro.
Changing the theme
By default, the ratings panel uses the builder theme - emoticons are used for voting and coloured stars are used for results. You can however use the dynamic theme as follows:
When voting, stars will be shown instead of emoticons:
As you move the mouse over the stars, while voting, each star up to and including the one the mouse is over will light up, for example:
After voting, the results will be shown as follows:
Display Types
By default the macro will show either a rating panel (where you can cast your vote) or the results panel (if you have already voted).
There are, however, a few additional display types...
The results display will only ever show the results, and will not allow voting:
Resulting in:
There is also a percentage display that shows the current average value of the rating as a percentage:
Resulting in:
73
This is useful if you want to put the value in to a table or within text explaining the rating, for example:
Resulting in:
The current article rating is 73%.
Multiple Rating Panels
If you want to display multiple rating panels on one page (or any other type of content), you need to specify uniqe keys for each rating panel.
If you do not specify a unique key, or use the same key more than once, only the first rating panel with a specific key (or no key) will allow voting - all the rest will display in results mode.
Specify a key as follows:
The first rating panel would use a default key (taken from the internal object database ID in case you are interested), while the following panels would use the specified keys.
Keys are case sensitive. If you change a key (even it's capitalisation, e.g. from "usability" to "Usability") then the old results will not be shown.
The on-screen result would be:
The rate keys are unique to the content in which they are being stored. That is to say, you can use the same rate key - of "Usability" for example - on multiple pages, etc.
Restrict voting to registered users
By default, the ratings panel allows anyone to vote but there may be cases where you only want registered users to vote, etc.
To do this, use the show-to macro and hide-from macro (you can also use the [USERGUIDE:show-if macro] or [USERGUIDE:hide-if macro] should you wish to restrict options based on where the ratings panel is displayed):
In the example above, anyone in the confluence-users user group (i.e. anyone with a user account) will see the macro in a form where they can vote. Anyone who is not in that user group (i.e. anonymous users) will merely see the results for the rating and will not be able to vote.
This is a great macro at a great price, but when I switch between browsers, my ratings are not displayed on a page even though I am logged into Confluence. I would expect the ratings to be tied to my login in Confluence, not a cookie within the browser I've used.
Yup, the macro uses cookies so that it can remeber who's voted. We developed it this way as there was a significant requirement for anonymous users to rate content, however the downsides are:
The benefits are:
So... In answer to your question, at present the macro will fail to recognise you if you switch browser or computer. I'll add an issue to our tracker later this evening so that people can comment and vote for various ideas.
Guy,
one question: How to enable rating macro for all the pages within one space? That would be cool. Being forced to place macro for every single page inside a space is rather a tedious task, and macro can easily get deleted from the content.
Is it technically possible to somehow 'enable' macro globally? Maybe via modifying space templates?
Michal.
Hi Michal,
It's not currently possible, however we'll test it with Builder 2.0 which has a more flexible theme architecture.
Best Regards,
Guy
i just installed this plugin thru the confluence repository client and it gives me unknown macro when i type in
Hello,
I'm currently using Builder 1.6 and wanted to add the rate macro to each page using the theme. I've added it into the custom footer section and although the ratings appear on each page, they can't be used.
Is there any way that this can be achieved using Builder?
Unfortunately it's not possible to do that with Builder 1.6. However, we had lots of requests and made it possible in Builder 2.0 and above which includes enhancements to the panels that allow macros (such as the rate macro) to be used.
When using Builder 2.0 or above, it's worth using the following notation to ensure that the macro only appears in suitable places:
{builder-show:context=page,blogpost|mode=view}{rate}{builder-show}The [builder-show macro] is part of the Builder 2.0 and above theme and allows you to chose what types of content (and which display modes) to show content. In the example above, we only show the rating panel on the normal view or pages and blogposts (news articles).
I am trying to use the rate macro for multiple items in a table. The rating shows up fine, but the only one that can be rated is te first one. Is there a way to get all of them to be rated. This is like a table with several columns of categories that need to be rated against 3 differect columns. So I have about 36 fields to populate with ratings. Only the first one gets rated.
You need to use the "key" parameter if you have more than one rating on a page...
The rating gets stored against the key (the default key is the database ID of the page) - if you have several rate macros on a page and none of them specified their own key, they'll all store against the default key and thus all show the same results, etc. By adding a different key to each of them they'll store their results separately.
Hi,
there seems to be a small problem with the {rate} macro in IE7 when used with a {deck} macro.
When you move between cards the emoticons disappears and you can only view the small chart button.
It works fine in Firefox.
Not sure if this is a bug or if there's a way around this.
Thanks.
Just a small correction. The problem exists when the {rate} macro is used within the {deck} macro.
Is it possible to change the title= value in the dynamic theme?
I am currently working on a project where we need to use the Rate Macro. The version of confluence being used is v2.2.10. The Macro seems to bomb out. Is there a solution for this in place or is there a Rate Macro that is out there for this version of confluence and up? Any help will be greatly appreciated.
hi
im working in rate macro
in this once i voted i could not get the green arrow in the rate
but im getting the red undo.how can i vote for the second time
We're working on a new version of this plugin - should be released in a month or so. Bug fixes and new features
Hai Guy,
But even though i have upgraded(version1.1.6) my plugin version still i found the
issue.may i know what is the latest version.If the latest version is v1.1.6,
how can i overcome the issue.
With Regards,
Dhivya.M
The most recent version hasn't been released yet. It should be noted that the macro is designed to prevent (within reason) people from making multiple votes.
The documentation says that the delete button appears only if you have sufficient privileges to edit the content in which the macro is used. But in our testing all users have the delete button. Is this a bug?
Our users have recently noticed this as well and testing confirms it. We are using 1.1.7 of the Rate Plugin.
I am getting the following error:
Error formatting macro: rate: java.lang.NullPointerException
When using:
{rate:title=Interest Level}or:
{rate}Any thoughts???
update: I just realized that the macro is not available for version 2.6. Is there an ETA for this macro in the latest confluence version?
Hello,
This macro is very useful however I do not want users to be able to delete the ratings.
That would mess up the results and some users might try this function just to play with it.
Any way to do that ?
Thanks.
Hi.
I've set up a book club at my company. We're intent to use our Wiki as a way to review books of interest to the employees. I've set up a simple page which I'll place the code below. It's a live template. The template works well except for one conflict. As soon as I put the
{rate} macroalong with the{table-data} macrointo the form I get a very strange error. "TypeError: ${"heratbeatDiv").style has no properties"This only happens when I have the rate macro present within the form. Otherwise this works well.
I need to have each page created under this template be rated. It defeats the purpose of having these pages be created this way if it wont work. Could you please suggest any work-arounds or solutions that may be present.
My company is currently using Confluence 2.7.2, Enterprise Wiki
h3. {color:maroon}{text-data:BookTitle|width=500px}Book Title{text-data}{color}{hidden-data}Insert the formal book title here{hidden-data} h4. {hidden-data:whenEmpty=BookSubTitle}{text-data:BookSubTitle|width=500px}Book Sub-Title{text-data}{hidden-data}{hidden-data}Insert the book sub title here{hidden-data} ---- h5.{text-data:Author}Author(s){text-data} {rate} {hidden-data}add your best .jpg of the book cover here.{attachment-data:BookCover|width=100px}{hidden-data} h2. Links {table-data:BookLinks|intitialRows=3} || Source || Link Type || Link || | {text-data:Source|width=100px}Source Name{text-data} | {list-data:LinkTypes} {list-option:Buy}Purchase{list-option} {list-option:Rev}Review{list-option} {list-option:Edit}Editorial{list-option} {list-option:Misc}Miscellaneous{list-option} {list-data} | {text-data:Link|width=300px}Place http:// link here...{text-data} | {table-data} h2. Reviews Review from Amazon.com... {text-data:AmazonRev|width=800px|height=100px}Place text from favorite amazon.com Review here{text-data} Review from Alibris.com... {text-data:AlibrisRev|width=800px|height=100px}Place text from favorite alibris.com Review here{text-data} Review from Half.Ebay.com... {text-data:HalfRev|width=800px|height=100px}Place text from favorite half.ebay.com Review here{text-data}Any feedback will be much appreciated. Thank you.
How could I get an auto generated list of top rated articles?
This would be a great feature on the homepage of a space.
We're currently trying the Advanced Search plugin to do this. Not sure if it is going to work as advertised, but that's the approach we're trying. The syntax I'm trying is this:
{search-form:autoSubmit=true|hidden=true} {search-input:type=hidden|match=label|value=xyz} {search-submit:Search} {search-form} {search-results:showExcerpts=false|rateThreshold=0|maxResults=500|fields=rating,title,creation,author|sortField=rating|sortDir=desc}Will there be a new version of the Advanced Search plugin?
Can you tell me when it will become available?