hi everyone,
i have one site running drupal 5.1 and publishing a podcast through the Views module.
i want to set up a different drupal site on another domain. i want to be able to show the same view with the same podcast nodes.
the new site will be focused on the podcast and have little or no content other than the View of the latest podcasts, maybe a category browser, and commenting. it will of course have a distinct template.
i have been reading the handbook and other sources on running multiple sites off the same database. this seems to be the right direction. however, i'm confused about how to make it all work.
advice?
thanks -- will hall
On dim, 2008-01-20 at 00:40 -0800, will hall wrote:
hi everyone,
i have one site running drupal 5.1 and publishing a podcast through the Views module.
i want to set up a different drupal site on another domain. i want to be able to show the same view with the same podcast nodes.
the new site will be focused on the podcast and have little or no content other than the View of the latest podcasts, maybe a category browser, and commenting. it will of course have a distinct template.
i have been reading the handbook and other sources on running multiple sites off the same database. this seems to be the right direction. however, i'm confused about how to make it all work.
I have done something like that: a main site with much content, and another site with only a few static pages and a part of the main site's content. I created a sites/mynewsite.com directory, and added a new settings.php file in which I modified a few variables at the end to have a new name, a new theme and a new frontpage for the site. I then arranged blocks for this theme to display a new menu, and changed the theme to not display the primary and seconday links. And voilà ! But I'm not an Drupal expert, so there may be a better way to do this.
Xav
On Jan 20, 2008, at 1:55 AM, Xavier Bestel wrote:
I have done something like that: a main site with much content, and another site with only a few static pages and a part of the main site's content. I created a sites/mynewsite.com directory, and added a new settings.php file in which I modified a few variables at the end to have a new name, a new theme and a new frontpage for the site. I then arranged blocks for this theme to display a new menu, and changed the theme to not display the primary and seconday links. And voilà ! But I'm not an Drupal expert, so there may be a better way to do this.
Xav
I have done the same thing before as well. A little more advice:
* Make sure $base_url is set, and then you can check against this in php code for block visibility, it also makes sure that all the links on that site, link to that site only. Any links back to the main site with all content will have to include the full href.
* Use the $conf array to set things such as the front page of the new site. e.g.
$conf = array( 'site_frontpage' => 'path_alias_for_your_view', );
A couple of downsides to this is that all content is available on either side. Even if there are no links to it, one could poke around and all the same paths will be valid on both sites. So you'll have to watch your menus and blocks to make sure that the same links do not appear on both sites. I managed this by having two versions of my primary menu, and putting it into a block and then using PHP to control which site got which block/menu. YMMV
-Mike
__________________ Michael Prasuhn mike@mikeyp.net http://mikeyp.net 949.200.7595 714.356.0168 cell 949.200.7670 fax
hi everyone, thanks for the prompt replies.
this is helpful but i am a drupal newbie and it's a bit hard for me to follow; i hope you can be patient as i ask some more newbie questions.
i have 2 separate domains www.myoriginalsite.com and www.mynewsite.com.
i create a sites/www.mynewpodcastsite.com directory.
i register the domain www.mynewsite.com and have the namerserver point to -- where -- to make this work? is there an apache config file that will make requests for www.mynewsite.com go to the sub-directory?
so now i have two settings.php files, one in /sites/default and one in /sites/www.mynewpodcastsite.com? and drupal will only use /sites/www.mynewpodcastsite.com when www.mynewpodcastsite.com is the url prefix being accessed?
then in this new settings.php file i can change the base_url value, but leave the database info the same.
How does drupal know how to use a completely different template and configuration for the new site?
if there is an article on drupal.org or somewhere that walks me through this that would be ideal, i'm a bit beyond my skillset here and on a steep learning curve.
thanks for help!
-- will
Michael Prasuhn wrote:
On Jan 20, 2008, at 1:55 AM, Xavier Bestel wrote:
I have done something like that: a main site with much content, and another site with only a few static pages and a part of the main site's content. I created a sites/mynewsite.com directory, and added a new settings.php file in which I modified a few variables at the end to have a new name, a new theme and a new frontpage for the site. I then arranged blocks for this theme to display a new menu, and changed the theme to not display the primary and seconday links. And voilà ! But I'm not an Drupal expert, so there may be a better way to do this.
Xav
I have done the same thing before as well. A little more advice:
- Make sure $base_url is set, and then you can check against this in
php code for block visibility, it also makes sure that all the links on that site, link to that site only. Any links back to the main site with all content will have to include the full href.
- Use the $conf array to set things such as the front page of the new
site. e.g.
$conf = array( 'site_frontpage' => 'path_alias_for_your_view', );
A couple of downsides to this is that all content is available on either side. Even if there are no links to it, one could poke around and all the same paths will be valid on both sites. So you'll have to watch your menus and blocks to make sure that the same links do not appear on both sites. I managed this by having two versions of my primary menu, and putting it into a block and then using PHP to control which site got which block/menu. YMMV
-Mike
Michael Prasuhn mike@mikeyp.net http://mikeyp.net 949.200.7595 714.356.0168 cell 949.200.7670 fax
On Jan 20, 2008, at 11:12 AM, will hall wrote:
hi everyone, thanks for the prompt replies.
this is helpful but i am a drupal newbie and it's a bit hard for me to follow; i hope you can be patient as i ask some more newbie questions.
i have 2 separate domains www.myoriginalsite.com and www.mynewsite.com.
i create a sites/www.mynewpodcastsite.com directory.
I believe you only need to use example.com, without the www for the directory names.
i register the domain www.mynewsite.com and have the namerserver point to -- where -- to make this work? is there an apache config file that will make requests for www.mynewsite.com go to the sub-directory?
Point your name server at your web server. You will need to configure Apache in most instances, and you should point Apache to the same dir that the first domain is set to. You can pretty much duplicate the original config file or info and replace the domain in it for the most part.
so now i have two settings.php files, one in /sites/default and one in /sites/www.mynewpodcastsite.com? and drupal will only use /sites/www.mynewpodcastsite.com when www.mynewpodcastsite.com is the url prefix being accessed?
That's correct.
then in this new settings.php file i can change the base_url value, but leave the database info the same.
How does drupal know how to use a completely different template and configuration for the new site?
If you are doing database sharing, i.e. the same database for both sites, you'll need to use the $conf array at the end of the settings.php file to set things such as theme, front_page, etc. You can set any variable that Drupal uses here. Take a peak through the variable table and this will give you some ideas how to make it work, or use the devel module to check variables.
if there is an article on drupal.org or somewhere that walks me through this that would be ideal, i'm a bit beyond my skillset here and on a steep learning curve.
Probably, but I'm not sure where. Hope this helps.
-Mike
thanks for help!
-- will
__________________ Michael Prasuhn mike@mikeyp.net http://mikeyp.net 949.200.7595 714.356.0168 cell 949.200.7670 fax