Share user database for 2 (or more) different forums.

Started by Spaceman-Spiff, September 03, 2004, 09:14:44 PM

Previous topic - Next topic

NanoSector

Any way on how to do this in 2.0 RC4?

I got jCreator and it doesn't find anything with {db_prefix}.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Hj Ahmad Rasyid Hj Ismail

There are two approaches in this thread. One that you are trying to use, and the other is via mySQL/phpMyAdmin. Try searching db_prefix or just prefix instead.

NanoSector

Quote from: ahrasis on November 21, 2010, 11:30:58 AM
There are two approaches in this thread. One that you are trying to use, and the other is via mySQL/phpMyAdmin. Try searching db_prefix or just prefix instead.
Can you tell me what exact to search for? I'm not really sure if I get your comment the right way.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Hj Ahmad Rasyid Hj Ismail

It is under Sources folder (all files). If you are in doubt, ask Johncccccc. He had made a mod (half way) to do this and it works. I missed the mod files he gave me, so I guess, you'll need to ask him then, if you need that.

C.Fultz

Quote from: mkmeister on March 04, 2010, 03:35:19 PM
OK, here's a step by step of exactly what I did. There were ZERO code changes, and only used MySQL to pull it off as noted in a previous post.

As a note, I'm using SMF 1.1.11 and MySQL 5.0.x. If SMF 2.x uses a similar table structure (haven't looked at it personally yet), I'd imagine it'd work just as well and still no code changes. They don't even need to be on the same database, but it's easier, and my instructions will assume they're using the same database with just different prefixes for the two (or more) installations of SMF. It does not matter what domain they are hosted on as long as they use the same MySQL server.

This will share user logins and PMs.

Assume you have two installations. One is an already established forum installation, and it uses the prefix "forumA_". The other is a new forum that you want to share forumA's logins and PMs. It has the prefix "forumB_". They're both in the database called "smf".

Log onto MySQL. There are a variety of tools for this but I just use commandline.
Now, once in MySQL, issue the following.
USE smf;

First, just move forumB's tables you want shared out of the way.
ALTER TABLE forumB_members RENAME TO forumB_members_old;
ALTER TABLE forumB_personal_messages RENAME TO forumB_personal_messages_old;
ALTER TABLE forumB_pm_recipients RENAME TO forumB_pm_recipients_old;


WARNING: Your forumA install will NOT be accessible once you do the following step until all steps are complete. It'd be wise to make a backup first too.
Next, rename forumA's tables to use a "shared_" prefix.
ALTER TABLE forumA_members RENAME TO shared_members;
ALTER TABLE forumA_personal_messages RENAME TO shared_personal_messages;
ALTER TABLE forumA_pm_recipients RENAME TO shared_pm_recipients;


Finally, create views of the shared tables for both forumA and forumB so they see the exact same tables and the info is the same for both.
First, forumA:
CREATE VIEW forumA_members AS SELECT * FROM shared_members;
CREATE VIEW forumA_personal_messages AS SELECT * FROM shared_personal_messages;
CREATE VIEW forumA_pm_recipients AS SELECT * FROM shared_pm_recipients;


And next, forumB:
CREATE VIEW forumB_members AS SELECT * FROM shared_members;
CREATE VIEW forumB_personal_messages AS SELECT * FROM shared_personal_messages;
CREATE VIEW forumB_pm_recipients AS SELECT * FROM shared_pm_recipients;


Presto! Finished! Both forumA and forumB share users and PMs!

If anybody can spot corrections or something wrong with the above instructions, let me know and I'll correct it.

EDIT: Corrected a couple of typos.

I wanna thank you soooo much! You are an awesome help!

jekwumoore

we rule the world

Another Rob

I'm running RC3, i just want to have a few sites using the same membership list, so member1 signs up on site1, then can login to site2 and site3 as well without having to sign up individually. should i have any problems using the MySQL method?

