Upgrade - nodebb-plugin-topic-ratings
-
Hello!
Please upgrade this plugin https://github.com/NodeBB/nodebb-plugin-topic-ratings for the NodeBB v3.0.0
I'm add this code in my theme:
https://github.com/NodeBB/nodebb-plugin-topic-ratings/blob/master/static/templates/partials/ratings.tplWhen I click on the rating button (star), the rating is not added and nothing happens.
-
I updated this plugin to work on 2.x and 3.x but someone else published it with the same name. https://www.npmjs.com/package/nodebb-plugin-topic-ratings
You can get the source code from here
https://github.com/NodeBB/nodebb-plugin-topic-ratings/commits/master -
-
-
Request for feat: Show topic rating for all users
In now the rating is visible only to the user who has rated the topic. Other users do not see this rating.For example, if user Alex set 5 stars, only Alex view this result in rating.
-
@brazzerstop Sounds like a bug, I will take a look.
-
@baris said in Upgrade - nodebb-plugin-topic-ratings:
show total rating to all users
use half stars for more accurate rating
show real rating on tooltip
show number of people who rated on tootlip
rewrite to async/awaitThanks for the cool innovations! Huge work!
-
@DownPW You need to modify
topics_list.tpl
in the harmony theme, or if you are using a custom theme you need to add to that. All you need to do is add<!-- IMPORT partials/ratings.tpl -->
to the location where you want the ratings to show up. -
@DownPW said in Upgrade - nodebb-plugin-topic-ratings:
Can I do it via an HTML widget?
You can use it via html widget, but need copy code of rating template: https://github.com/NodeBB/nodebb-plugin-topic-ratings/blob/master/templates/partials/ratings.tpl and paste in topic tpl.
-
here ?
/home/nodebb/nodebb/node_modules/nodebb-theme-harmony
The parameter remains after an upgrade?
I don't like to touch the system file too much. In general, I like that the plugin does it for me
-
OK Thanks @brazzerstop
And If I want it at the same place like baris screenshot and on recent and categories list ?
EDIT:
Edit this file to have in recent and categories list
/home/nodebb/nodebb/node_modules/nodebb-theme-harmony/templates/partials/topics_list.tpl
And add code like baris said here :
<!-- IMPORT partials/ratings.tpl -->
And add this css for fix display inline :
span.topic-ratings-stars.text-warning { margin-top: -4px !important; } span.topic-ratings-stars.text-primary{ margin-top: -4px !important; }
@baris :
But I wonder if the parameters remain in the TPL file after an update or if it has to be redone every time?
It would be great to be able to do all of this through the ACP or maybe define some pre-configured places to make this easier to set up
Frankly, it's not easy to understand at first and the readme is brief
-
@DownPW said in Upgrade - nodebb-plugin-topic-ratings:
recent and categories list
Then you need to do as Baris, add this
<!-- IMPORT partials/ratings.tpl -->
intopics_list.tpl
@baris said in Upgrade - nodebb-plugin-topic-ratings:
All you need to do is add <!-- IMPORT partials/ratings.tpl --> to the location where you want the ratings to show up.
@DownPW said in Upgrade - nodebb-plugin-topic-ratings:
here ?
/home/nodebb/nodebb/node_modules/nodebb-theme-harmony
Yes, after this line https://github.com/NodeBB/nodebb-theme-harmony/blob/main/templates/partials/topics_list.tpl#L61
-
I noticed the bug with the value in the average ranking, after 3 voices the average rating shows this value:
3.6666666666666665