Hornstar
Well-known member
Slavik I now have the importer working and I am ready to try and get the likes importing. I am not sure how to alter it because with my dbtech likes I have both thanks and likes and I need to import these into the one likes on xf. Here is the dbtech schema:Not yet, however you can just alter one of the other likes import code, just change the feild names to the ones your system uses.
View attachment 55646 View attachment 55647
I am assuming this is what needs to be altered:
Code:
// Likes
$start = microtime(true);
echo " post thanks as likes";
exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SET @like_id = 0;SELECT SQL_NO_CACHE @like_id:=@like_id+1 AS like_id, \'post\' AS content_type, post_thanks.postid AS content_id, post_thanks.userid AS like_user_id, post_thanks.date AS like_date, post.userid AS content_user_id FROM post_thanks LEFT JOIN post ON (post.postid = post_thanks.postid) ORDER BY post_thanks.id" ' . self::$extraOutCommand . ' > ' . self::$dataDir . 'xf_liked_content.txt');
echo " (" . number_format(intval(shell_exec('wc -l ' . self::$dataDir . 'xf_liked_content.txt'))) . ' records in ' . number_format(microtime(true) - $start, 2) . "s)...\r\n";
}
else if (self::$doVbseoLikes)
{
Thanks