XF 1.1 Post Thank You Hack into likes

aculate

Well-known member
I just bought xenForo 1.1 and im testing the import function... I'm importing from vb3.8 to 1.1. So far, everything went very smooth

My question is how do import the Post Thank You Hack into likes after the import ?

Thanks
 
This one?

http://www.vbulletin.org/forum/showthread.php?t=122944

I haven't ever used that addon, but I just looked at the code and it stores all "thank yous" in a table called post_thanks.

Since the importer already imports reputation as likes, I would do a cross-table insert query on the vBulletin database to create reputation records from the "thank you" records. Then the importer should pick that up.

I can't test it because I don't have access to your data, but I think this query will work for you:

Code:
INSERT INTO reputation (postid, userid, reputation, whoadded, reason, dateline)
	SELECT pt.postid, p.userid, 1, pt.userid, '', pt.date
	FROM post_thanks AS pt
	LEFT JOIN post AS p ON (p.postid = pt.postid);

Run this query on the vBulletin database before the import.

Because this query changes the data for the purpose of an import, you don't want to run this on a live database or one that you intend to keep using after the import.
 
I just bought xenForo 1.1 and im testing the import function... I'm importing from vb3.8 to 1.1. So far, everything went very smooth

My question is how do import the Post Thank You Hack into likes after the import ?

Thanks

You have to install this add-on before you actually start the import. After the installation of this add-on an extra button appears in the import controls which triggers the import of post thanks into likes. You can safely uninstall this add-on after importing. We successfully used this add-on when we migrated our forum but this took extremely long i.e. almost 12 hours for about 750,000 posts. Using direct sql queries might be faster but we did not try it.
 
http://xenforo.com/community/threads/post-thank-you-hack-into-likes.23660/#post-291959
Since the importer already imports reputation as likes, I would do a cross-table insert query on the vBulletin database to create reputation records from the "thank you" records. Then the importer should pick that up.

Code:
INSERT INTO reputation (postid, userid, reputation, whoadded, reason, dateline)
SELECT pt.postid, p.userid, 1, pt.userid, '', pt.date
FROM post_thanks AS pt
LEFT JOIN post AS p ON (p.postid = pt.postid);

Run this query on the vBulletin database before the import.

Although this thread is rather old, it works fine for vB4.2.1 with the core vB4-importer in XF 1.2.0. Thank you so much, Jake!

BTW: I've emptyed the table "reputation" in vB4 before running that query, because I never used the reputation system on vB - and there was only trial and old rubbish inside. Furthermore one should know, that the amount of likes imported into XF is much less than the amount of post_thanks/reputation in the vB tables - depending on the number of posts you delete in your forums. I struggled shortly because of that, missing 25k of likes, before I had the idea, that likes from deleted posts of course won't be imported.
 
Top Bottom