Post Ratings - taking likes to the next level [Deleted]

How can i disable the color change behind the ratings? I cannot remember for the life of me.

Hytu4Ib.png
ACP->Home->Options->Post Ratings->Input bar minimum opacity. Set it to a number that works for you.

Edit: sorry, I just realised you might actually be referring to the lighter colour you have there.

This should work for you. Set the colours as appropriate.

Code:
/* set the colour behind postratings summary */
.dark_postrating_outputlist, .dark_postrating_thread_rating {
  background-color: @pageBackground !important;
}
.message .dark_postrating.likesSummary, .dark_postrating {
  background-color: @pageBackground !important;
}
 
Last edited:
ACP->Home->Options->Post Ratings->Input bar minimum opacity. Set it to a number that works for you.

Edit: sorry, I just realised you might actually be referring to the lighter colour you have there.

This should work for you. Set the colours as appropriate.

Code:
/* set the colour behind postratings summary */
.dark_postrating_outputlist, .dark_postrating_thread_rating {
  background-color: @pageBackground !important;
}
.message .dark_postrating.likesSummary, .dark_postrating {
  background-color: @pageBackground !important;
}

-snip- got it, thanks!
 
Last edited:
At the moment there are some guys in my forum trolling other users with giving only (and a lot of) bad ratings for postings.

It is possible to remove Likes given by a user in AdminCP, but will this also remove all given ratings using this AddOn? If not, could we please add this feature ASAP? Thank you so much!

There is no built in functionality for that, but there are some manual queries you can use listed on the first post of this thread
 
Hi @Luke F

Could you explain this query which appears on the forum home page and why it does a full table scan of user_profile please:
Code:
SELECT user.*
    ,
    user_profile.*
,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (1,2,4,5,6,7,8,10)) as positive_rating_count

    , (user.like_count + coalesce((select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (1,2,4,5,6,7,8,10)), 0)) as positive_rating_count_incl_likes

,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (11,13)) as negative_rating_count

,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (14,3,9,12,15)) as neutral_rating_count

,(select sum(count_received) from dark_postrating_count where user_id = user.user_id) as total_rating_count

FROM xf_user AS user

    LEFT JOIN xf_user_profile AS user_profile ON
        (user_profile.user_id = user.user_id)
WHERE (1=1) AND (user_profile.status_date > 0)
ORDER BY user_profile.status_date DESC
LIMIT 15

Regards
 
  • Like
Reactions: Xon
Hi @Luke F

Could you explain this query which appears on the forum home page and why it does a full table scan of user_profile please:
Code:
SELECT user.*
    ,
    user_profile.*
,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (1,2,4,5,6,7,8,10)) as positive_rating_count

    , (user.like_count + coalesce((select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (1,2,4,5,6,7,8,10)), 0)) as positive_rating_count_incl_likes

,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (11,13)) as negative_rating_count

,(select sum(count_received) from dark_postrating_count where user_id = user.user_id and rating in (14,3,9,12,15)) as neutral_rating_count

,(select sum(count_received) from dark_postrating_count where user_id = user.user_id) as total_rating_count

FROM xf_user AS user

    LEFT JOIN xf_user_profile AS user_profile ON
        (user_profile.user_id = user.user_id)
WHERE (1=1) AND (user_profile.status_date > 0)
ORDER BY user_profile.status_date DESC
LIMIT 15

Regards

Unless I'm mistaken that is not a standard XF query (may be widget framework)

The table scan is to be expected, unless whatever addon it is from adds an index to user_profile.status_date. It has nothing to do with the subqueries post ratings has coincidentally added
 
In admin CP > applications > ratings, either delete or disable the disagree rating


Hello,
Is it possible to show a list of users who rated under the post , instead of the standart rating counts icons. I would like to see the list of users without selecting the list view if possible.
Thank you
screenshot-forum esigara us 2016-02-04 15-33-17.webp

Edit; One more question :)
is it possible to only list the users who gave a positive rating and hide who the nagetive ones came from ?
 
Last edited:
How can I increase the spacing between icons?

Add to the EXTRA.css template:

Code:
.dark_postrating_inputlist li { margin-right: 5px; }

Hello,
Is it possible to show a list of users who rated under the post , instead of the standart rating counts icons. I would like to see the list of users without selecting the list view if possible.
Thank you
View attachment 127840

Edit; One more question :)
is it possible to only list the users who gave a positive rating and hide who the nagetive ones came from ?

It is not possible to list the users who rated a post directly on each post as that data is not fetched until a user clicks 'List'

For hiding negative ratings, you can make the following template edit. Note it won't hide anything from alerts or news feed.

In dark_postrating_detail, search for the bits in black and add the bits in red:


<xen:foreach loop="$postrating_detail" value="$rating" key="$id">
<xen:if is="{$rating.type} != -1">



-----


</xen:if>
</xen:if>
</xen:foreach>
</tr>
 
Hi @Luke F

Still hoping for usergroup setting to allow self-ratings, have you considered it further again recently?

Cheers,

Regs.
 
It is not possible to list the users who rated a post directly on each post as that data is not fetched until a user clicks 'List'

For hiding negative ratings, you can make the following template edit. Note it won't hide anything from alerts or news feed.

In dark_postrating_detail, search for the bits in black and add the bits in red:


<xen:foreach loop="$postrating_detail" value="$rating" key="$id">
<xen:if is="{$rating.type} != -1">



-----


</xen:if>
</xen:if>
</xen:foreach>
</tr>

Thank you very much
 
Hello!

I'm very interested in this add-on, but I do have a question if you don't mind. :P

Can you assign individual trophies for all of the elements or is it grouped under the existing system?
 
I would love to have a possibility to limit the number of ratings a user can give (maybe by usergroup), maybe only a limit for negative ratings. A lot of abuse otherwise for posts with a different opinion inside a thread :-(
 
Hi Luke,
At lot of my members tell me that they keep accidentally hitting the wrong like option when scrolling using mobile devices. It seems the main issue is because the like action buttons are on the right of a post but the like results show on the left of a post.

How do I change these around please, so that the action is by the avatar and the result is on the right?
 
Hey!

For some reason the ratings displayed in sidebar and in postbit is different. The memberinfo on sidebar says for example (5) likes while the postbit says (1) like. Is there some setting I'm missing?
 
Hello!

I loaded a backup of the site after the server died with storage problem. The rating bar under each post where users give ratings doesn't display now.

I'm getting this error too:
Illegal string offset 'like_count' in /home/web/domains/domain.com/public_html/library/Dark/PostRating/EventListener.php, line 266
 
Last edited:
Top Bottom