Expansion of joomla site - joomla

I have a requirement to build one parent site and few child sites..using domain and sub-domain concept and want to have installations of joomla at parent and all sub-domains. But I want only my parent site to hold user data and Alpha user points data while my child sites would be hosting components and modules separately and use user data and Alpha user points data from parent site.
Could any one suggest me is it a good Architecture to go and is there any extension or component already available to achieve it. Example
below:
parent site movies.com Child sites braveheart.movies.com, troy.movies.com
I will have forums, blogs and other component installations at braveheart and troy sub-domains seperately while my Alpha user points and users db/tables would reside at movies.com(main domain).
It's like single-sign on or Centralised Alhpa user points, but free to install same component and modules at different sub-domains.
Highly appreciate any replies or solutions proposed

I would have recommended this: http://docs.joomla.org/Multiple_Domains_and_Web_Sites_in_a_single_Joomla!_installation (yes it's old but with little modification you can make it work on the latest version of Joomla) but the problem is that you want to install extensions to these subdomains as well, which will mess up the parent structure.
I think Joomla is not the best choice for what you want to do - Wordpress handles the multiple domain thing much more elegantly and gracefully.
PS: There are also some extensions that do more or less what you want. Check here: http://extensions.joomla.org/extensions/core-enhancements/multiple-sites/7557

As long as you're using the same version of Joomla across all sites, and all the DBs are on one server, one method would be to keep the parent user and alpha points tables, drop the tables on the child sites, and replace them with table views from the parent database. Then you just need to do a bit of tweaking to handle bridged sessions.
Basically, the child sites think they've got their own tables, when actually you've tricked them into using the parent DB user tables.
Reference:
http://www.ijoomla.com/blog/one-set-of-joomla-users-multiple-joomla-installs/
This is for Joomla 1.5, but the process is transferable for 2/3.x, if you know what you're doing. No need for installing a bunch of extensions.
If you're going to try this method (keep in mind you need to have a good handle on MySQL manipulation and Joomla), make sure you back your sites up.
If you're not confident, the reference above goes through a bunch of alternatives.

Related

How can I limit wagtail's site history by site to support multi-tenancy?

I have a multi-tenant wagtail set up and we are currently working on getting up to date. We've just recently upgraded to v2.15 which introduced audit logging for all models instead of just page models.
AFAICT from looking through the wagtail code, the changes for a page model are only visible to superusers or admins with can_add_subpage or can_edit permissions which seems to effectively support multi-tenancy.
However, for all the other models there is no limitation put into effect. This means that an admin for Site A is seeing when changes are made to Site B or anytime a user is added or edited. We are using email addresses as usernames so this presents a rather major privacy issue.
This method hasn't been updated in any newer version, AFAICT, so I don't believe that just upgrading will fix this.
Does anyone have any ideas on either any wagtail settings we can change to keep Site and user changes invisible to non superusers or how we might localize BaseLogEntryManager.viewable_by_user so we can override the default wagtail implementation to our needs?
We have previously done something somewhat similar with the search available to admins by creating our own src/app/templates/wagtailadmin/pages/search.html and creating our own local version of https://github.com/wagtail/wagtail/blob/stable/2.13.x/wagtail/admin/views/pages/search.py
I had thought about trying to do something similar here however that doesn't seem like a good thing to do given how different those circumstances are and I think it was only possible using the register_admin_search_area hook.
I run a fairly large multitenanted Wagtail site. I have made public gist of the code we use in Wagtail 2.16 to restrict reports.
One of the main things we had to patch is the filters on the reports page. We do not want users on one site to even know there are other users in the system. This is implemented in the site_specific_get_users_for_filter method.
Although our non-page models all have site_ids, it was not possible to filter ModelLogEntries in site, so we settled for hiding that report from everyone except superusers.

MVC3 How to serve different versions of the site

I need to be able to serve different versions of my whole site per client. Certainly beta vs production but it would be nice to serve one or two prior production versions. Client customization is encouraged and I don't wish to force all clients to follow the (anticipated) pace of development.
Which version to serve is stored in the db.
From what Ive read so far a custom view engine may be the most straightforward way to accomplish this but before heading down this road I would welcome any advice and comment.
Thanks for insight!
Eric
EDIT: It isn't just the views that are different; controllers, master pages, images, CSS...
If the rules regarding which version is displayed to which user, I'm guessing they need to authenticate first. If that's the case you'll have opportunity to set a cookie on the user.
I would probably set a cookie on authentication that determines which version to show the user and then use a URL Rewriter like IIRF to direct requests with that cookie set to the beta version of the site.
Has the added benefit of users being able to opt back to the production site if they have issues with the beta.
I went down the view engine route How do I implement a custom RazorViewEngine to find views in non-standard locations?
Basically it's pretty stright forward, we have the same controllers models, etc. All the code is shared. The rendering of the views though is based on a "brand". So the view engine is clever enough to say if I'm brand A then the view will live in {standard view location}/brand/viewname.
It's hierachical though so if the view is in the branded folder it uses that one, else it falls back to the default location. It's basically an extension of the standard model used by MVC to find the location of the view source.

Magento product translation for multiple multi-lingual websites

I am wondering how to manage my product catalog for Magento efficiently. I keep one stock of products and sell them through multiple websites, those websites are in turn all in multiple languages.
The most common advice is to create a store for each website and a different store view per language, in which you can translate the product description. This doesn't seem very efficient to me. For example, if you have 4 different websites, each offering products in English and in Spanish, you have to do the same translation 4 times for each website. This becomes very cumbersome for multiple websites in multiple languages and a lot of products.
What I ideally would do, is maintain one translation per language and keep track of my product stock centrally (ie. still be able to manage the product globally). How can this be achieved in Magento?
Update: after digging around some more, asking in IRC channels, posting on forums, and searching the heck out of Google and the Magento Connect extension repository, I am starting to realise this is one of Magento's short comings. I am going to develop my own solution for this. Please leave a message here if you are interested in the same functionality, if there is enough response I will see if I can make it available for others.
Unfortunately there is no good answer to this question. Product texts are typically entered on the store view level, like you already discovered. Having multiple store views in the same language (but under different websites) will create a burden and overhead to configure.
If this was my store, I would pick one of these routes:
Load data from an external source, where product data is already nicely managed. Managing product data in Magento can be a pain.
Or, if you MUST do it in Magento, create a custom module to update all the relevant fields across multiple websites. You could create an event listener "on product save", that updates all texts for store views with the same language.
or, you can override the product resource model, so product names, descriptions and some other texts are loaded differently from the database (but this would definately be the most complicated route).
In App/Locale/ Directory this is Global locale directory you can read it in all your websites managed from one back-end !
And you can set the local directory for each storeview from
system->configuration->design->Translations
so basically you can use the same locale for different themes as long as you maintain the files updated with all the variables !
I was running 9 websites with different store views from one backend i never had issues with translations !

Possible to use one codebase for a subdomain for multiple sites?

I don't even know if this is even possible, but I thought I'd ask.
I am creating a small CRUD application but I have multiple sites. Each site would use the CRUD. The application would have common CRUD methods and style, but each individual site would apply different forms. I want to avoid creating multiple CRUD applications that varied only in specific content (just different forms).
I want to have something like this:
mycrud.website1.com
mycrud.website2.com
mycrud.website3.com
I can create a subdomain for each individual site no problem. But is it feasible to point all the subdomains to one MVC application directory? And if it is possible any suggestions for how I might go about restricting users from website1 from seeing website2 or website3 content? Is that something "roles" could take care of (after authenticating user)?
Thanks.
There are a lot of websites that do this, not just with MVC. Some content farms point *.mydomain.com to a single IP and have a wild card mapping in IIS.
From there, your application should look at the URL to determine what it should be doing. Some CMS systems operate in this manner, using the domain as a key to deciding what pages to load.
I've built a private labelable SAS application (Software as a Service) that allows us to host all of our clients in a single application. Some clients have customizations to pages or features. We are able to handle that by creating custom plugins for each client that over-ride the Controllers or Views when needed.
All clients share a common code base and aside from each clients custom theme/template they are the same. Only when a client had us customize one feature did we need to build out their plugin DLL. Now, this is advanced stuff so it would require heavy modifications to your code base but in the end if it's what your application needs it is 100% possible.
First - the easy part is having one web site for all three domains. You can do that simply with DNS entries. No problem. All three domains should point at the same ip.
As far as the content, you could do that in a number of ways. I think your idea of roles is pretty solid. It also leaves open the possible of a given user seeing content from both site1 and site2, if that would ever be necessary.
If you don't want to force users to authenticate, you should look at other options. You could wrap your CRUD logic and data access logic into separate libraries and use them across three different sites in IIS. You could have one site and display content based on the request URL. There's probably a lot of other options too.

Advise needed - which Rapid Application Development Framework using PHP and MVC meets this specific need?

we are a parents initiative who runs a small kindergarden / child nursery and we set out to build a basic web based documentation and reporting application for our nursery.
After spending a week doing research on the various PHP MVC frameworks, I have a few questions that I could not answer myself - even after having a closer look (installed on local machine) at CakePHP, Symfony, CodeIgniter, YII and Joomla.
The goal is to build a web application where site managers, staff and parents (roles) can log in to do simple tasks, depending on their role (hence I need a RBAC). Site managers will for example be able to add staff to the database, staff will be able to add children and do some documenation on children (select a child and enter details on special needs etc.). Parents should be able to update information about who is picking up the child, or inform the staff if a child will not come in at a certain date.
Now, since this is all basic CRUD with only a few tables underneath, tables connected via some foreign key constraints, I would like the framework to generate CRUD skeletons for me.
And since I need to manage roles and limit access to certain pages, I would like a basic user management out of the box.
Plus, PHP and MySQL and MVC are set - otherwise I would have used Oracle Apex as I have some experience with that.
So, I looked at a vast amount of PHP frameworks and found the following to be promising:
CodeIgniter (with Bonfire plugin)
Symfony2
YII framework with GII
CakePHP
Joomla
BUT none of the frameworks I looked at seemed to fit my need:
creating CRUD skeleton pages based on my ERD with foreign keys (MySQL InnoDB) / Scaffolding
offering a basic user management out of the box with up to date security measures in place (passwords stored using phpass or salted hashes & md5, user registration, defining roles and limiting tasks to roles/users).
If somebody could suggest a PHP Framework that comes with those two requirements build in, I would be very happy to hear about it. THANK YOU very much in advance!!
(I really liked CodeIgniter because it was simple to set up and lightweight, I liked the Bonfire user management plugin but was disappointed when I found out they sacked scaffolding in the lasted release
And I liked Joomla for its user management, but found it quite hard to get started on component development, plus no scaffolding).
You should check FuelPHP and its ORM, Oil and Auth packages. It's really great. If you liked CodeIgniter, you'll probably love Fuel.
http://www.fuelphp.com

Resources