Content Ratings

Content Ratings [Paid] 2.7.6

No permission to buy ($35.00)
There's a huge amount of customisation in this version, it's really quite amazing.

The one thing I may keep this for vs the stock implementation is the tap to show menu on mobile, instead of long press. I still have issues with long press and the stock implementation on XF2. It doesn't always seem to work for me because I end up inadvertently activating peek and pop, which is a bit annoying, and then I end up having to undo and redo reactions.
 
  • Like
Reactions: Xon
i'm a little confused as to why anyone would still need this on 2.1? isn't the functionality being built in to the core?
Most of the features for this add-on will be released as Reactions/Ratings Essentials for the XF2.0 version as this version has significant more customisation ability, and configuration options around who can use a rating. It also has a framework for triggering actions once some content is rated a sufficient amount.
 
Most of the features for this add-on will be released as Reactions/Ratings Essentials for the XF2.0 version as this version has significant more customisation ability, and configuration options around who can use a rating. It also has a framework for triggering actions once some content is rated a sufficient amount.
of course, its all but mandatory in 2.0. but i'm curious how this would interact with 2.1? can you turn off the built-in system and use this instead? can they work along side each other?
 
of course, its all but mandatory in 2.0. but i'm curious how this would interact with 2.1? can you turn off the built-in system and use this instead? can they work along side each other?
The current system is built on-top of Likes, XF2.1 Reactions are likes with some renames and a bit of extra meta-data. Yes, some bits change but I should be able to adapt Content Rating to it reasonably easily.

UI wise I'll likely keep my solution (with optional 'use xf ui' option), but I haven't yet dived into the back-end integration. It may be possible to have the one add-on work on both XF2.0 and XF2.1 if possible as this saves support work and reduces confusion.
 
The current system is built on-top of Likes, XF2.1 Reactions are likes with some renames and a bit of extra meta-data. Yes, some bits change but I should be able to adapt Content Rating to it reasonably easily.

UI wise I'll likely keep my solution (with optional 'use xf ui' option), but I haven't yet dived into the back-end integration. It may be possible to have the one add-on work on both XF2.0 and XF2.1 if possible as this saves support work and reduces confusion.
make it easy. Aur make the tutorial for your ratings. I didn't set up till now.
 
I just updated to Content Rating 1.3.7, and it broke the main page of the admin CP after I uploaded the files, and after I ran the upgrade, the main error went away, but now there are a bunch of logged server errors:
188974
188975
 
The stats error is not unexpected. Can you post one of each of the post macro ones?

Otherwise you can clear your error log and see if it happens in the future, upgrading can always cause things like that
 
Here is one of the macro ones
Server error log
  • XF\Db\Exception: Macro public:sv_contentratings_macros :: rating_summary() error: MySQL statement prepare error [1146]: Table 'xenforo.xf_reaction_sv_ratings' doesn't exist
  • src/XF/Db/AbstractStatement.php:212
  • Generated by: CarpCharacin
  • Nov 24, 2018 at 10:28 PM
Stack trace
SELECT xf_reaction_sv_ratings.*
FROM xf_reaction_sv_ratings

WHERE (`xf_reaction_sv_ratings`.`reaction_id` = 2)


