We've been using MRBS for room reservations since 2010 (thank you for the great resource!).
We'd like to use a custom flavor of MRBS to handle requests and approvals for employee time off. The new calendar would require different config and vocab overrides (instead of "rooms" we'll have "request slots", "type" would become "leave type", the long description field would be set to private, approvals would be enabled, and so on (see attached screenshot). I have MRBS in its own directory, while this new time off system is in "/leave".
First, am I going about this the wrong way in duplicating the entire web directory, just to have 2 different config and lang.en files?
Second, I'd like one user table and authentication type/session so that users can log in once and access both systems. In the "Leave" config, I set auth type to "db_ext" and linked to the MRBS user table. I edited auth_db_ext.inc to also get user levels from the db, which must have been introduced after 1.4.11. I can continue tweaking this to also pull email addresses, but I'd like some reassurance that I'm on the right path first...
So, is there a recommended way to share the same set of auth/session/cookie files between two directories or installs of MRBS?
Version: 1.4.11
Database: MySQL 5.6.33
Server: Linux/virtual hosting
PHP: 5.3.29
Thanks in advance.
A second issue I encountered was how to show the same user list link in the header's log in window if I have the base URLs set in Config to their own directories, e.g., url/mrbs and url/leave
I imagine I'll have to hard-code the link in 'leave' so that it brings users to the master table in /mrbs.
Yes, using db_ext is exactly the right approach.
However I don't think that hard - coding the user list link is going to work as it will just switch users into the other installation, with the header links etc all pointing to the other installation.
Instead I think you'll have to do something like edit edit _users so that all the db() operations are done on the other database.. Or else just accept that there is only a user list link in ones installation.
Thanks for the reply. In edit_users, how would I specify which db.usertable to use? I see several references to $tbl_users, but I was unable to locate where that is declared. I could replace $tbl_users with a specified dbname.tablename (like "mrbs.mrbs_users") in edit_users, but I suspect this might create issues elsewhere.
In my current db_ext setup, I still get asked to log in twice when switching between installations. It's not a big issue, but one auth session for both apps would be ideal. Would merging databases and using different tbl_prefixes for each in config help resolve this?
You just need to have a different defaultincludes which calls up a different config file. You might also need to do the same thing for the Javascript file edit _users.js.php