? 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(' -

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('');