Common index page for 3 drupal sites - php

I have 3 websites which were built on drupal, 3 are on different sub-domains each. Now i want to built a common index page for all 3 websites in which i want to show features of all 3 websites and to load faster. Also i want to move all the websites to sub-directory instead of sub-domain (Example: www.example.com/site1 instead of www.site1.example.com).
Is this a suggestible method? if done so should i work on.htaccess configuration too?
Please suggest me in this.
Thanks.

You can work with multi-site configuration. This is the most fascinating thing about Drupal. You can use single code base for multiple sites. Then you can configure them in the way you want. You can also define a common index page but its little bit tricky and may require some coding.

Related

Multiple sites with 1 kohana core on same server

I think it has to be possible, but didn't find anything useful yet...
Is it possible to run multiple websites with from 1 Kohana core? Basically all website's are the same, only the layout is different. (Just a different view-folder, (works)) and the content is a bit different. (This is based on constant SITE_ID that pulls it from the db, (also works))
The only two things are, how do I configure this in my bootstrap/index.php? I thought of checking the url. With that url perform a query on the table 'websites' (select where url = '$url') and get the right SITE_ID and view from that query.
In that way both x.com y.com and z.com will pull up the same index.php file. After that SITE_ID is defined and with that id the right content is loaded and the right view is used.
Also, how can I do this in combination with widgets. I have like 8 different widgets and each website displays 3 of those 8 over different pages. So x.com/a will display widget 'widget_1' and 'widget_2', x.com/b will display 'widget_2' and 'widget_3'. But y.com/a has to display 'widget_6' and 'widget_7' and y.com/b has to display 'widget_3' and 'widget_4'.
Is there a way this can be managed? I didn't worked a lot with widgets before and now I want to use it in combination with multiple sites...
Possible?
For multiple sites handled via database within a single instance; what you're doing is similar to a multisite CMS. I have experience developing CMSes, both of the single site and multisite sort; I can tell you through experience that developing a multisite CMS is significantly more complex than doing multiple instances of single CMS. I usually opt for the latter if having multisite is not a requirement from the client and the implementation is up to me.
Have you considered multiple instances of websites with separate folders?
For multiple instances of single sites, I suggest reading http://kohanaframework.org/3.2/guide/kohana/tutorials/sharing-kohana to get a better idea of how do go about having multiple sites with single (or even multiple core).

Multiple Joomla websites with in One installation and database

Is it possible(out of the box) to have multiple website running on one Joomla installation.
The idea is to give clients a unique domain(or sub domain) and based on the request coming from a particular domain the view should be assembled (theme selection, articles, pages)..
Is it possible.. ??
It important that for each domain we should have a unique theme.
I am not particular about Joomla..If the same is possible with ease in any other CMS like Drupal,etc then please share your thoughts about the same.
Thanks in advance
In Drupal this is called "multisites" and it's easy to have each site have its own theme and/or even have additional modules used only on some sites, but all sites generally using the same Drupal installation. Anyway, what you describe is commonly done in Drupal and not too hard to accomplish.
More info here: http://drupal.org/documentation/install/multi-site
i am not sure about installation, but you can store all the data into a single database, but keep in mind that it is possible with multiple prefixes,
means like you have two joomla sites one with 'jos_' prefix(by default joomla prefix, you can change this) and the other with different prefix

CMS for existing site

I have a site which contains around 3000 static and dynamic pages. I think 2900 of the pages are based on 3 different php pages which create all the 2900 pages based on database content, and it has about 100 static pages.
How difficult would it be to integrate a CMS into the website so our Marketing department can make changes to the website easily without them having to mess around with code?
That will largely depend on how your site is currently structured. Since you say about 2900 pages are dynamic, you should be able to port these in an automated fashion (again : all will depend on your actual data, this can be very easy or very hard depending on how that data is structured). Suppose for instance you were to use Drupal (just picking one of the major players here). Then you could use the Migrate module to port your existing data over to Drupal.
A nice video on how to do this is at http://dc2009.drupalcon.org/session/migration-not-just-birds (you can also find it at archive.org for easy downloading btw - DrupalCon DC 2009 - Migration: Not Just for the Birds)
That's a big question as it depends on what you want the cms to be able to do, and how much it needs to do. If time is a factor, why not use an existing third party cms and integrate your design and content into it.
They're easy to install, but again, your question is kinda vague. In the long run, a cms would probably save you time, so I'd say invest in setting one up.
That's heavily dependent of the structure of your website!
Most CMS use a template engine/system with placeholders. You need to change your existing content so it fits into the CMS system.
Or do you only want that the data is easy editable by users? Then you can try to include a WYSIWYG editor. But a page with so many sites, I think it will be more workload to put it into a CMS, but it will be more future-proof.
You will need to use a TAG based CMS.
You may add tags at the of each page (automaticaly or via the template)
and give your users to be able to edit the site page.
I think Toko Content Editor can help you with that
Editizer is a service that retrofits WordPress to existing static pages.

Serving multiple site with one drupal (not using multi site)

I am looking for expert advice on how to best serve multiple sites with one Drupal instance (using Pressflow 6.x). Let's consider the company needing this is called "ABC Group of Companies" and it has 3 sister concerns. So, altogether there will be four sites:
www.abcgroup.com
www.company-a.com
www.company-b.com
www.company-c.com
Here are the things that are most interesting:
The users will be shared among all
the sites
Each site will "mostly" host their own content (say the welcome text on home page, or menu items - different for each site)
Some contents, will be shown in all of the sites (say, a company-wide notice....or an employee directory)
The theme for each site will be different
Now, I am thinking of having DNS entry so each of the domain point to the same Drupal installation and when Drupal gets bootstrapped, I would like to sniff into the $_SERVER array to know which site is being hit. I'd then like to load the theme accordingly, show the contents specific to that site, and also show the contents that are shared with all the sites.
To make this happen, so far I have created a node type called "Site" and have created four contents for each of the sites. Then for each other content type (say, Page) I have put a node reference to the "Site" content type with multiple value so when creating a new content, the administrator can specify in which site that content will be showed. However, after that I am stuck.
I have tried to understand Contexts, Spaces, PURL - but haven't figured them out fully yet and I believe I could use the community power to help me out. What do you think is the best approach to handle this scenario ?
It'd be greatly helpful if anybody can suggest a direction.
Regards,
Emran
The way you are suggesting is certainly a way that you could do it, but have you considered domain access? I have used it in the past and found it to be very useful. there is also quite a large collection of modules which work with it. Different themes, Options as to which nodes should appear on which sites and shared users are all features that it has.
Hope this helps!
http://drupal.org/project/domain
First up, I strongly second hookds suggestion of using Domain Access Module for this (+1). It has extensive support/features for your scenario and already covers most of the hard parts you'd need to solve yourself otherwise.
Second, if you insist on trying to do this yourself, I can assure you that it is possible, as we have done something pretty similar recently (some special requirements ruled out domain access), but it was a lot of work, especially when functionality provided by contributed modules would not fit well into our 'unusual' scenario.
Given the multitude of special cases you'd have to cover, it is hard to point out a general direction (apart from suggesting to use Domain Access Module ;) but one major point would be to check out the custom_url_rewrite_inbound()/custom_url_rewrite_outbound() function combo. These will allow you to do pretty low level URL manipulations for incoming requests, as well as for URLs generated for output, both of which you'll need to do if you you want to serve multiple domains from the same instance.
Did I mention that you should check out Domain Access Module before you try to build this yourself?
It sounds like there will be virtually no content shared between these sites. Will you be wanting a single login across all sites?
Remember, Domain Access uses 1 shared database.
You could also just do a regular multi-site install, and share certain tables.
I give Domain Access two thumbs up, but just make sure you really need what it actually does.
Also, I would look into the Feeds.module. You can pull content from anywhere (especially another drupal site) and it imports it directly and creates nodes and fields automatically from it.

CakePHP: reusing models, controllers, configuration but not views and routes

Our website is going to work as follows:
There's a central site www.example.org where everybody can register, change information, manage their 'business card'.
Also, everybody will have companyname.example.org. Here users can publish a simple site based on information they change in the main site.
This site is being built on CakePHP. I'm wondering what a good setup for this is. After doing some googling it appears to be common to create a separate directory for controllers and models for reusing, but in this case I want to really share all the code, except routes and views.
Is it possible to change routes based on a domainname. Would this be considered 'appropriate' for CakePHP at all. Rather than a solution that 'does' the job, I would prefer to find the best practice.
Thanks!
Solved using this tutorial
Off the top of my head, the routing engine in CakePHP has no concept of domains so what you could theoretically do is map a route eg /company1/post/1 to company1.example.com/post/1 using Apache rewrite
Prefixing in routes is possible as I've used it before to produce a multilingual site eg /en/blog, /es/blog etc so it would be just a case of prefixing the company name in the route.
What you are looking for are themes.
CakePHP 1.3 has a neat implementation of that, but 1.2 works almost as good.
In your AppController, you will want to add something along those lines to load a different theme based on the host:
$mapThemes = array('company.example.com' => 'theme-1', 'store.example.com' => 'theme-shopping');
$this->theme = $mapThemes[env('SERVER_NAME')];
Of course, possibilities are endless. You can load $mapThemes from the database by letting every user define multiple themes, etc. But that's the general idea and what I believe is the Cake way of doing things.

Categories