Resource icon

vBulletin Big Board Importer [vBulletin 3 + vBulletin 4] [Paid] 1.5.0

No permission to buy ($150.00)
My Import doesn't works: The Export run great. But the Custom User Fields not imported. why?




What can i do?

Import errors can happen as a matter of course and can usually be ignored. The data is being directly dumped and imported without being properly fit and cast for the destination fields, so you can get expected errors like "data too long" and "incorrect integer". It still works though.

User fields must be mapped manually. Find this code in the exporter:

Code:
		$start = microtime(true);
		echo "          skipping user fields";
		//Map any custom user feilds you have here. Disabled by default.
		// exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'interests\' AS field_id, field3 AS field_value FROM userfield WHERE field3 != \'\' ORDER BY userid" ' . self::$extraOutCommand . ' > ' . self::$dataDir . 'xf_user_field_value.txt');
		// exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'twitter\' AS field_id, field14 AS field_value FROM userfield WHERE field14 != \'\' ORDER BY userid" ' . self::$extraOutCommand . ' >> ' . self::$dataDir . 'xf_user_field_value.txt');
		// exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'last_bump_date\' AS field_id, field17 AS field_value FROM userfield WHERE field17 > 0 ORDER BY userid" ' . self::$extraOutCommand . ' >> ' . self::$dataDir . 'xf_user_field_value.txt');
		// exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'icq\' AS field_id, icq AS field_value FROM user WHERE icq != \'\' ORDER BY userid" ' . self::$extraOutCommand . ' >> ' . self::$dataDir . 'xf_user_field_value.txt');
		// exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'aim\' AS field_id, aim AS field_value FROM user WHERE aim != \'\' ORDER BY userid" ' . self::$extraOutCommand . ' >> ' . self::$dataDir . 'xf_user_field_value.txt');
		// exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'yahoo\' AS field_id, yahoo AS field_value FROM user WHERE yahoo != \'\' ORDER BY userid" ' . self::$extraOutCommand . ' >> ' . self::$dataDir . 'xf_user_field_value.txt');
		// exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'skype\' AS field_id, skype AS field_value FROM user WHERE skype != \'\' ORDER BY userid" ' . self::$extraOutCommand . ' >> ' . self::$dataDir . 'xf_user_field_value.txt');
		// exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'msn\' AS field_id, msn AS field_value FROM user WHERE msn != \'\' ORDER BY userid" ' . self::$extraOutCommand . ' >> ' . self::$dataDir . 'xf_user_field_value.txt');
 
Just a quickie about the custom user fields. We have one that's a checkbox. I've set up the target XenForo userfield as a dropdown list with Yes or No choices only.
How do I modify one of the above lines to accept a checked box (I believe the vb table stores a value of 1) into XenForo as a Yes.....and an unchecked (else) a No. (It's a required user field). Thanks
 
Just a quickie about the custom user fields. We have one that's a checkbox. I've set up the target XenForo userfield as a dropdown list with Yes or No choices only.
How do I modify one of the above lines to accept a checked box (I believe the vb table stores a value of 1) into XenForo as a Yes.....and an unchecked (else) a No. (It's a required user field). Thanks

Example (red code):

Rich (BB code):
exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'interests\' AS field_id, IF(field3 = 1, 'Yes', 'No') AS field_value AS field_value FROM userfield WHERE field3 != \'\' ORDER BY userid" ' . self::$extraOutCommand . ' > ' . self::$dataDir . 'xf_user_field_value.txt');
 
Works a peach, thanks. For anyone else reading that wants to do this, I had to tweak it slightly

Code:
exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary;SELECT SQL_NO_CACHE userid AS user_id, \'xenforofieldname\'     AS field_id, IF(field5 = 1, \'Yes\', \'No\') AS field_value FROM userfield  ORDER BY userid" ' . self::$extraOutCommand . ' >> ' . self::$dataDir . 'xf_user_field_value.txt');

As vBulletin stores an unchecked option as an empty field, I had to remove the WHERE statement, and I also needed to escape the quotes around the Yes/No values.
 
@Slavik or @Jake Bunce does this take into consideration vbulletin prefix?

Because I got this error:
Code:
exporting posts...
  postsERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.post' doesn't exist
rm: cannot remove `/home/gamerz/public_html/demo/importData/xf_post_*': No such file or directory
 (0 records in 0.01s)...
  post IPsERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.post' doesn't exist
 (0 records in 0.01s)...
  reputation as likesERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.reputation' doesn't exist
 (0 records in 0.01s)...
  reported postsERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.thread' doesn't exist
 (0 records in 0.01s)...
  reported post commentsERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.thread' doesn't exist
 (0 records in 0.01s)...
  reported profile postsERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.thread' doesn't exist
 (0 records in 0.01s)...
  reported profile post commentsERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.thread' doesn't exist
 (0 records in 0.01s)...
  reported private messagesERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.thread' doesn't exist
 (0 records in 0.01s)...
  reported private message commentsERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.thread' doesn't exist
 (0 records in 0.01s)...
  post edit historyERROR 1146 (42S02) at line 1: Table 'gamerz_vbtestsite.postedithistory' doesn't exist
 (0 records in 0.01s)...
Total time for posts: 0.10s
root@server [~]#

What is wrong here?
 
It does not.
I had a similar issue as we used a table prefix too. I did start modifying the code to take into account a table prefix variable that I declared at the top.
However, I realised it would be quicker to just modify my vbulletin install.
All I had to do was modify includes/config.php, my photopost-inc,php or photopost-int.php and then drop the prefix from the tables in PHPMyAdmin.
Oh and then I had to modify a Photopost database table manually, take the prefix out of one of the option fields to get it working again.
 
Select the database, then go to the Structure tab.
Scroll to the bottom and then "Check All"
Click on "With checked" and select "Edit prefix" or "Change prefix" (I forget which).
It gives you two options, enter your current prefix at the top (With underscore if you're using it...I was using vb_ )
Then leave the destination one blank.

Do make sure you turn your forum off first then also change includes/config.php to reflect the table prefix change.
Also if you have other plugins they *may* need editing in their own way too.
 
@Marcel, thanks, that worked perfect.

@Slavik or @Jake Bunce I have posts working, but now I get this error when doing users.

Code:
 Make Selection [1-9]: 2

exporting users...
  user & user authenticate
An exception occurred: Mysqli prepare error: SELECT command denied to user 'gamerz_xenadm'@'localhost' for table 'user' in /home/gamerz/public_html/demo/library/Zend/Db/Statement/Mysqli.php on line 77
#0 /home/gamerz/public_html/demo/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('??????SELECT us...')
#1 /home/gamerz/public_html/demo/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), '??????SELECT us...')
#2 /home/gamerz/public_html/demo/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('??????SELECT us...')
#3 /home/gamerz/public_html/demo/library/Zend/Db/Adapter/Abstract.php(734): Zend_Db_Adapter_Abstract->query('??????SELECT us...', Array)
#4 /home/gamerz/public_html/demo/Export.php(325): Zend_Db_Adapter_Abstract->fetchAll('??????SELECT us...')
#5 /home/gamerz/public_html/demo/Export.php(1853): DigitalPointExporter->users()
#6 {main}

User gamerz_xenadm has all privileges already:
upload_2013-10-2_22-7-36.webp

What have I done wrong?
 
Back
Top Bottom