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

Hello Luke,

Any Chance to delete ALL Ratings, given and received (from all Users, also deleted Users). Could you provide a MySQL Query? Thank You!! (y)

// Nevermind, i fixed it myself.
 
Great plugin, one of the best!

Quick question. Is there a way to tell who has made a negative comment? Or allow admins to click on something so they can see who left a negative comment on X user?

Thanks,
Mike
 
Click on "List", it'll show who's made what kind of comment.
Sorry, should've been more specific. I meant like all time. Because a user has a negative rating and she wants to see who gave it to her without going through every one of her posts.
 
Sorry Luke Foreman, I know it has been chaotic on this forum so I didn't know if you saw my request. I would like to have likes and post ratings live in harmony and be separate. Basically I will be changing Likes to "Reps" and only using post ratings on about 3 forums and all the other content including posts on other forums where I have post ratings disabled to be to be able to be "Liked"/"Repped". I changed all the proper settings in the Post Ratings options, but for some reason I am not seeing likes appearing again? Is there somewhere else I should be looking? Please see the link for how a forum looks that does not have Post Ratings enabled there is not a likes button appearing: https://www.dropbox.com/s/9ua1mokqx0163g4/Screen Shot 2013-12-26 at 1.58.08 PM.png

Also issue number two is how do you get ratings either a bar or numbers to display on the home page where it shows the user Avatar and stats show in the upper right hand corner. For some reason I cannot get it to display here. I got it to show ratings text, but the numbers never display.
 
Ok I just purchased this and would like to know how to not include XenForo likes. I would like to stop the XenForo likes and use this system instead
 
Hey @Luke Foreman

Was styling a clients site and how sure if this has been adjusted at all but in the message user info:

It uses:
pairsInline
Instead of

pairsJustified

Like the rest of the fields:

postratings.webp

No biggie I just have to add some extra css for your snippit to correct some issues that it doesn't inherit by default from xenforo.
 
Luke, thinking about purchasing this. Is it easy enough to disable if for some reason I would like to stop using it? Would is cause any database errors if it was disabled?
 
Luke, thinking about purchasing this. Is it easy enough to disable if for some reason I would like to stop using it? Would is cause any database errors if it was disabled?

You can just disable it like a normal add on. It shouldn't cause any problems for you.
 
Not sure if related but I turned automatic serialization in an attempt to get Digital Point Image Proxy and Search to work.
PHP:
$config['cache']['frontendOptions']['automatic_serialization'] = true;

You may need to restart your caching system if you have other stuff utilizing the cache. Honestly, I'm not really sure why XF doesn't default it to "true" (or make it true without even an option to change it). There's no downside to enabling it.

It did not solve my issues with those addons so I turned it off and restarted Apache. After I turned it off I saw about 3 of these errors in the Server Error Logs:

ErrorException: Invalid argument supplied for foreach() - library/Dark/PostRating/Model/User.php:14 Generated By: Unknown Account, 3 minutes ago Stack Trace #0 /home/blah/public_html/library/Dark/PostRating/Model/User.php(14): XenForo_Application::handlePhpError(2, 'Invalid argumen...', '/home/blah/publi...', 14, Array) #1 /home/blah/public_html/library/XenForo/Model/User.php(389): Dark_PostRating_Model_User->prepareUserFetchOptions(Array) #2 /home/blah/public_html/library/XenForo/Model/User.php(869): XenForo_Model_User->getUserById(1687, Array) #3 /home/blah/public_html/library/XenForo/ControllerHelper/UserProfile.php(81): XenForo_Model_User->getFullUserById(1687, Array) #4 /home/blah/public_html/library/XenForo/ControllerHelper/UserProfile.php(28): XenForo_ControllerHelper_UserProfile->getUserOrError(1687, Array) #5 /home/blah/public_html/library/XenForo/ControllerPublic/Member.php(623): XenForo_ControllerHelper_UserProfile->assertUserProfileValidAndViewable(1687) #6 /home/blah/public_html/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Member->actionRecentContent() #7 /home/blah/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch)) #8 /home/blah/public_html/index.php(13): XenForo_FrontController->run() #9 {main} Request State array(3) { ["url"] => string(48) "https://8th.us/members/mattw.1687/recent-content" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }
 
@Luke Foreman
I got these errors when I turn on debug. I'm using latest version of XF, your addon and PHP 5.5.8

Argument 3 passed to Dark_PostRating_Model::canRatePost() must be of the type array, null given, called in /home/nginx/domains/public/library/Dark/PostRating/EventListener.php on line 38 and defined in /home/nginx/domains/public/library/Dark/PostRating/Model.php, line 600
Argument 2 passed to Dark_PostRating_Model::canViewRatingListForPost() must be of the type array, null given, called in /home/nginx/domains/public/library/Dark/PostRating/EventListener.php on line 39 and defined in /home/nginx/domains/public/library/Dark/PostRating/Model.php, line 631
 
I would like to have likes and post ratings live in harmony and be separate. Basically I will be changing Likes to "Reps" and only using post ratings on about 3 forums and all the other content including posts on other forums where I have post ratings disabled to be to be able to be "Liked"/"Repped". I changed all the proper settings in the Post Ratings options, but for some reason I am not seeing likes appearing again? Is there somewhere else I should be looking? Please see below for how a forum looks that does not have Post Ratings enabled there is not a likes button appearing:

https://www.dropbox.com/s/9ua1mokqx0163g4/Screen Shot 2013-12-26 at 1.58.08 PM.png

Sorry Luke Foreman, I know it has been chaotic on this forum so I didn't know if you saw my request. I would like to have likes and post ratings live in harmony and be separate. Basically I will be changing Likes to "Reps" and only using post ratings on about 3 forums and all the other content including posts on other forums where I have post ratings disabled to be to be able to be "Liked"/"Repped". I changed all the proper settings in the Post Ratings options, but for some reason I am not seeing likes appearing again? Is there somewhere else I should be looking? Please see the link for how a forum looks that does not have Post Ratings enabled there is not a likes button appearing: https://www.dropbox.com/s/9ua1mokqx0163g4/Screen Shot 2013-12-26 at 1.58.08 PM.png

Also issue number two is how do you get ratings either a bar or numbers to display on the home page where it shows the user Avatar and stats show in the upper right hand corner. For some reason I cannot get it to display here. I got it to show ratings text, but the numbers never display.

Currently Post Ratings will replace like functionality globally, so it's not possible to enable the legacy like system in some areas only

For the visitor panel issue, can you screenshot what you are seeing? Rating totals as numbers should be integrated there by default

Is there any way to stop abusing the system? Some one can like some other persons posts in mass and increase his rating to massive amounts.

1. Is there anyway we can limit number of likes one person can give to another person per day? or atleast number of likes per day a person can give to others?

2. Is there anyway we can find likes one person has given and anyway to delete them?

since i am running a help forum i should allow new registered members to give likes to the people who helped them. But feels like some abuser can easily spoil the whole system in few hours and even keep me helpless coz i can't even find where he gave likes or any way to delete them.

Lets say i gave likes power only to some reputed group still only one needed to easily spoil the whole system and make me help less.

Post Ratings is designed with minimal redundancy in its database design, so you can run simple queries against the dark_postrating table to clean up any rating abuse (e.g. delete from dark_postrating where user_id = x) - unlike other areas of xenforo there is no need to worry about directly editing the database.

I work on the profile page and wanted to ask where I can change the style?
In what for Templates are the four things? Positive ratings received:, Neutral ratings received:, Negative ratings received: and the Status Bar

View attachment 63870 Thanks for help
and a happy new year :sleep:

That's in dark_postrating_member_info and dark_postrating_member_info_bar


Ok I just purchased this and would like to know how to not include XenForo likes. I would like to stop the XenForo likes and use this system instead

Simply set 'Like rating' to 'disabled' - this will disable all interop with the xenforo like system

For instructions to convert XF likes to ratings, see the first post of this thread


Hey @Luke Foreman

Was styling a clients site and how sure if this has been adjusted at all but in the message user info:

It uses:
pairsInline
Instead of

pairsJustified

Like the rest of the fields:

View attachment 64563

No biggie I just have to add some extra css for your snippit to correct some issues that it doesn't inherit by default from xenforo.

Noted, will sort that


Is there a way that a user clicks on a post like and funny?

Multiple ratings on a single post by a single user are not possible

Not sure if related but I turned automatic serialization in an attempt to get Digital Point Image Proxy and Search to work.


It did not solve my issues with those addons so I turned it off and restarted Apache. After I turned it off I saw about 3 of these errors in the Server Error Logs:

