Advertisement:

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

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Share user database for 2 (or more) different forums.
« Reply #20 on: November 02, 2004, 04:36:36 PM »
Check the Stats.template.php file in Themes/default.  Did you share the themes table as I suggested?

-[Unknown]

jamesgrant

  • Guest
Re: Share user database for 2 (or more) different forums.
« Reply #21 on: November 02, 2004, 04:39:01 PM »
on what forum??? the original one, or the new one.

I've only modified files in the 'Sources' directory as suggested.... do i need to make modifications in othe directories too???


 :)

jamesgrant

  • Guest
Re: Share user database for 2 (or more) different forums.
« Reply #22 on: November 02, 2004, 04:40:28 PM »
what do i need to do with the file? do i need to change all the database entries to match my original forum like i had to do in all the Sources .php files?

thanks for ya help btw lol

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Share user database for 2 (or more) different forums.
« Reply #23 on: November 02, 2004, 04:53:29 PM »
In addition to the tables listed in the first post, I suggest you also do the same for:

{$db_prefix}themes -> smf1_themes

You'd probably also want to share log_karma, log_online, and log_floodcontrol.

-[Unknown]

jamesgrant

  • Guest
Re: Share user database for 2 (or more) different forums.
« Reply #24 on: November 02, 2004, 05:04:38 PM »
Wicked!

Thanks for that lol


dunno if it was you tinkering with the forum, but i uploaded my theme to the new forums' themes directory, and also just copied my settings.template from the original forum to the new one and it all appears to work!!

Thanks [unknown] :)


jamesgrant

  • Guest
Re: Share user database for 2 (or more) different forums.
« Reply #25 on: November 07, 2004, 07:11:54 AM »
Good morning lol....

Everything is still working fine... i havent yet opened the 2nd forum up yet... but i have noticed something:

The initial setup was fine, linking the database tables and stuff, but now new members have joined my original forum, they dont seem to become "new members" in my second forum.

i had 308 members when i made the second database, and now new people are still joining my forum, it's updating the members in my original forum, but not in my second forum...

So my original forum says 309, and my new forum still says 308.  :-\ :-\
However, the new members are listed in the new forum if you search for them.... so i assume they can access it fine (seeing as it's the same database table anyways).... but it's not updating on the second forum as new people joining.... so even tho i have 309 members, the 2nd forum says i have 308 lol...

It's not important, but i just thought i'd let you know in case you have any sort of resolution for it :)

J

jamesgrant

  • Guest
Re: Share user database for 2 (or more) different forums.
« Reply #26 on: November 07, 2004, 07:26:34 AM »
Just went into the new forum, and recounted all topics and statistics, which has sorted out the problem....

Is there any way to 'nudge' the forum to do that itself??? or am i going to have to 'syncronize' the forums every couple of days then??  :-\ :-\ :-\

8)

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Share user database for 2 (or more) different forums.
« Reply #27 on: November 07, 2004, 07:27:16 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]

-[Unknown]

jamesgrant

  • Guest
Re: Share user database for 2 (or more) different forums.
« Reply #28 on: November 07, 2004, 07:59:45 AM »
hi [unknown].... thanks for the tip lol... i should have read the entire post!!  ::)

That kills my forum though:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/crdscene/public_html/v6/Sources/Subs.php on line 1540

anything i am doing wrong?

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Share user database for 2 (or more) different forums.
« Reply #29 on: November 07, 2004, 08:05:15 AM »
Are you sure you copied and pasted exactly as I posted?

What code did you remove, and what did you add?

-[Unknown]

jamesgrant

  • Guest
Re: Share user database for 2 (or more) different forums.
« Reply #30 on: November 07, 2004, 08:27:04 AM »
i took out

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


and replaced it with

         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__);


and it still comes up with the error.... but this time it's a different line number  ::)

jamesgrant

  • Guest
Re: Share user database for 2 (or more) different forums.
« Reply #31 on: November 07, 2004, 08:28:35 AM »
lol i think i know what i've done....

i need to change the prefix1_settings
and prefix2_settings

with my database names??????


oooops lol

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,872
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Share user database for 2 (or more) different forums.
« Reply #32 on: November 12, 2004, 01:57:35 PM »
prefix1 and prefix2 are the database table prefixes for your two boards. However, that shouldn't have anything to do with the T_CONSTANT_ENCAPSED_STRING message. According to this, that means you probably forgot a semicolon someplace.
« Last Edit: November 12, 2004, 02:01:55 PM by Oldiesmann »
Michael Eshom
Cincy Space - now open!

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #33 on: December 03, 2004, 02:25:32 AM »
I have two databases setup and now I'm trying to get them to smoothly to integrate into mambo. I have it working on http://www.goosemoose.com/mambo but only the Rats Rule! forum is actually integrated, the dog forum uses a wrapper. Any ideas on how to get them both integrated? They will both work off of the single mambo log in since they share the same cookie and member database, etc.

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Share user database for 2 (or more) different forums.
« Reply #34 on: December 03, 2004, 05:22:49 AM »
Search for mambo integration, there's be many topics on it. There's already an integration between SMF and Mambo.

http://mamboforge.net/projects/mos-smf/
Cristián Lávaque http://cristianlavaque.com

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #35 on: December 03, 2004, 01:27:53 PM »
That is what I am using but it's not set up for multiple forums sharing a database.

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #36 on: December 06, 2004, 10:14:31 PM »
I can't get themes to work properly over shared databases. I've shared the themes table, but wierd things happen. I am seeing the themes I have created in forum A listed in forum B's admin panel, but not for the users when they are logged into B. I also think that when they switch to forum B they are ending up with the wrong theme, maybe it's going off of the same ID of forum B? I also noticed I have 2000 entries in my themes table for forum A and almost all of them are from theme id 1. I think that it hasn't been deleting as I have been deleting and recreating themse over time.

What do you suggest as the best way to set this up. I want to have two themes only on each board, and I want that theme to follow each user. What do I setup i n the admin panel of each board, meaning what directory, do i set up the same theme names, same id, etc.

Thanks

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Share user database for 2 (or more) different forums.
« Reply #37 on: December 07, 2004, 08:33:10 PM »
The themes table stores the settings and options for every theme.  This includes the themes themselves, their paths, and the member's options.

Sounds like knownThemes (on the settings table) needs to be syncronized between the two.

-[Unknown]

Offline Cal-Look

  • Newbie
  • *
  • Posts: 6
Re: Share user database for 2 (or more) different forums.
« Reply #38 on: December 10, 2004, 09:18:38 PM »
I've followed the instructions as posted and it worked perfectly - I couldn't believe it. But I've noticed a small bug - when I go to either board and click the link that lets me load the posts that have been posted since my last visit, I get an empty list, when I know that there are new messages. I've even posted new messages from an alter profile, on both boards, to test it out. Any thoughts? have I missed something?

Thanks for the help - I'm really loving the software!

Offline Goosemoose

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,400
  • Gender: Male
    • Goosemoose.com
Re: Share user database for 2 (or more) different forums.
« Reply #39 on: December 11, 2004, 03:50:52 AM »
I've followed the instructions as posted and it worked perfectly - I couldn't believe it. But I've noticed a small bug - when I go to either board and click the link that lets me load the posts that have been posted since my last visit, I get an empty list, when I know that there are new messages. I've even posted new messages from an alter profile, on both boards, to test it out. Any thoughts? have I missed something?

Thanks for the help - I'm really loving the software!

Make sure you shared all the tables correctly. It sounds like you made a mistake somewhere as I have 3 forums shared right now and that feature works for me.