Hi,
I wrote a simple script to read thanks from vbulletin and then insert into xenforo tables.
Is it sufficient for importing thanks from vbulletin to xenforo likes ?
I wrote a simple script to read thanks from vbulletin and then insert into xenforo tables.
PHP:
<?php
@mysql_connect("localhost","root","");
@mysql_select_db("xen");
$q1 = mysql_query("SELECT * FROM tmp_like
WHERE id > ".$_GET['next']."
AND id <= ".($_GET['next']+40000)."
ORDER BY id ASC");
while($r1 = mysql_fetch_assoc($q1)) {
mysql_query("INSERT INTO xf_liked_content
VALUES (null,
'post',
'".$r1['postid']."',
'".$r1['userid']."',
'".$r1['date']."',
'".$r1['content_userid']."'
)");
mysql_query("UPDATE xf_user
SET like_count = like_count + 1
WHERE user_id = ".$r1['content_userid']);
$lastid = $r1['id'];
}
echo "Last import id : <a href=\"like.php?next=".$lastid."\">".$lastid."</a>";
Is it sufficient for importing thanks from vbulletin to xenforo likes ?