whynot
Well-known member
Isn't it thumb down?but people hate him for all the stupid things and vote 523 times with thumb up in all the 200 posts after the frist one.
Isn't it thumb down?but people hate him for all the stupid things and vote 523 times with thumb up in all the 200 posts after the frist one.
Is there or can there be a CLI rebuild of the ratings? We have been running the rebuild for 2 days now and are only half way through... 33 million of over 60 million posts.
View attachment 148461
Addon is installed but rating options are not showing up. Permissions are all fine though.
Hello, sent!There is no CLI option but you can potentially speed up the process (at the risk of timeouts on a slow server) by raising the value of PER_PAGE at the top of /library/Dark/PostRating/Deferred/PostCache.php (and the other .php files, but PostCache is the one in your screenshot)
Can you PM me admin CP details to take a look?
You might also want to triple check the permissions with /admin.php?permissions/analyze
There is no CLI option but you can potentially speed up the process (at the risk of timeouts on a slow server) by raising the value of PER_PAGE at the top of /library/Dark/PostRating/Deferred/PostCache.php (and the other .php files, but PostCache is the one in your screenshot)
# User@Host: root[root] @ localhost []
# Thread_id: 12900513 Schema: live_xf QC_hit: No
# Query_time: 100.058259 Lock_time: 0.000040 Rows_sent: 20000 Rows_examined: 41121021
# Rows_affected: 0
SET timestamp=1487624154;
select
post.post_id, post.thread_id
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 1) as dark_postrating_1_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 2) as dark_postrating_2_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 4) as dark_postrating_4_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 5) as dark_postrating_5_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 6) as dark_postrating_6_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 7) as dark_postrating_7_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 8) as dark_postrating_8_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 9) as dark_postrating_9_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 10) as dark_postrating_10_count
,
pr_cache.rating_cache,
pr2.rating, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 1) as dark_postrating_1_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 2) as dark_postrating_2_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 4) as dark_postrating_4_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 5) as dark_postrating_5_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 6) as dark_postrating_6_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 7) as dark_postrating_7_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 8) as dark_postrating_8_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 9) as dark_postrating_9_count
, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 10) as dark_postrating_10_count
from xf_post AS post
left join dark_postrating_post_cache pr_cache ON (post.post_id = pr_cache.post_id)
left join dark_postrating pr2 on (post.post_id = pr2.post_id and pr2.user_id = 374904)
limit 41100000, 20000;
Don't know if this is something that can be improved in a future update or if a different approach can be taken for a rewrite, if that happens for XF2... but this query that is a part of the rebuild process for post ratings is a beast.
Code:# User@Host: root[root] @ localhost [] # Thread_id: 12900513 Schema: live_xf QC_hit: No # Query_time: 100.058259 Lock_time: 0.000040 Rows_sent: 20000 Rows_examined: 41121021 # Rows_affected: 0 SET timestamp=1487624154; select post.post_id, post.thread_id , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 1) as dark_postrating_1_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 2) as dark_postrating_2_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 4) as dark_postrating_4_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 5) as dark_postrating_5_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 6) as dark_postrating_6_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 7) as dark_postrating_7_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 8) as dark_postrating_8_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 9) as dark_postrating_9_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 10) as dark_postrating_10_count , pr_cache.rating_cache, pr2.rating, (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 1) as dark_postrating_1_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 2) as dark_postrating_2_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 4) as dark_postrating_4_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 5) as dark_postrating_5_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 6) as dark_postrating_6_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 7) as dark_postrating_7_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 8) as dark_postrating_8_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 9) as dark_postrating_9_count , (select count(*) from dark_postrating pr USE INDEX (`post_id_rating`) where pr.post_id = post.post_id and pr.rating = 10) as dark_postrating_10_count from xf_post AS post left join dark_postrating_post_cache pr_cache ON (post.post_id = pr_cache.post_id) left join dark_postrating pr2 on (post.post_id = pr2.post_id and pr2.user_id = 374904) limit 41100000, 20000;
Bought that, have it running, love it. But have a couple of questions.
1. Doesn't it show in notifications panel when a user gets a like or dislike? I'm sure it did before with the stock likes but doesn't seem to be now..?!
2. Is there a way to send an email when a user gets a like / rating? (Let them turn it off via CP perhaps?)
@Luke F Still loving this add-on. I'm really hoping you will be bringing out a xenforo 2 version. Are you able to confirm or not?
I will revisit it in the 2.0 update
He confirmed it already 2 posts above yours...
So, not sure if this is on my end or not. I am doing a site makeover, starting from scratch. When I went to go find Post Ratings download in my email I received this error, very confused now.
View attachment 149353
View attachment 149354
View attachment 149355
Little help would be greatly appreciated!
Yes there is room for improvement in that query, it doesn't seem to have an order by and could benefit from an early-out on unrated posts. I will revisit it in the 2.0 update
Luke, can you revisit for Version 2, so that all positive ratings are rated as a like within the Xenforo dbase.
We use essential cookies to make this site work, and optional cookies to enhance your experience.