Converter Release: Snitz Forums to PHPBB and PHPNuke

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
Endeavour2
Registered User
Posts: 50
Joined: Wed Oct 18, 2006 3:47 pm

Converter Release: Snitz Forums to PHPBB and PHPNuke

Post by Endeavour2 »

Hi,

I've released my Snitz Forums to PHPBB / PHPNuke (bbtonuke) converter (2 converters included, one for Nuke and one for BB). This script fully migrates all forums, forum structure, topics and posts. It also merges user databases - more on this in the documentation. Snitz code to BBCode is done for all topics, and the forum search tables are properly set up.

No code changes, mods or hacks to the PHPBB / PHPNuke source are required, and all posts/topics are ordered correctly after migration. Simply run the converter and that's it.

Note, I only had limited Snitz test data to do this with and it has only been tested with Nuke 7.6 and PHPBB 2.0.21, but should work for other versions.

You can download it here:
http://www.amazingbrass.co.uk/dist/exte ... 3-dist.zip

v0.3 released 08-01-07


*edit 17-02-07* Patch to v0.3 required

You may need to apply the following patch to the converter (if in doubt, apply it). Before running the converter, open Snitz2PHPBB.php and go to line 1047. You should see:

Code: Select all

$query = "SELECT * FROM ".$snitz_topics." WHERE `TOPIC_ID` >= ".$nexttopic." ORDER BY `LASTACTIVITY` ASC LIMIT ".$LOW_MEMORY_MAXTOPICS;
Replace this line with:

Code: Select all

$query = "SELECT * FROM ".$snitz_topics." ORDER BY `LASTACTIVITY` ASC LIMIT ".$nexttopic." , ".$LOW_MEMORY_MAXTOPICS;
Save your changes and begin the migration as normal.

Cheers!
Last edited by Endeavour2 on Sat Feb 17, 2007 7:45 pm, edited 3 times in total.
Endeavour2
Registered User
Posts: 50
Joined: Wed Oct 18, 2006 3:47 pm

Post by Endeavour2 »

Received this message from joeventura, figured it would benefit others using the converter.
Process seems pretty straightforward however some questions:

On this line:

$snitz_url = "http://www.thesite.com/PATH_TO_SNITZ_FO ... ?TOPIC_ID=";

Is there supposed to be something entered for: PATH_TO_SNITZ_FORUM ??


Yes. This is how the converter knows what the relative links are within your site.

Assuming your users access your snitz forum by:

Code: Select all

http://www.thesite.com/forums
You would change this config line to:

Code: Select all

http://www.thesite.com/forums/topic.asp?TOPIC_ID=
The converter examines each post for a Snitz URL tag that begins like this. It then rewrites the tag to BBCode compliant URLs that point to your new PHPBB forum (which you define with the next config option).

It's aimed at letting you migrate Snitz forums at (for example) www.mysite.com/myforums to PHPBB forums at (for example) www.mysite.com/phpbbforums, whilst keeping links in posts working (links in one post that link to another post in the forum).
Also having problems with this:

Use MySQL Migration Wizard to import your Snitz data to a
MySQL database - this can be the same or different MySQL

Is this the Migration Toolkit? The Wizard does not allow for a dumped file, I need to upload the database to my server as a MySQL dump

Any suggestions? I have a 10mb Snitz Forum that I need to convert.

Thanks


The MySQL Migration wizard definitely does allow for a dumped file, it just doesn't look like it. It was bad design on MySQL's part, IMO.

Follow the migration steps through, past where you select the access database and choose the tables/schema etc. You'll end up at a screen asking you for your MySQL server & login details - I assume this is where you got stuck?

Give it any valid MySQL server details, even one at your ISP - it doesn't matter. When you get past this step (all this step does is check the connection works, it doesn't migrate any data) you'll be given options whether you want to directly migrate into a MySQL server or create SQL dump files. The wizard will create 2 dump files, one for the table structure and one for the data.

Hope that helps.

*edit* removed the actual site URL as requested.
Last edited by Endeavour2 on Wed Nov 15, 2006 7:05 pm, edited 1 time in total.
joeventura
Registered User
Posts: 2
Joined: Sun Nov 12, 2006 4:48 pm

