[Convertor] vBulletin 3.x to phpBB3

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Anti-Spam Guide
XS-Software
Registered User
Posts: 4
Joined: Thu Apr 01, 2010 4:30 pm

Re: [Convertor] vBulletin 3.x to phpBB3

Post by XS-Software »

I've found a way to fix it.

In file: convert_vb30.php
On line 390:
I edited the code and in the end it was:

Code: Select all

array('topic_title',			'thread.title',			'phpbb_set_encoding'),
So I removed the utf shit there.. ;)
And it worked correct. :)
XS-Software
Registered User
Posts: 4
Joined: Thu Apr 01, 2010 4:30 pm

Re: [Convertor] vBulletin 3.x to phpBB3

Post by XS-Software »

This time the problem cant be solved by editing this part of the code.
I tried the original one, and the one that i made but the result is the same.
This time it's with my Bulgarian board which charset is windows-1251
So I put it in the file - windows-1251.
But after installing the problem is in the forums' and descs' names
(like on the picture below)
Image

So anyone can fix this? :cry:
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote

Re: [Convertor] vBulletin 3.x to phpBB3

Post by D¡cky »

Your forum description looks fine, so I would try using the same thing for the Category and Forum titles

You could also try this:
For categories

Code: Select all

			'forum_name'	=> htmlspecialchars(phpbb_set_default_encoding($row['title']), ENT_COMPAT, 'UTF-8'),
FOR forums

Code: Select all

				'forum_name'		=> htmlspecialchars(phpbb_set_default_encoding($row['title']), ENT_COMPAT, 'UTF-8'),
				'forum_desc'		=> htmlspecialchars(phpbb_set_default_encoding($row['description']), ENT_COMPAT, 'UTF-8'),
Have you hugged someone today?
XS-Software
Registered User
Posts: 4
Joined: Thu Apr 01, 2010 4:30 pm

Re: [Convertor] vBulletin 3.x to phpBB3

Post by XS-Software »

Now it became like this:
Image
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote

Re: [Convertor] vBulletin 3.x to phpBB3

Post by D¡cky »

Sorry about that. Those are blank because I gave you $row instead or $row1.

You do realize there are three loops for inserting the forums? One for the categories and two for the forums.

You could try
For categories

Code: Select all

'forum_name'		=> htmlspecialchars(phpbb_set_default_encoding(htmlspecialchars_decode(html_entity_decode($row['title']), ENT_QUOTES)), ENT_COMPAT, 'UTF-8'),
For forums

Code: Select all

'forum_name'		=> htmlspecialchars(phpbb_set_default_encoding(htmlspecialchars_decode(html_entity_decode($row1['title']), ENT_QUOTES)), ENT_COMPAT, 'UTF-8'),
'forum_desc'		=> htmlspecialchars(phpbb_set_default_encoding(htmlspecialchars_decode(html_entity_decode($row1['description']), ENT_QUOTES)), ENT_COMPAT, 'UTF-8'),
There are so many variables, how characters are stored in the database, MySQL connection collation and table & field collations, It is difficult to tell you exactly what to do. I have had the same problem myself and I ended up manually editing the titles and descriptions after the conversion.
Have you hugged someone today?
User avatar
Tom V
Registered User
Posts: 118
Joined: Sun Feb 26, 2006 5:38 pm
Location: Belgium
Name: Tom Vervoort

Re: [Convertor] vBulletin 3.x to phpBB3

Post by Tom V »

D¡cky wrote:phpBB will take poll option id's only up to 127. To increase, change the poll_option_id column from tinyint to smallint.

Code: Select all

ALTER TABLE `phpbb_poll_options` CHANGE `poll_option_id` `poll_option_id` SMALLINT( 4 ) NOT NULL DEFAULT '0' 
That's not the real problem, the real problem is the function vb_import_polloption
It inserts the $poll_id instead of the order $i

so:
OPEN functions_vb30.php
FIND

Code: Select all

$sql='insert into '.POLL_OPTIONS_TABLE.' (poll_option_id,topic_id,poll_option_text,poll_option_total) values('.$poll_id.','.$topicid.',\''.$poll_option.'\','.$vote[$i-1].')'; 
REPLACE WITH

Code: Select all

$sql='insert into '.POLL_OPTIONS_TABLE.' (poll_option_id,topic_id,poll_option_text,poll_option_total) values('.$i.','.$topicid.',\''.$poll_option.'\','.$vote[$i-1].')'; 
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote

Re: [Convertor] vBulletin 3.x to phpBB3

Post by D¡cky »

Tom V wrote:
D¡cky wrote:phpBB will take poll option id's only up to 127. To increase, change the poll_option_id column from tinyint to smallint.

Code: Select all

ALTER TABLE `phpbb_poll_options` CHANGE `poll_option_id` `poll_option_id` SMALLINT( 4 ) NOT NULL DEFAULT '0' 
That's not the real problem, the real problem is the function vb_import_polloption
It inserts the $poll_id instead of the order $i

so:
OPEN functions_vb30.php
FIND

Code: Select all

$sql='insert into '.POLL_OPTIONS_TABLE.' (poll_option_id,topic_id,poll_option_text,poll_option_total) values('.$poll_id.','.$topicid.',\''.$poll_option.'\','.$vote[$i-1].')'; 
REPLACE WITH

Code: Select all

$sql='insert into '.POLL_OPTIONS_TABLE.' (poll_option_id,topic_id,poll_option_text,poll_option_total) values('.$i.','.$topicid.',\''.$poll_option.'\','.$vote[$i-1].')'; 
Thanks for pointing that out, but shouldn't it be $i-1 to go along $vote[$i-1] and $option[$i-1]? I am unable to test at the moment.
Have you hugged someone today?
User avatar
Tom V
Registered User
Posts: 118
Joined: Sun Feb 26, 2006 5:38 pm
Location: Belgium
Name: Tom Vervoort

Re: [Convertor] vBulletin 3.x to phpBB3

Post by Tom V »

In a "normal" board It's starting from 1 ... So no, just $i
askhy
Registered User
Posts: 2
Joined: Sun Apr 18, 2010 8:13 am

Re: [Convertor] vBulletin 3.x to phpBB3

Post by askhy »

Wheni strated the conversion it give me this error

Code: Select all

Fatal error: Call to undefined function phpbb_set_encoding() in /home/fullthrr/public_html/forum/includes/functions_convert.php(1281) : eval()'d code on line 1
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote

Re: [Convertor] vBulletin 3.x to phpBB3

Post by D¡cky »

askhy wrote:Wheni strated the conversion it give me this error

Code: Select all

Fatal error: Call to undefined function phpbb_set_encoding() in /home/fullthrr/public_html/forum/includes/functions_convert.php(1281) : eval()'d code on line 1
Are you using the convertor from the first post in this topic? There is no call to phpbb_set_encoding on line 1281 and the function is definitely there.
Have you hugged someone today?
askhy
Registered User
Posts: 2
Joined: Sun Apr 18, 2010 8:13 am

Re: [Convertor] vBulletin 3.x to phpBB3

Post by askhy »

yes, i downloaded from the first post, put every file in his place like in the tutorial, vb and phpbb are in the same database...

Later edit, made it, was missing a file from the convertor folder :D
Last edited by askhy on Mon Apr 19, 2010 7:28 pm, edited 1 time in total.
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote

Re: [Convertor] vBulletin 3.x to phpBB3

Post by D¡cky »

askhy wrote:yes, i downloaded from the first post, put every file in his place like in the tutorial, vb and phpbb are in the same database...
askhy wrote:Wheni strated the conversion it give me this error

Code: Select all

Fatal error: Call to undefined function phpbb_set_encoding() in /home/fullthrr/public_html/forum/includes/functions_convert.php(1281) : eval()'d code on line 1
Heh. My fault for not reading your error message closely enough. There is no call to phpbb_set_encoding in includes/functions_convert.php. You have done something wrong and I am not sure what that is. Maybe you have renamed a file?

The first thing is, you need to have the install directory from the original phpBB3 installation in place. Then you upload the vB3 convertor files to the install directory. Once the files are in place, you point your browser to install/index.php and click the convert tab. You should now see the list of available convertors, one of them being the vBulletin convertor.
Have you hugged someone today?
User avatar
Paul1978
Registered User
Posts: 8
Joined: Fri Apr 30, 2010 3:27 pm
Location: Los Angeles, CA.
Name: Paul Rayden

Re: [Convertor] vBulletin 3.x to phpBB3

Post by Paul1978 »

i have the following error in the convertor vb3.8.4 to phpbb3, help please..

Code: Select all

Error General
SQL ERROR [ mysql4 ]

Duplicate entry '16777215' for key 1 [1062]

SQL

INSERT INTO community_users (username, username_clean, user_password, user_pass_convert, user_email, user_email_hash, group_id, user_type, user_permissions, user_timezone, user_dateformat, user_lang, user_style, user_actkey, user_ip, user_regdate, user_passchg, user_options, user_new, user_inactive_reason, user_inactive_time, user_lastmark, user_lastvisit, user_lastpost_time, user_lastpage, user_posts, user_dst, user_colour, user_occ, user_interests, user_avatar, user_avatar_type, user_avatar_width, user_avatar_height, user_new_privmsg, user_unread_privmsg, user_last_privmsg, user_message_rules, user_full_folder, user_emailtime, user_notify, user_notify_pm, user_notify_type, user_allow_pm, user_allow_viewonline, user_allow_viewemail, user_allow_massemail, user_sig, user_sig_bbcode_uid, user_sig_bbcode_bitfield, user_form_salt) VALUES ('AdsBot [Google]', 'adsbot [google]', '', 0, '', '00', 59, 2, '', 0, 'D, d M Y, H:i', 'es', 1, '', '', 1272613865, 1272613865, 230271, 0, 0, 0, 1272613865, 0, 0, '', 0, 0, '9E8DA7', '', '', '', 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1, 0, 1, 1, 1, 0, '', '', '', '6b16f61b304ba9b7')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal_mysql->sql_error()

FILE: includes/functions_user.php
LINE: 250
CALL: dbal_mysql->sql_query()

FILE: includes/functions_convert.php
LINE: 1883
CALL: user_add()

FILE: install/install_convert.php(1652) : eval()'d code
LINE: 2
CALL: add_bots()

FILE: install/install_convert.php
LINE: 1652
CALL: eval()

FILE: install/install_convert.php
LINE: 799
CALL: install_convert->jump()

FILE: install/install_convert.php
LINE: 203
CALL: install_convert->convert_data()

FILE: install/index.php
LINE: 409
CALL: install_convert->main()

FILE: install/index.php
LINE: 286
CALL: module->load()
The end of time has come..
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote

Re: [Convertor] vBulletin 3.x to phpBB3

Post by D¡cky »

Paul1978 wrote:i have the following error in the convertor vb3.8.4 to phpbb3, help please..

Code: Select all

Error General
SQL ERROR [ mysql4 ]

Duplicate entry '16777215' for key 1 [1062]

SQL

INSERT INTO community_users (username, username_clean, user_password, user_pass_convert, user_email, user_email_hash, group_id, user_type, user_permissions, user_timezone, user_dateformat, user_lang, user_style, user_actkey, user_ip, user_regdate, user_passchg, user_options, user_new, user_inactive_reason, user_inactive_time, user_lastmark, user_lastvisit, user_lastpost_time, user_lastpage, user_posts, user_dst, user_colour, user_occ, user_interests, user_avatar, user_avatar_type, user_avatar_width, user_avatar_height, user_new_privmsg, user_unread_privmsg, user_last_privmsg, user_message_rules, user_full_folder, user_emailtime, user_notify, user_notify_pm, user_notify_type, user_allow_pm, user_allow_viewonline, user_allow_viewemail, user_allow_massemail, user_sig, user_sig_bbcode_uid, user_sig_bbcode_bitfield, user_form_salt) VALUES ('AdsBot [Google]', 'adsbot [google]', '', 0, '', '00', 59, 2, '', 0, 'D, d M Y, H:i', 'es', 1, '', '', 1272613865, 1272613865, 230271, 0, 0, 0, 1272613865, 0, 0, '', 0, 0, '9E8DA7', '', '', '', 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1, 0, 1, 1, 1, 0, '', '', '', '6b16f61b304ba9b7')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal_mysql->sql_error()

FILE: includes/functions_user.php
LINE: 250
CALL: dbal_mysql->sql_query()

FILE: includes/functions_convert.php
LINE: 1883
CALL: user_add()

FILE: install/install_convert.php(1652) : eval()'d code
LINE: 2
CALL: add_bots()

FILE: install/install_convert.php
LINE: 1652
CALL: eval()

FILE: install/install_convert.php
LINE: 799
CALL: install_convert->jump()

FILE: install/install_convert.php
LINE: 203
CALL: install_convert->convert_data()

FILE: install/index.php
LINE: 409
CALL: install_convert->main()

FILE: install/index.php
LINE: 286
CALL: module->load()
Is this your first time converting?
What is the highest user_id in the vBulletin users table?
Have you hugged someone today?
User avatar
Paul1978
Registered User
Posts: 8
Joined: Fri Apr 30, 2010 3:27 pm
Location: Los Angeles, CA.
Name: Paul Rayden

Re: [Convertor] vBulletin 3.x to phpBB3

Post by Paul1978 »

D¡cky wrote:
Paul1978 wrote:i have the following error in the convertor vb3.8.4 to phpbb3, help please..

Code: Select all

Error General
SQL ERROR [ mysql4 ]

Duplicate entry '16777215' for key 1 [1062]

SQL

INSERT INTO community_users (username, username_clean, user_password, user_pass_convert, user_email, user_email_hash, group_id, user_type, user_permissions, user_timezone, user_dateformat, user_lang, user_style, user_actkey, user_ip, user_regdate, user_passchg, user_options, user_new, user_inactive_reason, user_inactive_time, user_lastmark, user_lastvisit, user_lastpost_time, user_lastpage, user_posts, user_dst, user_colour, user_occ, user_interests, user_avatar, user_avatar_type, user_avatar_width, user_avatar_height, user_new_privmsg, user_unread_privmsg, user_last_privmsg, user_message_rules, user_full_folder, user_emailtime, user_notify, user_notify_pm, user_notify_type, user_allow_pm, user_allow_viewonline, user_allow_viewemail, user_allow_massemail, user_sig, user_sig_bbcode_uid, user_sig_bbcode_bitfield, user_form_salt) VALUES ('AdsBot [Google]', 'adsbot [google]', '', 0, '', '00', 59, 2, '', 0, 'D, d M Y, H:i', 'es', 1, '', '', 1272613865, 1272613865, 230271, 0, 0, 0, 1272613865, 0, 0, '', 0, 0, '9E8DA7', '', '', '', 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1, 0, 1, 1, 1, 0, '', '', '', '6b16f61b304ba9b7')

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal_mysql->sql_error()

FILE: includes/functions_user.php
LINE: 250
CALL: dbal_mysql->sql_query()

FILE: includes/functions_convert.php
LINE: 1883
CALL: user_add()

FILE: install/install_convert.php(1652) : eval()'d code
LINE: 2
CALL: add_bots()

FILE: install/install_convert.php
LINE: 1652
CALL: eval()

FILE: install/install_convert.php
LINE: 799
CALL: install_convert->jump()

FILE: install/install_convert.php
LINE: 203
CALL: install_convert->convert_data()

FILE: install/index.php
LINE: 409
CALL: install_convert->main()

FILE: install/index.php
LINE: 286
CALL: module->load()
Is this your first time converting?
What is the highest user_id in the vBulletin users table?
phpbb3
last "user_id" in "community_users" table
22994 > 22995 > 16777215

vbulletin3.8.4
last "userid" in "user" table
22997769 > 22997770 > 22997771
The end of time has come..

Return to “[3.0.x] Convertors”