Commit 824e7d4d authored by Dries's avatar Dries

- Patch #44920 by Crell et al: added support for a sites/all directory.

parent 15b40d7e
Drupal x.x.x, xxxx-xx-xx (development version)
------------------------
- added support for different cache backends
- added support for a generic "sites/all" directory.
- usability:
* added support for auto-complete forms (AJAX) to user profiles.
* improved configurability of the contact forms.
......
......@@ -118,24 +118,38 @@ INSTALLATION
will be removed according to the pattern above if no port-specific
configuration is found, just like a real subdomain.
Each site configuration can have its own site-specific modules and
themes that will be made available in addition to those installed
in the standard 'modules' and 'themes' directories. To use
site-specific modules or themes, simply create a 'modules' or
'themes' directory within the site configuration directory. For
example, if sub.example.com has a custom theme and a custom module
that should not be accessible to other sites, the setup would look
like this:
NOTE: for more information about multiple virtual hosts or the
configuration settings, consult the Drupal handbook at drupal.org.
4. INSTALLING MODULES AND THEMES
Drupal ships with a number of default modules and themes in the
'modules' and 'themes' directories, respectively. You can download
additional modules and themes from http://drupal.org/project.
The recommended place to put new modules and themes is in the 'sites'
directory. To make a module or theme available to all sites, simply
place it under the sites/all/modules directory or sites/all/themes
directory. To make it available to only one site, place it in the
sites/sub.example.com/modules or sites/sub.example.com/themes directory.
For example, to make module_a and theme_a available to all sites, but
module_b and theme_b available only to sub.example.com, the setup
would look like this:
sites/all/:
themes/theme_a
modules/module_a
sites/sub.example.com/:
settings.php
themes/custom_theme
modules/custom_module
themes/theme_b
modules/module_b
NOTE: for more information about multiple virtual hosts or the
configuration settings, consult the Drupal handbook at drupal.org.
configuration settings, consult the Drupal handbook at
http://drupal.org/handbook.
4. CONFIGURE DRUPAL
5. CONFIGURE DRUPAL
You should consider creating a "files" subdirectory in your Drupal
installation directory. This subdirectory stores files such as
......@@ -161,7 +175,7 @@ INSTALLATION
Create an account and login. The first account will automatically
become the main administrator account with total control.
5. CRON TASKS
6. CRON TASKS
Many Drupal modules (such as the search functionality) have periodic
tasks that must be triggered by a cron job. To activate these tasks,
......
......@@ -544,9 +544,9 @@ function poll_view(&$node, $teaser = FALSE, $page = FALSE, $block = FALSE) {
$node->body = $node->teaser = '';
$links = module_invoke_all('link', 'node', $node, 1);
$links[] = l(t('older polls'), 'poll', array('title' => t('View the list of polls on this site.')));
$links[] = array('#title' => t('older polls'), '#href' => 'poll', '#attributes' => array('title' => t('View the list of polls on this site.')));
if ($node->allowvotes && $block) {
$links[] = l(t('results'), 'node/'. $node->nid .'/results', array('title' => t('View the current poll results.')));
$links[] = array('#title' => t('results'), '#href' => 'node/'. $node->nid .'/results', '#attributes' => array('title' => t('View the current poll results.')));
}
$node->links = $links;
......
......@@ -544,9 +544,9 @@ function poll_view(&$node, $teaser = FALSE, $page = FALSE, $block = FALSE) {
$node->body = $node->teaser = '';
$links = module_invoke_all('link', 'node', $node, 1);
$links[] = l(t('older polls'), 'poll', array('title' => t('View the list of polls on this site.')));
$links[] = array('#title' => t('older polls'), '#href' => 'poll', '#attributes' => array('title' => t('View the list of polls on this site.')));
if ($node->allowvotes && $block) {
$links[] = l(t('results'), 'node/'. $node->nid .'/results', array('title' => t('View the current poll results.')));
$links[] = array('#title' => t('results'), '#href' => 'node/'. $node->nid .'/results', '#attributes' => array('title' => t('View the current poll results.')));
}
$node->links = $links;
......
......@@ -673,13 +673,14 @@ function system_default_region($theme) {
}
/**
* Returns an array of files objects of the given type from both the
* site-wide directory (i.e. modules/) and site-specific directory
* (i.e. sites/somesite/modules/). The returned array will be keyed
* using the key specified (name, basename, filename). Using name or
* basename will cause site-specific files to shadow files in the
* default directories. That is, if a file with the same name appears
* in both location, only the site-specific version will be included.
* Returns an array of files objects of the given type from the site-wide
* directory (i.e. modules/), the all-sites directory (i.e. sites/all/modules/)
* and site-specific directory (i. e. sites/somesite/modules/). The returned
* array will be keyed using the key specified (name, basename, filename). Using
* name or basename will cause site- specific files to shadow files in the
* default directories. That is, if a file with the same name appears in both
* the site-wide directory and site-specific directory, only the site-specific
* version will be included.
*
* @param $mask
* The regular expression of the files to find.
......@@ -700,6 +701,8 @@ function system_listing($mask, $directory, $key = 'name', $min_depth = 1) {
$searchdir = array($directory);
$files = array();
// Always search sites/all/* as well as the global directories
$searchdir[] = 'sites/all';
if (file_exists("$config/$directory")) {
$searchdir[] = "$config/$directory";
}
......
......@@ -673,13 +673,14 @@ function system_default_region($theme) {
}
/**
* Returns an array of files objects of the given type from both the
* site-wide directory (i.e. modules/) and site-specific directory
* (i.e. sites/somesite/modules/). The returned array will be keyed
* using the key specified (name, basename, filename). Using name or
* basename will cause site-specific files to shadow files in the
* default directories. That is, if a file with the same name appears
* in both location, only the site-specific version will be included.
* Returns an array of files objects of the given type from the site-wide
* directory (i.e. modules/), the all-sites directory (i.e. sites/all/modules/)
* and site-specific directory (i. e. sites/somesite/modules/). The returned
* array will be keyed using the key specified (name, basename, filename). Using
* name or basename will cause site- specific files to shadow files in the
* default directories. That is, if a file with the same name appears in both
* the site-wide directory and site-specific directory, only the site-specific
* version will be included.
*
* @param $mask
* The regular expression of the files to find.
......@@ -700,6 +701,8 @@ function system_listing($mask, $directory, $key = 'name', $min_depth = 1) {
$searchdir = array($directory);
$files = array();
// Always search sites/all/* as well as the global directories
$searchdir[] = 'sites/all';
if (file_exists("$config/$directory")) {
$searchdir[] = "$config/$directory";
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment