Welcome, Guest. Please Login or Register.
November 24, 2017, 03:28:04 PM
Home Help Search Login Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Converters  |  Topic: 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 27486 times)
aitrus
Noobie
*
Posts: 8


ba da pa pa...


WWW
here... a phpBB 1.4x to YaBB 1.4.1 converter...
« on: September 17, 2002, 10:27:09 AM »
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, 11:30:57 AM 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, 11:19:29 AM »
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...


WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #2 on: September 17, 2002, 11:28:57 AM »
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, 06: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 17, 2002, 11:24:59 PM »
Reply with quote

BOO FRIGGIN YA GRANDMA!!  ;D
Logged

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


.:: :-) ::.


WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #5 on: September 19, 2002, 07:36:43 AM »
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, 03: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', 'Mikado@wish.net', 990655200, '0', '', '', 'A'dam', '', '', '', 1, '', 2, '' )
DB Error: syntax error

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



WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #7 on: October 09, 2002, 03:55:27 PM »
Reply with quote

It seems the A'dam is giving the troubles and has to be escaped first. Try replacing:
Code: [Select]

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


by:
Code: [Select]

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

Logged

aitrus
Noobie
*
Posts: 8


ba da pa pa...


WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #8 on: October 09, 2002, 04: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...


WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #9 on: October 09, 2002, 04: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, 02: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, 01: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', 'r.niels@student.kun.nl', 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, 01:57:07 PM by vegatopia » Logged
Compuart
Quality, Quality, Quality!
YaBB God
*****
Posts: 1283



WWW
Re:here... a phpBB 1.4x to YaBB 1.4.1 converter...
« Reply #12 on: October 10, 2002, 02:00:21 PM »
Reply with quote

yep, that's it :)

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

by:
Code: [Select]
 $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, 02: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, 03: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:

Code: [Select]
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, 03: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  |  Topic: 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.0.12 | SMF © 2016, Simple Machines
Valid XHTML 1.0! Valid CSS!
Page created in 0.053 seconds with 19 queries.