phorum.org to phpBB conversion

This is an archive of the phpBB 2.0.x convertors forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
Azu
Registered User
Posts: 21
Joined: Tue Jun 04, 2002 10:31 am
Location: Czech Republic
Contact:

phorum.org to phpBB conversion

Post by Azu »

Hi All,

Here is my script for convert data from phorum.org 3.x to phpBB 2.0.x

Script generate SQL file what contains sql commands for addition new data to phpBB
---------

TXT file download here

ZIP file download here

-----------------------------------------------------------
Czech phpBB comunity http://phpbb.atmplus.cz
DanielJarrett
Registered User
Posts: 425
Joined: Fri Dec 14, 2001 7:30 pm
Location: near Paris, France
Contact:

Post by DanielJarrett »

Could you translate it? I like to know what's happening :)
Azu
Registered User
Posts: 21
Joined: Tue Jun 04, 2002 10:31 am
Location: Czech Republic
Contact:

Post by Azu »

No Problem,

/****************************************************************************
* Instruction (English)
* ---------------------
*
* - Backup All Data from phpBB
*
* - Must instaled database phrorum.org and phpBB at your computer
* - This script copy to other directory in your website at your computer
* - Set write acces in this directory
* - Set database acces in SETUP section at this script ($dbname, $dbuser, $dbhost, $dbpasswd)
* - Run this script skript
* - Script generate in same directory file "dump.sql" which contains SQL command for
* additing new data from phorum.org to phpBB
* - Open etc. phpMyAdmin and run file "dump.sql"
*
* If file "dump.sql" not created or occur error, uncomment lines 161, 162
* $result2 = mysql_query("SELECT table_name FROM forums WHERE parent=".mysql_Result($result1, 0, "id")." LIMIT 1");
* $tabulka = mysql_Result($result2, 0, "table_name");
*
****************************************************************************/
bebox
Registered User
Posts: 10
Joined: Sun Jan 20, 2002 11:37 am

Help...trying to download converter but can't get to website

Post by bebox »

Can't get to the website with the converter above for Phorum...really really need it...can someone help???

Thanks :))
Azu
Registered User
Posts: 21
Joined: Tue Jun 04, 2002 10:31 am
Location: Czech Republic
Contact:

Post by Azu »

What's problem ?

use this script and add sql commands which script generate.

If you will convert data phorum to phpbb, you can send dump your phorum.org data to my [url=mailto:azu@atmplus.cz]emaila dress[/url] and i convert data to you

10 minutes and data coverted.

:wink:
bebox
Registered User
Posts: 10
Joined: Sun Jan 20, 2002 11:37 am

Post by bebox »

Hi Azu,
Thanks mate.....your website wasn't working yesterday..I was just getting connection errors but everything seems fine today

Thanks for the reply and will talk soon
Jason
User avatar
hawk259
Registered User
Posts: 30
Joined: Thu Jan 24, 2002 6:50 pm
Contact:

Post by hawk259 »

The script works great once I converted it to work off a postgres database, but one thing is missing, search. You can't search on messages imported from the phorum. I think because it is not putting the info in the search index table. Any chance you can add this to the script?

Thanks,

Brian
User avatar
hawk259
Registered User
Posts: 30
Joined: Thu Jan 24, 2002 6:50 pm
Contact:

Post by hawk259 »

hawk259 wrote: The script works great once I converted it to work off a postgres database, but one thing is missing, search. You can't search on messages imported from the phorum. I think because it is not putting the info in the search index table. Any chance you can add this to the script?

Thanks,

Brian


Or is there a way to force a search re-index? That would be even better ;-)
Azu
Registered User
Posts: 21
Joined: Tue Jun 04, 2002 10:31 am
Location: Czech Republic
Contact:

Post by Azu »

Just a few minor probs....
1. I had to edit the sql file and change all newlines to <br> to import in
otherwise the posts would have been fairly mixed up.
2. I think it has also bought across some of the posts which I had marked
"N" in the approved column in Phorum

Jason

I have nothing free time, does thereforce not update and append next ideas for this script :(

If you want anyone follow on expansion this script, add these edits this.
User avatar
hawk259
Registered User
Posts: 30
Joined: Thu Jan 24, 2002 6:50 pm
Contact:

Post by hawk259 »

Ok, here is my shot at the converter script:

http://www.brianfrance.com/software/php ... bb.php.txt

This script is not dependent on the database you are using (I use postgres) and also adds the the posts into the search index so they can be found by searching.

This script will not work with phorums that have folders and doesn't care if posts are marked "N" in the approved column.

Have fun!

Brian

BTW, if any developers are reading this, comments on this?

Code: Select all

			// The database package keeps every sql query statment around.
			//   this is bad as it will eat up memory until PHP dies
			// This clears the cache and clears up the memory.
			unset( $db->last_query_text );
			unset( $db->row );
			$db->num_queries = 0;
			$db->in_transaction = 0;
Ashe
Former Team Member
Posts: 642
Joined: Sun Jul 08, 2001 11:38 am

Post by Ashe »

hawk259 wrote: Or is there a way to force a search re-index? That would be even better ;-)

The Unified Convertor System features a built-in search re-indexing tool. :D
jdiver
Registered User
Posts: 15
Joined: Fri Oct 26, 2001 5:12 am

Post by jdiver »

I'm attempting to use hawk259's Phorum converter script and it seems it doesn't allow me to create two instances of two different db's (the phpBB db as defined by the variable $db and the phorum db as defined by the variable $phorum_db). Is it possible to have two connections open to two different db's? Any ideas on what the problem may be and any possible solution would be greatly appreciated.
User avatar
hawk259
Registered User
Posts: 30
Joined: Thu Jan 24, 2002 6:50 pm
Contact:

Post by hawk259 »

jdiver wrote: I'm attempting to use hawk259's Phorum converter script and it seems it doesn't allow me to create two instances of two different db's (the phpBB db as defined by the variable $db and the phorum db as defined by the variable $phorum_db). Is it possible to have two connections open to two different db's? Any ideas on what the problem may be and any possible solution would be greatly appreciated.


The problem may be two different db's. I was converting from postgres to postgres and db to same db should work, but db to different db will not work (mysql to postgres will not work).

If you are converting to the same db you may want to add some debuging prints into the file db/<dbname>.php in the sql_db function and see where it fails to open the database also print the connection strings and make sure it looks ok.

Brian
jdiver
Registered User
Posts: 15
Joined: Fri Oct 26, 2001 5:12 am

Post by jdiver »

Thanks for the reply. I am using two different db's, but they are both MySQL. When I run the script, I get a "Can't get max cat_order..." error. The sql command is the correct one, as I can run it from phpMyAdmin and get the correct result. The problem seems to be that it is creating another instance of a db connection ($phorum_db) and that somehow prevents the standard instance ($db) from working. If I comment out the creation of the $phorum_db connection, then it will work until it gets to an sql command where it needs the $phorum_db. Perhaps this is a limitation of my server? If so, is there any way to override whatever the setting is using an htaccess file? Thanks again for the help.
User avatar
hawk259
Registered User
Posts: 30
Joined: Thu Jan 24, 2002 6:50 pm
Contact:

Post by hawk259 »

This is really strange.

In config.php $dbname is not the same as $phorum_dbname in the convert script is it? Not that it should matter if it is try commenting out:

$phorum_db = new sql_db(...

and add this line above it:

$phorum_db = $db;

Sorry, I can't be more help.

Brian

BTW, there is not a limit on db connection in safe mode is there?
Locked

Return to “[2.0.x] Convertors”