Topic Ratings Plugin

Thanks @angus . Just tried it and worked fine. Thanka again!

1 Like

These buttons are disappearing when activating the plugin:

image

My app.yml
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/paviliondev/discourse-ratings.git

Just installed discourse yesterday

Sir , I have installed 2.4.0.beta4 vesion of Discourse. I have installed two plugins discourse-rating (https://github.com/paviliondev/discourse-ratings) and discourse-topic-preview (https://github.com/angusmcleod/discourse-topic-previews) . we have developed post badge plugin. all these plugins working fine in v2.4.0.beta2 +342 version. but not in .4.0.beta4 vesion. Kindly look into this issues. if you want any more info then let me know

Hey, @Mahesh_Tirthakar Please file a full bug report here: Bug Report

i have installed rating plugin in discourse development which is 2.4.0.beta5 but in docker discourse version it is not working ???

./launcher rebuild app

after rebuilding the docker discourse instance it is working. thanks.

2 Likes

Rating Shows before the Username in Mobile view
image

How to sort the topics in home page by rating?

aggregateRating Show on Thread when view-source and Google errors

<div itemscope itemtype="http://schema.org/CreativeWork">
  <span itemprop="name">TITLE</span>
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <span itemprop="ratingValue"></span>
    <span itemprop="ratingCount">0</span>
  </div>
</div>

Category is disable Rating.

When check element is aggregateRating empty. How to remove when view-source

2 Likes

Do you think it’s time to move on : CreativeWorkSeries @angus

{
    "@context": "https://schema.org/",
    "@type": "CreativeWorkSeries",
    "name": "[title]",
    "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "[score]",
        "bestRating": "[best]",
        "ratingCount": "[count]"
    }
}
2 Likes

@Bcat Thanks for the note. I’ll take a look at it later in the week.

1 Like

Hello,

I just installed this package and restarted several times, but I do not see the option to enable ratings under category settings. Any idea what could be wrong? I checked the plugin settings and ratings are enabled there. I’m not using tagging right now - just want to turn this on for certain categories.

Thanks for your help.

Nevermind, I found it. The setting appears under “Category Lockdown” which is a different plugin I have installed, which is why I didn’t see it (see image below). I guess this plugin doesn’t create its own header for controls under the settings tab.

3 Likes
<% if @topic_view.topic.average_rating != "" %>
<div itemscope itemtype="http://schema.org/CreativeWorkSeries">
  <span itemprop="name"><%= @topic_view.topic.title %></span>
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <span itemprop="ratingValue"><%= @topic_view.topic.average_rating %></span>
    <meta itemprop="bestRating" content="5"/>
    <span itemprop="ratingCount"><%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %></span>
  </div>
</div>
<% end %>

How to use if @topic_view.topic.average_rating != “” For show/Hide this code?


solve

<% if @topic_view.topic.average_rating && @topic_view.topic.posts.count %>
<div itemscope itemtype="http://schema.org/CreativeWorkSeries">
  <span itemprop="name"><%= @topic_view.topic.title %></span>
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <span itemprop="ratingValue"><%= @topic_view.topic.average_rating %></span>
    <meta itemprop="bestRating" content="5"/> 
    <span itemprop="ratingCount"><%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %></span>
  </div>
</div>
<% end %>

OK, all users of Topic Ratings, please take note below.

How to safely update when using our plugins:

Pavilion’s update schedule

Topic Ratings is one of the Pavilion family of open source plugins.

Going forward, Pavilion will focus on ensuring compatibility of a core set of its plugins with Discourse Core tests-passed branch during the first 5 days of every month only.

Any bugs which arise because of an incompatibility will be addressed asap during this ‘supported period’, preferably by the 7th day. Low severity or Beta feature bugs may not be addressed by this date, but obvious things which are ‘breaking’ a forum should be resolved.

This new policy will come into effect 1st May 2020

Why we are introducing this policy

We have no control over changes in Discourse core. That is how it should be. However, as our plugins have grown and become more sophisticated, it is getting more and more burdensome to guarantee they are working with every update of Discourse. It’s becoming untenable to ensure immediate compatibility is maintained.

To give our developers breathing room so they can attend to other priorities in addition to plugin support we will no longer be guaranteeing compatibility with Discourse every day of the month.

This policy should also help you achieve more stability and give you more certainty over when you can more safely update.

How to perform your update

Aim to update your Production Discourse instance (both Discourse core and our plugins) in the first 5 days of every month. Notify us on the relevant Plugin Topic on Meta of any issues you encounter. You will get more focussed support from the Pavilion team on any issues with their plugins during this period.

You update your Production server outside of the first 5 days of the month at your own risk. If you do so and something breaks related to one of our plugins, we urge you to report it and in addition, and if appropriate, uninstall our plugin until it is resolved. Unfortunately we may not get around to fixing it until the next supported period at the beginning of the following month.

For even greater safety

Consider testing your update on your own staging server built from a back-up of your production site. This is especially important if your site is large, popular and/or part of a business.

You can switch this server off for the rest of the month so you don’t get charged for up-time. Use this opportunity to test out all basic functionality to identify any issues with plugins. Report all critical and high issues asap on the relevant plugin topic.

Using a staging site may allow you to have more discretion over when you update, but be aware of the relative lack of support in the latter part of the month.

Thanks for your understanding!

2 Likes

I’m not sure if the bug has been reported.

You can rate more than one time (related to can_rate), if a topic is loaded and your post with the rating is not included in that initial load.

It will work (can_rate to false) once the post with rating is loaded.

It’s quite problematic. What you said as comment there might be the reason
https://github.com/paviliondev/discourse-ratings/blob/b0afbde2f76740b0ffe1e54ff4a65daabde82497/lib/ratings_helper.rb#L65

Is it possible to fix please?

2 Likes

Guys, we just pushed a new feature Multiple Ratings into master. Now you can rate a topic based on multiple criteria. Its a complete overhaul of the existing plugin. Please have a look at this guide for how to migrate your existing data to the new structure.

We suggest you take a backup before upgrading just to be extra careful.

We’ll look forward to your feedback.

5 Likes

Thanks for reporting the issue. We have almost completely revamped the plugin. Could you on the latest version whether you get this issue or not?

Is there some condition the checkbox to allow ratings to appear in the category settings?
After upgrading, I can’t see it anymore.

It’s a Discourse for testing stuff, and there are currently ratings enabled on ‘Uncategorized’ category.
Even though I can see the ratings, the option still doesn’t have appear in this category. Nor on a new category. All settings are enabled.

Also, another issue on Ratings tab. I removed the first category with None ; but it doesn’t seem possible to put it back. Also, not possible to Add Uncategorized with None.

1 Like

Yes you need to do a few things mentioned in the documention link above.

1 Like