views:

76

answers:

1

Hi there. Beforehand let me thank you all !! Really guys you help a lot. When I will finish my web site and will have much time on watching how userbase is growing I will come here again and again to answer to another people questions(if I can )

So here is the problem.

I made a web-site on CodeIgniter. A social network engine. Something like phpfox, classmates_com or facebook.

It's right now somehow not multilingual, So the UI strings are in the view files, and next step will be move them to the language files.

I want the user to have ability to change the language. So I assume that in database user will have row "lang_local" which would be by default set to en, and then to any other language he will change .

So what is eating my nervs and enery is following.

I will make on this engine several demographic social networks,and I would like to manage theese web-sites in centralized manner with one backend . So whenever I would like to make a new web-network, I just add the domain settings install the script in new folder and add it in database sites

I see it like this

on every table in database like users,comments,messages,categories ,etc I will have a row site_id , and on each query add/update/delete I add a WHERE SITE_ID=XXX and in table sites(site_id,site_name,domain_name) will have all domains , so that in backend I can filter data by website.

Is this a good way? What if i will need then to be multiserver, what about load balancing? Who can tell me what would be a right,PROFESSIONAL way? My maximum user limit for a database is something like for start 10.000 in one-two year 100.000users

A: 

There are loads of ways to do multi-site, but this is a perfectly good way to handle things. I use this approach in my internal work CMS.

The only downside is that it could potentially become massive and have performance issues. You may need to write an export script so you can grab everything belonging to a site then move them to their own install.

Phil Sturgeon
You mean that the way I described and want to do is the right one?
DR.GEWA
Your way is a perfectly good solution, I do it a similar way 2/3rd of the time.
Phil Sturgeon

related questions