LIMIT 1
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1146, '42S02')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1146, '42S02')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Mvc/Entity/Finder.php(1130): XF\Db\AbstractAdapter->query('\r\n\t\t\tSELECT `xf...')
#5 src/XF/Mvc/Entity/Manager.php(359): XF\Mvc\Entity\Finder->fetchOne()
#6 src/XF/Mvc/Entity/Entity.php(373): XF\Mvc\Entity\Manager->getRelation(Array, Object(SV\ContentRatings\Entity\RatingType))
#7 src/XF/Mvc/Entity/Entity.php(171): XF\Mvc\Entity\Entity->getRelation('SvExtra')
#8 src/XF/Mvc/Entity/Entity.php(95): XF\Mvc\Entity\Entity->get('SvExtra')
#9 src/addons/SV/ContentRatings/Entity/RatingType.php(87): XF\Mvc\Entity\Entity->__get('SvExtra')
#10 src/XF/Mvc/Entity/Entity.php(142): SV\ContentRatings\Entity\RatingType->getRatingTypeCategoryId()
#11 src/XF/Mvc/Entity/Entity.php(95): XF\Mvc\Entity\Entity->get('rating_type_cat...')
#12 src/addons/SV/ContentRatings/Entity/Ratable.php(439): XF\Mvc\Entity\Entity->__get('rating_type_cat...')
#13 src/XF/Mvc/Entity/Entity.php(142): SV\ContentRatings\XF\Entity\User->getSvCategorizedRatings()
#14 src/XF/Mvc/Entity/Entity.php(100): XF\Mvc\Entity\Entity->get('sv_categorized_...')
#15 internal_data/code_cache/templates/l1/s11/public/sv_contentratings_macros.php(775): XF\Mvc\Entity\Entity->offsetGet('sv_categorized_...')
#16 src/XF/Template/Templater.php(663): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array, Array)
#17 internal_data/code_cache/templates/l1/s11/public/sv_contentratings_account_visitor_menu_counts.php(11): XF\Template\Templater->callMacro('sv_contentratin...', 'rating_summary', Array, Array)
#18 src/XF/Template/Templater.php(1250): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array)
#19 src/XF/Template/Templater.php(1324): XF\Template\Templater->renderTemplate('sv_contentratin...', Array)
#20 internal_data/code_cache/templates/l1/s11/public/account_visitor_menu.php(38): XF\Template\Templater->includeTemplate('public:sv_conte...', Array)
#21 src/XF/Template/Templater.php(663): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array, Array)
#22 internal_data/code_cache/templates/l1/s11/public/widget_visitor_panel.php(11): XF\Template\Templater->callMacro('account_visitor...', 'visitor_panel_r...', Array, Array)
#23 src/XF/Template/Templater.php(1250): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array)
#24 src/XF/Widget/WidgetRenderer.php(62): XF\Template\Templater->renderTemplate('widget_visitor_...', Array)
#25 src/XF/Widget/WidgetRenderer.php(67): XF\Widget\WidgetRenderer->render()
#26 src/XF/Template/Templater.php(1526): XF\Widget\WidgetRenderer->__toString()
#27 internal_data/code_cache/templates/l1/s11/public/forum_list.php(206): XF\Template\Templater->widgetPosition('forum_list_side...', Array)
#28 src/XF/Template/Templater.php(1250): XF\Template\Templater->{closure}(Object(SV\ContentRatings\XF\Template\Templater), Array)
#29 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_list', Array)
#30 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#31 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Listin...', 'public:forum_li...', Array)
#32 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#33 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#34 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#35 src/XF.php(329): XF\App->run()
#36 index.php(13): XF::runApp('XF\\Pub\\App')
#37 {main}
Request state
array(4) {
["url"] => string(1) "/"
["referrer"] => string(49) "https://www.utahfishkeepers.us/admin.php?add-ons/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
  • Like
Reactions: Xon
Hmmm... Literally the only reason if buy this add-on is to convert 1.5 post ratings addon to natural XF 2.1 ratings. I have no plans to use this Addon for ratings besides converting.

Maybe I'll just convert all my positive post ratings to likes in 1.5 before upgrading to 2.0.

Convert ratings to likes: (irreversible; for permanent uninstallations)

  1. Select a rating you would like to convert to XF Likes in Options > Post Ratings > Like rating
  2. Run Recount Ratings
  3. Click cancel once it starts building the rating cache
  4. Repeat steps 1-3 for all ratings you would like to convert to likes
 
The latest Content Rating 1.3.x pulls content into a format that XenForo 2.1 expects. It needs to rebuild the reaction caches however.

It will be some time before I can convert the add-on to work on XF2.1 and write an independent importer.

Hmmm... Literally the only reason if buy this add-on is to convert 1.5 post ratings addon to natural XF 2.1 ratings. I have no plans to use this Addon for ratings besides converting.
This add-on does do a lot more than stock XF2.1 ratings
 
So if I were to do the upgrade, the data would be imported into reactions? Would the add-on need to be disabled before the upgrade since it isn't compatible with XF 2.1?
 
So if I were to do the upgrade, the data would be imported into reactions?
Yes, but reactions wouldn't display right as a cache needs to be rebuilt. The cache is per-content, and it rebuilt when a piece of content has a reaction added or removed.

Would the add-on need to be disabled before the upgrade since it isn't compatible with XF 2.1?
Yes, you would need to disable the add-on before upgrading to XF2.1 since it isn't compatible. But XF2.1 isn't stable yet, so I really don't recommend upgrading a live site to using it.
 
Also, it appears that this add-on causes Showcase comment likes to stop working. Here is the server error:
Code:
Server error log
[LIST]
[*]Error: Call to undefined method XenAddons\Showcase\Entity\Item::deltaRatingFixup()
[*]src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php:589
[*]Generated by: CarpCharacin
[*]Nov 29, 2018 at 2:37 PM
[/LIST]
Stack trace
#0 src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php(507): SV\ContentRatings\Service\Rating\DeltaCounter->processEntityFixups()
#1 src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php(361): SV\ContentRatings\Service\Rating\DeltaCounter->applyItemChanges(24, Array, Array)
#2 src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php(339): SV\ContentRatings\Service\Rating\DeltaCounter->processItems(Array, Array)
#3 src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php(259): SV\ContentRatings\Service\Rating\DeltaCounter->updateContent()
#4 src/addons/SV/ContentRatings/XF/Entity/LikedContent.php(269): SV\ContentRatings\Service\Rating\DeltaCounter->process()
#5 src/XF/Entity/LikedContent.php(105): SV\ContentRatings\XF\Entity\LikedContent->rebuildContentLikeCache()
#6 src/addons/SV/ContentRatings/XF/Entity/LikedContent.php(174): XF\Entity\LikedContent->_postSave()
#7 src/XF/Mvc/Entity/Entity.php(1159): SV\ContentRatings\XF\Entity\LikedContent->_postSave()
#8 src/XF/Repository/LikedContent.php(94): XF\Mvc\Entity\Entity->save()
#9 src/addons/SV/ContentRatings/XF/Repository/LikedContent.php(32): XF\Repository\LikedContent->insertLike('sc_comment', 24, Object(SV\WarningImprovements\XF\Entity\User), true)
#10 src/XF/Repository/LikedContent.php(63): SV\ContentRatings\XF\Repository\LikedContent->insertLike('sc_comment', 24, Object(SV\WarningImprovements\XF\Entity\User), true)
#11 src/XF/ControllerPlugin/Like.php(28): XF\Repository\LikedContent->toggleLike('sc_comment', 24, Object(SV\WarningImprovements\XF\Entity\User))
#12 src/addons/SV/ContentRatings/XF/ControllerPlugin/Like.php(67): XF\ControllerPlugin\Like->actionToggleLike(Object(XenAddons\Showcase\Entity\Comment), '/showcase/comme...', '/showcase/comme...', '/showcase/comme...', NULL)
#13 src/addons/XenAddons/Showcase/Pub/Controller/Comment.php(290): SV\ContentRatings\XF\ControllerPlugin\Like->actionToggleLike(Object(XenAddons\Showcase\Entity\Comment), '/showcase/comme...', '/showcase/comme...', '/showcase/comme...')
#14 src/XF/Mvc/Dispatcher.php(249): XenAddons\Showcase\Pub\Controller\Comment->actionLike(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XenAddons\\Showc...', 'Like', 'json', Object(XF\Mvc\ParameterBag), 'xa_showcase', Object(XenAddons\Showcase\Pub\Controller\Comment), NULL)
#16 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#18 src/XF.php(329): XF\App->run()
#19 index.php(13): XF::runApp('XF\\Pub\\App')
#20 {main}
Request state
array(4) {
["url"] => string(26) "/showcase/comments/24/like"
["referrer"] => string(76) "https://www.utahfishkeepers.us/showcase/downstairs-bottom-40-gallon-tank.20/"
["_GET"] => array(1) {
["/showcase/comments/24/like"] => string(0) ""
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(46) "/showcase/downstairs-bottom-40-gallon-tank.20/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "****"
["_xfResponseType"] => string(4) "json"
}
}
 
Also, it appears that this add-on causes Showcase comment likes to stop working. Here is the server error:
Code:
Server error log
[LIST]
[*]Error: Call to undefined method XenAddons\Showcase\Entity\Item::deltaRatingFixup()
[*]src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php:589
[*]Generated by: CarpCharacin
[*]Nov 29, 2018 at 2:37 PM
[/LIST]
Stack trace
#0 src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php(507): SV\ContentRatings\Service\Rating\DeltaCounter->processEntityFixups()
#1 src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php(361): SV\ContentRatings\Service\Rating\DeltaCounter->applyItemChanges(24, Array, Array)
#2 src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php(339): SV\ContentRatings\Service\Rating\DeltaCounter->processItems(Array, Array)
#3 src/addons/SV/ContentRatings/Service/Rating/DeltaCounter.php(259): SV\ContentRatings\Service\Rating\DeltaCounter->updateContent()
#4 src/addons/SV/ContentRatings/XF/Entity/LikedContent.php(269): SV\ContentRatings\Service\Rating\DeltaCounter->process()
#5 src/XF/Entity/LikedContent.php(105): SV\ContentRatings\XF\Entity\LikedContent->rebuildContentLikeCache()
#6 src/addons/SV/ContentRatings/XF/Entity/LikedContent.php(174): XF\Entity\LikedContent->_postSave()
#7 src/XF/Mvc/Entity/Entity.php(1159): SV\ContentRatings\XF\Entity\LikedContent->_postSave()
#8 src/XF/Repository/LikedContent.php(94): XF\Mvc\Entity\Entity->save()
#9 src/addons/SV/ContentRatings/XF/Repository/LikedContent.php(32): XF\Repository\LikedContent->insertLike('sc_comment', 24, Object(SV\WarningImprovements\XF\Entity\User), true)
#10 src/XF/Repository/LikedContent.php(63): SV\ContentRatings\XF\Repository\LikedContent->insertLike('sc_comment', 24, Object(SV\WarningImprovements\XF\Entity\User), true)
#11 src/XF/ControllerPlugin/Like.php(28): XF\Repository\LikedContent->toggleLike('sc_comment', 24, Object(SV\WarningImprovements\XF\Entity\User))
#12 src/addons/SV/ContentRatings/XF/ControllerPlugin/Like.php(67): XF\ControllerPlugin\Like->actionToggleLike(Object(XenAddons\Showcase\Entity\Comment), '/showcase/comme...', '/showcase/comme...', '/showcase/comme...', NULL)
#13 src/addons/XenAddons/Showcase/Pub/Controller/Comment.php(290): SV\ContentRatings\XF\ControllerPlugin\Like->actionToggleLike(Object(XenAddons\Showcase\Entity\Comment), '/showcase/comme...', '/showcase/comme...', '/showcase/comme...')
#14 src/XF/Mvc/Dispatcher.php(249): XenAddons\Showcase\Pub\Controller\Comment->actionLike(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XenAddons\\Showc...', 'Like', 'json', Object(XF\Mvc\ParameterBag), 'xa_showcase', Object(XenAddons\Showcase\Pub\Controller\Comment), NULL)
#16 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#18 src/XF.php(329): XF\App->run()
#19 index.php(13): XF::runApp('XF\\Pub\\App')
#20 {main}
Request state
array(4) {
["url"] => string(26) "/showcase/comments/24/like"
["referrer"] => string(76) "https://www.utahfishkeepers.us/showcase/downstairs-bottom-40-gallon-tank.20/"
["_GET"] => array(1) {
["/showcase/comments/24/like"] => string(0) ""
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(46) "/showcase/downstairs-bottom-40-gallon-tank.20/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "****"
["_xfResponseType"] => string(4) "json"
}
}
What are showcase comment likes?
 
Top Bottom