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

Given how long this add-on has been available and how many people use it, I don't anticipate getting my suggestion implemented but I'll ask anyway. :)

Would it be possible to make it so specific ratings don't count against a user's total rating? The use case I'm looking at is product reviews, using the "First post only" option, so readers can rate the item/thing/whatever was reviewed, not the poster.

ps. I love how easy it was to create images and ratings for 1, 2, etc stars. :) Thanks for an awesome add-on. It was one of the reasons I bought a xenForo license over using a different forum script.
 
Is there an option for a confirmation when you click on one of the ratings? Many members on my forum struggles on mobile screens with pressing the wrong one, so a confirmation would help a lot!
 
Given how long this add-on has been available and how many people use it, I don't anticipate getting my suggestion implemented but I'll ask anyway. :)

Would it be possible to make it so specific ratings don't count against a user's total rating? The use case I'm looking at is product reviews, using the "First post only" option, so readers can rate the item/thing/whatever was reviewed, not the poster.

ps. I love how easy it was to create images and ratings for 1, 2, etc stars. :) Thanks for an awesome add-on. It was one of the reasons I bought a xenForo license over using a different forum script.

Yes you can set a rating type to 'Uncounted'

Is there an option for a confirmation when you click on one of the ratings? Many members on my forum struggles on mobile screens with pressing the wrong one, so a confirmation would help a lot!

There is no option for that, but I am looking into ways to improve the mobile experience

Where do I enable the navbar option for this addon? the geekzone.io/post-ratings/ ? Right now I just see an error page.

I believe https://xenforo.com/community/resources/extend-post-ratings.3817/ provides that functionality
 
How can I disable certain ratings? I would like to get rid of 2-3 ratings, like "dumb" and "old", but I can't find an option for that anywhere. I've seen other websites with that add-on accomplish this, so I know it's possible.
 
How can I disable certain ratings? I would like to get rid of 2-3 ratings, like "dumb" and "old", but I can't find an option for that anywhere. I've seen other websites with that add-on accomplish this, so I know it's possible.

In Admin CP > Applications > Ratings you can either choose to completely delete a rating (click X next to a rating in the list) or when editing it you can tick 'Disabled', which will prevent future use and display of the rating but keep it retroactively on posts
 
Unfortunately there is not a lot that can be done given the current integration with XF likes - sorting both data sets combined by date can't really be done without a temporary table. It still shouldn't be too slow if you server is set up to create temporary tables in memory, the size is never bigger than a single user's total received/given ratings+likes. The functions are also only used on the rarely-accessed 'ratings you've given' and 'ratings you've received' pages.

That said there is potential for a fast path for the first page (which is very likely the only page that will ever be hit), where both parts of the union are limited to the max results per page. I'll look into this for the next update.
Fyi, but I got a large speedup by rewriting the query to move the user join to outside the limit/offset. Viewing the last page of a user with ~100k positive ratings went from ~2 seconds to ~0.5 seconds.

Changing the query of getRatingsByContentUser, to look something like:
Code:
        return $this->fetchAllKeyed('SELECT *
            FROM ('. $this->limitQueryResults('
				(
					SELECT pr.*, "post" as content_type, pr.post_id as content_id, pr.user_id as rating_user_id
					FROM dark_postrating pr
					WHERE pr.user_id=? and pr.rating <> ?
					ORDER BY pr.date DESC
					'.$optimisedLimit.'
				)
					UNION ALL
				(									
					SELECT liked_content.like_id as id, liked_content.content_id as post_id, liked_content.like_user_id as user_id, liked_content.content_user_id as rated_user_id, ? as rating, liked_content.like_date as date,
						liked_content.content_type, liked_content.content_id, liked_content.like_user_id as rating_user_id
					FROM xf_liked_content AS liked_content
					WHERE 1 = ? and liked_content.like_user_id = ? and liked_content.content_type = \'post\'
					ORDER BY liked_content.like_date DESC
					'.$optimisedLimit.'
				)				
				
				ORDER BY date DESC
			', $limitOptions['limit'], $limitOptions['offset']
        ).' ) ratings
        INNER JOIN xf_user AS user ON (user.user_id = ratings.rated_user_id)',
		'id', array($userId, $options->dark_postrating_like_id, $options->dark_postrating_like_id, $options->dark_postrating_like_id > 0 ? 1 : 0, $userId));
 
Is there a way to align the text better with the icon? I used 24x24.

Thanks,

View attachment 126405
Add to EXTRA.css:
Code:
.dark_postrating_outputlist li img, .dark_postrating_thread_rating img { vertical-align: middle !important; }

@Luke F - Does this plugin come with the Post Ratings page that lists every rating and is essentially a leaderboard? See here: http://discusshq.com/post-ratings/

I believe that is https://xenforo.com/community/resources/extend-post-ratings.3817/

Fyi, but I got a large speedup by rewriting the query to move the user join to outside the limit/offset. Viewing the last page of a user with ~100k positive ratings went from ~2 seconds to ~0.5 seconds.

Changing the query of getRatingsByContentUser, to look something like:
Code:
        return $this->fetchAllKeyed('SELECT *
            FROM ('. $this->limitQueryResults('
                (
                    SELECT pr.*, "post" as content_type, pr.post_id as content_id, pr.user_id as rating_user_id
                    FROM dark_postrating pr
                    WHERE pr.user_id=? and pr.rating <> ?
                    ORDER BY pr.date DESC
                    '.$optimisedLimit.'
                )
                    UNION ALL
                (                                  
                    SELECT liked_content.like_id as id, liked_content.content_id as post_id, liked_content.like_user_id as user_id, liked_content.content_user_id as rated_user_id, ? as rating, liked_content.like_date as date,
                        liked_content.content_type, liked_content.content_id, liked_content.like_user_id as rating_user_id
                    FROM xf_liked_content AS liked_content
                    WHERE 1 = ? and liked_content.like_user_id = ? and liked_content.content_type = \'post\'
                    ORDER BY liked_content.like_date DESC
                    '.$optimisedLimit.'
                )              
              
                ORDER BY date DESC
            ', $limitOptions['limit'], $limitOptions['offset']
        ).' ) ratings
        INNER JOIN xf_user AS user ON (user.user_id = ratings.rated_user_id)',
        'id', array($userId, $options->dark_postrating_like_id, $options->dark_postrating_like_id, $options->dark_postrating_like_id > 0 ? 1 : 0, $userId));

Would've thought mysql would have been smart enough to do that itself, interesting
 
Is there a possible way to show who liked or any other rating a post or thread as apposed to having to use a drop down list to reveal?
 
Is there a possible way to show who liked or any other rating a post or thread as apposed to having to use a drop down list to reveal?
I would also recommend a Facebook type "hover" revealing all likes or just ratings in general perhaps. It just seems strange not seeing someone who "liked" something, perhaps something to get used to?

Screen Shot 2016-01-16 at 11.26.02 AM.webp
 
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!
 
@Luke F is it possible to make the author total received ratings in post count smaller when it get's to the 1000? Sorta like the media gallery does by adding a k next to the 1000 number? So instead of 4,000.. it would show 4k?

On some layout this could be useful because it drops the counts to a new line which can be undesirable look.
Screen Shot 2016-01-23 at 9.07.58 AM.webp

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

Hytu4Ib.png
 
Back
Top Bottom