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

Import Thanks from vBulletin

Discussion in 'XenForo Development Discussions' started by majafy, Aug 8, 2016.

  1. majafy

    majafy Member


    I wrote a simple script to read thanks from vbulletin and then insert into xenforo tables.



    $q1 mysql_query("SELECT * FROM tmp_like
                       WHERE id > "
                         AND id <= "
                       ORDER BY id ASC"
    $r1 mysql_fetch_assoc($q1)) {
    mysql_query("INSERT INTO xf_liked_content
                     VALUES (null,

    mysql_query("UPDATE xf_user
                    SET like_count = like_count + 1
                    WHERE user_id = "

    $lastid $r1['id'];

    "Last import id : <a href=\"like.php?next=".$lastid."\">".$lastid."</a>";

    Is it sufficient for importing thanks from vbulletin to xenforo likes ?
  2. MtoR

    MtoR Well-Known Member


    This does seem fine if you get a look at the XenForo_Model_Like and the function likeContent.
    Which is called with params 'post / post id / post user id when liking a post.

    One question though, in your code you are sure that the post id while be the one in xf ?


Share This Page