• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Add-on "Post Ratings" to likes converter (CLI)

allewreK

Active member
#1
Hello,

I am using for like 1 years this addon by @Luke Foreman : http://xenforo.com/community/resources/post-ratings-taking-likes-to-the-next-level.410/

But I would like to switch back to the traditional like system because I think queries on a big board takes longer than XenForo's core likes.

My problem is that I can't just disable the addon : if I do that my members will loose a lot of points and loads of evaluations will be lost.

So I would like an importer, it would convert every "post rating" evaluation to a like AND update each members total like.

If anyone is interested, tell me, I could pay. Since I have a lot of data, it would be safer (and easier) to do it as a CLI script.

Regards.
 

Luke F

Well-known member
#2
The code to do this already exists in Dark_PostRating_Model::recountRatings, just a matter of commenting out the other bits and swapping the like rating id condition with a positive rating condition
 

allewreK

Active member
#3
The code to do this already exists in Dark_PostRating_Model::recountRatings, just a matter of commenting out the other bits and swapping the like rating id condition with a positive rating condition
Really Luke ? I'm going to have a look to this, thanks you very much =D

But will this work with a huge database ? I have a lot of users and rating... could their be a timeout if it is too long ?

And will this remove old "post ratings" once converted to the traditional like system ? Because if it fails at 50% and I run again the import, the first 50% will get double like...
 

allewreK

Active member
#4
The code to do this already exists in Dark_PostRating_Model::recountRatings, just a matter of commenting out the other bits and swapping the like rating id condition with a positive rating condition
Can you help me commenting out the other bits and swapping the like rating id condition with a posivite rating condition please ?
 

Luke F

Well-known member
#5
Really Luke ? I'm going to have a look to this, thanks you very much =D

But will this work with a huge database ? I have a lot of users and rating... could their be a timeout if it is too long ?

And will this remove old "post ratings" once converted to the traditional like system ? Because if it fails at 50% and I run again the import, the first 50% will get double like...
You can keep running it until it fully completes without any double likes occurring
 

allewreK

Active member
#8
The code to do this already exists in Dark_PostRating_Model::recountRatings, just a matter of commenting out the other bits and swapping the like rating id condition with a positive rating condition
Please Luke,

What is the condition swap, and the code to comment out ?