? profiles/default/welcome.inc 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 19 Aug 2006 23:39:51 -0000 @@ -545,6 +545,34 @@ } /** + * Load a profile-specific include file and invoke its method. + * + * @param $name + * Name of the file to be included. + * @param $method + * If given, the name of the method to be invoked. Otherwise, the $name is + * used. + */ +function install_profile_invoke($name, $method = NULL) { + $profile = variable_get('install_profile', 'default'); + $file = "./profiles/$profile/$name.inc"; + // If the installed profile doesn't have the given file, use default's. + if (!file_exists($file)) { + $profile = 'default'; + $file = "./profiles/default/$name.inc"; + } + if (file_exists($file)) { + include_once($file); + // Use a specified method if given. Otherwise, look for a method with the + // file's name. + $method = $method ? $method : $name; + $function = $profile .'_profile_'. $method; + return function_exists($function) ? $function() : FALSE; + } + 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 = '