Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
3 + 8 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
1" because it won't transfer the first user from SMF as that is the first user and normaly the admin user, the scripts do however transfer the topics and posts created by this user. Step 2: Empty these tables: -prefix_bb_categories -prefix_bb_forums -prefix_bb_posts -prefix_bb_posts_text -prefix_bb_topics -prefix_bb_reads_forum -prefix_bb_reads_topic Don't delete them, only empty :). Step 3: Now you have to make proper changes in config.php file (database name, username, password, table's names). Step 4: Run: -members.php -categories.php -forums.php -topics.php -posts.php Step 5: SMF uses a different password encryption level based on SHA1, XOOPS uses MD5 encryption. To have XOOPS use the SMF SHA1 hash some core files have to be hacked. Becarefull you can ruin a lot in these files so only do whats in this file. edit /xoopsdir/kernel/member.php Find the function &loginUserMd5 Add this function above or below it. /** * Logs in a user with a SHA1 SMF password */ function &loginUserSha1($uname, $pwd) { $smf_hash = sha1(strtolower($uname) . $pwd); $criteria = new CriteriaCompo(new Criteria('uname', $uname)); $criteria->add(new Criteria('pass', $smf_hash)); $user = $this->_uHandler->getObjects($criteria, false); if (!$user || count($user) != 1) { $user = false; return $user; } return $user[0]; } Save the file and close it. Next edit /xoopsdir/class/auth/auth_xoops.php Replace: function authenticate($uname, $pwd = null) { $member_handler =& xoops_gethandler('member'); $user =& $member_handler->loginUser($uname, $pwd); if ($user == false) { $this->setErrors(1, _US_INCORRECTLOGIN); } return ($user); } With: function authenticate($uname, $pwd = null) { $member_handler =& xoops_gethandler('member'); $usermd5 =& $member_handler->loginUser($uname, $pwd); $usersha1 =& $member_handler->loginUserSha1($uname, $pwd); if ($usermd5 == false OR $usersha1 == false) { $this->setErrors(1, _US_INCORRECTLOGIN); } if ($usermd5 == true) { $user = $usermd5; } if ($usersha1 == true) { $user = $usersha1; } return ($user); } Safe the file and exit. Step 6: Empty the caches in the folders: xoops_data/caches/smarty_cache xoops_data/caches/smarty_compile xoops_data/caches/xoops_cache Don't delete the .htaccess files in there and the index.html files. Step 7: Actually, that's all! .[/quote] [/quote]" />

Re: SMF CBB 3.08 converter
by ghia on 2010/11/25 8:22:04

This script runs down to a SQL select all from the SMF user table. The fields of the resulting array are then inserted in the XOOPS user table with an SQL insert.
INSERT INTO $xoops_users VALUES ( list of values)
The list of values has to have all relevant fields from SMF and literal values for the other XOOPS fields. The list has to be in the order of the XOOPS user table (see structure).
By specifying a field list
INSERT INTO $xoops_users ( list of fields) VALUES ( list of values)
you could rely on the default clause of the table structure, if this value corresponds to the value wanted.
This way you can shorten the list of values (same length as list of fields).
However some fields as eg activated will need a dedicated literal value.

Alternative is to convert the tables with phpMyAdmin and full SQL
INSERT INTO xoops_users (xfield1, xfield2, ...) SELECT sfieldx as xfield1, 'literal1' as xfield2, ... FROM smf_members
Re: SMF CBB 3.08 converter
by charpres on 2010/11/24 19:18:12

I've been playing around with trying to get these scripts to work with a SMF 2 installation.

I have found that SMF (without much point) changed around their database to make most things lower case and the order in which fields are in the database have changed. So, you have to rename fields to the proper case and/or with underscores.

On top of that, there appears to be quite a few more fields in the members database. So, it is a matter of also having to try and match:

What order things are in
whether upper or lower case
whether SMF gratuitously threw in a underscore
what fields will match the right Xoops fields.

I really don't care about many of the fields, like URL, ICQ, aim and so on. Is there an easy MySQL syntax to let the script skip lines that do not match?

All I really want to do is get those SMF "members" into the equivalent Xoops "users" field, along with posts and other essential information. All of the user's personal information can get lost for all I care.
Re: SMF CBB 3.08 converter
by charpres on 2010/11/23 15:56:35

I think the other huge issue is password hashing.

If you modify the Xoops script heavily to allow SMF passwords, then you are forever stuck with having to try and modify each and every new upgrade to Xoops.

I have kind of come to the conclusion that there is no practical way to handle this unless you want to spend a great deal of time making the transfer only to have an incompatible password system that will cause future problems.
Re: SMF CBB 3.08 converter
by ghia on 2010/11/22 23:44:13

Wait for CBB 4.0 Final and use 3.08 for the time being.
As you see in the thread, some adaptation for the scripts are required to make the number of fields correct for some tables.
Re: SMF CBB 3.08 converter
by charpres on 2010/11/22 22:10:11

I've been trying like crazy to modify this script to convert SMF 2 to CBB 4.

My brain is about to explode.

I can't go backward on the SMF 2, but I could go back to an earlier CBB version.

Has anybody re-done this script or are there any suggestions?

I would like to change from SMF to Xoops, but there are 6,500 users at the current SMF site and I don't want to have to start over from scratch.

Who's Online

181 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 181


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits