Multiple sub domains with mixed data sources

Multisites manager and data sharing solution for Joomla!
Forum rules
This forum is not for any support questions/issues/features. Please use Support Center for such requests.
Post Reply
WhatNoWebsite
Newbie
Newbie
Posts: 5
Joined: April 2nd, 2015, 2:43 pm
Name: WHat No Website
Browser: Firefox

Multiple sub domains with mixed data sources

Post by WhatNoWebsite »

As you'll see from the attached image we want to do something a little different but I believe Multi Sites has done this before so here goes...

We'd like multiple instances of the primary website installed on already created sub domains (created through cPanel).
  • Each sub domain should be able to use the same template as the primary site but allow colour and logo customisations.
    It's possible that each sub domain will have unique content at least for the home page. CMS in use: K2
    Each sub domain will have unique logins for the users managed by the main websites DB but they will not be able to use thos credentials on the other sub domains, only on the sub domain they are authorised to use
    We have code that runs reports based on data held in a number of seperate tables in the main DB. However, these reports use the unique Joomla user ID so while all users can login through predefined sub domains their credentials should not be held anywhere else other than the central website
The code for the reports can be changed to work across sub domains as JUMI is quite flexible in how we impement PHP so I hope all the above is possible and I hope the attached image helps.



Image
User avatar
Admin
Site Admin
Site Admin
Posts: 1064
Joined: October 21st, 2008, 6:39 pm
Name: Administrator
Browser: Chrome

Re: Multiple sub domains with mixed data sources

Post by Admin »

That won't work, please choose a valid case study first:
http://alterbrains.com/joomla-extension ... se-studies
WhatNoWebsite
Newbie
Newbie
Posts: 5
Joined: April 2nd, 2015, 2:43 pm
Name: WHat No Website
Browser: Firefox

Re: Multiple sub domains with mixed data sources

Post by WhatNoWebsite »

OK, a question if I may...

1. If I create sites using Multi Sites would the users register and be authenticated against the main site's DB or the sub domain's DB...?

An updated image of what we're looking to do:

Image
User avatar
Admin
Site Admin
Site Admin
Posts: 1064
Joined: October 21st, 2008, 6:39 pm
Name: Administrator
Browser: Chrome

Re: Multiple sub domains with mixed data sources

Post by Admin »

By default Joomla site loads user data from own database tables.

MightySites allows to configure site A to user tables of site B for users, so both sites will use same database tables and hence all users will be always same on both sites.

No matter where user is registered/updated/deleted - this action will affect both sites.

If 2 sites have same users - we can also setup special single login, so user logged on site A will be also auto-logged on site B.
Or it's possible to share session (no need for special single login in this case) if both sites use same TLD - i.e. subdomain.master.com and master.com
WhatNoWebsite
Newbie
Newbie
Posts: 5
Joined: April 2nd, 2015, 2:43 pm
Name: WHat No Website
Browser: Firefox

Re: Multiple sub domains with mixed data sources

Post by WhatNoWebsite »

That sounds promising.

So if I had the following websites:
  • PrimarySubDomain.FloogleBinder.com (for admins)
    SubDomain01.FloogleBinder.com (for franchisee)
    SubDomain02.FloogleBinder.com (for franchisee)
    SubDomain03.FloogleBinder.com (for franchisee)
    SubDomain04.FloogleBinder.com (for franchisee)
A user's registration and subscription data (as there's a subscription component) would be available across all sub domains so long as they were a sub domain of the primary website...?

If that's the case then I guess the user records are synchronised across all sub domains...?

Would it be possible to also have unique styling on each sub domain then...? For example change the site's meta data, logo and colour scheme...?
User avatar
Admin
Site Admin
Site Admin
Posts: 1064
Joined: October 21st, 2008, 6:39 pm
Name: Administrator
Browser: Chrome

Re: Multiple sub domains with mixed dause same tabta sources

Post by Admin »

Please first advice: do you need each slave site to have own files or all sites can use same files?
Will each site use own database tables or use same tables and have same contents?
I strongly recommend to choose a single case study from this page, otherwise we won't have a success:
http://alterbrains.com/joomla-extension ... se-studies
WhatNoWebsite
Newbie
Newbie
Posts: 5
Joined: April 2nd, 2015, 2:43 pm
Name: WHat No Website
Browser: Firefox

Re: Multiple sub domains with mixed data sources

Post by WhatNoWebsite »

I looked at the case studies and couldn't find one that matched, although as I assume you developed the component you would be able to provide more help.

Here's what I think would work:

Centralised user credentials and subscriptions
Each site would have to have a unique template and unique content

If the user credentials and subscriptions wre copied over to sub sites then that would be OK providing we could register users from the main website.

Please note: All sites would be sub domains, even the main site.

I think this case study is the closest to what we are looking for:

http://alterbrains.com/joomla-extension ... t-contents

Thhe content would be different for each site, mainly just the template would be customised, but the user authentication and subscriptions would have to be managed in one of two ways:

1. All user data replicated across all sub domains
2. All user data held in one single DB on the primary sub domain

In either case I expect that any user could in theory login through any sub domain and their subscription would be checked but to login through another sub domain the user would have to KNOW where that sub domain is of course.
User avatar
Admin
Site Admin
Site Admin
Posts: 1064
Joined: October 21st, 2008, 6:39 pm
Name: Administrator
Browser: Chrome

Re: Multiple sub domains with mixed data sources

Post by Admin »

Do you need to share files (so slave sites will be parked domains and all sites will share same server folder, hence use same files) or not (each slave subdomain will use own subfolder and have own Joomla files)?

Our case studies cover all possible usage cases, so if you can't find anything similar - in most cases MightySites won't help you.

Please note that MightySites doesn't sync or replicate database data.

Users and subscriptions can be shared: multiple sites will use same database tables for users and subscriptions (depends on subscriptions component - it should use native Joomla database layer).

So any user-related action on any site will affect all sites because same tables are affected.

Once a user is registered on any site - he can login on any site.
Once a user is deleted on any site - he is missed on all sites.
etc.
In either case I expect that any user could in theory login through any sub domain and their subscription would be checked but to login through another sub domain the user would have to KNOW where that sub domain is of course.
Such behavior doesn't depend on MightySites.
WhatNoWebsite
Newbie
Newbie
Posts: 5
Joined: April 2nd, 2015, 2:43 pm
Name: WHat No Website
Browser: Firefox

Re: Multiple sub domains with mixed data sources

Post by WhatNoWebsite »

Sounds good and thanks for the speedy response.

Given the case study above I'm happy we can have a unique look and feel for teh other sub domains by changing the template file.

I'm still a bit curious about how ACL is managed though. You mentioned above that MightySites doesn't sync or replicate database data.

is this cirrect then:

User A registered on Site A
→ User's record is available on Site A or B for login

What happens of user B registers on site B or C...?

WHat happens if the user account is deleted on site A or B or indeed C...?
User avatar
Admin
Site Admin
Site Admin
Posts: 1064
Joined: October 21st, 2008, 6:39 pm
Name: Administrator
Browser: Chrome

Re: Multiple sub domains with mixed data sources

Post by Admin »

Each site can have own template style in Joomla as usual if each site uses own database tables.
User A registered on Site A
→ User's record is available on Site A or B for login

What happens of user B registers on site B or C...?
If users are shared - user record is available on all sites which share users.
What happens if the user account is deleted on site A or B or indeed C...?
If users are shared - user record is deleted on all sites which share users.
Post Reply