SMF -> Joomlaboard conversion

Discuss the integration of SMF here.
User avatar
maxdg
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4173
Joined: Sun Sep 04, 2005 3:52 pm
Location: Colli Euganei
Contact:

Re: SMF -> Joomlaboard conversion

Post by maxdg » Fri Aug 04, 2006 11:11 am

Go to Translation of your Components menu
Clic Frontend and select, from the Frontend appearance list: "Image list (horizontal)".
"Civiltà è la misura con cui la comunità provvede a tutti, nel disinteresse collettivo. Il disinteresse è la norma di selezione per l’immortalità di una razza intelligente."

http://www.ufomachine.org/

 
User avatar
ITzorro
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Aug 02, 2006 2:28 pm
Location: Sweden
Contact:

Re: SMF -> Joomlaboard conversion

Post by ITzorro » Fri Aug 04, 2006 11:32 am

I'm sorry I can't find it, I have tried components menu and then joomfish and then translation but after that I can't find anything that says frontend.

User avatar
maxdg
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4173
Joined: Sun Sep 04, 2005 3:52 pm
Location: Colli Euganei
Contact:

Re: SMF -> Joomlaboard conversion

Post by maxdg » Fri Aug 04, 2006 11:39 am

We have different versions.
Language Configuration may be the appropriate menu item for your version.
Anyway, search for something called: "Frontend appearance" in your Joomfish menu..
"Civiltà è la misura con cui la comunità provvede a tutti, nel disinteresse collettivo. Il disinteresse è la norma di selezione per l’immortalità di una razza intelligente."

http://www.ufomachine.org/

User avatar
ITzorro
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Aug 02, 2006 2:28 pm
Location: Sweden
Contact:

Re: SMF -> Joomlaboard conversion

Post by ITzorro » Fri Aug 04, 2006 11:49 am

Now I found it. Module manager/joomfish language section/Appereance of language selector.
Thanks!

User avatar
radianation
Joomla! Intern
Joomla! Intern
Posts: 53
Joined: Tue Nov 15, 2005 4:28 am
Location: Louisville, KY
Contact:

Re: SMF -> Joomlaboard conversion

Post by radianation » Wed Sep 06, 2006 5:44 am

I am running into problems because some users that appear in the forum tables are no longer members of the site. Is there a way to set in Joomlaboard that the user is perhaps a "guest" ??? If so, how can I modify the original script to accomplish this?

cruisinflatout
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Oct 02, 2006 3:19 pm
Location: Regina, SK, Canada
Contact:

Re: SMF -> Joomlaboard conversion

Post by cruisinflatout » Wed Oct 04, 2006 5:35 am

This may be useful to some people in the future.  I tried a few of the SMF >> JoomlaBoard conversions (including the incredibly stupid one of converting to phpBB and then to JB  :'( ) and none of them worked good enough.  This one WILL work and make your transfer relatively seamless

So, I created one that I've tested on Joomla 1.0.8 and SMF 1.1 RC2.  Seems to work great from the tests I've done so far, I will update here if I find there to be any problems.

This conversion expects your Joomla table prefixs to be "jos_" and your SMF prefixes to be "smf_" though but this can easily be fixed by performing a replace in TextPad (Notepad).  It also will import all categories, boards, users, IP's, signatures and their corresponding groups into JB from your SMF installation.

MOST IMPORTANTLY, it doesn't mess around with any of your users data on the Joomla User side of things.  This is important because your current users won't have to change their passwords, and the posts they made on the SMF side before conversion are all still assigned to them in JoomlaBoard - they can edit their own old posts that have been converted over etc...

(NOTE: If you are converting to Joomla for the first time - then this script won't do the trick for you.  If you are converting from SMF bridged with Joomla to Joomla with JB - then you'll like this script)

Once converted, all posts will be in tact and the users post count will increase from where they left off on the SMF forum you had.  So if they had 23 posts on the SMF site, their next post in the JB forum would put them at 24.

This conversion is thanks in part to maxdg - a whole section in there is mostly what he had early in this thread.

Like maxdg's - you need the mysql.php file he posted at the beginning of this thread.  I put the mysql.php file in a folder named "Convert" in the base of my site along with the following code in a file named "Index.php".

Just point your browser to yoursite.com/convert and the script will do the rest.  Hope this helps  ;)