Hj Ahmad Rasyid Hj Ismail

Quote from: Another Rob on January 27, 2011, 06:46:10 PM
I'm running RC3, i just want to have a few sites using the same membership list, so member1 signs up on site1, then can login to site2 and site3 as well without having to sign up individually. should i have any problems using the MySQL method?
We won't know until you try it  ;D

priceform

Hi

Just got the forum for my site. I previously had a forum using different software. Is there any way I can import the messages/users from that forum in to my new one.

Thanks ;D

Illori

please open a separate topic for your issue. you may also want to check out the converters on the download page.

Quinn

#370
Quote from: ahrasis on January 31, 2011, 12:45:30 PM
Quote from: Another Rob on January 27, 2011, 06:46:10 PM
I'm running RC3, i just want to have a few sites using the same membership list, so member1 signs up on site1, then can login to site2 and site3 as well without having to sign up individually. should i have any problems using the MySQL method?
We won't know until you try it  ;D

I have 1.1.13 and rc5 and it doesn't seem to work. Apparently there are several changes to the members tables from 1.1.xx to 2.0 that break using the MySQL view method. It should work for 2.0 RCx

Hj Ahmad Rasyid Hj Ismail

Quote from: Quinn on February 17, 2011, 03:35:11 PM
Quote from: ahrasis on January 31, 2011, 12:45:30 PM
Quote from: Another Rob on January 27, 2011, 06:46:10 PM
I'm running RC3, i just want to have a few sites using the same membership list, so member1 signs up on site1, then can login to site2 and site3 as well without having to sign up individually. should i have any problems using the MySQL method?
We won't know until you try it  ;D

I have 1.1.3 and rc5 and it doesn't seem to work. Apparently there are several changes to the members tables from 1.1x to 2.0 that break using the mysql method. It should work for 2.0 RCx
IMO it won't work on different SMF version especially between 1.x and 2.x. But I do think it will work on the same version using mysql technique.

Quinn

Quote
IMO it won't work on different SMF version especially between 1.x and 2.x. But I do think it will work on the same version using mysql technique.

I have to agree... since I have already tested this on my site. I hope there is an import feature or upgrade in the works for 1.1.xx to 2.0 as I am sure there are a lot of 1.xx sites that would migrate to 2.0 Final

Illori

there is an upgrade process from 1.1.1* to 2.0 already, upgrade.php.

Quinn

Quote from: Illori on February 18, 2011, 06:09:09 AM
there is an upgrade process from 1.1.1* to 2.0 already, upgrade.php.

Thank you, I'll look into it when 2.0 goes Gold. Right now I am working on the new theme template with rc5 while the 1.1.3 site is up and working fine.

Eudemon

i'm gonna try this out for my both rc5 websites

has anyone done this successfully in 2.0rc5 ? or other 2.0 candidate versions?
just a little concern bcuz this topic is kinda old and it targets 1.0version.. from 2004

luuuciano

Hi!

Currently I have a project  that is based in "federated" forums... nearly 25 forums about the same topic... each forum points to certain region (geographically)
All of them in the same domain, maybe using sub domain for each one... and the main idea is to share members tables, etc... each forum having like 20 topic areas

I have readed this thread, as a couple other with other methods... almost all of them not supported anymore, or going to be on that status (as the feline subforums aproach)... and I can not decide what to do
So... what to do? :(

Can someone recommend me anything?
Or maybe exists another forum script that achieves this better? (but I love smf... thats because Im trying to find whays to use it)

Or maybe another aproach to the idea... mmm
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

Stef001

Have someone already find out how to share the uploaded avatars.
I use smf 2.0 RC5

Stef.
SMF 2.0.2 | SimplePortal 2.3.5

samiran12

that sounds good and i too will try this...but i just want to know whether it has any side effects???

Eudemon

just to report back that i shared 2 forums of 2 different domains using this method
it's been running for a month now, and everything is good

Advertisement: