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

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

Previous topic - Next topic

Urbanite

What happens if I have two forums on same server with different sub domains and have the same database set up in admin/server settings on them both; will it not then share and update the content of this single database?

I am making this sound too simple perhaps  :-\
Just when you finally get it idiot proof ...along comes a bigger idiot!

jensvanherck

i have a question with this does it share the persons postcount 2?

cdr_hayalet

Hello  i read all the post about that topic,but i couldn't see about my problem.
We are two friends,and we have got 2 forums.
We wanna share our member table.When we apply the first post,it is work.But i can be admin for my friends forum,and he can be admin my forums.What do i have to do for change it  ::)

Accutually i firstly think add a column to smf_member like Site_Id.But i dunno where does SMF know we are admin.I looking for it but i failed,and i am still looking for too.Bur if someone know,please say me.And if you know better soluation than mine,please say me.

Thank you for everything
/*hayalet*/

cdr_hayalet

and i don't found download link that mod : http://custom.simplemachines.org/mods/?mod=41
if someone has got it please share with us.Bcuz another one didn't found it too like :S

cdr_hayalet

sorry triple
but i solved my problem for 1.1.3.
if someone wanna i try to help

KahneFan

#185
(Should) this work in my case;

I currently have: mysite.com
And will be creating: myothersite.com , but it will actually be a mask of mysite.com/myothersite

Can I share a user db in this case, or will myother site being a sub of mysite mess things up? As far as cookies and all else is concerned, everything will see myothersite.com, but physically it will be in a sub.

And, to add to that, I may be creating: anothersite.com , which will also be a mask of mysite.com/anothersite

In short, can I use this to effectivly link

mysite.com
myothersite.com (masked from a sub)
anothersite.com (another masked sub)

But all using the same db.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

KahneFan

...it appears to work OK for my situation. However, I guess there's still not a fix for the member count to appear on all forums?
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

brianjw

Hi,

I am having this same problem:
Quote from: Nic on October 26, 2004, 11:41:05 AM
Firstly, thanks SO much for this post - it was exactly what I needed.  I now have two forums for two sub-domains on the same site using one member table, which is just what I wanted.  however, I did notice one thing (no biggy, but wondered if I could fix it).  If someone registers on one forum, the member count automatically adds another one on, but on the other forum it doesn't and I have to tell it to recount the totals.  it's not a big hassle at the moment, since both forums are just new and not many people are registering, but if the forums get bigger it could be annoying having to recount totals each time a new member joins.  Is there any way around this?
and the fix for it was:
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]

But I cannot find those codes for SMF 1.1.6. Can someone help me with it? Thanks.

fyndler

Hi

Sorry but i dont get it i changed this "{$db_prefix}membergroups" => "smf1_membergroups" to this "{$db_prefix}brutalfpsforum00membergroups" => "smf1_membergroups"

And i get

Table 'brutalfpsforum00.smf_brutalfpsforum00_membergroups' doesn't exist
File: C:\xampp\htdocs\Sources\BoardIndex.php
Line: 293

haha what do i do wrong ?

qubbah

i want only memberlist and their username in my sencondry forum. Thats member can acces new forum with same password.

How can i make it with minimun changed?

Beltazar_DSA

OMD.. LMAO..   so now, I have finally found this and that this could be done..   

Now, here would be the trick..   taking 3 separate forums    all running  SMF.1.1.7.  and Tiny Portal..   they all are under the same name domain w/ cept  /manor  /evolutions  and /dungeons              yeah, this is not going to happen anytime soon.. 


MarkJ

This way of setting up multiple forums is great.  Only part that doesn't apply with the new forum software is this:

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


The new code is this:

       updateSettings(array('totalMembers' => true), true);
}
// If $parameter1 is false, and approval is off, we need change nothing.
elseif ($parameter1 !== false)
{
// Update the latest member (highest ID_MEMBER) and count.
$result = db_query("
SELECT COUNT(*), MAX(ID_MEMBER)
FROM smf_members", __FILE__, __LINE__);
list ($changes['totalMembers'], $changes['latestMember']) = mysql_fetch_row($result);
mysql_free_result($result);

// Get the latest member's display name.
$result = db_query("
SELECT realName
FROM smf_members
WHERE ID_MEMBER = " . (int) $changes['latestMember'] . "
LIMIT 1", __FILE__, __LINE__);
list ($changes['latestRealName']) = mysql_fetch_row($result);
mysql_free_result($result);
}

updateSettings($changes);
break;



I am not sure if that is the right code but it looks like it could be.  Anyone know how to alter it so that it updates like before?

Regards

_Anthony_


brianjw

To make both sites update the counts instead of having to do it manually, use this for 1.1.7. Thanks to [SiNaN]/Blue Dream:

http://www.simplemachines.org/community/index.php?topic=271586.msg1829413#msg1829413

cammy1568

Hi, when i do this i cant register on the one i cahnged, i can only register on the main fourm. is there a way to fix this???

Game-Flight

Join Us Today! And help us out!


cdr_hayalet

#195
Quote from: KahneFan on September 06, 2008, 12:36:57 AM
(Should) this work in my case;

I currently have: mysite.com
And will be creating: myothersite.com , but it will actually be a mask of mysite.com/myothersite

Can I share a user db in this case, or will myother site being a sub of mysite mess things up? As far as cookies and all else is concerned, everything will see myothersite.com, but physically it will be in a sub.

And, to add to that, I may be creating: anothersite.com , which will also be a mask of mysite.com/anothersite

In short, can I use this to effectivly link

mysite.com
myothersite.com (masked from a sub)
anothersite.com (another masked sub)

But all using the same db.
i think you can do this absolutly.Bcuz i cant see any stuff to block what you want.Just you must be careful when you are editing your cookie name.It must be the same for your everysite.
EDIT//btw in your second message,you said there wasnt.But there is.If you read the first pages you will see how to solve.and i solved it too...

cdr_hayalet

Quote from: fyndler on October 30, 2008, 11:34:02 PM
Hi

Sorry but i dont get it i changed this "{$db_prefix}membergroups" => "smf1_membergroups" to this "{$db_prefix}brutalfpsforum00membergroups" => "smf1_membergroups"

And i get

Table 'brutalfpsforum00.smf_brutalfpsforum00_membergroups' doesn't exist
File: C:\xampp\htdocs\Sources\BoardIndex.php
Line: 293

haha what do i do wrong ?
dude you must change your membergroup prefix like this "main_membersgroup" :)
you must look again how to write "membersgroup" and after if it is ryt,you must check how did you change it in your smf files.You must keep it the same for your all forums :)

cdr_hayalet

Quote from: qubbah on November 28, 2008, 09:03:14 AM
i want only memberlist and their username in my sencondry forum. Thats member can acces new forum with same password.

How can i make it with minimun changed?
if you ask me you must change this tables:
members
i m not sure,i didnt try but i think this table is enough.a few time ago i checked my changed tables list.And according to me thats enough.

cdr_hayalet

Quote from: cammy1568 on January 21, 2009, 02:51:10 AM
Hi, when i do this i cant register on the one i cahnged, i can only register on the main fourm. is there a way to fix this???
you made mistake,i think.bcuz noone has like yours problem.if you check your steps you will see.

bburg5

I edited my files and now I get this error- "Table 'ffwaterf_Forum.smf2_members' doesn't exist" what is wrong with this?

Thanks

Advertisement: