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

XF 1.4 manually import dbtech thanks

Jake Bunce

XenForo moderator
Staff member
#1
I am posting this here for reference.

This assumes you enabled the option during the import to preserve the source ids.

If you use the "dbtech thanks" addon in vB and you want to manually import those "thanks" as "likes" then run this query:

Code:
INSERT INTO XFdbname.`xf_liked_content` (content_type, content_id, like_user_id, like_date, content_user_id)
	SELECT 'post', dbt.contentid, dbt.userid, dbt.dateline, post.userid
        FROM vBdbname.`dbtech_thanks_entry` AS dbt
        LEFT JOIN vBdbname.`post` AS post ON (post.postid = dbt.contentid)
ON DUPLICATE KEY UPDATE
        content_id = VALUES(content_id);
Then run this script:

https://xenforo.com/community/threa...t-profile-post-like-caches.42384/#post-457352
 

Donny

Active member
#3
URLS need redirecting. You need an example?

Old domain.com/45-forum-category/565767-thread-title.html
New domain.com/threads/thread-title.75872/

etc
 

Donny

Active member
#4
I am posting this here for reference.

This assumes you enabled the option during the import to preserve the source ids.

If you use the "dbtech thanks" addon in vB and you want to manually import those "thanks" as "likes" then run this query:

Code:
INSERT INTO XFdbname.`xf_liked_content` (content_type, content_id, like_user_id, like_date, content_user_id)
    SELECT 'post', dbt.contentid, dbt.userid, dbt.dateline, post.userid
        FROM vBdbname.`dbtech_thanks_entry` AS dbt
        LEFT JOIN vBdbname.`post` AS post ON (post.postid = dbt.contentid)
ON DUPLICATE KEY UPDATE
        content_id = VALUES(content_id);
Then run this script:

https://xenforo.com/community/threa...t-profile-post-like-caches.42384/#post-457352
The old and new forums are on different databases. The same server and IP, just different databases. I wanted to start a complete fresh this time. The old forum had been on that DB for around 8 years and with various customisations over the years it was very messy.
 
#5
1. Keyword not recognized (near "KEY)
2. Unexpected Token (near "=")


on query:
Code:
INSERT INTO XFDB.'xf_liked_content' (content_type, content_id, like_user_id, like_date, content_user_id)
SELECT 'post', dbt.contentid, dbt.userid, dbt.dateline, post.userid
        FROM VBDB.'dbtech_thanks_entry' AS dbt
        LEFT JOIN VBDB.'post' AS post ON (post.postid = dbt.contentid)
ON DUPLICATE KEY UPDATE content_id = VALUES(content_id);
There's any angel can help me? :3