vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   phpBB2 Importer (https://vborg.vbsupport.ru/showthread.php?t=37135)

ZenithRS 07-22-2002 10:06 PM

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

ZenithRS 07-23-2002 07:27 AM

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

b.richards 07-23-2002 03:36 PM

Wow . I REALLY appreciate this script. Many blessings to you!

Chad Beattie 07-23-2002 07:53 PM

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.

Scott MacVicar 07-25-2002 01:07 AM

An official phpBB2 importer has been released at http://www.vbulletin.com/members/

ZenithRS 07-25-2002 01:24 AM

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

Scott MacVicar 07-25-2002 02:04 PM

The one in the members area does Members, Forums, Threads and Polls

Chad Beattie 07-26-2002 03:33 PM

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 :)

Chad Beattie 07-26-2002 03:35 PM

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.

ZenithRS 07-27-2002 12:11 AM

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

frozen 08-03-2002 04:45 AM

How would I go about using this script if I have two seperate logins for mysql. ie:

phpBB2
username: phpBB
database: phpBBforums
passwd: phpBBpass

Vbulletin
username: vbulletin
database: vbulletinforums
passwd: vbulletinpass

As you can see when I try to perform the import It can not connect to my phpBB database because it uses a different username/pass then what is listed in vbulletin's config.php

thanks in advance

stuuu 08-12-2002 02:06 PM

I have tried this 3 times now, I keep recieving this error!

Quote:

PostID 2418 DONE (1 OF 15) PostID 2420 DONE (2 OF 15) PostID 2424 DONE (3 OF 15) PostID 2454 DONE (4 OF 15) PostID 2455 DONE (5 OF 15) PostID 2456 DONE (6 OF 15) PostID 2459 DONE (7 OF 15) PostID 2461 DONE (8 OF 15) PostID 2462 DONE (9 OF 15) PostID 2464 DONE (10 OF 15) PostID 2465 DONE (11 OF 15) PostID 2476 DONE (12 OF 15) PostID 2527 DONE (13 OF 15) PostID 2533
Fatal error: Maximum execution time of 30 seconds exceeded in /home/webhost/xxx/dnbforum.com/importers/bbimport_phpbb2.php on line 167
Help!

stuuu 08-12-2002 02:26 PM

Oh, I get the error while importing topics!

Chad Beattie 08-12-2002 04:48 PM

Here is what I suggest. First make a backup of your phpBB database. Then find the topic that it is hanging on and delete it. On my main site which I am getting ready to convert, I have had to delete at least 4 topics now to get it working. Once I make sure everything is ok, I will then wipe out my vb database and start from scratch. When I tested this on another one of my test boards, I had 2 topics that needed removed before the script would run. But after getting rid of those 2 topics, it worked fine.

wstahlhut 08-18-2002 02:47 AM

seeing a weirdness, I am getting timeouts errors also... I am not sure it is the same topic... digging more

***
Edit
***

Same post... going to dump it and see how it goes...

Nebula 08-23-2002 07:12 PM

Sorry I've been away for so long.

Or, you could set the amount of topics it parses per cycle even lower...

Nebula 08-25-2002 03:15 PM

Version 0.9.5 is out. This version fixes the problem with avatars not importing. They now import without a problem, though if you choose to import avatars, it may take extra time during the process, since vBulletin has to grab every image file, which can take some time ;)

I also updated the BBCode routine to support the 'reply with quote' tag. Basicially, it now converts [ quote=Nebula] into [ quote]Topic originally posted by Nebula.

Also, I submitted this version to JelSoft, and they are considering merging this with their official one. We'll see how it goes ;)

wstahlhut 08-29-2002 07:17 PM

Quote:

Originally posted by Nebula
Sorry I've been away for so long.

Or, you could set the amount of topics it parses per cycle even lower...

the lower post count is not working in the new version, I had 7 post I had to remove last time before I got tired of doing that...

thanks

William :banana: :bunny:

Nebula 08-29-2002 08:12 PM

...I'm curious what the posts were that you had to delete...did they have anything in them, like a poll or something?

Chad Beattie 08-30-2002 08:21 PM

Great to hear about the avatars. I am getting ready to convert my production board over this weekend so I will be doing another test run on it probably tomarrow. I will post links to the threads which cause any hangups so you can check them out.

Thanks again for all your work :)

p.s. Has anyone figured out how to transfer user groups over yet?

Nebula 08-30-2002 08:37 PM

good luck, I hope everything goes well. Also, if you have a lot of announcements, BBCode is not parsed (little bug I found today. Doesn't mean BBCode won't work, but some may not show up correctly.)

I may release a new version soon.

Nope, haven't figured out how user groups work. Too stupid of a system ;)

JdS 09-06-2002 08:57 PM

OK, I actually read through all 7 pages and I figured out that I am NOT the only person getting timed-out. Seems to be something occuring recently or what?

