ElkArte Community

Project Support => Support => Topic started by: Burke Knight on February 29, 2016, 10:00:37 pm

Title: 2 forums, 1 userbase...
Post by: Burke Knight on February 29, 2016, 10:00:37 pm
Okay, I have 2 forums and want them to share same userbase.
One forum is my main site, the other is going to be the new version of my webmaster forum.
Reason is, I decided its best to have my main just be for the projects we do.
The webmaster forum, will house the rest.

Right now, the webmaster forum only has cats and boards, and main Armin account, so would like to do this now, before add more content.

However, database work, and such, is not my strong points, so will need help on this, and good instruction.
Title: Re: 2 forums, 1 userbase...
Post by: derived on February 29, 2016, 11:32:31 pm
you already installed a 2nd (webmaster) forum onto the same db?
Title: Re: 2 forums, 1 userbase...
Post by: Burke Knight on February 29, 2016, 11:35:56 pm
Quote from: derived – you already installed a 2nd (webmaster) forum onto the same db?

No, but I can export and import it into the same db....
Right now, they on same server, just different domains and databases.
Title: Re: 2 forums, 1 userbase...
Post by: Flavio93Zena on March 01, 2016, 12:05:49 am
Do they need to synch to the same database and register users at the same time in both forums if new people come there or not? If not, you can just import the database normally and clear out all topics.
Title: Re: 2 forums, 1 userbase...
Post by: derived on March 01, 2016, 12:07:36 am
that's beyond me

i was thinking copy entire db, rename it for forum#2, repair_settings.php in it's root... end up with a copy of forum#1 and just clean it out and rearrange to suit


Title: Re: 2 forums, 1 userbase...
Post by: Burke Knight on March 01, 2016, 12:20:19 am
Quote from: derived – that's beyond me

i was thinking copy entire db, rename it for forum#2, repair_settings.php in it's root... end up with a copy of forum#1 and just clean it out and rearrange to suit



That won't let me keep userbase on both.
That's how it basically was made, a while back. It was the site now at my main. Just went and cleared all posts and members, to make new site. But now, would like them to share the same userbase that the main site has, so can log in and be able to use both forums, under the same account.
Title: Re: 2 forums, 1 userbase...
Post by: Flavio93Zena on March 01, 2016, 12:22:34 am
I think it's not possible, unless you massively recode the whole thing, due to how notifications/posts/users IDs work... This, at least, if you want them to be always synched, otherwise I told you how to do it in reply3 :P
Title: Re: 2 forums, 1 userbase...
Post by: Burke Knight on March 01, 2016, 12:29:09 am
Quote from: Flavio93Zena (#OpIsis) – I think it's not possible, unless you massively recode the whole thing, due to how notifications/posts/users IDs work... This, at least, if you want them to be always synched, otherwise I told you how to do it in reply3 :P


No, you told me how to do what I've already done, and you pretty well know I did it...LOL

I said, I want them to SHARE the SAME userbase.

Meaning, your account on one, is the same and logs you into the other, as well.

They had some about it on SM.org, using the SSI file, but I'm at a loss understanding that stuff.
Title: Re: 2 forums, 1 userbase...
Post by: ahrasis on March 01, 2016, 01:40:13 am
Strange but Multi Elkarte Sub Forum Addon (MESFA) can already do that.
Title: Re: 2 forums, 1 userbase...
Post by: Flavio93Zena on March 01, 2016, 02:24:47 am
I thought about sub-forums, but it seems he is asking for something quite different, I may be wrong though :)
Title: Re: 2 forums, 1 userbase...
Post by: Burke Knight on March 01, 2016, 06:02:35 am
Quote from: ahrasis – Strange but Multi Elkarte Sub Forum Addon (MESFA) can already do that.


I had thought that was to make one forum, into multiple sub-forums.

What I need, is 2 forums on different domains, to use same member-base.
Title: Re: 2 forums, 1 userbase...
Post by: emanuele on March 01, 2016, 06:14:52 am
Assuming you don't need shared authentication (i.e. log into one makes you logged into the other), that would likely be a pain to do cross-domain (cookies are not "shareable", they are domain-specific), what I would do is make one of the two the "master", direct users to that one for registration, and once registration is done, replicate the user to the other database.
How the replication is done... well, you could use the same scheme I used for the "PM to new members" (taking in consideration in 1.0.6 one of the hooks is broken and needs a workaround).
Title: Re: 2 forums, 1 userbase...
Post by: Burke Knight on March 01, 2016, 09:16:01 am
Well, imported  the members from one to the other, and now, getting strange errors in the webmaster forum, that are not in the main site.

Do note, except for a couple theme edits, the rest of the files for webmaster forum, are from the main site, yet only that one has the errors.

Code: [Select]
Type of error: Undefined
8: Undefined variable: scripturl
URL http://www.webmastershaven.net/index.php?action=admin;area=logs;sa=errorlog;desc
File: webmastershaven.net/themes/default/languages/english/Post.english.php (body_below sub template - eval?)
Line: 359

Type of error: Undefined
8: Undefined variable: scripturl
URL http://www.webmastershaven.net/index.php?action=admin;area=logs;sa=errorlog;desc
File: webmastershaven.net/themes/default/Errors.template.php (body_above sub template - eval?)
Line: 458
Title: Re: 2 forums, 1 userbase...
Post by: Flavio93Zena on March 01, 2016, 09:19:11 am
You should well know after many years with smf, that you have to disable the template eval if you get "blabla sub template - eval?" errors :P
Title: Re: 2 forums, 1 userbase...
Post by: Burke Knight on March 01, 2016, 09:22:27 am
Okay, then explain why one forum has the error, and the other does not, both not disabled.


EDIT: Looks like the calls I did for links caused it. However, I do not know why, as they worked using the scripturl call, yet threw errors.
I changed them to hard coded URL, though, so not big issue, just a curiosity.
Title: Re: 2 forums, 1 userbase...
Post by: ahrasis on March 01, 2016, 10:22:40 am
Quote from: Flavio93Zena (#OpIsis) – I thought about sub-forums, but it seems he is asking for something quite different, I may be wrong though :)

Well, that believe is actually wrong. You can have two same forum with different domain or subdomain. You only need to choose the same category(ies) and group(s) if you want the same group(s) to have access to it.
Title: Re: 2 forums, 1 userbase...
Post by: emanuele on March 01, 2016, 10:28:10 am
I'm not sure what you mean... ???
Title: Re: 2 forums, 1 userbase...
Post by: ahrasis on March 01, 2016, 11:02:40 am
The original idea is to make two forum with one database, right? I have involved in discussions in various topics while in SMF until feline come with the solution of subforums mod. She took and implement the idea so that (sub)forums could have identical or separate forums based on categories accesible from various domain or subdomains. So yes, MESFA, a derivative of it, can run two similar or separate forum with single database.
Title: Re: 2 forums, 1 userbase...
Post by: Burke Knight on March 01, 2016, 11:12:03 am
@ahrasis, in my case, it'd only be the members, not all the data, so not too sure if this would work.
However, let them register at both, if they want. Easier that way, in the long run....LOL
Title: Re: 2 forums, 1 userbase...
Post by: ahrasis on March 01, 2016, 11:24:50 am
Then, you should read all the caveats already discussed and summarized in SMF first.

I wish you a very good luck though luck got nothing to do with this user database sharing.