Drupal 6 multisite | Riccardo Barbieri

user warning: Query was empty query: in /home/riccardo/domains/riccardobarbieri.com/public_html/sites/all/modules/gallery_assist/gallery_assist.module on line 3975.

Drupal 6 multisite

Printer-friendly version

Multiple domains

 

Multisite management

 

Essential Drupal social networking modules

 

The main points are:

1) you have to setup the domain to point to the root drupal install (not directly to the subsite) and

2) the subsites themselves are created via subdirectories off of /sites in the main drupal install.

  • Using PHP MySQL or any other database application, create a database by the name "domain2"
  • Grant full privileges to the database to the default user
  • Using phpMyAdmin, create the tables and default data in your database by suitably modifying the drupal database file ("database.sql").
  • Using cPanel or ftp, create a sub-directory in the "/sites" directory called "domain2.com"
  • Copy the /sites/default/settings.php to the new directory /sites/domain2.com/settings.php
  • Make changes to the following line in the new settings.php file
    $db_url = 'mysql://db-username:db-password@localhost/new-db-name';
  • Create a symlink from the new location to the main site, using the command (for example):

    ln -s /home/username/public_html/
    /home/username/public_html/domainname2

    Here, I am assuming your webhost has parked your new domain at "/domainname2" folder of your main account. In this example, the url http://domainname2.tld should resolve to the physical folder /home/username/public_html/domainname2 on your server (or shared server).

    If you don't have shell access and your webhost does not support creating symlinks, try out the symlink() function in php. Here is a step by step guide to using symlink function if you dont have shell access. Note that for this to work, it is necessary to delete the physical folder "/home/username/public_html/domainname2" from your web server, as the link created by symlink() is only symbolic and not actual. The article explains that in detail.

  • Now access your new domain name at the address http://domainname.tld
  • Create your first user account, which should be the admin user.

 

Sharing users and content across multiple sites

How to setup a Drupal multisite on Windows

 

Bijvoorbeeld: Optional CSS configurable by your visitors ...

this example the additional sheet is called "High_Contrast.css" which brightens up fonts and darkens the backgrounds (effectively overriding certain styles in style.css ). It works for anonymous users (via a cookie) and logged-in users ...

 

  • Pathauto:
    if we define a hyphen as seperator for spaces AND we eliminate small words (the, it, a, and) we have the problem that if the small word is the first or last word of the title, pathauto leaves a trailing hyphen: the-alcazar-palace >>> /sevilla/-alcazar-palace We could do without a seperator, google will read the lettercombination of the URL anyway (but then all words are included in one long URL... the present situation).
  • Country selection for the map:
    I think it would be practical to have one country selected on entering (the country of the user/visitor, or the one set as default or someting). Practically unavoidable when having much information (in fact maybe even a starting-map with some default selected categories? to avoid charging to long) Also better for input (for the selection of provinces for example...) If someone wants another country, that he go to country.on-map.info (isn't it?)
  • Language selection for the listing:
    More or less the same. Unfortunately the language selection in the exposed filters asks for a specific default language, while it should be selected dynamically... We can start with English and have the visitor select afterwards of course. Later work out how to make it dynamic. Possibility of some easy basic text enrichment? Bold (ctrl B?), link, URL, Menu, language and pathauto structure what URL kind do we want? - spain.on-map.info/contentype/menupath/item.html ?? - en.on-map.info/spain/category/title.html We might end up using more than only the "page" type... (for basic level selection, both for input as for output: business, tourism, personal, social, image, video, ) it could be an additional dimension.. If we choose the right names for the content types they may add to search engine friendliness and already indicate the kind of content. I haven't checked the pathauto for languages yet. If using menus, how to let people choose the parent menu? They have to put in a name and select a parent, otherwise no path is created and no menu holds the item. But then menu-items should be restricted, else people can put content under "administer". But only one can be chosen... If using category pathnames, how to deal with multiple categories?