Anyway, this importer does a much better job than the official one; if only it didn't time out like it does... :)

wstahlhut 09-06-2002 09:47 PM

nope mine are bad... and Nebula was looking at a copy of my database, but I have not hear back in a while...

JdS 09-06-2002 10:26 PM

mine worked eventually... it was just one post with bbcodes for [color] and [size]

wstahlhut 09-06-2002 11:03 PM

the problem is that I have 75% of my post are like that...

Nebula 09-07-2002 01:46 AM

The [size] convert routine has been bad since the start...and I've been considering removing it. It appears I will have to, since it's causing problems for people.

wstahlhut 09-07-2002 01:52 AM

there anyway you can just strip it and the color tags out?

Nebula 09-07-2002 01:56 AM

That's what I was planning on having it do. I will see what I can do ;)

wstahlhut 09-07-2002 01:58 AM

GREAT!!!! that will help as lot as the old phpBB tags are just garbage after being imported to vB

geniuscrew 09-21-2002 03:16 PM

I have a problem with this script - although it worked perfectly from phpBB to vB 2.2.7, the end moderator column has assigned every moderator to every forum.

Also I used the same username when setting up my vB, as the one I had on phpBB, so now there are "2" of me - which one is safe to delete?

Thanx for a great hack btw

geniuscrew 09-21-2002 03:48 PM

Actually no need!

Works like a Charm! - Thanx!

minodsy 09-23-2002 06:46 PM

Nebula: this hack just r0x! :D i need to thank you a lot for this work and for distribuiting it freely. great!

I report only a problem with the [size] translation: in large posts it timeouts at the row with the main regexp :( (as reported by other people in these pages). So i had to comment that line and re-import.

Thx anyway

BenJohnson 10-06-2002 06:50 PM

This hack doesn't work too well.

When converting posts, it is not counting them correctly.

For instance, I had 875 threads & 6100 posts. However, the converter makes it say 875 threads & 875 posts.

How does one fix that?

Nebula 10-06-2002 07:30 PM

first off, you probably didn't update counters. And if you did, then maybe you have a hacked phpBB??? it's worked fine for me countless times...

Marshalus 10-10-2002 03:19 AM

I keep coming up with this error:

Database error in vBulletin Control Panel 2.2.7:

Invalid SQL: DELETE FROM session WHERE sessionhash=''
mysql error: Table 'eclipse_phpbb.session' doesn't exist

mysql error number: 1146

Date: Wednesday 09th of October 2002 11:21:15 PM
Script: http://ADDRESS/bbimport_phpbb2.php?s...&anncExpire=30
Referer:


But the thing is, there is not session table in phpBB. Where does it script get this?

pdatoon 10-15-2002 04:17 PM

did someone try the importer on a production VB board?

I want to fusion a PHPbb board with mine and i was wondering if there is any kind of problem. I know it's better to import to a blank VB board.

suggestions?

Nebula 10-15-2002 07:15 PM

Marshalus: that bug has to do with database switching...some versions of PHP/mySQL do not handle it well. It works fine for me, and I can't reproduce that error, though people seem to have it.

pdatoon: Importing into a board with users/posts already there works just as well as when you're importing into a blank board. There is only one concern: say a user registered on your phpBB as 'Nebula'. Then, you shut the phpBB down, move to vBulletin for a few weeks. Nebula creates a new account on the vBulletin. If he names that account 'Nebula', then my script will link all the old phpBB posts to his new username. However, if he registered as 'NebulaDJ', then my script would create a new user 'Nebula', instead of 'NebulaDJ'. The official importer has a step called 'Associate Usernames', where you specify a username on the phpBB, and it can link it to the current vBulletin one. All my script does is check if the usernames are the same. So, if this is important to you, use the official one. If this doesn't matter, you can use mine or the official one...;)

Marshalus 10-18-2002 05:54 AM

What versions of PHP and MySQL are you running?

Also, on the autodetection of usernames, if they have different caps on them, like "marshalus" instead of "Marshalus" will it still compare them as the same user?

Nebula 10-18-2002 09:42 PM

I'm running the most recent versions of everything (OmniHTTPd (Apache doesn't work well for me), PHP, & mySQL). PHP is 4.2.3, and mySQL is 3.23.53.

Also, no, it is case sensitive. Sorry :ermm:

A-handreas 10-25-2002 05:21 PM

Hello!

I will switch from phpbb2 version 2.02 to the newest vbb. But in the process of importing the post on most of the post it stops with the following problem message:

Fatal error: Maximum execution time of 20 seconds exceeded in /usr/local/httpd/htdocs/***/***/forum/importers/bbimport_phpbb2.php on line 160

and my forum had 80.000 post, no way to do it post by post or skip it.

Please help, the rest before works better then the official importer, this sucks more.

I stand by, because I want to open my forum tomorrow again
Andreas


All times are GMT. The time now is 04:17 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.01276 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete