• Welcome to Simple Machines Community Forum. Please login or sign up.
September 24, 2021, 05:54:42 PM

News:

SMF 2.0.18 has been released! Please update. Read more.


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

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

Previous topic - Next topic

[Unknown]

Check the Stats.template.php file in Themes/default.  Did you share the themes table as I suggested?

-[Unknown]

jamesgrant

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

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

[Unknown]

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

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

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

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)

[Unknown]

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]

-[Unknown]

jamesgrant

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?

[Unknown]

Are you sure you copied and pasted exactly as I posted?

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

-[Unknown]

jamesgrant

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

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

Oldiesmann

November 12, 2004, 01:57:35 PM #32 Last Edit: November 12, 2004, 02:01:55 PM by Oldiesmann
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.
Michael Eshom
Cincy Space - now open!

Goosemoose

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.

Anguz

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

Goosemoose

That is what I am using but it's not set up for multiple forums sharing a database.

Goosemoose

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

[Unknown]

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]

Cal-Look

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!

Goosemoose

Quote from: Cal-Look 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!

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.

Advertisement: