Index: includes/install.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.inc,v retrieving revision 1.15 diff -u -r1.15 install.inc --- includes/install.inc 18 Aug 2006 18:58:44 -0000 1.15 +++ includes/install.inc 22 Aug 2006 17:23:22 -0000 @@ -545,6 +545,38 @@ } /** + * Load an install profile file and invoke a hook. + * + * @param $hook + * The name of the hook to invoke. + * @param ... + * Arguments to pass to the hook implementation. + * @return + * The return value of the hook implementation. + */ +function install_profile_invoke() { + $profile = variable_get('install_profile', 'default'); + // Load the profile. + require_once "./profiles/$profile/$profile.profile"; + $args = func_get_args(); + $hook = array_shift($args); + $function = $profile .'_profile_'. $hook; + if (function_exists( $function)) { + return call_user_func_array($function, $args); + } + // If the hook isn't implemented in the installed profile, try the + // default profile. + else { + require_once './profiles/default/default.profile'; + $function = 'default_profile_'. $hook; + if (function_exists('default'. $function)) { + return call_user_func_array($function, $args); + } + } + return FALSE; +} + +/** * Hardcoded function for doing the equivalent of theme('placeholder') * when the theme system is not available. */ Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.677 diff -u -r1.677 node.module --- modules/node/node.module 19 Aug 2006 21:40:58 -0000 1.677 +++ modules/node/node.module 19 Aug 2006 23:20:48 -0000 @@ -2255,35 +2255,11 @@ } $output .= theme('pager', NULL, variable_get('default_nodes_main', 10)); } + // If there are no nodes, show the appropriate install profile's welcome text. else { - $output = t(' -

Welcome to your new Drupal website!

-

Please follow these steps to set up and start using your website:

-
    -
  1. - Create your administrator account - To begin, create the first account. This account will have full administration rights and will allow you to configure your website. -
  2. -
  3. - Configure your website - Once logged in, visit the administration section, where you can customize and configure all aspects of your website. -
  4. -
  5. - Enable additional functionality - Next, visit the module list and enable features which suit your specific needs. You can find additional modules in the Drupal modules download section. -
  6. -
  7. - Customize your website design - To change the "look and feel" of your website, visit the themes section. You may choose from one of the included themes or download additional themes from the Drupal themes download section. -
  8. -
  9. - Start posting content - Finally, you can create content for your website. This message will disappear once you have published your first post. -
  10. -
-

For more information, please refer to the help section, or the online Drupal handbooks. You may also post at the Drupal forum, or view the wide range of other support options available.

', - array('@drupal' => 'http://drupal.org/', '@register' => url('user/register'), '@admin' => url('admin'), '@config' => url('admin/settings'), '@modules' => url('admin/settings/modules'), '@download_modules' => 'http://drupal.org/project/modules', '@themes' => url('admin/build/themes'), '@download_themes' => 'http://drupal.org/project/themes', '@content' => url('node/add'), '@help' => url('admin/help'), '@handbook' => 'http://drupal.org/handbooks', '@forum' => 'http://drupal.org/forum', '@support' => 'http://drupal.org/support') - ); + include_once('./includes/install.inc'); + $output = install_profile_invoke('welcome'); + $output = '
'. $output .'
'; } drupal_set_title(''); Index: profiles/default/default.profile =================================================================== RCS file: /cvs/drupal/drupal/profiles/default/default.profile,v retrieving revision 1.1 diff -u -r1.1 default.profile --- profiles/default/default.profile 8 Aug 2006 21:18:04 -0000 1.1 +++ profiles/default/default.profile 22 Aug 2006 17:21:05 -0000 @@ -20,3 +20,37 @@ 'description' => 'Select this profile to enable some basic Drupal functionality and the default theme.' ); } + +/** + * Return a welcome message for the profile. + */ +function default_profile_welcome() { + return t(' +

Welcome to your new Drupal website!

+

Please follow these steps to set up and start using your website:

+
    +
  1. + Create your administrator account + To begin, create the first account. This account will have full administration rights and will allow you to configure your website. +
  2. +
  3. + Configure your website + Once logged in, visit the administration section, where you can customize and configure all aspects of your website. +
  4. +
  5. + Enable additional functionality + Next, visit the module list and enable features which suit your specific needs. You can find additional modules in the Drupal modules download section. +
  6. +
  7. + Customize your website design + To change the "look and feel" of your website, visit the themes section. You may choose from one of the included themes or download additional themes from the Drupal themes download section. +
  8. +
  9. + Start posting content + Finally, you can create content for your website. This message will disappear once you have published your first post. +
  10. +
+

For more information, please refer to the help section, or the online Drupal handbooks. You may also post at the Drupal forum, or view the wide range of other support options available.

', + array('@drupal' => 'http://drupal.org/', '@register' => url('user/register'), '@admin' => url('admin'), '@config' => url('admin/settings'), '@modules' => url('admin/settings/modules'), '@download_modules' => 'http://drupal.org/project/modules', '@themes' => url('admin/build/themes'), '@download_themes' => 'http://drupal.org/project/themes', '@content' => url('node/add'), '@help' => url('admin/help'), '@handbook' => 'http://drupal.org/handbooks', '@forum' => 'http://drupal.org/forum', '@support' => 'http://drupal.org/support') + ); +} \ No newline at end of file