• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
One application with different sets of configs

#1
[eluser]Alexander Weps[/eluser]
I would like If my application could use different configs (database.php, config.php, customconfigs) based on some variable passed on from index.php. So the application would be same for all clients, but they would use different databases etc.

#2
[eluser]Dam1an[/eluser]
The normal way to appraoch this sort of thing would be to store what each user sees in the database
You can then set a session variable for the group which they belong to, and in your controller constructor, show the content for that users group

#3
[eluser]Alexander Weps[/eluser]
I would like to have one database per client, and even stylesheets per client, so I would like to move some configs elsewhere, to the client folder.

#4
[eluser]Dam1an[/eluser]
For the stylesheet per client
If you're going to have a large number of clients, you really don't wants to have hundreds (or thousands) of CSS files, if the main difference is stuff like colours, you could have a base stylesheet, and then just a string stored in the database with the override styles., or, you could store the whole CSS in the database.
You could also render the stylesheet on the fly using PHP

As for the database per client
You could have a main database (accessible via $this->db) which has all the users database settings, you can then create another database connection (and assign it to something like $this->client_db)


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.