Welcome, Guest. Please Login or Register.
April 26, 2024, 07:10:56 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Converters  |  here... a phpBB 1.4x to YaBB 1.4.1 converter... « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: here... a phpBB 1.4x to YaBB 1.4.1 converter...  (Read 84420 times)
aitrus
Noobie
*
Posts: 8


ba da pa pa...

ICQ - 2749585 WWW
here... a phpBB 1.4x to YaBB 1.4.1 converter...
« on: September 17, 2002, 03:27:09 PM »
Reply with quote

After reading through 4 pages of "I want I want I want..." I decided to just write this converter myself.

http://uhacc.org/code/phpBBtoYaBB.php.gz
http://uhacc.org/code/phpBBtoYaBB.php.bzip2
http://uhacc.org/code/phpBBtoYaBB.php.zip

Right click on that link and download the code.  Quick instructions are in the file itself.
It will convert most information for categories, boards, posts (including dates and times), instant messages, and users.  The converter also removes some of the BBCode from the posts.  Check out the code for more information.
This script will blow away everything in YaBB before it runs to prevent duplicates.  So don't try and use this to import into an existing forum.
The output is ugly, and if your browser or webserver chokes on it, then go through and comment out all of the "echo" statements before you run it.
Once ran, users can go to the login screen and click "forgot password" to have a new password created and sent to them.
« Last Edit: September 17, 2002, 04:30:57 PM by aitrus » Logged

This post brought to you by the language C and the number f.
Chris Cromer
The Strange One
Mod Team
YaBB God
*****
Posts: 3152


I am just a figment of your imagination.

WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #1 on: September 17, 2002, 04:19:29 PM »
Reply with quote

You have to zip it up, or else we can't download it(all we get is the html and not the source code itself. ::))

Even when you right click it only saves the html of the file.
Logged

Chris Cromer

I am not suffering from insanity, I am enjoying every minute of it.
aitrus
Noobie
*
Posts: 8


ba da pa pa...

ICQ - 2749585 WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #2 on: September 17, 2002, 04:28:57 PM »
Reply with quote

Err... yeah... I don't know where my brain was...  ???

I modified the original post with the new files...
Logged

This post brought to you by the language C and the number f.
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #3 on: September 17, 2002, 11:08:27 PM »
Reply with quote

VERY COOL!
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
David
Destroyer Dave
Global Moderator
YaBB God
*****
Posts: 5761


I'm not a llama!

WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #4 on: September 18, 2002, 04:24:59 AM »
Reply with quote

BOO FRIGGIN YA GRANDMA!!  ;D
Logged

A.M.A.
YaBB God
*****
Posts: 685


.:: :-) ::.

evolve_xp@hotmail.com WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #5 on: September 19, 2002, 12:36:43 PM »
Reply with quote

nice  :) :) :)
Logged

vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #6 on: October 09, 2002, 08:32:20 PM »
Reply with quote

No workie form me unfortunately. It starts with converting members and when it reaches member nr. 49 it stops with a syntax error:

Executing: INSERT INTO yabbse_members ( ID_MEMBER, memberName, realName, passwd, emailAddress, dateRegistered, personalText, websiteTitle, websiteUrl, location, ICQ, AIM, YIM, hideEmail, signature, posts, MSN ) VALUES ( 48, 'Mieke', 'Mieke', '2e11ad88e8b40630c6ece8e0cef0e32a', '[email protected]', 990655200, '0', '', '', 'A'dam', '', '', '', 1, '', 2, '' )
DB Error: syntax error

Anyone any idea?
Logged
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #7 on: October 09, 2002, 08:55:27 PM »
Reply with quote

It seems the A'dam is giving the troubles and has to be escaped first. Try replacing:
 $sql .= "'" . $objRow->websiteUrl . "', '" . $objRow->location . "', ";

by:
 $sql .= "'" . $objRow->websiteUrl . "', '" . mysql_escape_string($objRow->location) . "', ";
Logged

aitrus
Noobie
*
Posts: 8


ba da pa pa...

ICQ - 2749585 WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #8 on: October 09, 2002, 09:01:48 PM »
Reply with quote

Looks like your error is on member #48, not #49.  See the 'A'dam'?  Try changing line 646 of the code from this:

  $sql .= "'" . $objRow->websiteUrl . "', '" . $objRow->location . "', ";

to this:

  $sql .= "'" . $objRow->websiteUrl . "', '" . addcslashes( $objRow->location ) . "', ";

j
Logged

This post brought to you by the language C and the number f.
aitrus
Noobie
*
Posts: 8


ba da pa pa...

ICQ - 2749585 WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #9 on: October 09, 2002, 09:04:13 PM »
Reply with quote

Heh... Looks like we were posting at the same time.  =)