ErrorException: Invalid argument supplied for foreach() - library/Dark/PostRating/Model/User.php:14 Generated By: Unknown Account, 3 minutes ago Stack Trace #0 /home/blah/public_html/library/Dark/PostRating/Model/User.php(14): XenForo_Application::handlePhpError(2, 'Invalid argumen...', '/home/blah/publi...', 14, Array) #1 /home/blah/public_html/library/XenForo/Model/User.php(389): Dark_PostRating_Model_User->prepareUserFetchOptions(Array) #2 /home/blah/public_html/library/XenForo/Model/User.php(869): XenForo_Model_User->getUserById(1687, Array) #3 /home/blah/public_html/library/XenForo/ControllerHelper/UserProfile.php(81): XenForo_Model_User->getFullUserById(1687, Array) #4 /home/blah/public_html/library/XenForo/ControllerHelper/UserProfile.php(28): XenForo_ControllerHelper_UserProfile->getUserOrError(1687, Array) #5 /home/blah/public_html/library/XenForo/ControllerPublic/Member.php(623): XenForo_ControllerHelper_UserProfile->assertUserProfileValidAndViewable(1687) #6 /home/blah/public_html/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Member->actionRecentContent() #7 /home/blah/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch)) #8 /home/blah/public_html/index.php(13): XenForo_FrontController->run() #9 {main} Request State array(3) { ["url"] => string(48) "https://8th.us/members/mattw.1687/recent-content" ["_GET"] => array(0) { } ["_POST"] => array(0) { } }

I would not recommend using that option in conjunction with Post Ratings, as it explicitly serializes data in the data registry and it's probably going to end up getting serialized/unserialized twice


Set, but the panel does not appear. How it works?
View attachment 64855
http://wpcommerce.ru/

Make sure you have permissions set correctly


@Luke Foreman
I got these errors when I turn on debug. I'm using latest version of XF, your addon and PHP 5.5.8

Argument 3 passed to Dark_PostRating_Model::canRatePost() must be of the type array, null given, called in /home/nginx/domains/public/library/Dark/PostRating/EventListener.php on line 38 and defined in /home/nginx/domains/public/library/Dark/PostRating/Model.php, line 600
Argument 2 passed to Dark_PostRating_Model::canViewRatingListForPost() must be of the type array, null given, called in /home/nginx/domains/public/library/Dark/PostRating/EventListener.php on line 39 and defined in /home/nginx/domains/public/library/Dark/PostRating/Model.php, line 631

That error would appear to be a conflict with another addon rather than an issue with PHP 5.5.8

As a workaround you can replace all 3 instances of 'array $forum' in library/dark/postrating/model.php with 'array $forum = array()' - this will not affect any functionality
 
  • Like
Reactions: DRE
Luke the post ratings addon is killing our server:
SELECT thread.*

,

user.*, IF(user.username IS NULL, thread.username, user.username) AS username,

post.message, post.attach_count,

NULL AS thread_read_date,

0 AS thread_is_watched,

0 AS user_post_count,

waindigo_avatarflags_ip.ip, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 1) as dark_postrating_1_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 5) as dark_postrating_5_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 2) as dark_postrating_2_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 3) as dark_postrating_3_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 4) as dark_postrating_4_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 8) as dark_postrating_8_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 14) as dark_postrating_14_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 6) as dark_postrating_6_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 7) as dark_postrating_7_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 9) as dark_postrating_9_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 10) as dark_postrating_10_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 11) as dark_postrating_11_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 12) as dark_postrating_12_count, 1 as dark_postrating_has_fetched_max

, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = thread.first_post_id and pr.rating = 13) as dark_postrating_13_count, 1 as dark_postrating_has_fetched_max

,

content.content_title, content.background_image, content.content_seo_cache, content.hub_id, content.content_type, content.content_id, content.author_name, content.can_feature

FROM xf_thread AS thread



LEFT JOIN xf_user AS user ON

(user.user_id = thread.user_id)

LEFT JOIN xf_post AS post ON

(post.post_id = thread.first_post_id)

LEFT JOIN xf_ip AS waindigo_avatarflags_ip ON

(waindigo_avatarflags_ip.ip_id = post.ip_id)

LEFT JOIN editorial_content AS content ON (thread.thread_id = content.thread_id)

WHERE (thread.node_id = 100) AND (thread.sticky = 0) AND (thread.discussion_state IN ('visible')) AND 1=1

ORDER BY thread.last_post_date DESC

LIMIT 30 OFFSET 930=
It's adding 13 subqueries to the main thread query. !!!!!!!!!!!!!!!!!!!!!!!!
Please can you optimise this? ASAP?
(We checked that it's not our editorial element, and it's not. The query took 18 seconds to run without it).
 
Top Bottom