Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

can two forums use the same user login data

Aloittaja darknovember, tammikuu 25, 2014, 12:52:41 AP

« edellinen - seuraava »

darknovember

just another crazy question im tossing out there
but if you have two forums, can you use the user information from forum #1 on forum #2
reason for this question is because I would like to use some mods on part of my forum but not on other parts
So the easiest way i can figure to do this is simply to make more forums, but i would really like to have everyone use the same login information on both forums without having to re register, haha no idea if this can be done or not just wondering.

Arantor

Not without a massive amount of work and all kinds of things that are a bit flaky.
Holder of controversial views, all of which my own.


darknovember

ahh, haha thats probably something i should stay away from then haha

moparisthebest

Couldn't you have 2 forums in the same database with different prefixes, then make prefix2_members a view of prefix1_members ?
You can have my gun when you pry it from my cold, dead hands.
Linux users, we do it in the open.

Arantor

No. There are some very nasty issues like for example avatars won't work properly even if you fix all the places where the DB prefix would have to be changed.
Holder of controversial views, all of which my own.


moparisthebest

Quickly looking through the database structure I don't see any problems that would cause, the avatar issue would be due to the avatar directory not being in sync across both forums, but that would be remedied with a symbolic link:

ln -s /path/to/forum1/avatars /path/to/forum2/avatars

Any other reason it wouldn't work?
You can have my gun when you pry it from my cold, dead hands.
Linux users, we do it in the open.

Arantor

Except that uploaded avatars are not in that folder but stored in the attachments table as well as the master attachments folder(s), user preferences in the themes table (as the only storage of arbitrary rows per user), custom field values also there in the themes table... Need I go on?
Holder of controversial views, all of which my own.


moparisthebest

So attachments table and folder would have to be shared too, the other tables could be different to allow different user preferences/themes for different forums.  It might work if it's that big of a deal for you. :)
You can have my gun when you pry it from my cold, dead hands.
Linux users, we do it in the open.

Arantor

And sharing the attachments table will cause all kinds of things to go haywire, because it works by attaching to message ids so now you share attachments between forums and each attachment shows up in two different places.
Holder of controversial views, all of which my own.


darknovember

only idea i could think of is if the profile folders was synced with the other, I havent really poked around in the file structure of smf so im unsure how doable it is really.
but if its just a file by file copy im sure that i could make a script to automatically copy all of the files from one area to the other.
only issue with all of that i could see is file naming, and if a user changed there profile in forum #2 then when it did come time for the profiles to sync the changes that they did make in forum number 2 would be reverted back to the way they was before...


another thought on getting this done is I wonder how hard it would be to implement mods in one part of the forum but not others.... thats probably another crazy hard thing to do but its just a thought none the less...

Arantor

There's no 'folders' for the profile. None of that stuff is in files anywhere, it's all in the database. And trying to sync that is also a pain in the posterior.

There is really no good way in SMF to do what you're trying to do :(
Holder of controversial views, all of which my own.


darknovember

yeah haha, thats kinda why once you told me that at the start that it was very hard to do i figured ide forget about that idea haha :P, just was browsing and seen all the replies here on it , already created the two forums and had everyone at least the active members create new profiles on the other forums and were using them both now haha just thought there was a easier way of doing it all.

TomW

I had 3 forums share member data by creating views of the members tables.   It worked but had some serious quirks, one of which was the need to upload an avatar for each forum.  Also the user statistics get borked.  And you cannot successfully use any mods for PMs.  Plus, any mods which require changes to the member tables required extra attention.  And, for some users, even though they had a username/password, they had to register again - I never figured that one out as it was not a consistent problem.  None of these are major issues, but were a pita at times.

Those are the issues that I faced.  I eventually removed the views, created the member tables from scratch, and repopulated them with a backup from the 'main' forum.    It is now much easier for me to install mods, and best of all, none of the forum members complained.

Advertisement: