tommydamic68
Well-known member
If you disable the add on or decide to remove it, will all likes go back as they were before installing the add on?
If you disable the add on or decide to remove it, will all likes go back as they were before installing the add on?
If you disable the add on or decide to remove it, will all likes go back as they were before installing the add on?
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!
Where do I enable the navbar option for this addon? the geekzone.io/post-ratings/ ? Right now I just see an error page.
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.
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.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.
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));
Add to EXTRA.css:
.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/
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));
That worked @Luke F - thanks!Add to EXTRA.css:
Code:.dark_postrating_outputlist li img, .dark_postrating_thread_rating img { vertical-align: middle !important; }
I believe that is https://xenforo.com/community/resources/extend-post-ratings.3817/
Would've thought mysql would have been smart enough to do that itself, interesting
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?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?
We use essential cookies to make this site work, and optional cookies to enhance your experience.