![]() |
Share users database among many forums
This is a feature requested many times, and we are still waiting, so I released a patch to be able to run many forums with the same user database.
This is an EXPERIMENTAL PATCH I'm running on my forums. Code:
--- ../../../private/upload/includes/class_core.php 2008-07-10 11:17:32.000000000 +0200 This is only useful for new forums joining anothers one user database. Requirements:
FORUM A has table prefix FA_ in database, FORUM_B has FB_ and FORUM_C has FC_ FORUM A is the main, and older forum, where we have all our users. then we would install FORUM_B and FORUM_C normally, using the same database that FORUM_A uses, but setting up their own table prefixes. once FB_ and FC_ are installed then we go patching class_core.php from FORUM_B and FORUM_C setting up $main_prefix = "FA_"; so they use FORUM_A for shared tables. Possible problems:
Author: Optimizacion Web |
Interesting approach, i keep an eye on it :)
|
yea this might come in handy
|
I implimented a similar one where the seperate forums just shared the user, pm and one or two more tables and it works pretty well. However it does require mass changes to the FB and FC PHP files where yours would not?
If I read your correctly it looks like if the table being queried is in the array it will use the FA table prefix? |
I have been looking for something like this. I will follow.
|
Another (similar) solution is to use MySQL 5's views.
(Example: db2.user is a view of db1.user) |
Quote:
And, yes, the result is that when any table in "shared tables" is queried the query ends up rewritten so it goes to the FA_ prefix. |
Quote:
Can you point us to some document about mysql5 views? How do you setup a view? Greetings, Miguel ?ngel. |
add to your array
Quote:
|
Thanks Lionel!!
Anyway, I'm not sure if the table "session" would be safe to be shared among all forums... why? ... because it points to the threadid or URL the user is watching, and that would be different between one forum and another. Anyway it would be nice because this way the total user activity in the forums would be reflected. |
All times are GMT. The time now is 09:56 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|