Code: Select all

<?
    include("mysql.php");
    connectbdd();

//Populate Categories
echo "<br />Populating Categories...<br />";
$query="TRUNCATE TABLE jos_sb_categories";
$result = mysql_query($query) or die("<br />Invalid query:<br />$query<br />" . mysql_error());

// Import the main categories
$query="INSERT INTO jos_sb_categories (id,parent,name,cat_emoticon,locked,alert_admin,moderated,moderators,pub_access,pub_recurse,admin_access,admin_recurse,ordering,future2,published,checked_out,checked_out_time,review,hits,description) SELECT ID_CAT + 500, 0, name, 0, 0, 0, 0, NULL, 0, 0, 0, 0, catOrder, 0, 1, 0, '0000-00-00 00:00:00', 0, 0, '' FROM smf_categories ORDER BY catOrder";
$result = mysql_query($query) or die("<br />Invalid query:<br />$query<br />" . mysql_error());

// Import the forums
$query="INSERT INTO jos_sb_categories (id,parent,name,ordering,description,pub_access,pub_recurse,published) SELECT ID_BOARD, ID_CAT + 500, name, boardOrder, description, 0, 0, 1 FROM smf_boards";
$result = mysql_query($query) or die("<br />Invalid query:<br />$query<br />" . mysql_error());

echo "<br />OK...categories and boards imported successfully!<br />";

//Populate Users Table
echo "<br />Populating Users Table...<br />";

$query="TRUNCATE TABLE jos_sb_users";
$result = mysql_query($query) or die("<br />Invalid query:<br />$query<br />" . mysql_error());

// Get the group id:s for regular users and administrators in Mambo.
$query = "SELECT group_id FROM jos_core_acl_aro_groups WHERE name='Registered' OR name='Super Administrator' ORDER BY name ASC";
$result = mysql_query($query) or die("<br />Invalid query:<br />$query<br />" . mysql_error());
$admingid = mysql_result( $result, 0, 0 );
$usergid = mysql_result( $result, 1, 0 );

// Read all users from SMF
$query="SELECT * FROM smf_members WHERE ID_MEMBER > 0 ORDER BY ID_MEMBER";
$result = mysql_query($query) or die("<br />Invalid query:<br />$query<br />" . mysql_error());

while ( $row = mysql_fetch_object( $result ) ) {

$id_query="SELECT id FROM jos_users WHERE username = '$row->memberName'";
$id_result = mysql_query($id_query) or die("<br />Invalid query:<br />$id_query<br />" . mysql_error());
$row2 = mysql_fetch_object($id_result);
$jos_id = $row2->id;

if ( $jos_id <> 0 ) {
	// Convert date for last visit and register date.
	$registerDate = date( "Y-m-d H:i:s", $joindate );
	$lastvisitDate = date( "Y-m-d H:i:s", $lastlog );

	// Set user type and group id
	if ( $row->ID_GROUP == "1" ) {
		$usertype = "administrator";
		$gid = $admingid;
	} else {
		$usertype = "user";
		$gid = "0";
	}

	print "$row->username, ";

	// Add the user to the simpleboard usertable
	$query = "INSERT INTO `jos_sb_users` (userid, posts, signature) VALUES ('$jos_id', '$row->posts', '$row->signature')";
	mysql_query($query) or die("<br />Invalid query:<br />$query<br />" . mysql_error());
	$did++;
	}
	$total++;
}

echo "<br />Total users " . $total . ", Inserted " . $did . ' of the users...<br><br>(NOTE: If inserted is less than actual, it is due to the user having made a post but has since deleted their account.  The post will still show up as usual though...)<br />';

