Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Joomla Bridge Support => Topic started by: Bugman on January 16, 2006, 10:19:36 AM

Title: [Solved +instructions on how to] Convert all SMF users to joomla users?
Post by: Bugman on January 16, 2006, 10:19:36 AM
Hello

I need to physically put all SMF users into the joomla database.

Anyone know how?

J
Title: Re: Convert all SMF users to joomla users?
Post by: Kindred on January 16, 2006, 10:21:29 AM
SMF Users are automatically ported over into joomla the first time they log in using the bridge login module.
Title: Re: Convert all SMF users to joomla users?
Post by: Bugman on January 16, 2006, 10:45:06 AM
Hello,

No that fails.

I will stop posting in all these threads and keep it to one

Apologies for triple posting. Please lock this thread

Bugman
Title: Re: Convert all SMF users to joomla users?
Post by: Orstio on January 16, 2006, 08:33:30 PM
Since this is the only topic that you started yourself for help with your site, I'll respond to it instead of locking it.

QuoteSMF Users are automatically ported over into joomla the first time they log in using the bridge login module.

QuoteNo that fails.

Version of SMF?

Version of bridge?

URL?
Title: Re: Convert all SMF users to joomla users?
Post by: Bugman on January 17, 2006, 05:44:52 AM
Hi,

Bridge: 3.20
SMF: RC2
Joomla: 1.0.7

After deleteing everyone, and putting back in the admin and then starting it off again, it works!

Thankyou for your patience!

I do have one more problem though, when using the trick to convert users into another user group, using this code:

mosMakeHtmlSafe($row);

   $row->id = 0;
   $row->usertype = '';
   $row->gid = $acl->get_group_id('Registered','ARO');

   if ($mosConfig_useractivation=="1") {
      $row->activation = md5( mosMakePassword() );
      $row->block = "1";

Changing Registered to Author fails to give the user a usertype in the database. Any ideas?

Bugman
Title: Re: Convert all SMF users to joomla users?
Post by: Orstio on January 17, 2006, 06:32:09 AM
Since the bridge doesn't use the default Joomla registration, that code hack will be useless.

Are you using bridge registration, or SMF registration?
Title: Re: Convert all SMF users to joomla users?
Post by: Bugman on January 17, 2006, 06:44:31 AM
The bridged version

The above edited file was the com_SMF_registeration one so I thought it might do.

Any ideas how I can make them all authors when the log in?

Ta

Bugman
Title: Re: Convert all SMF users to joomla users?
Post by: Orstio on January 17, 2006, 07:06:17 AM
Are Authors group 19, or 21?

You'll want to find queries in that file that have the number '18' in them, and change them to the appropriate group id number for Authors.
Title: Re: Convert all SMF users to joomla users?
Post by: Bugman on January 17, 2006, 07:17:44 AM
Authors are group 19

Just done that, and that doesn't work. Still comes up as being registered

Bugman
Title: Re: Convert all SMF users to joomla users?
Post by: Orstio on January 17, 2006, 07:23:37 AM
You do realize that it won't convert existing users, right?  Only new registrations....
Title: Re: Convert all SMF users to joomla users?
Post by: Bugman on January 17, 2006, 07:30:56 AM
Oh  i see, no i want to convert existing users in SMF into the joomla database as authors! :-( I thought the hack made them into something else as they convert over to joomla userbase

If it helps, so far, after doing a few database dumps, the only lines which change after I have made them an author in the backend is:


Old ->  INSERT INTO jos_core_acl_groups_aro_map VALUES (18, '', 13);
New ->INSERT INTO jos_core_acl_groups_aro_map VALUES (19, '', 13);

And in the jos_users at the end of the users insert

Old -> '', 0, 0, 18, '0000-00-00 00:00:00', '2006-01-17 07:14:26', '', '');
New -> 'Author', 0, 0, 19, '0000-00-00 00:00:00', '2006-01-17 07:14:26', '', 'editor=');


So obviously there is still some "18" numbers lying about, but where, there are none left in smf_registeration. Also how do I get that "author" to be inserted. Does the editor bit at the end matter too?

Thank you

Bugman
Title: Re: Convert all SMF users to joomla users?
Post by: Bugman on January 17, 2006, 07:36:16 AM
It would seem the 18s are coming from smf.php, so ok, i can edit thoose, but still, It wont show author in usertype.

Bugman
Title: Re: Convert all SMF users to joomla users?
Post by: Bugman on January 17, 2006, 08:55:35 AM
Hello,

After a bit of hassle, i have figured it out, and included instructions on how to do this.

Note, this was done using RC2, 1.0.7 and 3.20

This is to make all users, as they login in for the first time, or even register, into authors.

Get hold of com_smf, open it up and using dreamweaver, or something similar, find and replace all numbers that are 18 to 19

Then, you will need to find

INSERT INTO {$mosConfig_dbprefix}users
(name,username,email,password,gid)

And add in after password

usertype,

in both smf.php and smf_registeration.

Also, in the values line under where you find these alterations, you will need to add in:

'Author',
in the approiate place in the line, after the password bit.

And then viola, save, rezip, upload and it works

Many thanks and patience to all thoose who helped

Bugman