Developing a multiple site application |
[eluser]Unknown[/eluser]
My pet project currently is based in offering a web application that manages soccer leagues. At this moment I can handle one league, that is ONE "client". That said I need to handle different server_urls for each client (multiple leagues, multiple clients) that can have their own personalized (css and images) look. www.soccerleague1.com www.soccerleague2.com www.soccerleague3.com ... My approaches: 1) Have multiple CI for each league (not quite interested in this option, lot of work to maintain) 2) Have one CI installation and handle a leages table in the DB. About this option, I think I will add the league_id to every other table (like matches, teams, etc). Questions about option 2: 2.1) Wich would be the better way to handle the multiple sites (session, globals)? I mean, I need to get the server_url then get the league associated and then do the correspondent querys. My guess is to do something like this (hook that loads pre_controller): Code: class Hook { or Code: class Hook { I think the first approach is the correct one cause it defines a different variable (through session) to each user. The second one would change a global variable (config item) every time a request to a controller is done. 2.2) Is there a way to do this without using sessions? (Extending the controller maybe? but the counterpart would be repeating the query everytime against the DB). I hope I explained myself good enough. Thanks! |
Messages In This Thread |
Developing a multiple site application - by El Forum - 12-06-2010, 11:38 AM
Developing a multiple site application - by El Forum - 12-06-2010, 12:28 PM
Developing a multiple site application - by El Forum - 12-07-2010, 07:39 AM
|