Thanks for looking into it as well.  I probably should escape all of the strings, but ugh... what a lot of typing...

j
Logged

This post brought to you by the language C and the number f.
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #10 on: October 10, 2002, 07:55:12 AM »
Reply with quote

Thanks to you both. I'll give it a try later on today and let you know if it worked.  :D
Logged
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #11 on: October 10, 2002, 06:54:33 PM »
Reply with quote

Unfortunately neither of the adjustements to the original script did the tric. Aitrus's new line produced errors from line one on (forgot to write them down, I'll look into that later), Compuart's solution worked longer, but it stopped when trying to convert member 728 and said: DB Error: syntax error

This is what it tried to do with member 728:
Executing: INSERT INTO yabbse_members ( ID_MEMBER, memberName, realName, passwd, emailAddress, dateRegistered, personalText, websiteTitle, websiteUrl, location, ICQ, AIM, YIM, hideEmail, signature, posts, MSN ) VALUES ( 728, 'Dark O'Neills', 'Dark O'Neills', 'f45eba65fefe6616cd8cbf0c34526c0c', '[email protected]', 1027116000, '0', 'http://www.student.kun.nl/r.niels', 'http://www.student.kun.nl/r.niels', 'Nijmegen', '', '', '', 0, '', 0, '' )

Any of you see anything unusual? Is it the 'Dark O'Neills' thingie?


« Last Edit: October 10, 2002, 06:57:07 PM by vegatopia » Logged
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283


ICQ - 8801024Compuart@hotmail.com WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #12 on: October 10, 2002, 07:00:21 PM »
Reply with quote

yep, that's it :)

replace:
 $sql .= $objRow->ID_MEMBER . ", '" . $objRow->memberName . "', ";
  $sql .= "'" . $objRow->realName . "', ";

by:
 $sql .= $objRow->ID_MEMBER . ", '" . mysql_escape_string($objRow->memberName) . "', ";
  $sql .= "'" . mysql_escape_string($objRow->realName) . "', ";

(who knows it might happen again, same procedure, just put it into a mysql_escape_string(bla) function)
« Last Edit: October 10, 2002, 07:01:15 PM by Compuart » Logged

vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #13 on: October 11, 2002, 08:46:21 AM »
Reply with quote

Thanks for the tip, it worked fine for inserting memebers, topics and posts. But then it stopped when it wanted to gather post texts:

Executing: INSERT INTO yabbse_messages ( ID_MSG, ID_TOPIC, ID_MEMBER, posterTime, posterIP ) VALUES ( 56189, 2426, 1, 1029867240, '24.132.154.56' )
Gathering post text info from phpBB...

Sorry to bother you guys again  :(

Logged
vegatopia
Noobie
*
Posts: 27


Seamos realistas, pidamos lo imposible!

Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #14 on: October 11, 2002, 08:50:59 AM »
Reply with quote

Other thingie I'm wondering about: can i run the script from a completely fresh yabbse install? What I mean is: I don't have to set up categories and forums first, but it will import categories and forums from the old phpbb-install right?
Logged
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Converters  |  here... a phpBB 1.4x to YaBB 1.4.1 converter... « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.026 seconds with 20 queries.