Content Ratings

Content Ratings [Paid] 2.8.5

No permission to buy ($35.00)
Update to xenforo 2.0.2 caused many of these, is that to be expected?

Code:
    Error: Call to undefined method SV\ContentRatings\XF\Template\Templater::setJsBaseUrl() src/XF/App.php:1451

    Generated by: Unknown account Feb 2, 2018 at 11:23 AM

Stack trace

#0 src/XF/App.php(1082): XF\App->setupTemplaterObject(Object(XF\Container), 'SV\\ContentRatin...')
#1 src/XF/Container.php(28): XF\App->XF\{closure}(Object(XF\Container))
#2 src/XF/App.php(2650): XF\Container->offsetGet('templater')
#3 src/XF/Pub/App.php(348): XF\App->templater()
#4 src/XF/Mvc/Dispatcher.php(280): XF\Pub\App->preRender(Object(XF\Mvc\Reply\Message), 'html')
#5 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\Message), 'html')
#6 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#7 src/XF.php(328): XF\App->run()
#8 index.php(13): XF::runApp('XF\\Pub\\App')
#9 {main}

Request state

array(4) {
  ["url"] => string(41) "/threads/see-you-in-amsterdam.5382/page-2"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
@Mr Lucky try reuploading the files, the new method setJsBaseUrl isn't being found. My add-on showing up in the error message is a false positive.

That said; there is an XF2.0.2 glitch:
1517572736761.webp

Working on isolating why it is happening.
 
Hey Xon, thanks for this add on, it's really good. I've got a request which I hope might make it into a future build: would it be possible to have the ratings display inline on large screens and in a tool tip if a small screen is detected? We use a lot of ratings on my board and mobile users wind up with multiple lines of ratings on screen sometimes.
 
Hey Xon, thanks for this add on, it's really good. I've got a request which I hope might make it into a future build: would it be possible to have the ratings display inline on large screens and in a tool tip if a small screen is detected? We use a lot of ratings on my board and mobile users wind up with multiple lines of ratings on screen sometimes.
This would be doable with css media queries to show/hide based on screen size, but the logistical challenge is how to display this option and to wire up so it renders the menu multiple times.

I'll add it to the to-do list to see if there is a decent solution.
 
Not sure if this is a bug in the importer but it's a bit weird

Step 4 of 4: Ratings - [25,486] 48.06%
Step 4 of 4: Ratings - [27,214] 48.13%
Step 4 of 4: Ratings - [36,121] 48.43%
Step 4 of 4: Ratings - [50,295] 48.85%

Edit: Step 4 of 4: Ratings - [1,398,488] 68.85%

The % value is going up by tiny amounts while the ratings count is going up by thousands. The first 47% or so did the first 20,000 ratings. The next 5,000 ratings only moved it on 1%. The next 10,000 ratings only moved it on about 0.3%.

It seems like the % counter is bugged?
 
Last edited:
Not sure if this is a bug in the importer but it's a bit weird

Step 4 of 4: Ratings - [25,486] 48.06%
Step 4 of 4: Ratings - [27,214] 48.13%
Step 4 of 4: Ratings - [36,121] 48.43%
Step 4 of 4: Ratings - [50,295] 48.85%

Edit: Step 4 of 4: Ratings - [1,398,488] 68.85%

The % value is going up by tiny amounts while the ratings count is going up by thousands. The first 47% or so did the first 20,000 ratings. The next 5,000 ratings only moved it on 1%. The next 10,000 ratings only moved it on about 0.3%.

It seems like the % counter is bugged?
You likely have a huge number of ratings that need importing. If you run select count(*) from dark_postrating, you can get a count, my website has 11 million ratings it will needs to import, thousands at a time isn't going to move the % counter much.

Also what css controls the spacing between ratings in the ratings bar?
The "Rating bar rating item" style property. Or look for .xf-svRatingBarRatingItem in sv_contentratings.less

Can the totals for each category be displayed?

i.e. totals next to "Positive", etc.

View attachment 168131
Yup, easy.
 
Sorry I think you misunderstand.

Yep I have like 5 million ratings. 25,000 is not 48% of 5 million. The % counter does not reflect the progress. I assume it’s meant to?
 
Another styling tweak suggestion. At present it looks like this on mobile:


Screen Shot 2018-02-04 at 11.26.11.webp

Post Ratings looks like this:

Screen Shot 2018-02-04 at 11.28.05.webp

A combination of the two would seem to be the best solution. To keep the ratings full width and to out any current ratings above them like Post Ratings does (but without the text).
 
Ratings imported successfully overnight (8.5 hours but using the browser-based importer)

However, I seem to have lost some a small number of Likes. All the other ratings match up perfectly.
 
Sorry I think you misunderstand.

Yep I have like 5 million ratings. 25,000 is not 48% of 5 million. The % counter does not reflect the progress. I assume it’s meant to?
I'ld need to double check, but mechanically the imported actually visits each post and then imports all the ratings on that post.

Another styling tweak suggestion. At present it looks like this on mobile:


View attachment 168161

Post Ratings looks like this:

View attachment 168162

A combination of the two would seem to be the best solution. To keep the ratings full width and to out any current ratings above them like Post Ratings does (but without the text).
I believe this can be done with some media queries & changing from flex layout to block layout. Will require some tinkering.

Ratings imported successfully overnight (8.5 hours but using the browser-based importer)

However, I seem to have lost some a small number of Likes. All the other ratings match up perfectly.
It is possible there was some hard deleted posts which where not kept resulting in some likes being removed, this is expected and what the ratings importer from Post Rating is designed to minimize.
 
Thanks for the excellent support!

If the import is counting progress through posts and not likes that maybe makes sense. I don't think it's that big a deal, as long as it's not pointing to anything else going wrong.

Also I assume the command line importer is far faster?
 
  • Like
Reactions: Xon
Thanks for the excellent support!
Thanks :) Please leave a review if you have the time then!

If the import is counting progress through posts and not likes that maybe makes sense. I don't think it's that big a deal, as long as it's not pointing to anything else going wrong.
I've made some adjustments for the next version, but that doesn't really help you.

Most of the time, I've tracked these down to the content being hard deleted so when it recounts ratings your count goes down a bit.

Also I assume the command line importer is far faster?
Significantly, it doesn't need to startup XF2 for each request meaning it is about 10-20% faster.
 
Xon updated Content Ratings for XF2 with a new update entry:

1.0.3 - Minor feature update & bugfixes

  • Add 'Rating Category Summary' style property
    • On a user's rating summary page, show totals for given/received count on a category.
  • Add 'Rating Category Collapsible' style property
    • On a user's rating summary page, clicking on a rating category will collapse or expand it.
  • Support showing the first post ratings in the thread list
    • global option to enable support (default disabled)
    • sort from higest to lowest (default true)
    • Show...

Read the rest of this update entry...
 
Back
Top Bottom