Rate Macro

Name Rate Macro
Vendor Adaptavist.com Ltd (Website)
Authors Dan Hardiker, Alain Moran, Jonathan Nolen
Homepage http://confluence.atlassian.com/display/CONFEXT/Rate+Macro
Issue Management http://jira.adaptavist.com/browse/Rate
Categories Content Macros
Version 2.0.2
Availability Confluence v2.7 to v2.9-m5
State Stable
Support Unsupported Plugins
License Freeware / Open Source (BSD)
Price Donate
Release Docs http://confluence.atlassian.com/display/CODEGESIT/Rate+Macro
Java API Docs n/a
Download Source http://svn.atlassian.com/svn/public/contrib/confluence/rate-plugin/tags/2.0.2/
Download JAR adaptavist-plugin-rate-2.0.2.jar

Thanks also to people who helped with ideas and testing including David Peterson, Mike Cannon-Brookes, Jens Schumacher, Jonathan Nolen

Description/Features

A set of macros for collecting and displaying page ratings. It has the following notable features:

  • Cookie based to detect if someone has voted before (not supposed to prevent duplicate votings)
  • Fully AJAXed
  • Multiple {rate}'s per Page (or other ContentEntityObject) through alphanumeric keys, with the default being the CEO's id.
  • Configurable title
  • Themable! You can change the configuration and graphic files used through a "theme" parameter. There are two bundled themes: builder [default] and dynamic.
  • A "Results only" view which will only render the results view of the macro
  • Results preview ability for those who have not voted (and the ability to go back to the voting screen)
  • Unvoting ability for the already voted
  • Clear ability to remove all the votes recorded (resets cookies too) - this functionality is given to those who can edit the current page (or are a global / space administrator)

A {rate-table} macro for rendering information in tabular form, which has the following notable features:

  • Default mode of rendering the default key of the current page CEO
  • Ability to specify a different CEO to use (you must know the CEO's id)
  • Ability to specify multiple keys to render
  • Chart Plugin compatable!
  • Switches to hide the rating breakdown, and overall rating.

A {rate-report} macro also exists, but is currently unwired due to the possible abuse it could have. This would have contained the following functionality:

  • Velocity template with a RateHelper class to access data
  • Ability to retrieve and process information in an entirely custom manner

As it was seen that the {rate-table} performed the majority of the functions that this macro could be used for, it was decided to discontinue this macro. If you disagree and believe that this macro is worth supporting, then please speak up!

Requirements

none at this time

Installation

Install using the plugin repository

Tested Environments

Version 1.0

Confluence v2.0 RC2

Version 1.1

Confluence v2.1.2

Documentation

The macros in this plugin are documented (with examples and related links) in the Builder User Guide:

  • rate - A content rating macro
  • rate-table - A tabular rating result display macro

Many of the macros also have accompanying documentation in the Wiki Notation Guide.

Version History

Version Comments Author
1.0
  • Initial release
Adaptavist.com
1.1
  • Confluence v2.1 compatability
Adaptavist.com

Known Issues

  • A selection box that covers from the selected icon to the left of the screen appears when voting - most visible during a prolonged click.

Future Development

We currently have no plans for this plugin to progress any further - if you have anything you wish to see performed to this plugin, please add them here.

Screenshots

Here's a few screen grabs of some of the macros in action...

Labels

confluence20 confluence20 Delete
confluence21 confluence21 Delete
plugin plugin Delete
macro macro Delete
repository_current repository_current Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jan 26, 2006

    Ben Naftzger says:

    It would be nice if you could also have a page level rating that is restricted s...

    It would be nice if you could also have a page level rating - that is restricted strictly to a single rating per page. This would allow each page to have a 'page rating'. Having multiple ratings on a page is more inclined to content/snippet rating. As part of page ratings, it would be excellent to list out all of the pages of a certain rating (e.g. all pages rated 4: ....) or list out all rated pages, sorted by rate (rated 1 pages: ... , rated 2 pages: ... , rated 3 pages: .... , etc.).

    1. Jan 26, 2006

      Guy Fraser says:

      If you don't specify the "key" parameter, it defaults to the content id for the ...

      If you don't specify the "key" parameter, it defaults to the content id for the CEO on which the rate macro is used. We're hoping to eventually find support in other macros for pages using the default rating so that lists of pages can be ordered by rating, etc.

  2. Jan 31, 2006

    jenneke godschalk says:

    Ik can't download this macro. The linked page is not working: "The requeste...

    Ik can't download this macro. The linked page is not working: "The requested resource cannot be found"

    Is there any alternative way to donwload this macro?

     

    1. Jan 31, 2006

      Dan Hardiker says:

      I have updated the links which now work. We will try to avoid linking through fi...

      I have updated the links which now work. We will try to avoid linking through fish eye in future.

  3. Mar 04, 2006

    Ben Naftzger says:

    FYI: the page rating feature request can be found here:

    FYI: the page rating feature request can be found here: http://jira.atlassian.com/browse/CONF-5640

    1. Mar 04, 2006

      Guy Fraser says:

      This is already implemented simply place the rate panel on a page without a "key...

      This is already implemented - simply place the rate panel on a page without a "key" and it will store the rating under the CEO ID. We're hoping to upgrade various macros to allow sorting on this so you could show children, pagetree, incoming links, etc., ordered by rating.

      1. Mar 12

        Thom W Gray says:

        Have the "various macros" you were thinking about here been updated so that the ...

        Have the "various macros" you were thinking about here been updated so that the rating for child pages can be shown on a parent page? If so, what is the approach one should use on the parent page?

  4. Aug 13, 2006

    Rajendra says:

    I think we can not install this macro using Repository client; but it does have ...

    I think we can not install this macro using Repository client; but it does have label "repository_current". Is that suppose to mean something different ?

    thanks,
    Rajendra

    1. Aug 13, 2006

      Dan Hardiker says:

      This plugin is marked as "alpha" state, and I'm guessing you are filtering out p...

      This plugin is marked as "alpha" state, and I'm guessing you are filtering out plugins that are below a later state. You can use the Admin tab in the Confluence Repository Client to change the threshold to something more inclusive.

      1. Aug 14, 2006

        Guy Fraser says:

        @Dan: We should probably move this to stable state as as far as I am aware there...

        @Dan: We should probably move this to stable state as as far as I am aware there are no important bugs with this plugin.

  5. Sep 28, 2006

    Bhavin Turakhia says:

    i just installed this  plugin thru the confluence repository client and it ...

    i just installed this  plugin thru the confluence repository client and it says installed. but typing

    Unknown macro: {rate}
    into a page gives me "unknown macro" error

    1. Sep 29, 2006

      Dan Hardiker says:

      Can you confirm that the plugin is shown as installed and enabled in the Plugin ...

      Can you confirm that the plugin is shown as installed and enabled in the Plugin Manager please? Also can you check the logs for any exceptions.

      1. Oct 02, 2006

        Bhavin Turakhia says:

        i just checked and i see funny behaviour. the plugin is NOT installed. i clicked...

        i just checked and i see funny behaviour. the plugin is NOT installed. i clicked on the "install" link in the confluence repository client, it says successfully installed rate plugin 1.1. but nevertheless the plugin continues to display the "Install" link.

        i even checked WEB-INF/lib and the jar file is there. but the plugin is not showing as installed

      2. Oct 02, 2006

        Bhavin Turakhia says:

        ok ... i managed to install the plugin now .... and its working :)

        ok ... i managed to install the plugin now .... and its working

  6. Oct 02, 2006

    Bhavin Turakhia says:

    is there a way to get a list of toprated articles in a space etc? this macro wou...

    is there a way to get a list of top-rated articles in a space etc? this macro would be very useful if we could do that.

    for instance we have a library of articles in a space. every article has a "rating" at the bottom. if i want to create a section that says - Top 10 articles by rating. can i pull that out in some fashion?

    1. Oct 02, 2006

      Guy Fraser says:

      Use the Advanced Search Plugin and include the rating column and set sort order ...

      Use the Advanced Search Plugin and include the rating column and set sort order on that column to descending.

      1. Nov 12, 2007

        Amit says:

        Hello Guy Could you post an example of example code for this combination. My req...

        Hello Guy

        Could you post an example of example code for this combination. My requirement is simply to display the top 5 pages rated in the current space.

        Amit 

  7. Nov 01, 2006

    Shameem says:

    Hi, I am using rate macro as one cell inside a scaffold table. Now for...

    Hi,

    I am using rate macro as one cell inside a scaffold table. Now for each row of the table I should have different 'key' value in rate macro so that I could get distinguished rating for each row content. For e.g.:

    My first row has one cell as :- rate:title=Title|key=someKey1

    Second row has:- rate:title=Title|key=someKey2 & so on.......

    Is there any way by which I can dynamically generate the 'key' so as to have a unique key for each of the rate macros in my table?

    1. Nov 02, 2006

      Dan Hardiker says:

      The rate macro was not designed for this sort of use there is no way to generate...

      The rate macro was not designed for this sort of use - there is no way to generate a unique appendage, and that appendage would be best injected by the scaffolding (specifically the boilerplate) stuff.

  8. Nov 14, 2006

    Paul Carruthers says:

    Just installed the rate macro...the graphics don't show up. I just have a blank ...

    Just installed the rate macro...the graphics don't show up. I just have a blank box with the title. I can click on the box to vote, but without the graphics it's kinda hard .

    Any ideas? Here's the pic...

    1. Nov 14, 2006

      Guy Fraser says:

      Check you have the Base URL correctly configured in Admin Console > General Conf...

      Check you have the Base URL correctly configured in Admin Console > General Config

      1. Nov 14, 2006

        Paul Carruthers says:

        That's got it. Thanks\!

        That's got it. Thanks!

    2. Nov 14, 2006

      Dan Hardiker says:

      I've just installed the latest Rating plugin from the repository into a clean 2....

      I've just installed the latest Rating plugin from the repository into a clean 2.2.9-std, and it worked as expected.

      Do you have any other configuration in your environment?

  9. Feb 02, 2007

    mhowitt says:

    I'm having trouble installing the Rate Macro. I have a 2.3 install of Confluence...

    I'm having trouble installing the Rate Macro. I have a 2.3 install of Confluence. When I click the button Install for the Rate Macro in the Plugin Repository it says:

    Expected plugin key [com.adaptavist.confluence.rate] and got [adaptavist.confluence.rate] from: http://svn.atlassian.com/svn/public/contrib/confluence/rate-plugin/trunk/dist/adaptavist-plugin-rate-1.1.1.jar

    Please advise. 

    1. Feb 02, 2007

      Alain Moran says:

      After a quick peruse of the source I think I see what's wrong, however the rate ...

      After a quick peruse of the source I think I see what's wrong, however the rate macro wont currently work with confluence 2.3 anyway. I guess that's a problem with the repository metadata being too 'relaxed' and allowing it to be installed against 2.3 before it's been upgraded.

      1. Feb 02, 2007

        Guy Fraser says:

        When you go in to make it conf 2.3 compatible, please ensure all the links outpu...

        When you go in to make it conf 2.3 compatible, please ensure all the links output by the rate macro have a "nofollow" on them to stop Google spidering them (15GB of log files due to exceptions caused by that)

        1. Feb 04, 2007

          Alain Moran says:

          The rate macro has now been ported to confluence 2.3, nofollow links added, and ...

          The rate macro has now been ported to confluence 2.3, nofollow links added, and resolved issues with the image path that was preventing the images display correctly on some installations.

  10. Feb 12, 2007

    Kelly Heese says:

    When I try to install the rate plugin using the Plugin Repository (in v229), I g...

    When I try to install the rate plugin using the Plugin Repository (in v229), I get:

    The following error(s) occurred:

    Any ideas? Is this supposed to work with v229?

    1. Feb 12, 2007

      Alain Moran says:

      Ah ... moving the rate macro source over to using maven2 has resulted in the key...

      Ah ... moving the rate macro source over to using maven2 has resulted in the key changing to com.adaptavist.confluence.rate, however the old jar files contain the now deprecated adaptavist.confluence.rate.

      After discussion with Dan I have added an 'aka' identifier to the metadata which should allow the repository to understand both keys.

      1. Feb 13, 2007

        Kelly Heese says:

        Thanks Alain It installed fine from the repository.

        Thanks Alain - It installed fine from the repository.

        1. Mar 09, 2007

          Jeff Guthrie says:

          Kelly I get your exact same error when I try to install the plugin through the r...

          Kelly I get your exact same error when I try to install the plugin through the repository client. What did you do differently? Thanks! (v2.2.9)

          1. Mar 12, 2007

            Alain Moran says:

            you can download the jar file from

            you can download the jar file from http://svn.atlassian.com/svn/public/contrib/confluence/rate-plugin/jars/adaptavist-plugin-rate-1.1.1.jar and install it manually in the normal way

  11. Feb 13, 2007

    Kelly Heese says:

    After installing latest version of the RATE macro in Confluence v229, I'm gettin...

    After installing latest version of the RATE macro in Confluence v229, I'm getting:

    Error formatting macro: rate: java.lang.NullPointerException

    Please advise.

    1. Feb 15, 2007

      Alain Moran says:

      This may be related to a problem with the repository metadata, please retrym if ...

      This may be related to a problem with the repository metadata, please re-trym if that does not work, please post some more detail about the exception you are seeing

      1. Feb 15, 2007

        Kelly Heese says:

        In trying to fix the java null pointer exception, I just uninstalled the rate ma...

        In trying to fix the java null pointer exception, I just uninstalled the rate macro. Now when I reinstall it (from the repository) – I get the same error message as before:

        The following error(s) occurred: