Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
phpBB2 Importer Details »»
phpBB2 Importer
Version: 1.00, by Nebula Nebula is offline
Developer Last Online: Dec 2009 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-06-2002 Last Update: Never Installs: 257
Is in Beta Stage  
No support by the author.

Heya everyone. This is a beta release of my importer that converts phpBB2 (RC4 or greater) into vBulletin. It should convert into vBulletin 2.2.0 or greater.

To install the script:[list=1][*]Download bbimport_phpbb2.php from this post (You can only download it if you have entered your username in the vBulletin Members Area, DO NOT PRIVATE MESSAGE ME ASKING ME TO SEND IT TO YOU!!)[*]Open your FTP program of choice, and upload it to the /importers directory in your vBulletin folder (You may need to create this folder if you have never run an importer before)[*]Log into your vBulletin Control Panel[*]On the left navigation pane, find the 'Import & Maintenance' section, and click on 'BB Import Systems'[*]In the page that loads, select 'phpBB2 RC4+', and click 'Begin Import'[*]Follow the instructions from there[/list=1]
Post your results here! Let me know anything that goes wrong, or your success story

Current Version: 0.9.5.2

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #82  
Old 07-22-2002, 10:06 PM
ZenithRS ZenithRS is offline
 
Join Date: Jul 2002
Location: Canberra, Australia
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nebula... good work dude. I have a phpBB2 forum which I'm looking to convert over to vBulletin so decided to test your script out on a test server. The import worked fine with the exception of the following...

a) For some reason there was a post with a poll that caused it to crash out. The Jelsoft importer fell over at the same point. Once I deleted that post the import carried on successfully. I'm not sure why it was falling over, but the sql query it was executing was trying to select null id's.

b) Private Messages seem to have all imported OK, but just looking at my own in and out boxes there are quite a few that are identified with the wrong username. i.e. the message is meant for me but the from user displayed is incorrect. This is strange because some are in fact correct.?!?! This is not a biggie, as others have said I can just delete the PM's before import, but would be nice to see it work too

c) Avatars don't seem to be importing at all. No errors reported.

Again, good job. Keep it up :banana:

Cheers

Z
Reply With Quote
  #83  
Old 07-23-2002, 07:27 AM
ZenithRS ZenithRS is offline
 
Join Date: Jul 2002
Location: Canberra, Australia
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've worked out the problem with the Private Messages import. At some stage in the history of my phpBB2 I've deleted a user which left a gap in the sequence of userid's. In this case it was userid 18. The import script doesn't allow for this so phpbb userid 19 gets entered into the vbulletin as userid 18 as 18 is the next available spot...the field must be set to auto increment and the script doesn't "notice" the jump in phpbb's userid's.

I created a dummy user on the phpbb2, and then changed it's userid to 18 to fill in the gap in the sequence. Then ran the import script again. All the private messages are now associated with the correct user ids.

This explains why some had problems with the PM import while others didn't. I haven't delved into Nebula's code to find out why it does this, but I'm sure it will be a simple fix.

Hope this helps.

:banana:

Z
Reply With Quote
  #84  
Old 07-23-2002, 03:36 PM
b.richards b.richards is offline
 
Join Date: Jul 2002
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow . I REALLY appreciate this script. Many blessings to you!
Reply With Quote
  #85  
Old 07-23-2002, 07:53 PM
Chad Beattie Chad Beattie is offline
 
Join Date: Jul 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ZenithRS
I've worked out the problem with the Private Messages import. At some stage in the history of my phpBB2 I've deleted a user which left a gap in the sequence of userid's. In this case it was userid 18. The import script doesn't allow for this so phpbb userid 19 gets entered into the vbulletin as userid 18 as 18 is the next available spot...the field must be set to auto increment and the script doesn't "notice" the jump in phpbb's userid's.

I created a dummy user on the phpbb2, and then changed it's userid to 18 to fill in the gap in the sequence. Then ran the import script again. All the private messages are now associated with the correct user ids.

This explains why some had problems with the PM import while others didn't. I haven't delved into Nebula's code to find out why it does this, but I'm sure it will be a simple fix.

Hope this helps.

:banana:

Z
Hmm. That helps a bit. I know I have created test users in the past and then deleted them. So that is probably why I am seeing this. Well, I hope you find it, that will be nice to get working. But really nothing to much to worry about. Now that you mention it, I don't think my avatars came across either. I was too busy trying to find the post it hung on and then also the PM issue that I didn't pay attention. Anyway, thanks for the info.
Reply With Quote
  #86  
Old 07-25-2002, 01:07 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

An official phpBB2 importer has been released at http://www.vbulletin.com/members/
Reply With Quote
  #87  
Old 07-25-2002, 01:24 AM
ZenithRS ZenithRS is offline
 
Join Date: Jul 2002
Location: Canberra, Australia
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Err.. yeah, but it's not as full featured as Nebula's, which I think was the point of this thread.

BTW, I've also come up with a small script that converts the quote="username" format of phpBB2 to vBulletin's standard format if anyone's interested in it. It's stand alone and can be run after the import.

Cheers

Z
Reply With Quote
  #88  
Old 07-25-2002, 02:04 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The one in the members area does Members, Forums, Threads and Polls
Reply With Quote
  #89  
Old 07-26-2002, 03:33 PM
Chad Beattie Chad Beattie is offline
 
Join Date: Jul 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But still, I think you are missing the point. If you read through this thread you will see everyone that has used the official one thought it was horrible. I can vouch for that. I tried it first, and I was very dissapointed. I purchased vb a week back and my biggest concern was converting my phpBB board over to vb. I would have to say if the only thing available at the time was the offical convertor script, I would have been kicking and screaming to vb asking why they could call a script an 'official phpBB convertor' when it does a horrible job. The script posted here works great. Sure, a couple of things my have issues, but the end result of this script vs the official script is 1000 times better. To be honest, I would have not purchased vb if I had not found this thread. Reading how bad the official script is and what state it leaves your forums in, I would not have wasted my time. But I have to thank Nebula for putting in the time to do something correct. After reading how well his script works, and using it myself, I can now convert over with out any major issues.

Thanks
Reply With Quote
  #90  
Old 07-26-2002, 03:35 PM
Chad Beattie Chad Beattie is offline
 
Join Date: Jul 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by ZenithRS
Err.. yeah, but it's not as full featured as Nebula's, which I think was the point of this thread.

BTW, I've also come up with a small script that converts the quote="username" format of phpBB2 to vBulletin's standard format if anyone's interested in it. It's stand alone and can be run after the import.

Cheers

Z
Yes, I am very interested in getting a copy of it. Can you post a copy.

Thanks.
Reply With Quote
  #91  
Old 07-27-2002, 12:11 AM
ZenithRS ZenithRS is offline
 
Join Date: Jul 2002
Location: Canberra, Australia
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK... but please please PLEASE backup your database before running this. I'm a builder, so my PHP skills are rudimentary at best. The script did run fine on my 2.2.6 vB.

Here's the code... just put it anywhere on your server and run it.

BACKUP YOUR DATABASE FIRST. This hasn't been tested anywhere other than on my solitary box. Your database is YOUR responsibility.

PHP Code:
<?
connectToDB();
$result=mysql_query("SELECT * FROM post WHERE pagetext LIKE '%[quote=%'");
while ($myrow=mysql_fetch_array($result)) {
    $temp="";
    echo "<b>Found [quote= in post id ".$myrow["postid"]."</b><br>\n";
    $post_string=$myrow["pagetext"];
    $post_string=str_replace("[/quote]","[/B][/QUOTE]",$post_string);
    while(substr_count($post_string,"[quote=\"")) {
        $position=strpos($post_string,"[quote=\"");
        $temp[]=substr($post_string,0,$position+6);
        $temp[]="][i]Originally posted by ";
        $post_string=substr($post_string,$position+8,strlen($post_string));
        $temp[]=substr($post_string,0,strpos($post_string,"\""))." [/i]".chr(13).chr(10)."[B]";
        $post_string=substr($post_string,strpos($post_string,"\"")+2,strlen($post_string)-(strpos($post_string,"\"")+2));
        }
    $temp[]=$post_string;
    $new_post_string=implode("",$temp);
    $new_post_string=addslashes($new_post_string);
    $update_query="UPDATE post SET pagetext='$new_post_string' WHERE postid=".$myrow["postid"];
    $update_result=mysql_query($update_query);
    if(!$update_result)
        die("Couldn't update: ".mysql_error())."<br><br>";
    echo "Post updated successfully... <p>";
    }
echo "SCRIPT COMPLETED";

function connectToDB()
  {
  $link=mysql_connect("dbserver","username","password");
  if(!$link)
    die("Couldn't connect to MySQL");
  mysql_select_db("dbname",$link)
    or die ("Couldn't open forum: ".mysql_error());
  }
?>
Obviously change the database information in the connectToDB function, including the dbname in the mysql_select_db statement.

Hope it works OK.

Cheers

Z
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05562 seconds
  • Memory Usage 2,323KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete