Content Ratings

Content Ratings [Paid] 2.8.5

No permission to buy ($35.00)
Error with the last update:

ParseError: syntax error, unexpected token "\" in src/addons/SV/ContentRatings/Job/UserGivenRatingCount.php at line 72
  1. Composer\Autoload\{closure}() in src/vendor/composer/ClassLoader.php at line 427
  2. Composer\Autoload\ClassLoader->loadClass()
  3. class_exists() in src/XF/Container.php at line 266
  4. XF\Container->createObject() in src/XF/App.php at line 1930
  5. XF\App->XF\{closure}() in src/XF/Container.php at line 233
  6. XF\Container->create() in src/XF/App.php at line 3458
  7. XF\App->job() in src/XF/Job/Atomic.php at line 97
  8. XF\Job\Atomic->getFirstJob() in src/XF/Job/Atomic.php at line 25
  9. XF\Job\Atomic->run() in src/XF/Job/Manager.php at line 275
  10. XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 205
  11. XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 89
  12. XF\Job\Manager->runQueue() in src/XF/Admin/Controller/ToolsController.php at line 165
  13. XF\Admin\Controller\ToolsController->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 362
  14. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
  15. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  16. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  17. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
  18. XF\App->run() in src/XF.php at line 806
  19. XF::runApp() in admin.php at line 15


ParseError: syntax error, unexpected token "\"
src/addons/SV/ContentRatings/Job/UserGivenRatingCount.php:72
 
Last edited:
Xon I've been struggling with trying to extend to a custom content type. Looking through your old posts it looks like you intended to eventually make this straightforward and document it, however I'm having trouble finding any info on it. Could you help point me in the right direction?

I've added the reaction_score, reactions, and reaction_users columns to my table and entity, I've registered the content type's entity and reaction_handler_class, and created actionReact and actionReactions methods in my custom controller. Beyond that, I'm not sure how to proceed.
 
Cool. I got this to work by examining the reports addon you suggested, however my reaction bar is not giving me the moderator delete options and I'm not sure why.
 
Cool. I got this to work by examining the reports addon you suggested, however my reaction bar is not giving me the moderator delete options and I'm not sure why.
Removing reactions by others requires the general.removeOtherReactions permission. You can add your own permission by overriding/implementing canRemoveOthersReaction method instead of the default implementation from the Ratable trait.
 
Thanks Xon! I'll try to make a post about the steps I took once I'm sure everything is working.

Last question: What do I need to add to make sure users receive alerts when their content has received a reaction?
 
iOS 18.2 breaks Content Ratings. Previously, tapping the thumb up reaction opened the reaction bar to select the desired reaction.
With iOS 18.2 that no longer happens. Instead the Thumb Up reaction is activated and it's only possible to choose the Thumb up reaction.
With Content Ratings disabled (i.e. stock Xenforo) holding the Thumb Up reaction for a moment opens the reaction bar.
 
Last edited:
I think it might be the embed isn't being hooked as expected, I'll investigate that. But it'll probably be after christmas week before I can release a fix for it
 
there is a bug with emoji type reactions on /forum/members/ /#latest-activity template

i have set small size emoji but on recent activity emoji icon is still medium size and class 'sv-rating-type--medium'
example https://findozor.net/forum/members/aleksei.1/#latest-activity

Code:
<div class="sv-rating-type__icon"><span data-template-name="public:sv_contentratings_macros::rating_type_icon" class="sv-rating-type-icon  sv-rating-type-icon1 sv-rating-type-icon--emoji  reaction--inline sv-rating-type--medium" title="Нравится"><span class="smilie smilie--emoji" title="emoji.+1    :+1:" data-shortname=":+1:">👍</span></span></div>

on another templates (for example alert) it has correct class 'sv-rating-type--small' and size
Code:
<span data-template-name="public:sv_contentratings_macros::rating_type_icon" class="sv-rating-type-icon  sv-rating-type-icon1 sv-rating-type-icon--emoji  reaction--inline sv-rating-type--small" title="Нравится"><span class="smilie smilie--emoji" title="emoji.+1    :+1:" data-shortname=":+1:">👍</span></span>
 
Can you check if various template modifications are applying or not? It is also possible this particular page wasn't expected properly
 
Can you check if various template modifications are applying or not? It is also possible this particular page wasn't expected properly
no, everything is working as expected, all template mods applied
 
Last edited:
i have another issue on leaving reaction and it occurs only on mobile
this results in weird animation and js error
browsers - chrome (any - desktop with emulation or mobile), latest xf and addon versions
Code:
rate.min.js?_v=1f13188d:3 Uncaught TypeError: Cannot read properties of undefined (reading 'targetTouches')    at HTMLDivElement.m (rate.min.js?_v=1f13188d:3:300)

Code:
applyTooltipContent() {
            if (!this.svContentRating_applyTooltipContent())
                return !1;
            let a = null
              , b = null
              , e = null
              , h = (this.tooltip || this.$tooltip.get(0)).querySelector("." + this.options.baseClass + "-content");
            const m = g => {
>>>         g = g.originalEvent.targetTouches[0];
                if (g = t.elementFromPoint(g.clientX, g.clientY).closest('[data-xf-click="sv-rate"]')) {
                    const c = XF.Element.getHandler(f ? k(g) : g, "sv-rating-type-tooltip");
                    if (c) {
                        const l = g.getAttribute("id");
                        a && l !== a && (b.querySelectorAll(".sv-rating-type-icon").forEach(d => {
                            d.classList.remove("is-active")
                        }
                        ),
                        e.trigger.hide());
                        c.trigger.isShown() || (e = c,
                        a = l,
                        b = g,
                        g.querySelectorAll(".sv-rating-type-icon").forEach(d => {
                            d.classList.add("is-active")
                        }
                        ),
                        c.trigger.show())
                    }
                }
            }
 
Last edited:
Reactions in direct messages seem to not work ?

"Oops! We ran into some problems. The requested message could not be found." for direct messages ... any idea ?

Issue is: Link to /direct-messages/xxx/messages/react?reaction_id=xx which is 404.

while it probably needs to be

/direct-messages/replies/xx/react?

=> happens only with inline I think. / in reaction bar ... so a non-default setting.
 
Last edited:
Back
Top Bottom