1. 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

Discussion in 'Installation, Upgrade, and Import Support' started by Jake Bunce, Feb 21, 2015.

  1. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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
     
  2. Donny

    Donny Active Member

    Thank you!
     
  3. Donny

    Donny Active Member

    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
     
  4. Donny

    Donny Active Member

    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. murdercode

    murdercode Member

    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
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    @murdercode

    I think your single quotes are messing up the syntax. Use backquotes like in my original post.
     

Share This Page