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

Arantor

QuoteAt the same time, share the avatar / attachment table using this tips.

Incredibly bad idea!

Assuming you have two topic and two message tables, you'll be duplicating attachments unless you modify all the attachment handling code too (have fun with that)

Basically, an attachment is attached to a post by id. If you attach a file to message id 1000, the same attachment is visible in BOTH sides' message 1000.

Hj Ahmad Rasyid Hj Ismail

Quote from: Arantor on March 27, 2010, 05:47:31 PM
Incredibly bad idea!

Assuming you have two topic and two message tables, you'll be duplicating attachments unless you modify all the attachment handling code too (have fun with that)

Basically, an attachment is attached to a post by id. If you attach a file to message id 1000, the same attachment is visible in BOTH sides' message 1000.
Wow... ok.
Quote from: Arantor on March 05, 2010, 07:15:54 AM
Note that member avatars are shared if they use an external URL or pick from the gallery (since that's stored in the members table, along with their post count) but not if they upload their own (since that's stored in the attachments table)
So we just leave the last part for the time being and do not allow members to upload but they can instead use an external URL or pick from the gallery? Will that be fine Arantor?

Arantor


Hj Ahmad Rasyid Hj Ismail

#303
Thanks a lot for your patience, tips and supports.

Mr. Doug

Ok...so that was the most painless process on the planet. (after I got everything in the same DB)

RC3, up and running with no issues using the MySQL method. The only thing I'd add is that you need to make sure you "recount forum statistics" after you link them all to the same user DB. I'm showing the correct count across 3 sites now. (Soon to be 4...as soon as I can figure out how to import 25,000 phpBB3 users to my SMF installation.)
--
Doug Hardman
doug (at) puttertalk (dot) com

Hj Ahmad Rasyid Hj Ismail

Quote from: Mr. Doug on March 27, 2010, 08:22:14 PM
Ok...so that was the most painless process on the planet. (after I got everything in the same DB)

RC3, up and running with no issues using the MySQL method. The only thing I'd add is that you need to make sure you "recount forum statistics" after you link them all to the same user DB. I'm showing the correct count across 3 sites now. (Soon to be 4...as soon as I can figure out how to import 25,000 phpBB3 users to my SMF installation.)

By the way, do you face any problems with cookie(s)? It seems like I cannot login or logout or do certain admin settings properly. I bothers me when it says "You were unable to login. Please check your cookie settings." I have tried cleaning cookies, clear caches, setting new cookies' name, using repair_settings.php and even re-upgrade to RC3 with no success at all.

Any advices guys?

Mr. Doug

I've had no issues with cookies. Just make sure your cookies aren't named the same way. (keep them all different.)
--
Doug Hardman
doug (at) puttertalk (dot) com

Hj Ahmad Rasyid Hj Ismail

I guess my mod is creating this problem. Thanks anyway.

forfun

If the second forum is located in a sub-domain and in a different database, but both databases are located in the same server, will it be able to "share" the same members/PM accounts.
Thanks much in advanced

Mr. Doug

I found a caveat to a shared member DB. Make sure all the Themes on your boards are numbered the same way. If I make a change the default to one (and reset the members options), all 3 get the change pushed.
--
Doug Hardman
doug (at) puttertalk (dot) com

Arantor

Note also that custom profile fields are also in that table...

Mr. Doug

Here's another thought...if I share the banlogs and ban-triggers, would that translate? I can't imagine it wouldn't, but thought I'd ask before I just went and shared them.
--
Doug Hardman
doug (at) puttertalk (dot) com

Arantor


j4r3k

#313
Hello,
I have successfully merged more than 2 forums together (running SMF 1.1.11). Sharing tables:
members
membergroups
personal_messages
pm_recipients
log_online
smileys

My PROBLEM is when new user registers the info about totalusers and latest member does not update.
Someone posted a solution here but it doesn't work.
Only the latestRealName field in _settings tables is updated, but the totalMembers does not update.

Any ideas how to fix it?

Mr. Doug

I ran into the same thing. If you run the "update statistics" maintenance, it fixes it. So now I just run that every few days until I can get around to writing a cron script that does it for me. Everything functions correctly, it just doesn't update the number of users in the bottom of the page..
--
Doug Hardman
doug (at) puttertalk (dot) com

j4r3k

There must be a way to solve this.
From my investigation it works this way:
even if you manually update all the _settings tables (fields: latestMember, totalMembers) the info won't show at the bottom of main page, action that updates stats must take place - user registers for example - but then this action does not update _settings tables regardless of the code I included above, so your are 1 user behind already  :(

Arantor

Did you also:
* update $modSettings in memory?
* force the cache to be emptied?

Arantor

So what are you actually feeding $value as then?

Arantor


Arantor

updateSettings(array('totalMembers' => true), true);

This is what I was looking for. Is that the line you're using?

See I don't understand how you've mashed up the code, to be quite blunt.

Advertisement: