Content Ratings

Content Ratings [Paid] 2.7.6

No permission to buy ($35.00)
Do you have any plans to add the criteria based on nodes? Like user has recieved at least X likes in node Y? I've this idea for a long time now :D

I don't know if this is possible (or if it's to special). It would be great if we could have experts per forum node (maybe as a widget in the sidebar or as something that shows up in the profile).

So if someone has the most helpful ratings in a forum node (maybe time based?) he's in expert in there.
 
This already exists.

You must enable the global "Show ratings on thread list " option, and then in style properties adjust the following settings as required;
  • "Sort Ratings in thread list" (default true)
  • "Limit Ratings in thread list" (default 1)

How do set the value to true?
 
Is this considered stable and (relatively) bug free for 2.1 now? Been waiting a long time to upgrade but looks like things might be ready?
 
@Xon, Is there a CLI importer/upgrader from the old version (1.1.8) for XF2?

In fact, any CLI commands that are applicable would be useful to have listed :-)
 
Last edited:
You can just install the add-on and upgrade as normal via the CLI.

As for CLI commands, there are some rebuild commands;
Code:
xf-rebuild:svcr-content-data          Rebuilds content rating data.
xf-rebuild:svcr-user-counts           Rebuilds user like and rating counts.Can result in count totals decreasing!
xf-rebuild:svcr-user-given-counts     Rebuilds user given like and rating counts.Can result in count totals decreasing!
 
Code:
php cmd.php xf-addon:upgrade SV/ContentRatings
Upgrading Content Ratings from 1.1.8 to 2.0.5...
Confirm upgrade? (y/n)y
Upgrading . . . . . . . . . . . . .
Complete.
XenForo 2.1.3
Importing phrases...
    Importing SV/ContentRatings...

    Imported SV/ContentRatings.

Phrases imported. (4.55s)

Importing admin navigation...
Admin navigation imported. (0.00s)

Importing admin permissions...
Admin permissions imported. (0.00s)

Importing advertising positions...
Advertising positions imported. (0.00s)

Importing API scopes...
API scopes imported. (0.00s)

Importing bb codes...
Bb codes imported. (0.00s)

Importing bb code media sites...
Bb code media sites imported. (0.00s)

Importing class extensions...
Class extensions imported. (0.00s)

Importing code events...
Code events imported. (0.00s)

Importing code event listeners...
Code event listeners imported. (0.00s)

Importing content types...
Content types imported. (0.00s)

Importing cron entries...
Cron entries imported. (0.00s)

Importing help pages...
Help pages imported. (0.00s)

Importing member stats...
Member stats imported. (0.00s)

Importing navigation...
Navigation imported. (0.00s)

Importing options...
Options imported. (0.00s)
Importing option groups...
Option groups imported. (0.00s)

Importing permissions...
Permissions imported. (0.00s)
Importing permission interface groups...
Permission interface groups imported. (0.00s)

Importing routes...
Routes imported. (0.00s)

Importing style properties...
    Importing SV/ContentRatings...

    Imported SV/ContentRatings.

Style properties imported. (0.39s)
Importing style property groups...
Style property groups imported. (0.00s)

Importing template modifications...
Template modifications imported. (0.00s)

Importing templates...
Templates imported. (0.00s)

Importing widget definitions...
Widget definitions imported. (0.00s)

Importing widget positions...
Widget positions imported. (0.00s)

Miscellaneous caches rebuilt.

All data imported. (5.17s)

Running clean up tasks...
Rebuilding... Permissions .

Rebuilding... Alerts (12025823)
Rebuilding... Alerts (12029464)
Rebuilding... Alerts (12033349)
Rebuilding... Alerts (12037365)
Rebuilding... Alerts (12040764)
Rebuilding... Alerts (12044533)
Rebuilding... Alerts (12048554)
Rebuilding... Alerts (12052417)
Rebuilding... Alerts (12055881)
Rebuilding... Alerts (12061473)
Rebuilding... Alerts (12064989)
Rebuilding... Alerts (12069486)
Rebuilding... Alerts (12073173)
Rebuilding... Alerts (12077013)
Rebuilding... Alerts (12080751)

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /home/sites/public_html/src/XF/Db/Mysqli/Statement.php on line 105

In Process.php line 434:

  The process has been signaled with signal "11".


xf:addon-upgrade [-f|--force] [--] <id>

Any ideas what went wrong?
 
My site's now giving this error:

Fatal error: Call to undefined method XF\Repository\Reaction::getReactionsAsEntities() in /home/sites/public_html/src/addons/SV/ContentRatings/Stats/Ratable.php on line 46
 
Code:
php cmd.php xf-addon:upgrade SV/ContentRatings
Upgrading Content Ratings from 1.1.8 to 2.0.5...
Confirm upgrade? (y/n)y
Upgrading . . . . . . . . . . . . .
Complete.
XenForo 2.1.3
Importing phrases...
    Importing SV/ContentRatings...

    Imported SV/ContentRatings.

Phrases imported. (4.55s)

Importing admin navigation...
Admin navigation imported. (0.00s)

Importing admin permissions...
Admin permissions imported. (0.00s)