echo 'User import into JoomlaBoard successful!!<br />';

    $query = "SELECT * FROM smf_messages order by ID_TOPIC ASC, posterTime ASC";
    $bigr = mysql_query( $query ) or die(mysql_error());

    $prec_sb_id = 0;
    $prec_smf_topic = 0;
    $parent         = 0;
    $thread         = 0;
    $threadupdate   = 1;

    //
    // Populate Messages into JoomlaBoard
    echo 'Populating ' . mysql_num_rows( $bigr ) . ' messages into JoomlaBoard. <br />';
    while( $row = mysql_fetch_array( $bigr ))
    {
        $id             = $row['ID_MSG'];
        $id_topic       = $row['ID_TOPIC'];
        $id_board       = $row['ID_BOARD'];
        $posterTime     = $row['posterTime'];
        $subject        = $row['subject'];
        $posterName     = $row['posterName'];
        $posterEmail    = $row['posterEmail'];
        $posterIP       = $row['posterIP'];
        $body           = $row['body'];

        $subject = addslashes($subject);
        $body    = addslashes($body);

        if( $id_topic == $prec_smf_topic )
            $parent = $prec_sb_id;
        else
            $parent = 0;

        $thread = $threadupdate;

        //
        // Get the name of the board
        $r = mysql_query( "SELECT name from smf_boards where ID_BOARD='$id_board'") or die(mysql_error());
        $result = mysql_fetch_array($r);

        $boardname = $result['name'];

        $r = mysql_query( "SELECT id FROM jos_sb_categories where name='$boardname'") or die(mysql_error());
        if( mysql_num_rows($r) == 0 )
            die ("CATEGORIE $boardname INEXISTANTE DANS LA BASE MAMBO!!!");
        else
        {
            $result = mysql_fetch_array($r);
            $catid =  $result['id'];
        }

        //
        // Get the ID of the message poster
        $r = mysql_query( "SELECT id FROM jos_users where username='$posterName'") or die(mysql_error());
        if (mysql_num_rows($r) == 0 )
            $userid = '-1';
        else
        {
            $result = mysql_fetch_array($r);
            $userid = $result['id'];
        }

        $query = "INSERT INTO jos_sb_messages VALUES ('', '$parent', '$thread', '$catid', '$posterName', '$userid', '
$posterEmail', '$subject', '$posterTime', '$posterIP', '0', '0', '0', '0', '0', '0' )";
        mysql_query( $query ) or die ("$query" . "<br />" . mysql_error());

        $r = mysql_query( "SELECT id FROM jos_sb_messages order by id DESC limit 1" ) or die (mysql_error());
            $result = mysql_fetch_array( $r );
            $prec_sb_id = $result['id'];

        if( $parent == 0 )
            $threadupdate = $prec_sb_id;

        mysql_query( "UPDATE jos_sb_messages SET thread = '$threadupdate' WHERE id='$prec_sb_id'") or die(mysql_error());

        //
        // Insert Message Text into JoomlaBoard
        $query = "INSERT INTO jos_sb_messages_text VALUES ('$prec_sb_id', '$body')";
        mysql_query($query) or die ("$query" . "<br />" . mysql_error());

        $prec_smf_topic = $id_topic;
    }
    echo "<br />Message import Successful!<br /><br /><br />Conversion completed successfully!!!<br /><br />You may now verify the installation was successful and then delete your SMF files and data.<br /><br />Enjoy JoomlaBoard!";
?>
Regards;

Kevin
Last edited by cruisinflatout on Wed Oct 04, 2006 5:42 am, edited 1 time in total.

User avatar
tomthornz
Joomla! Apprentice
Joomla! Apprentice
Posts: 48
Joined: Thu Feb 16, 2006 6:33 pm
Location: UK

Re: SMF -> Joomlaboard conversion

Post by tomthornz » Tue Oct 10, 2006 9:17 pm

WOW! Works perfectly, thanks for the script.

Tom.
Please read forum rules regarding signatures: http://forum.joomla.org/viewtopic.php?t=65

User avatar
maxdg
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4173
Joined: Sun Sep 04, 2005 3:52 pm
Location: Colli Euganei
Contact:

Re: SMF -> Joomlaboard conversion

Post by maxdg » Tue Oct 10, 2006 11:05 pm

Thanks for your script Kevin but, just to be honest.. I have to repeat myself.. I have no credits at all about the last one.. ;)
I'll surely try your script (well... when I realised where I putted my old backup...  ???)
"Civiltà è la misura con cui la comunità provvede a tutti, nel disinteresse collettivo. Il disinteresse è la norma di selezione per l’immortalità di una razza intelligente."

http://www.ufomachine.org/

cruisinflatout
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Oct 02, 2006 3:19 pm
Location: Regina, SK, Canada
Contact:

Re: SMF -> Joomlaboard conversion

Post by cruisinflatout » Tue Oct 10, 2006 11:53 pm

