![]() |
Shared user database for multiple forums, same server
For version 3.5x+, please see https://vborg.vbsupport.ru/showthread.php?t=118473
This thread will detail how to have a single login for multiple forums. It makes the following assumptions:
Here are the steps:
Done! Both forums are now accessed by the same user table! PM's are unified across forums as is the user count. |
Although I personally have no use for this I just wanted to say good work! I know a lot of people will be greatful. :)
|
Awww man you stole my idea!!!!! Its ok though cause I am just happy to see it!
|
oh dear god I have waited for this for so long :S now port it to 3.5! I command you! (;) kidding, nice job)
I would love to get this working with the drupal CMS (I'm having a cookie issue at the moment) |
Very nice hack.
Very nice forums. Thanks, Mat |
can u clear up number 8 for me. i dont understand what u mean...
before i start on a hack or modification i like to know exactly whats goin on... this has nothing to do with posts right? just user login? |
What transfers with the character to both forums? All of their setting and profile (including profile pic and avatar)? Some of it? None of it?
Ideally it would seem to me you would have password and email the same while everything was per site. |
What about Subscriptions are those per user or per board?
Also is that a backup copy you are using or is it really live? Reason I ask is Stats: Armchairgeneral Threads: 1, Posts: 1, Members: 7,631 Welcome to our newest member, vernon.miles Stats:strategyzoneonline Threads: 32,469, Posts: 421,417, Members: 7,637 Welcome to our newest member, josephhnewkirk Either way I'm digging script. Your sites are pretty sweet too. |
Great hack...
Now only if we could use separate servers for this... :nervous: |
Quote:
The only thing bad I see is if you decide to expand and add another forum IE 3, 4, 5, 6 etc just imagine how many tables would be in that DB.. |
Quote:
Quote:
Quote:
|
Quote:
|
Quote:
|
Quote:
|
The only real use I would have for this is if it totally ran like 2 distinct forums that only shared the core user information (username, password, & email).
|
Quote:
|
I might be more useful if you actually created a second prefix (TABLE_PREFIX_USERS) and used this, rather than removing the prefix - most people use a prefix for a reason. :)
|
Quote:
|
On a Linux/Unix machine, you can use this script
Code:
# !/bin/bash Of course, you still need to manually modify the scripts that use a variable like $table instead of 'user[...]' (and stuff), as stated in first post, adding USER_PREFIX where needed, and insert somewhere your definition (I inserted it in class_core.php, just below the TABLE_PREFIX one). I also noticed a lack in the first post: if you want to also keep avatar images, you should modify image.php in line 129, adding as usual "USER_PREFIX . " before TABLE_PREFIX. |
Handy little script. Note that when you run it you should be logged as the web server user. The file's owner and group will get changed to whoever you run the script as. Also, the files will have the permissions changed to whatever that users umask is set to, which will probably be 644 and okay.
I also had to change: Code:
for i in `grep -lr $a` Code:
for i in `grep -lr $a *` |
any idea if this will be ported over to 3.5?
And do you think there is a way to have a parent forum where all threads are shown, but in the seperate/child forums just threads/posts from that forum are shown. maybe an extra field in the thread row that specifies if it belongs to one of the child forums or just the main... |
Hi westpointer,
I am wondering if you can put each forum on its own database. I have 3 sites and I am planning to add more in the future. This would be easier to backup and maintain the all the sites. |
Quote:
|
Quote:
Quote:
|
Quote:
The syntax for MySQL is "SELECT foo FROM database.table" so if you change the TABLE_PREFIX to include the database-name and give the db-user access to all databases, it should work without problems... Edit: you might even put the shared tables in a separate database from the rest of the tables. There are no problems with JOINs and such across databases, I have done that many times... |
Quote:
|
Quote:
I would love to be able to do it with different style, but i want it to feel like a completely different forum. When working with styles the main forum in the breadcrumb is always the parent forum so it doesn't look like the sub forum is the main one. know what i mean? |
Quote:
|
here is the error I am getting
Code:
Invalid SQL: |
please help me bump
|
Quote:
Code:
"".""user |
Quote:
Please if you can clear up your explanation of #8 a little better.. Thank You.. |
In /includes/functions.php: on line 1171 remove the table_prefix before $idname.
PHP Code:
PHP Code:
|
also In /includes/adminfunctions: modify print_choser_row (line 1161)to check for $tableid of user, usergroups
line 1161 before code change PHP Code:
also In /includes/adminfunctions_user.php around line 116 (construct_style_chooser) line 116 before code change PHP Code:
|
Quote:
PHP Code:
|
Quote:
|
Quote:
PHP Code:
|
Quote:
|
Quote:
Thank You |
Is there anyone else that has installed this hack that can help us out we are willing to pay $$$$ please pm us if you are intrested...
|
All times are GMT. The time now is 04:52 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:
|