diff options
-rw-r--r-- | CHANGELOG.txt | 1 | ||||
-rw-r--r-- | INSTALL.txt | 40 | ||||
-rw-r--r-- | modules/poll.module | 4 | ||||
-rw-r--r-- | modules/poll/poll.module | 4 | ||||
-rw-r--r-- | modules/system.module | 17 | ||||
-rw-r--r-- | modules/system/system.module | 17 |
6 files changed, 52 insertions, 31 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c128e6913..c15e0281b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,7 @@ 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. diff --git a/INSTALL.txt b/INSTALL.txt index b80507c00..38b37f583 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -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, diff --git a/modules/poll.module b/modules/poll.module index d9c4f6f90..0f587280f 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -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; diff --git a/modules/poll/poll.module b/modules/poll/poll.module index d9c4f6f90..0f587280f 100644 --- a/modules/poll/poll.module +++ b/modules/poll/poll.module @@ -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; diff --git a/modules/system.module b/modules/system.module index b7871d8a8..7a4c71588 100644 --- a/modules/system.module +++ b/modules/system.module @@ -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"; } diff --git a/modules/system/system.module b/modules/system/system.module index b7871d8a8..7a4c71588 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -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"; } |