Glad it could help...I'm looking at furthering it to include a part to convert some stuff into Community Builder as well such as birthdate etc etc...it's kinda unique to my situation but if folks would find a use for it, let me know and I'll post up the final script as well.

User avatar
maxdg
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4173
Joined: Sun Sep 04, 2005 3:52 pm
Location: Colli Euganei
Contact:

Re: SMF -> Joomlaboard conversion

Post by maxdg » Wed Oct 11, 2006 1:23 am

...it's kinda unique to my situation
I don't think so..
but if folks would find a use for it, let me know and I'll post up the final script as well.
Perhaps I can post it in our Italian forum, with some hints you provide and translation..

And, of course... YOUR credits..  ;)

Only one thing.. due to the jos_ prefix ... what's about changing the name of the CMS in the comments..?

Code: Select all

// Get the group id:s for regular users and administrators in Mambo.
8)
Last edited by maxdg on Wed Oct 11, 2006 1:30 am, edited 1 time in total.
"Civiltà è la misura con cui la comunità provvede a tutti, nel disinteresse collettivo. Il disinteresse è la norma di selezione per l’immortalità di una razza intelligente."

http://www.ufomachine.org/

cruisinflatout
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Oct 02, 2006 3:19 pm
Location: Regina, SK, Canada
Contact:

Re: SMF -> Joomlaboard conversion

Post by cruisinflatout » Wed Oct 11, 2006 1:44 pm

I hear ya...some of the comments aren't right (or even in English) - I just kind of threw it together late one night  :D

I'll post up a finalized version soon...

captainc
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sun Nov 20, 2005 7:34 pm

Re: SMF -> Joomlaboard conversion

Post by captainc » Sun Oct 22, 2006 7:43 pm

Hello cruisinflatout,

I am running YaBB on a website, an older French localized version - hence no upgrade, and I want to move the entire website to Joomla. Instead of installing SMF standalone + a Bridge Joomla-SMF, I prefer Joomlaboard.

According to your statement "You state "NOTE: If you are converting to Joomla for the first time - then this script won't do the trick for you.  If you are converting from SMF bridged with Joomla to Joomla with JB - then you'll like this script)" it is not possible to convert a 'standalone' SMF to Joomlaboard?

I found a Yabb -> SMF converter, so given my wish to use Joomlaboard, I'd need two conversions. Any thoughts?

Thanks

cruisinflatout
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Oct 02, 2006 3:19 pm
Location: Regina, SK, Canada
Contact:

Re: SMF -> Joomlaboard conversion

Post by cruisinflatout » Sun Oct 22, 2006 10:14 pm

The script I gave earlier in this thread expects there to be a SMF user table in the Joomla DB - one that is synced up with the Joomla installation it's bridged with.

I dunno if there is a YaBB to Joomlaboard conversion out there - if not, then I would imagine that converting your board to SMF and then using my script may work.

I would suggest setting up a test environment and run the YaBB --> SMF conversion and then my SMF --> Joomlaboard conversion.  Might work  ??? Good luck :)

User avatar
dimitris
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Oct 12, 2006 9:43 am
Location: Arillas Corfu

Re: SMF -> Joomlaboard conversion

Post by dimitris » Fri Dec 01, 2006 12:12 pm

The script looks very good,
I have an smf standalone ! so if I want to convert it with joomlaboard I will have to make first Smf bridge to Joomla, and then run your script,
Is this a good thought?

Dimitris

User avatar
Johan
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Wed Aug 24, 2005 3:48 pm
Location: Göteborg/Sweden
Contact:

Re: SMF -> Joomlaboard conversion

Post by Johan » Fri Dec 01, 2006 12:45 pm

cruisinflatout wrote: Glad it could help...I'm looking at furthering it to include a part to convert some stuff into Community Builder as well such as birthdate etc etc...it's kinda unique to my situation but if folks would find a use for it, let me know and I'll post up the final script as well.
Hi

This looks promising. One reason for using SMF is the powerfull way to handle member rights to boards. I think it’s very important to be able to control this in a better manner than Joomla does today? U can set permissions on almost every level in SMF, user, board? Does this script take care of this or is there an other solution for that? For example this might be transferred to Community Builder??

The final script would be a success If this is solved to... :D

cruisinflatout
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Oct 02, 2006 3:19 pm
Location: Regina, SK, Canada
Contact:

Re: SMF -> Joomlaboard conversion

Post by cruisinflatout » Fri Dec 01, 2006 7:26 pm

dimitris wrote: The script looks very good,
I have an smf standalone ! so if I want to convert it with joomlaboard I will have to make first Smf bridge to Joomla, and then run your script,
Is this a good thought?

Dimitris
That would be a way to do it.  Just make sure that SMF is bridged properly with Joomla before you transfer to JoomlaBoard.  I believe some of the SMF>>Joomla bridges include a way to sync the users between the SMF tables and the JOS tables - this would need to be done as well before you run this script.  Joomlahacks bridge does provide a way to sync the users.

Make sure you back up your DB at every major step (as is now, bridged with JOS, synced with JOS, etc)...MySQL Administrator is a free DL and is easy to use for this.

Good luck...

Kevin

Johan wrote:
cruisinflatout wrote: Glad it could help...I'm looking at furthering it to include a part to convert some stuff into Community Builder as well such as birthdate etc etc...it's kinda unique to my situation but if folks would find a use for it, let me know and I'll post up the final script as well.
Hi

This looks promising. One reason for using SMF is the powerfull way to handle member rights to boards. I think it’s very important to be able to control this in a better manner than Joomla does today? U can set permissions on almost every level in SMF, user, board? Does this script take care of this or is there an other solution for that? For example this might be transferred to Community Builder??

The final script would be a success If this is solved to... :D
Sorry, I've been sidetracked with other projects this past while so I haven't made much more headway.  As far as the permissions go, the SMF usergroups (and the corresponding permissions) do not carry over into the JOS system.  What I was speaking to before is that a current users posts will still "be theirs" when they're converted to Joomlaboard.  They would still have the permissions to modify the post etc.

I should have some time to dig into this some more later this month...so I'll keep this thread updated with the progress...

Thanks...

Kevin

User avatar
novata
Joomla! Ace
Joomla! Ace
Posts: 1144
Joined: Thu Oct 20, 2005 2:50 pm

Re: SMF -> Joomlaboard conversion

Post by novata » Thu Dec 14, 2006 9:33 pm

Quique llegastes a probar? como te fue?
cuenta por favor!

Novata
quiquedcode wrote: Thanks maxdg
I'll try this to see what happens

:)

wobo46
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Mar 22, 2006 4:28 pm

Re: SMF -> Joomlaboard conversion

Post by wobo46 » Tue Feb 06, 2007 12:17 am

This may sound very dumb but I guess I have filled in wrong data in the mysql.php - on starting the converting script it gives me "Error" which is the error message of mysql.php.

What I filled in:

Code: Select all

mysql_connect("name_of_the_database", "username_for_the_database", "password")
and
 mysql_select_db("name_of_the_database")
Is that correct?

wobo

cruisinflatout
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Oct 02, 2006 3:19 pm
Location: Regina, SK, Canada
Contact:

Re: SMF -> Joomlaboard conversion

Post by cruisinflatout » Tue Feb 06, 2007 12:34 am

No - the first parameter is the location of the DB (Such as "localhost") fill in your particular information to connect to the DB and you should be good to go.

Code: Select all

<?php

function connectbdd()
{
    if( false == mysql_connect("LOCATION_OF_DB", "USERNAME", "PASSWORD") )  /// FILL with your connections details
        die("Error");
    
    if( false == mysql_select_db("DB_NAME") ) // FILL with your database name
        die("Error.");
}

?>

wobo46
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Mar 22, 2006 4:28 pm

Re: SMF -> Joomlaboard conversion

Post by wobo46 » Tue Feb 06, 2007 2:09 am

