Content Ratings

Content Ratings [Paid] 2.7.6

No permission to buy ($35.00)
Is there way to men the ratings display as it was with post ratings, i.e. all images/icons visible along the bottom of the post, not in a dropdown?

I've looked through the style properties . Maybe it's there and I've missed it, thanks!
 
but I still get the same DEBUG with red X in options and the template error as above.
I'll patch this in the next version, it isn't required for the add-on to function.

Is there way to men the ratings display as it was with post ratings, i.e. all images/icons visible along the bottom of the post, not in a dropdown?

I've looked through the style properties . Maybe it's there and I've missed it, thanks!
Not yet, I plan to support that style of UI in a future release.
 
Odd thing happening which caught me out.

In xenforo 1 there is a separate permissions for the default likes and for post ratings (view and rate). So on my xf1 forum I had post ratings installed, permissions given for that but not for likes.

So when I upgraded to xf2 (still on a test forum) and install Content Ratings, it was only showing up for those groups with permissions for likes.

I scratched my head for a while over trying to find out what was up.

It's not a problem, just good to know this is the reason.
 
Couple of things regarding styling. I'm not sure I'm doing this the best way but it could be worth thinking about more precise descriptions for the style properties (after a couple of priorities e.g. The Post ratings Importer)

I found it quite complex when using both FA and image icons, getting the sizes right both in the dropdown and in the post, especially if using animation and zoom.

If you want the icons to increase in size when hovered (as in my video above) it is best to upload images that are at least the largest size otherwise when they increase in size the quality obviously deteriorates as the pixels become big. But then you need them to display smaller in the dropdown and posts. This took a bit of trial and error to make it work properly especially in IE, I'm not sure if this is the most elegant but does seem to work.

I wanted FA icons and images to be 24px so I set Style Properties :

Rating Type (FA icons in dropdown and in posts)

Text 24px sets FA icons size - BUT this also affects the description text, so you can override that in Rating Type Text (e.g. 12px)

Rating Type Icon (image icon in menu)

Code:
margin-right: 4px;
width:24px;
height:24px;

