Customizing SMF > SMF Coding Discussion

Two Identical Forums, One Database: Nothing is Ever Marked Read

(1/1)

rienholt:
First, I know two forums on one database isn't supported, its not what the software was intended for and the idea of it is crazy.

So here is my problem. A client of mine asked me to look at having two nearly identical forums one one database so that one could have high security and be visible to the net while the other one has less security and is only available on the local network. Kind of a weird setup but I said I would look into it mostly because I have interest in using two SMF on one database for another project. Cue to now, about six hours of tinkering later, and I am stumped. Using SQL VIEWS has produced great results except that marking posts as read fails and the more alike the forums are the less it works.

When the two forums are identical except for their root directory any new posts can never be marked as unread. No idea why. Now if you set it up so that one forum's tables are redirect to others except for settings and theme stuff a different problem occurs. When ever you get a new post you can mark it read on one forum but attempting to do so one the other forum just marks it unread. Looking at the SQL logs it seems that the forum that loads the new post first is able to replace smf_log_mark_read with the proper id_msg but the second forum will ignore the new post and replace with the second newest id_msg.

If anyone has any suggestions I would love to hear them cause this is out of my league, I'm a hardware guy who does web stuff on the side. Thanks in advance.

Arantor:

--- Quote ---First, I know two forums on one database isn't supported, its not what the software was intended for and the idea of it is crazy.
--- End quote ---

Not to mention beyond problematic since there will be a great many things broken, and this is almost certainly just the surface.


--- Quote ---So here is my problem. A client of mine asked me to look at having two nearly identical forums one one database so that one could have high security and be visible to the net while the other one has less security and is only available on the local network.
--- End quote ---

Incredibly weird, and a lot more work for something that is unnecessary - why not just have one setup and harden that - and use it for both?

I honestly wouldn't try to fix this, I would actually strip it back and only run the one installation and be done with it, it will work better and shouldn't have these strange problems.

MrPhil:
Step back and ask your client what they are trying to accomplish here. Then look to see if you can do it with a single SMF installation. If they demand two forums, what kind of differences are they looking for? Why does one have to be "unhardened"? What do they intend to do with it? It's possible to grant different permissions/privileges to different groups of users in one forum -- that might achieve what they want.

rienholt:
The idea is out there but also fairly creative I think.  The idea is that one install will be nice and fit in with the modern website while the other will be stripped down as far as possible to run on IBM POS terminals with 2Ghz single core processors and 512mb of RAM running Windows XP and a locked down IE6 or Power Mac G4s with Safari 2. These things are all VPNed to some managed colo server and the hope is that the employees in the store will be able to use the forums to interact with customers without having access to the wider web.  Also hardware upgrades are a no go since they still have 3 years left on their service plan with the IBM vendor.

But back to the SMF problem. I had a bit of trouble with search but really the testing went pretty good. I had a second install hooked into a live forum (backed up obviously) with views at one point and I was able to post, read, and admin from the second install just fine. This isn't just sharing members so message counts, pms, avatars and attachments get screwed up. This everything except the settings and theme tables basically. The problem with mark read is the only real problem I have had and its not really a horrible problem in this situation. I am just looking for some sort of fix because I like to be thorough and I may want to try a more complicated multi-install as a personal project later.

Navigation

[0] Message Index

Go to full version