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(' -
Please follow these steps to set up and start using your website:
-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 = 'Please follow these steps to set up and start using your website:
+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