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

How to import dbtech likes/thanks to xenforo

Hornstar

Well-known member
#1
If this is the wrong section, I apologise (please move).

I am currently on vbulletin 3.8 and am preparing to import over to xenforo :)

I would like to also import over dragonbyte tech likes/thanks over to xenforo.

I found this old modificiation: http://xenforo.com/community/threads/import-post-thanks-to-likes.5939/
with this change to accommodate dbtech: http://xenforo.com/community/threads/import-post-thanks-to-likes.5939/page-2#post-112954

However when I pressed the import button to import the thanks/likes I got this error:
Code:
Server Error
Mysqli prepare error: Column 'entryid' in where clause is ambiguous

[LIST=1]
[*]Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
[*]Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
[*]Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
[*]Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 734
[*]Zend_Db_Adapter_Abstract->fetchAll() in PostThanksImporter/Importer/vBulletin.php at line 46
[*]PostThanksImporter_Importer_vBulletin->stepPostThanks() in XenForo/Importer/Abstract.php at line 77
[*]XenForo_Importer_Abstract->runStep() in XenForo/ControllerAdmin/Import.php at line 180
[*]XenForo_ControllerAdmin_Import->_runStep() in XenForo/ControllerAdmin/Import.php at line 232
[*]XenForo_ControllerAdmin_Import->_startStep() in XenForo/ControllerAdmin/Import.php at line 175
[*]XenForo_ControllerAdmin_Import->actionStartStep() in XenForo/FrontController.php at line 337
[*]XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
[*]XenForo_FrontController->run() in /home/site/public_html/forum/admin.php at line 13
[/LIST]
Any advice would be greatly appreciated so I can move over to xenforo :)
 

Hornstar

Well-known member
#4
Copy that entire step into the vB3 importer, also adding that step to the getSteps() function in that importer.
Jake I have now bought the vb3 bigboard importer because of the speed and extra data it imports. I want to change over the thanks to the dbtech thanks/likes. I want to ensure I get it 100%. Consider me a bit of a novice, so what do I need to do?

Is this the part I need to change:
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)
     {
and if so, what do I need to change so my vb3 dbtech thanks and likes get imported? Thanks
 
Last edited:
#8
I have moved over a few sites already and skipped the DBTech likes/thanks because I got errors and didn't want to stop the import because of that.

So now I have thousands of mention tags all over the place. I would really appreciate it if anyone would care to offer up a sql comment to help get these moved into XF, i've got TagMe installed (is tagging part of the core system now or not)?

Example of what was imported ...

[MENTION=12345]UserName[/MENTION]
 

Ridemonkey

Well-known member
#9
I have moved over a few sites already and skipped the DBTech likes/thanks because I got errors and didn't want to stop the import because of that.

So now I have thousands of mention tags all over the place. I would really appreciate it if anyone would care to offer up a sql comment to help get these moved into XF, i've got TagMe installed (is tagging part of the core system now or not)?

Example of what was imported ...

[MENTION=12345]UserName[/MENTION]
Tagging is part of the core system now. Tag Me extends on that functionality a little.

Should be pretty simple since the user tagging syntax for XF is just USER=12345 instead of MENTION=12345. You'd need two different update statements:

Code:
UPDATE `xf_post` SET `message` = replace(message, '[MENTION', '[USER')

UPDATE `xf_post` SET `message` = replace(message, 'MENTION]', 'USER]')