Importing advertising positions...
Advertising positions imported. (0.00s)

Importing API scopes...
API scopes imported. (0.00s)

Importing bb codes...
Bb codes imported. (0.00s)

Importing bb code media sites...
Bb code media sites imported. (0.00s)

Importing class extensions...
Class extensions imported. (0.00s)

Importing code events...
Code events imported. (0.00s)

Importing code event listeners...
Code event listeners imported. (0.00s)

Importing content types...
Content types imported. (0.00s)

Importing cron entries...
Cron entries imported. (0.00s)

Importing help pages...
Help pages imported. (0.00s)

Importing member stats...
Member stats imported. (0.00s)

Importing navigation...
Navigation imported. (0.00s)

Importing options...
Options imported. (0.00s)
Importing option groups...
Option groups imported. (0.00s)

Importing permissions...
Permissions imported. (0.00s)
Importing permission interface groups...
Permission interface groups imported. (0.00s)

Importing routes...
Routes imported. (0.00s)

Importing style properties...
    Importing SV/ContentRatings...

    Imported SV/ContentRatings.

Style properties imported. (0.39s)
Importing style property groups...
Style property groups imported. (0.00s)

Importing template modifications...
Template modifications imported. (0.00s)

Importing templates...
Templates imported. (0.00s)

Importing widget definitions...
Widget definitions imported. (0.00s)

Importing widget positions...
Widget positions imported. (0.00s)

Miscellaneous caches rebuilt.

All data imported. (5.17s)

Running clean up tasks...
Rebuilding... Permissions .

Rebuilding... Alerts (12025823)
Rebuilding... Alerts (12029464)
Rebuilding... Alerts (12033349)
Rebuilding... Alerts (12037365)
Rebuilding... Alerts (12040764)
Rebuilding... Alerts (12044533)
Rebuilding... Alerts (12048554)
Rebuilding... Alerts (12052417)
Rebuilding... Alerts (12055881)
Rebuilding... Alerts (12061473)
Rebuilding... Alerts (12064989)
Rebuilding... Alerts (12069486)
Rebuilding... Alerts (12073173)
Rebuilding... Alerts (12077013)
Rebuilding... Alerts (12080751)

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /home/sites/public_html/src/XF/Db/Mysqli/Statement.php on line 105

In Process.php line 434:

  The process has been signaled with signal "11".


xf:addon-upgrade [-f|--force] [--] <id>

Any ideas what went wrong?
It needs to load a large number of alerts, while the memory should be released per iteration it may be loading them fast enough the memory limit isn't high enough. Try increasing it to 512mb or more and run the updat again.

My site's now giving this error:

Fatal error: Call to undefined method XF\Repository\Reaction::getReactionsAsEntities() in /home/sites/public_html/src/addons/SV/ContentRatings/Stats/Ratable.php on line 46
Make sure all the files are uploaded. You may get some errors during & immediately after the upload due to php caching.

Things may be a little wonky if the update rollback some.
 
Make sure all the files are uploaded. You may get some errors during & immediately after the upload due to php caching.

Things may be a little wonky if the update rollback some.

All the files aree definitely uploaded.

I still get that error and have to disable the addon from the command line to get access to the ACP.

Something weird is happening as although the addon is disabled, it doesn't seem to be actually disabled and I see the ratings on posts and can rate them.
 
If you do a rebuild of the add-on, and then disable the add-on; things should get back into a working shape. You'll need to then run the upgrade process again if you can, or kick off the rebuild operations manually.

I've complained about some of the design choices that XF2 has made with respect to add-ons, but I thought I work-around the edge cases :(
 
Could you run me through that step by step (with the correct commands?)

I thought I'd already tried that but maybe I missed a step.
 
Also how long should rebuilding the user given reaction counts take?

It's been running on the command line for a few hours now and doesn't seem to have gotten very far!
Rebuilding... User given reaction counts (3599)
 
So it's still going 6 hours later and assumuming it has to do every user, it's going to take overnight.

Is there a way to run cmd.php wth mutiple processors or anything that'd speed it up?
 
Could you run me through that step by step (with the correct commands?)

I thought I'd already tried that but maybe I missed a step.
Somthing like;
Code:
php cmd.php -v xf-addon:rebuild SV/ContentRatings
php cmd.php -v xf-addon:disable SV/ContentRatings

Then to upgrade via the CLI;
Code:
php cmd.php -v xf-addon:enable SV/ContentRatings
php cmd.php -v xf-addon:upgrade SV/ContentRatings

Also how long should rebuilding the user given reaction counts take?

It's been running on the command line for a few hours now and doesn't seem to have gotten very far!
Rebuilding... User given reaction counts (3599)
It shouldn't take that long. It is faster via CLI but hard to switch once the browser is doing stuff :(

So it's still going 6 hours later and assumuming it has to do every user, it's going to take overnight.

Is there a way to run cmd.php wth mutiple processors or anything that'd speed it up?
No sorry :( Doing it via the browser definitely slows things down massively
 
I'm doing it via the CLI and it's been going all day, it's currently at:

Rebuilding... User given reaction counts (17050)

Assuming that number is users, we have ab out 25,000.
 
Top Bottom