(seems to need both width and height for IE, other browsers seem to keep aspect ratio

Rating Icon (image icon in posts)

Code:
width:30px;
 
For the style properties:

'Rating Type' refers to areas where the rating type icon and some accompanying text (typically the rating type name, if displaying it is enabled) are shown side by side. This includes the rating drop-down menu and the headings of listing pages.

'Rating' refers to elements of the bar shown directly underneath posts, where the rating type icon and count are shown side by side.

For each of them, the properties of the icon and text elements can be set separately. There is also a global rating type icon style property, which will apply to the icons of both to hopefully ease things a bit. The animations do make proper styling a bit more complicated though.

Rating Type (FA icons in dropdown and in posts)

Text 24px sets FA icons size - BUT this also affects the description text, so you can override that in Rating Type Text (e.g. 12px)
In this case, you can just set the text size directly on the 'Rating Type Icon' property. That way it won't affect the description text and no override is necessary.

Rating Type Icon (image icon in menu)

Code:
margin-right: 4px;
width:24px;
height:24px;

(seems to need both width and height for IE, other browsers seem to keep aspect ratio
Aside from setting the text size directly here, this seems right. The width/height/and text size should all be set equal if you're using both CSS and image icons.

Rating Icon (image icon in posts)

Code:
width:30px;
Just curious - what happens here if it is set to 24px like the others? And is the text size being adjusted here as well?
 
  • Like
Reactions: Xon
Rating Type (FA icons in dropdown and in posts)

Text 24px sets FA icons size - BUT this also affects the description text, so you can override that in Rating Type Text (e.g. 12px)
In this case, you can just set the text size directly on the 'Rating Type Icon' property. That way it won't affect the description text and no override is necessary.

I tried that, but setting the text size there dd not affect the description text, it was still the same size as the FA icon (24px) which looks to big. I found I had to override it in Rating Type Text




Rating Icon (image icon in posts)
Code:
width:30px;

Just curious - what happens here if it is set to 24px like the others? And is the text size being adjusted here as well?
Well, checking again this has confused me as it doesn't seem to change the size of the image icon, but it changes the size (width only) of the container. I also has a weird effect on the animation if you set it really large, e.g. 300px then it rotates round an arc as opposed to rotating in one place. Hmmmm I'm now confused again.
 
  • Like
Reactions: Xon
Well, checking again this has confused me as it doesn't seem to change the size of the image icon, but it changes the size (width only) of the container. I also has a weird effect on the animation if you set it really large, e.g. 300px then it rotates round an arc as opposed to rotating in one place. Hmmmm I'm now confused again.
Probably something with the CSS animation being wonky I guess :(
 
Probably something with the CSS animation being wonky I guess :(

It doesn't bother me as I can see no reason to set it any wider than I want the icon to be. I was just experimenting to see what various settings there did.
 
Unable to upgrade to 0.10.1 in RC 2:

Code:
FRONT:

An exception occurred: [InvalidArgumentException] Container key 'sv.contentRatings.ratingTypes' was not found in src/XF/Container.php on line 43

XF\Container->offsetGet() in src/XF/App.php at line 2690
XF\App->container() in src/addons/SV/ContentRatings/Repository/RatingType.php at line 606
SV\ContentRatings\Repository\RatingType->getRatingTypesAsEntities() in src/addons/SV/ContentRatings/Entity/DynamicRatingCounts.php at line 157
SV\ContentRatings\Entity\DynamicRatingCounts::getRatingStructure() in src/addons/SV/ContentRatings/Entity/DynamicRatingCounts.php at line 182
SV\ContentRatings\Entity\DynamicRatingCounts::getStructure() in src/XF/Mvc/Entity/Manager.php at line 70
XF\Mvc\Entity\Manager->getEntityStructure() in src/addons/SV/ContentRatings/Entity/Ratable.php at line 328
SV\ContentRatings\XF\Entity\User::getStructure() in src/addons/XFMG/XF/Entity/User.php at line 74
XFMG\XF\Entity\User::getStructure() in src/addons/XFRM/XF/Entity/User.php at line 38
XFRM\XF\Entity\User::getStructure() in src/XF/Mvc/Entity/Manager.php at line 70
XF\Mvc\Entity\Manager->getEntityStructure() in src/XF/Mvc/Entity/Manager.php at line 210
XF\Mvc\Entity\Manager->getFinder() in src/XF/Mvc/Entity/Manager.php at line 131
XF\Mvc\Entity\Manager->find() in src/XF/Repository/User.php at line 24
XF\Repository\User->getVisitor() in src/XF/App.php at line 1498
XF\App->getVisitorFromSession() in src/XF/Admin/App.php at line 52
XF\Admin\App->start() in src/XF/App.php at line 1859
XF\App->run() in src/XF.php at line 328
XF::runApp() in admin.php at line 13

ACP



Exception: Could not find class SV\ContentRatings\XF\Template\Templater when attempting to extend XF\Template\Templater src/XF/Extension.php:174
Generated by: Pete Thomas Nov 15, 2017 at 2:22 PM
Stack trace
#0 src/XF/App.php(2338): XF\Extension->extendClass('XF\\Template\\Tem...', NULL)
#1 src/XF/App.php(1400): XF\App->extendClass('\\XF\\Template\\Te...')
#2 src/XF/App.php(1062): XF\App->setupTemplaterObject(Object(XF\Container), '\\XF\\Template\\Te...')
#3 src/XF/Container.php(28): XF\App->XF\{closure}(Object(XF\Container))
#4 src/XF/App.php(2624): XF\Container->offsetGet('templater')
#5 src/XF/Pub/App.php(348): XF\App->templater()
#6 src/XF/Mvc/Dispatcher.php(280): XF\Pub\App->preRender(Object(XF\Mvc\Reply\View), 'html')
#7 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#8 src/XF/App.php(1863): XF\Mvc\Dispatcher->run()
#9 src/XF.php(328): XF\App->run()
#10 index.php(13): XF::runApp('XF\\Pub\\App')
#11 {main}
Request state
array(4) {
  ["url"] => string(1) "/"
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

So I uninstalled and did a new installation of 0.10. 1 and get this

Code:
InvalidArgumentException: Table 'xf_sv_rating_cache_ConversationMessage' does not exist so cannot be altered in src/XF/Db/Schema/Alter.php at line 38
XF\Db\Schema\Alter->__construct() in src/XF/Db/SchemaManager.php at line 188
XF\Db\SchemaManager->newAlter() in src/XF/Db/SchemaManager.php at line 141
XF\Db\SchemaManager->alterTable() in src/addons/SV/ContentRatings/Repository/RatingType.php at line 360
SV\ContentRatings\Repository\RatingType->getSchemaChangeFor() in src/addons/SV/ContentRatings/Repository/RatingType.php at line 246
SV\ContentRatings\Repository\RatingType->applySchemaForContent() in src/addons/SV/ContentRatings/Repository/RatingType.php at line 212
SV\ContentRatings\Repository\RatingType->applyOutstandingSchemaChanges() in src/addons/SV/ContentRatings/Repository/RatingType.php at line 55
SV\ContentRatings\Repository\RatingType->addDefaultContentTypes() in src/addons/SV/ContentRatings/Setup.php at line 38
SV\ContentRatings\Setup->installStep1() in src/XF/AddOn/StepRunnerInstallTrait.php at line 60
SV\ContentRatings\Setup->installStepRunner() in src/XF/AddOn/StepRunnerInstallTrait.php at line 27
SV\ContentRatings\Setup->install() in src/XF/Admin/Controller/AddOn.php at line 379
XF\Admin\Controller\AddOn->actionInstall() in src/XF/Mvc/Dispatcher.php at line 249
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 88
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 41
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 1863
XF\App->run() in src/XF.php at line 328
XF::runApp() in admin.php at line 13
 
Could you provide a short gif/video how you would like it to behave? I just haven't actually seen how facebook's on-hover effect works before.

Hi @Xon,

You can see in this video.
On my phone, I tap and hold Like button then I have more reactions I can choose (Like, sad, love, angry, haha). Then I chose Love.
On Desktop, we hover our mouse to Like button to do the same thing.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

Here we only use the existing Like button for all Rating/Reactions.
 
Top Bottom