[ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Ideas Centre
camel1cz
Registered User
Posts: 13
Joined: Sun Jul 12, 2009 11:26 am
Location: Prague, Czech Republic
Contact:

[ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by camel1cz » Sun Jul 12, 2009 1:02 pm

Hi guys,

after some research I desided to write new native convertor from Phorum 5 for board I administer.
As it may be useful for ppl facing the same problem I do, I share the code here.

It works quite well for my board (about 30,000 users and 2,000,000 posts in 300,000 topics).

Instalation is straight forward - unzip the archive into root of phpBB install. In convert menu of installation should popup new option for conversion.

I'll try to give some support for this code ;-)

Download here
Last edited by camel1cz on Sat Jan 11, 2014 11:02 am, edited 2 times in total.

CADC
Registered User
Posts: 6
Joined: Fri Oct 30, 2009 8:37 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by CADC » Fri Oct 30, 2009 8:44 pm

Just used converter to go from Phorum 5.2.9a and when I got to the new forums there was no user accounts available except the one that I setup for administrator! Is there something that I don't know about for the converter? Does it not support 5.2.9a?

Any support is good support and thanks for getting me one step closer to being there!

camel1cz
Registered User
Posts: 13
Joined: Sun Jul 12, 2009 11:26 am
Location: Prague, Czech Republic
Contact:

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by camel1cz » Fri Oct 30, 2009 11:11 pm

Hmmmm, actually I didn't test the user accounts conversion very much as I use custom authentication plugin against external authentication server - my user accounts are automatically created after successfull authentication.

However the conversion code should be quite strightforward... if you have some PHP skills, feel free to modify my code.

ishvarko
Registered User
Posts: 5
Joined: Tue Aug 10, 2010 9:05 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by ishvarko » Tue Aug 10, 2010 9:19 pm

thank a lot for this convertor. It works fine. Good job.
Users are converted, but you have to move them to REGISTERED group. I did it manualy.
One problem I faced with: my attachments haven't converted. filenames seems to be pulled to attachment db table, but there are no files anywhere.
I found these comments in code:
// with this you are able to import all attachment files on the fly. For large boards
// this is not an option, therefore commented out by default.
// Instead every file gets copied while processing the corresponding attachment entry.
// if (defined("MOD_ATTACHMENT")) { import_attachment_files(); phpbb_copy_thumbnails(); }
But I don't understand where to put this line for copying files

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by D¡cky » Wed Aug 11, 2010 1:51 pm

The convertor expects the Phorum attachment files to be in the Phorum attach directory. The convertor then copies them to the phpBB3 files directory.
Have you hugged someone today?

ishvarko
Registered User
Posts: 5
Joined: Tue Aug 10, 2010 9:05 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by ishvarko » Wed Aug 11, 2010 4:12 pm

thanks, I have succesfully convert attachments las night. Had to install "Store files to disk" Phorum module and change some code in it to store files in one dir. Also some changes for converter required.
Here is 2 string I changed:

Code: Select all

				array('physical_filename',		'files.file_id',	'import_attachment'),
				array('real_filename',			'files.filename',		''),
Attachments are shown in the end of each post/ But i also wnat them to be shown among some text. I made changes for every post_text with regular expresions. Now bbcode for attachments looks like
filename.jpg
.
Here is a sample code for it:

Code: Select all

 <?php
require_once 'MDB2.php'; //PEAR MDB2 used here

$dsn = 'mysqli://user:password@host/dbName';
$options = array(
    'debug' => 2,
    'result_buffering' => false,
);

$mdb2 =& MDB2::factory($dsn, $options);
if (PEAR::isError($mdb2)) {
    die($mdb2->getMessage());
}

$sql="SELECT post_id,post_text  from phpbb_posts";
$res =& $mdb2->query($sql);

if (PEAR::isError($res)) {
    die($res->getMessage());
}
$done=0;
while (($row = $res->fetchRow())) {
    $count=0;
    $updated_text=preg_replace('/\[attachment \d+ (\S+\.\S+)\]/i', '[attachment=0]$1\[/attachment]', $row[1],-1,$count);
    if($count>0){
        $update="UPDATE phpbb_posts set post_text='$updated_text',post_attachment=1 where post_id=$row[0]";
        $affected =& $mdb2->exec($update);
        $done++;
    }
    echo $done.'\n';
}
$mdb2->disconnect();
?>

hhouwaard
Registered User
Posts: 1
Joined: Mon Jan 02, 2012 11:59 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by hhouwaard » Tue Jan 03, 2012 12:05 am

I have used the convert to convert phorum to phpBB. However, the users do not show up and I am unsure as to how to get the users all to be member of the registered users group. The only user that shows up on the list is the user admin, which is created when phpbb is installed.

Can someone assist me in this? I very much want to be able to convert away from phorum.

Hans

ishvarko
Registered User
Posts: 5
Joined: Tue Aug 10, 2010 9:05 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by ishvarko » Tue Jan 03, 2012 11:12 am

hhouwaard wrote: Can someone assist me in this? I very much want to be able to convert away from phorum.
Hans
Hi! It was few years ago when I've converted my phorum to phpbb. I realy can't remember exactly what i did, but I'll try to help. First, tell me can you see your users in Database table phpbb_users.

nbennett
Registered User
Posts: 3
Joined: Thu Mar 14, 2013 6:04 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by nbennett » Thu Mar 14, 2013 10:57 pm

Hi camel1cz

I am looking to download the Phorum -> phpBB converter you refer to in your original post. Unfortunately, the link you posted is dead. Can you help me out?

Best regards.

ishvarko
Registered User
Posts: 5
Joined: Tue Aug 10, 2010 9:05 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by ishvarko » Sat Mar 16, 2013 5:07 pm

I have one. Just uploaded to my server: http://perukar.org/exchange/phorum5-php ... 0.1.tar.gz

Dismal_Bliss
Registered User
Posts: 3
Joined: Sat Mar 16, 2013 7:49 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by Dismal_Bliss » Sat Mar 16, 2013 7:53 pm

Awesome! I just registered because I was looking for the same converter. I tried sending a PM but you have to have 5 posts before you can start sending PM's.

Thanks for the link. I will be trying this converter shortly :)

Dismal_Bliss
Registered User
Posts: 3
Joined: Sat Mar 16, 2013 7:49 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by Dismal_Bliss » Sun Mar 17, 2013 8:19 pm

Everything has worked great except for file attachments. I'm gonna study up what was said above about attachments and see if I can make sense of it.

Dismal_Bliss
Registered User
Posts: 3
Joined: Sat Mar 16, 2013 7:49 pm

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by Dismal_Bliss » Sun Mar 17, 2013 10:22 pm

Hmmm.... not sure if I am getting it.

Sure would like to PM that guy above and pick his brain a bit but I still gotta find another thread or 2 to post in to get my count above 5.

camel1cz
Registered User
Posts: 13
Joined: Sun Jul 12, 2009 11:26 am
Location: Prague, Czech Republic
Contact:

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by camel1cz » Mon Mar 18, 2013 6:42 pm

Guys, I've just updated the URL for download of the converter in my first post...

ss18
Registered User
Posts: 5
Joined: Thu Jan 09, 2014 1:58 am

Re: [ALPHA] Phorum 5.0.x to phpBB 3.0.x Convertor

Post by ss18 » Thu Jan 09, 2014 2:01 am

hey guys, any help, i keep getting this error while trying to convert

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 3592142 bytes) in /home/site/public_html/phpbb/install/install_convert.php on line 1294

Locked

Return to “[3.0.x] Convertors”