Advertisement:

Author Topic: Share user database for 2 (or more) different forums.  (Read 378849 times)

Offline Elmacik

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,285
  • Gender: Male
  • = Human Draft =
    • IT Store
Re: Share user database for 2 (or more) different forums.
« Reply #80 on: November 24, 2005, 10:55:15 AM »
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

Offline TheMaTrIx

  • Jr. Member
  • **
  • Posts: 220
Re: Share user database for 2 (or more) different forums.
« Reply #81 on: December 24, 2005, 10:35:31 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
« Last Edit: December 24, 2005, 10:38:19 AM by TheMaTrIx »

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #82 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.

Offline TheMaTrIx

  • Jr. Member
  • **
  • Posts: 220
Re: Share user database for 2 (or more) different forums.
« Reply #83 on: January 03, 2006, 08:28:48 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.

Offline Carver

  • Semi-Newbie
  • *
  • Posts: 20
  • Gender: Male
Re: Share user database for 2 (or more) different forums.
« Reply #84 on: January 20, 2006, 09:39:31 AM »
Find, Sources/Subs.php:

Code: [Select]
updateSettings(array(
'latestMember' => $latestmember,
'latestRealName' => $latestRealName,
'memberCount' => $memberCount,
'unapprovedMembers' => $unapprovedCount
));

Replace:
Code: [Select]
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

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #85 on: January 20, 2006, 04:30:58 PM »
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.

Offline Carver

  • Semi-Newbie
  • *
  • Posts: 20
  • Gender: Male
Re: Share user database for 2 (or more) different forums.
« Reply #86 on: January 20, 2006, 05:58:28 PM »
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
« Last Edit: January 20, 2006, 06:01:17 PM by Carver »

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #87 on: January 20, 2006, 09:47:25 PM »
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.

Offline Carver

  • Semi-Newbie
  • *
  • Posts: 20
  • Gender: Male
Re: Share user database for 2 (or more) different forums.
« Reply #88 on: January 21, 2006, 11:11:20 AM »
Thanks I decided to do just that, have Mambo, and new SMF loaded and I am working through your instructions.
Thanks Again
Curt

Offline manuelap

  • Semi-Newbie
  • *
  • Posts: 11
Re: Share user database for 2 (or more) different forums.
« Reply #89 on: March 04, 2006, 07:58:49 AM »
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!

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #90 on: March 04, 2006, 05:01:58 PM »
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.

Offline SanSite.Info

  • Jr. Member
  • **
  • Posts: 103
Re: Share user database for 2 (or more) different forums.
« Reply #91 on: May 07, 2006, 10:02:02 AM »
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





« Last Edit: May 07, 2006, 10:07:31 AM by SanSite.Info »

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #92 on: May 07, 2006, 03:35:10 PM »
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.

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #93 on: May 07, 2006, 03:44:07 PM »
BTW, are you using Joomla or Mambo on your site?

Offline SanSite.Info

  • Jr. Member
  • **
  • Posts: 103
Re: Share user database for 2 (or more) different forums.
« Reply #94 on: May 07, 2006, 04:38:35 PM »

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

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #95 on: May 07, 2006, 07:51:11 PM »
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.

Offline SanSite.Info

  • Jr. Member
  • **
  • Posts: 103
Re: Share user database for 2 (or more) different forums.
« Reply #96 on: May 08, 2006, 04:50:30 AM »

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



Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #97 on: May 08, 2006, 12:49:50 PM »
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.

Offline SanSite.Info

  • Jr. Member
  • **
  • Posts: 103
Re: Share user database for 2 (or more) different forums.
« Reply #98 on: May 09, 2006, 03:26:11 AM »
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






Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #99 on: May 10, 2006, 03:16:19 AM »
Go ahead and make a new thread and ask. This is more a general questions than a sharing forum question.