Post by joeventura »

Go further along in the process but now stuck here:

Confirmed the anonymous group was where it should be.
Confirmed the anonymous user was where it should be.
Found the last current phpbb userid (3), Snitz users will begin at 4.
Catch-all Snitz user already exists, guess you ran this script before :)
Deleting all phpbb users with a UserID higher than the Snitz catchall user.
Snitz catch-all user in the phpbb database had the right ID (3), so we're good to go with ID conversions.
New starting phpbb userid (same as above if Snitz catchall existed) is 4


MySQL query error!

Query was: SELECT * FROM FORUM_MEMBERS ORDER BY MEMBER_ID ASC

mysql_errno = 1016
mysql_error = Can't open file: 'FORUM_MEMBERS.ibd' (errno: 1)
extra info =
Endeavour2
Registered User
Posts: 50
Joined: Wed Oct 18, 2006 3:47 pm

Post by Endeavour2 »

Do you have PHPMyAdmin available to access this MySQL database with?

If so please paste the query as shown in the error message into the PHPMyAdmin SQL query option thing and let me know what happened.

It's very odd that failed, the script can clearly read the members table because it managed to add the Snitz user...
joeventura
Registered User
Posts: 2
Joined: Sun Nov 12, 2006 4:48 pm

Post by joeventura »

Well I figured the previous problem in that the data did not transfer to the database so the structure was there with no content.

Fixed that,
ran the conversion again and it went halfway then:

Here come the forum topics, nearly done. Why oh why did you use Snitz to start with?
Last phpbb post before migrating the stupidly designed Snitz topics is 5743.
Performing low memory migration, this iteration will migrate topics 1206 to 1406 out of 2104 total.


MySQL query error!

Query was: SELECT * FROM FORUM_TOPICS WHERE `TOPIC_ID` >= 1206 ORDER BY `LASTACTIVITY` ASC LIMIT 1206 , 200

mysql_errno = 0
mysql_error =
extra info = No posts in the Snitz topics table???


Have I run out of luck?
Endeavour2
Registered User
Posts: 50
Joined: Wed Oct 18, 2006 3:47 pm

Post by Endeavour2 »

That's an error thrown by the script because the SQL query executed successfully but no rows were returned.

Can you do the same thing in PHPMyAdmin with that query please, it should return 200 rows beginning at topic 1206.

The low memory migration uses the same code repeatedly in stages, so as you've already done about 5 stages we know it works...
Endeavour2
Registered User
Posts: 50
Joined: Wed Oct 18, 2006 3:47 pm

Post by Endeavour2 »

v0.2 released, download here: http://www.amazingbrass.co.uk/dist/exte ... 2-dist.zip

Code: Select all

0. Changelog
---------------------------
v0.2	- 	Fixed duplicate topic issue caused by Snitz leaving ghost topics
			behind (apparently when moving posts etc). Duplicate topics have
			the oldest topic deleted. This won't affect posts.
		-	Add fixup for the userid auto_increment to match the actual next
			id.
		-	Fixed a bug in the posts migrator, where the link to move to the
			next stage of the low memory migration wasn't updated with the
			correct params.
		-	Added option to skip the Snitz table fixup stage - useful if you
			have to run this script more than once as fixup only needs to be
			run once.
Endeavour2
Registered User
Posts: 50
Joined: Wed Oct 18, 2006 3:47 pm

Post by Endeavour2 »

v0.3 released, download here: http://www.amazingbrass.co.uk/dist/exte ... 3-dist.zip

Code: Select all

v0.3	-	Re-release of 0.2 mainly because there was a screwup with the
			previous package, which didn't include all the fixes.
		- 	Fixed a bug where the user's first name wasn't migrated
		-	Join dates appear properly in PHPBB migration now
Nemesis=>
Registered User
Posts: 1
Joined: Tue Jan 23, 2007 5:16 pm

Post by Nemesis=> »

Hi i have a running phpbb forum whit ofcourse its own database. I installed phpnuke 7.6 latest patch,Imported the nuke.sql trough phpmyadmin in another created database(same server) ,i made my Super user/admin in phpnuke.

Forums in phpnuke i didnt touch anything,no one registered. Well i upload all the Snitzz files to my webroot and configured to the converter wich is snitzz2nuke. During the process it stopped and says this:

Code: Select all

MySQL query error!

Query was: INSERT INTO nuke_users (`name`, `username`, `user_email`, `user_website`, `user_regdate`, `user_password`, `user_active_cp`, `user_interests`) values ('SNITZ MIGRATION', 'Snitz User', '[email protected]', 'http://www.amazingbrass.co.uk', 'Jan 23, 2007', '4a24c0544fe757efc522a3079d9db4a3', 'YES', 'This is a catch-all user for posts from deleted/invalid user accounts. It was created during the Snitz forum migration. This is not a real person!')

mysql_errno = 1044
mysql_error = Access denied for user 'my_databasename'@'localhost' to database 'my_databasename'
extra info = Couldn't add the catch-all Snitz user into the Nuke user table


So whats wrong?? :(
Endeavour2
Registered User
Posts: 50
Joined: Wed Oct 18, 2006 3:47 pm

Post by Endeavour2 »

The access denied error indicates the user account you configured in the migration script doesn't have the appropriate privileges to add rows to tables.

Check the database permissions for the user account you're using (in the error you pasted, "my_databasename", but I assume you've anonymized that).
darthtony
Registered User
Posts: 2
Joined: Thu Mar 31, 2005 1:22 pm

Post by darthtony »

something similar to covert Themes ?
ostiaxboz
Registered User
Posts: 4
Joined: Tue Feb 06, 2007 9:52 pm
Location: Italy
Contact:

existing snitz user password problems

Post by ostiaxboz »

Hi,
first of all thanks for your job Endeavour2...

I've successfully converted my old snitz (on a .mdb db) forum to a new phpbb /mysql forum, now i've only 1 problem: i can't login with my old user and pass on the new forum; however if i add a new user there is no login/logout probs, as far as like if I use the user/passwd data which i've added after the phpbb installation to test it

I'm testing the migration locally for the moment on a debian distro...

Any ideas?

Tnx in advantage

[EDIT-09.03.07]
I've clicked on the link "Forgot your password?" and now it's all ok
Thanks Endeavour2

[EDIT]
Last edited by ostiaxboz on Sat Mar 10, 2007 1:39 am, edited 1 time in total.
Earth is my skatepark!
Endeavour2
Registered User
Posts: 50
Joined: Wed Oct 18, 2006 3:47 pm

Post by Endeavour2 »

Hi ostiaxboz. That's a curious problem. Do you mean you can't log in with *any* migrated user, or just with your own account?

If it's your own account, when you installed phpbb did you create an admin account with the same username as your Snitz account? The script merges accounts and posts so if you named your admin account the same as your snitz user account it will have merged them.

Last thing, can you log in with the PHPBB admin account?

Oh, you did use the PHPBB lost password recovery, didn't you? The script can't migrate Snitz passwords...
fedetamayo
Registered User
Posts: 2
Joined: Fri Feb 09, 2007 11:48 pm

Couldn't convert last activity from free text to DATETIME in

Post by fedetamayo »

Hi Endeavour2,

I'm using your converter. All fine until step 4, I get the following error:

MySQL query error!

Query was: UPDATE `FORUM_TOPICS` SET `LASTACTIVITY` = CAST(T_LAST_POST AS DATETIME)

mysql_errno = 1064
mysql_error = You have an error in your SQL syntax near '(T_LAST_POST AS DATETIME)' at line 1
extra info = Couldn't convert last activity from free text to DATETIME in FORUM_TOPICS for topic fixup.

Any ideas what is wrong?
Help!

Regards,
Endeavour2
Registered User
Posts: 50
Joined: Wed Oct 18, 2006 3:47 pm

Post by Endeavour2 »

Hi,

The problem is exactly as the error says - the converter is trying to convert Snitz date and time stamps to PHPBB compatible timestamps.

I don't know why that's failing though, it's using an internal MySQL feature.

Can you try running that query directly on the database, for example through PHPMyAdmin SQL option? Simply copy and paste it and see what happens.

Thanks!
Locked

Return to “[2.0.x] Convertors”