Actually, I can imagine a way to make this work using the current 0.95 code. What if you set up your sites in MODx container/folders and used a combination of friendly alias paths and .htaccess to redirect the traffic? You could also write a simple plugin to forward requests and rewrite URLs based on the domain name and/or ultimate parent id. You could set your site start page to an index of all of your sites or a particular one of them. And you could use the current manager user system to control access to specific sites for different admins. You’d also have to make sure that your error page worked for all of these sites and limit your search scripts, etc. to the proper subfolders.
There are probably some other minor details that would need to get worked out in the process (like making sure that the RTE works for all sites and your .htaccess code doesn’t affect image paths, etc.), but is there any reason that folks can think of why this wouldn’t work?
Many commercial web hosts have explicit policies in their terms of service prohibiting you from doing this, so check yours before you do a lot of work just to have your host shut you down.
I still not dig the code deep enough, but quick look give me at least one idea.
Look, i can install two MODx using one DB, where only table prefixes is different.
Later, i change table names in secondary MODx code, for example:
$sql = "SELECT setting_name, setting_value FROM $dbase." . $table_prefix . "user_settings WHERE user=" . $user_id;
i must change to
$sql = "SELECT setting_name, setting_value FROM $dbase."modx1.user_settings WHERE user=" . $user_id;
Now i’m too lazy, but after some sleep i’ll try it.
Uwaga! Wlaczamy faze!
If all you want to do is to install more than one copy of MODx in the same database, just create multiple MODx folders and use different table prefixes in each installer.
I’m not sure why you’d need to make separate database tables to do that. Can’t you just do something along the lines of what I suggested first? You can restrict your manager users to specific document groups, so Group X would not be able to edit the documents that belong to Group Y.
Let me see if I understand what you’re looking for...
You want to manage several sites via one MODx manager
You want all of the data to be in one database
You want to share the manager and its users among all sites
So either you do something like I suggested in the beginning (which would get you all of this with the exception of separate configuration options for each "site"), or you hack the manager users table to add the site that user can access, do multiple installs with table prefixes equal to each site name (e.g., site1_modx_), and if you find that adding that to the getFullTableName function doesn’t do the trick create a plugin that sets $this->dbConfig[’table_prefix’] equal to the user’s site name value.
The latter is a lot more difficult...