Arrgh! Yes, it WAS a dumb question, thx a lot. I sat there and racked my brain what could be the first parameter!  :-[

After weeding out some duplicate entries (duh!) I got to the end of the conversion.
Populating 130266 messages into JoomlaBoard.

BUT: The new forum shows only 637 of those 130K postings!  :o
(The table jos_sb_messages counts just 637 lines, the smf_messages shows 130,266 lines!)

I did the conversion twice (truncating the jos_sb_* tables between). Same result both times.

wobo

cruisinflatout
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Oct 02, 2006 3:19 pm
Location: Regina, SK, Canada
Contact:

Re: SMF -> Joomlaboard conversion

Post by cruisinflatout » Tue Feb 06, 2007 2:18 am

The joomlaboard tables store messages differently than SMF does but I don't think the rowcount would be out by that much.

The only thing I can think of is perhaps the 638th record contains a single quote without having \ before it.  Does the conversion error out on you??

I know that you aren't converting to phpBB but perhaps you could install one of the other forums and use the conversion from SMF to it and see if it errors out as well.  I know it's a pain but it may let you know if it's the conversion script or something in your database.

Best of luck;

Kevin

wobo46
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Mar 22, 2006 4:28 pm

Re: SMF -> Joomlaboard conversion

Post by wobo46 » Tue Feb 06, 2007 12:41 pm

cruisinflatout wrote:
The only thing I can think of is perhaps the 638th record contains a single quote without having \ before it.  Does the conversion error out on you??
ok, I misunderstood. I took the "Populating 130266 messages into JoomlaBoard." for a success message! There was another line underneath I did not care for:
CATEGORIE INEXISTANTE DANS LA BASE MAMBO!!!
If I remember my french at school correctly that means "This category does not exist in the mambo base"

After a good sleep and some logical thinking I found the cause of the problem:
If a message is deleted in SMF it goes into a hidden (admin-only) board, so it can be revived if deleted on error. But in the database this message is still bound to the original board. If this board gets erased later we have a message which is bound to a non-existing board! IMHO a bug in SMF.

After deleting all "deleted messages" I got further but then the converter stopped again, this time without any error message. It just quit after having converted 58K of the listed 130K messages.

wobo, rummaging around in mysql hell....

BTW: This converter drives mysqld up to 85% CPU load and in one run it caused a complete shutdown of the live website! Is it possible to run the script directly on the server (so I can monitor the load and kill the process in case of emergency)?

wobo

cruisinflatout
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Mon Oct 02, 2006 3:19 pm
Location: Regina, SK, Canada
Contact:

Re: SMF -> Joomlaboard conversion

Post by cruisinflatout » Tue Feb 06, 2007 12:51 pm

Hey, glad you found the source of the one problem - sorry you ran into another.

I've never used this script to convert a large board.  I would imagine the reason it stops at 58K is because PHP times out.  I think there is a way to bypass the default PHP timeout period - but I am unsure of how to do that.  As far as processor usage - I am also not aware of anyway to get around that either - it wll use up quite a bit of processing power since it needs to loop through every single row of the SMF tables and insert them into the JB tables.

Perhaps someone else might be able to step in here and provide some solutions because I'm at a loss.

Also, maybe the dudes down at two shoes (designers of JoomlaBoard - http://www.tsmf.net/) might be able to  provide some feedback but I dunno. 

Sorry, and good luck.

Kevin

wobo46
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Mar 22, 2006 4:28 pm

Re: SMF -> Joomlaboard conversion

Post by wobo46 » Tue Feb 06, 2007 4:03 pm

cruisinflatout wrote: I would imagine the reason it stops at 58K is because PHP times out.
Ah, no. The problem is in the formatting of the text in SMF. I have now solved the 20th or 25th problem, all related to backticks or single quotes or semicolons in the texts (all of them not escaped!). I've spent over 6 hours now and I'm at 60% of the messages now. And the beauty of the script is: it does not tell in most cases, it just stops. Or it gives an error like "there is an error in your SQL on line 1 near "'a". OK, so I'd have to search all 130K messages for this "'a"? :(

I don't know who to blame, SMF or the converter script, I'd rather blame SMF to store data in a way it confuses SQL scripts. Weird, though, that I did not run into such problems earlier while performing data maintenance in mysql on the CLI.

There is more work yet after the conversion. All bb code seems to be different in JoomlaBoard (example: all quote and code and b and i tags are visible in the JoomlaBoard message view, although JoomlaBoard uses the same tags. Horrible. I don't know whether I'd start such a switch again.

Anyhow, thx for your input!

wobo

wobo46
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Mar 22, 2006 4:28 pm

Re: SMF -> Joomlaboard conversion

Post by wobo46 » Thu Feb 08, 2007 1:46 pm

Solved the issue by running the converter script on the server with

Code: Select all

$ php index.php
All was converted and while running the script mysqld used only 61% of CPU instead of 85% when I used it from the remote browser.

wobo
Last edited by wobo46 on Thu Feb 08, 2007 2:22 pm, edited 1 time in total.

keloid-scars
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Sep 22, 2006 1:54 pm

Re: SMF -> Joomlaboard conversion

Post by keloid-scars » Mon Feb 26, 2007 5:49 pm

When converting i receive the following...

Populating Categories...

OK...categories and boards imported successfully!

Populating Users Table...
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Invalid query:
INSERT INTO `jos_sb_users` (userid, posts, signature) VALUES ('504', '1', '')
Duplicate entry '504' for key 1


I've tried removing the record relating to userid 504 and rerun the conversion but again i received the error message above. Any ideas where to look next? Surely if there was duplication, especially with userid's, that this would have been flagged earlier.

User avatar
maxdg
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4173
Joined: Sun Sep 04, 2005 3:52 pm
Location: Colli Euganei
Contact:

Re: SMF -> Joomlaboard conversion

Post by maxdg » Mon Feb 26, 2007 9:05 pm

Check all the flags, when you export your database.
Maybe you have to check one or both:

- Disable foreign key checks
- Use ignore inserts
"Civiltà è la misura con cui la comunità provvede a tutti, nel disinteresse collettivo. Il disinteresse è la norma di selezione per l’immortalità di una razza intelligente."

http://www.ufomachine.org/

keloid-scars
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Sep 22, 2006 1:54 pm

Re: SMF -> Joomlaboard conversion

Post by keloid-scars » Tue Feb 27, 2007 12:02 am

Sorry, i may not have put enough information in the post. I created a convert folder with index.php containing the script from cruisinflatout (found above) and the mysql.php file connector.

It's when i run that script is when it fails with...

Populating Categories...

OK...categories and boards imported successfully!

Populating Users Table...
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Invalid query:
INSERT INTO `jos_sb_users` (userid, posts, signature) VALUES ('504', '1', '')
Duplicate entry '504' for key 1


I don't have access to the server as it's all hosted; but i feel the script should work (as the categories have come across and some users) and browsing the mysql tables for the 504 userid i can't see how it thinks there is any duplicate entries.

Thanks

keloid-scars
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Sep 22, 2006 1:54 pm

Re: SMF -> Joomlaboard conversion

Post by keloid-scars » Tue Feb 27, 2007 12:23 am

Doh, although using phpmyadmin to browse the table i eventually found a duplicate record through the members view within SMF. It had identical username and email. So i deleted one record, removed 504 record through phpmyadmin and reran the convert. It worked, but with...

Populating Categories...

OK...categories and boards imported successfully!

Populating Users Table...
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Total users 1229, Inserted 1227 of the users...

(NOTE: If inserted is less than actual, it is due to the user having made a post but has since deleted their account. The post will still show up as usual though...)
User import into JoomlaBoard successful!!
Populating 6317 messages into JoomlaBoard.
User 'keloidjoomla' has exceeded the 'max_updates' resource (current value: 20000)


I've seen something similar where there is a query requests limit set on mysql. I don't have access to change it and my host won't change it either so I hope this will continue from where it left of when i rerun the convert again.

bear29a
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Mar 01, 2007 9:43 am

Re: SMF -> Joomlaboard conversion

Post by bear29a » Thu Mar 01, 2007 9:45 am

Hi there,

I've followed through the posts carefully and am getting the following error:

"Populating Categories...

Invalid query:
INSERT INTO jos_sb_categories (id,parent,name,cat_emoticon,locked,alert_admin,moderated,moderators,pub_access,pub_recurse,admin_access,admin_recurse,ordering,future2,published,checked_out,checked_out_time,review,hits,description) SELECT ID_CAT + 500, 0, name, 0, 0, 0, 0, NULL, 0, 0, 0, 0, catOrder, 0, 1, 0, '0000-00-00 00:00:00', 0, 0, '' FROM smf_categories ORDER BY catOrder
Table 'hrs_joom1.smf_categories' doesn't exist"

Any ideas?

Could it be something to do with having smf and joomla in different databases? If so, how do I get them into the same database?

Thanks

Dave

 

Locked

Return to “SMF - Simplemachines.org Forum”