News:

Wondering if this will always be free?  See why free is better.

Main Menu

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

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

Previous topic - Next topic

Elmacik

Ok folks, what to do to make the forums automatically count the same members?
What [unknown] gave is quite old and doesnt work for new versions.
Home of Elmacik

TheMaTrIx

#81
Quote from: GwydionFrost on November 07, 2005, 03:42:17 AM
Is there a way to SEPARATE the member data (along with all the usergroup permissions, etc) into a separate DB, and still have all the separate boards access the info?

If you refer to this thread:

http://www.simplemachines.org/community/index.php?topic=61677.0

I'm testing how to use MySQL 5's FEDERATED table type to share user tables, do bans globaly and use Private messaging across the boards.

Its all working fine except for PM's (initialy, I'll get past that problem :p), they get writen, show as "Hey, thematrix, you have 2 messages, 2 are new." but no PM's are shown when you check your inbox. Wierd

Goosemoose

Orstio and I developed a new technique that's much simpler. check ouy www.goosemoose.com and visit all the forums to see the results.  everything runs in one folder and one database table set. let me know of you're interested. once rc2 is out ill post how to do it.

TheMaTrIx

Quote from: Goosemoose on December 24, 2005, 06:35:40 PM
Orstio and I developed a new technique that's much simpler. check ouy www.goosemoose.com and visit all the forums to see the results.  everything runs in one folder and one database table set. let me know of you're interested. once rc2 is out ill post how to do it.

The reason I'm trying to create a way to run with several databases is because its not a good idea to put to many tables in 1 database.

The network part of the site I'm building is a splitup of 1 single site that hosts a big load of developers that, once they reach a certain size of published content, get their own forum and/or portal.

Currently we already have about 20 lined up, so that would make that if every site has a forum, the network database would have like 500 tables, which is both bad databasing and totaly crap for managment.

Carver

Quote from: Goosemoose on April 16, 2005, 06:53:27 PM
Quote from: [Unknown] on October 31, 2004, 05:41:46 AM
Find, Sources/Subs.php:

updateSettings(array(
'latestMember' => $latestmember,
'latestRealName' => $latestRealName,
'memberCount' => $memberCount,
'unapprovedMembers' => $unapprovedCount
));


Replace:
db_query("
REPLACE INTO prefix1_settings
VALUES ('latestMember', '$latestmember'),
('latestRealName', '$latestRealName'),
('memberCount', '$memberCount'),
('unapprovedMembers', '$unapprovedCount')", __FILE__, __LINE__);

db_query("
REPLACE INTO prefix2_settings
VALUES ('latestMember', '$latestmember'),
('latestRealName', '$latestRealName'),
('memberCount', '$memberCount'),
('unapprovedMembers', '$unapprovedCount')", __FILE__, __LINE__);


-[Unknown]

What should this be in 1.1? The code has changed quite a bit.

did anyone come up with an answer for this part ?

Thanks

Goosemoose

No, I'm using a new method that I've described in the Mambo section. Works 10x better for me. I think I called it the Shared Forum Mod.

Carver

#86
Thanks
I will take at look at it, but I am using Bloc's Tiny Portal, and don't need Mambo for what I have going.
Goosemoose if you stop back here again does your SSI work with the multi forums?
I keep getting a can not find database error on my second forum, i have edited the SSI script to match the shared tables. members, membergroups,etc but still no go...
Thanks Again

Goosemoose

Everything works. I really only have one forum installed but the illusian of 8 :) Makes upgrades and mods MUCH easier to handle.

You could do the install even without mambo, it just wouldn't work quite a nicely. I'd try it on a test site first.

Carver

Thanks I decided to do just that, have Mambo, and new SMF loaded and I am working through your instructions.
Thanks Again
Curt

manuelap

Quote from: Spaceman-Spiff on September 03, 2004, 09:14:44 PM
In the tutorial below, the following database tables will be shared:
  • im_recipients
  • instant_messages
  • membergroups
  • members

I am using SMF 1.1 RC2 and find the tutorials in this topic of no use to me... Correct me if I am wrong, but this tutorial was made for SMF 1.0.6? Who has altered code for the version I am using????

Hope to hear from you!

Goosemoose

Carver, I recommend checking out my mod in the mambo section, it works much much better than this method, and only involves a few lines of code.

SanSite.Info

#91
Hello,

I am not getting this to work.  I got 2 Forums, and 2 different database in the same server.

- Both the forums are working fine with version 1.05 and 1.07 respectively ( is this fine having to merge 2 different versions ?? )

- Both the forums also have a different prefx name, smf and smf1

- Now I have changed this "{$db_prefix}members" and replace with "smf_members"" in my second forum ( I just took the members alone to see if its working )

So from this, it is clear that my 2nd forum which has got a prefix "smf1" is pointing to "smf" for the members.

-------------

But When I goto my 2nd forum, I am getting this message :

Database Error   
Please try again. If you come back to this error screen, report the error to an administrator.


-------------

Now I am stuck up here and I wish to proceed merging my 2 forums to one.


Few Queries :
a) If I change the prefix name of one forum alone to that of the 2nd forum, how will it take members of both forums and how will it count them.

b) Is it possible to overwrite one forum's database with the values of the other. And will tis step be successfull.


Please help me asap.

Thanks.

- San






Goosemoose

You are on the right track. You need to change {$db_prefix}members to smf_ in all your files. As well as make the other changes. If you already have members in both forums you will have to merge them which is going to be a decent sized task. You will have to change their ids in all their posts, threads and in the 2nd forum before pointing the info to the first. You will also have to deal with any name and id duplication issues. The instructions in this tthread are meant for starting a second forum and will have to be adapted if you are merging two existing ones.


SanSite.Info


Hello,

Thanks for your reply.


I am not using both. I just have a SMF Community and I want to merge it with another.

Will It work fine, If I take the Members Part alone from the database file of one community and paste it in the members part of the other community's database.

I dont need the post to be merged, jus the members.

- San

Goosemoose

No it won't work fine because you will have duplicate member id's and duplicate member names. You would have to run a query to increase the member ids of one of the tables and change any member names that would be duplicates, then you could merge.

SanSite.Info


Hello,

Thanks Once Again for the reply.

Can you please tell me the query in detail that I need to run in my phpmyadmin to modify the existing to make it unique.

I guess this task is gona be a little complicated.

Now I got a Community with 10000+ Members and another with 1000+, I wish to merge these two. So can anyone give me a query that will compare these 2 members tables for similar ids.



Please help me in this regard as this requirement is a little urgent.

- San



Goosemoose

Do you plan on abandoning all the posts from one of the boards? Which board are you getting rid of , the 10000 or the 1000? This is really a question for the main support board if you are not planning on continuing to run both boards.

SanSite.Info

Hello,

Thanks For The Reply.


I wish to take the Members from the 10000+ Forum and retain everything present in the 1000 Member Board


So I would have to retain the 1000+ Forum Board and modify the database in such a manner that it takes the members only of the 10000+ Board.


Please Help Me In this regard


- San






Goosemoose

Go ahead and make a new thread and ask. This is more a general questions than a sharing forum question.

Advertisement: