[ Index ] |
|
Code source de Drupal 5.3 |
1 <?php 2 // $Id: default.profile,v 1.4.2.1 2007/03/25 22:59:33 drumm Exp $ 3 4 /** 5 * Return an array of the modules to be enabled when this profile is installed. 6 * 7 * @return 8 * An array of modules to be enabled. 9 */ 10 function default_profile_modules() { 11 return array('block', 'color', 'comment', 'filter', 'help', 'menu', 'node', 'system', 'taxonomy', 'user', 'watchdog'); 12 } 13 14 /** 15 * Return a description of the profile for the initial installation screen. 16 * 17 * @return 18 * An array with keys 'name' and 'description' describing this profile. 19 */ 20 function default_profile_details() { 21 return array( 22 'name' => 'Drupal', 23 'description' => 'Select this profile to enable some basic Drupal functionality and the default theme.' 24 ); 25 } 26 27 /** 28 * Perform any final installation tasks for this profile. 29 * 30 * @return 31 * An optional HTML string to display to the user on the final installation 32 * screen. 33 */ 34 function default_profile_final() { 35 // Insert default user-defined node types into the database. 36 // For a complete list of available node type attributes, refer to the node 37 // type API documentation at: 38 // http://api.drupal.org/api/HEAD/function/hook_node_info 39 $types = array( 40 array( 41 'type' => 'page', 42 'name' => st('Page'), 43 'module' => 'node', 44 'description' => st('If you want to add a static page, like a contact page or an about page, use a page.'), 45 'custom' => TRUE, 46 'modified' => TRUE, 47 'locked' => FALSE, 48 ), 49 array( 50 'type' => 'story', 51 'name' => st('Story'), 52 'module' => 'node', 53 'description' => st('Stories are articles in their simplest form: they have a title, a teaser and a body, but can be extended by other modules. The teaser is part of the body too. Stories may be used as a personal blog or for news articles.'), 54 'custom' => TRUE, 55 'modified' => TRUE, 56 'locked' => FALSE, 57 ), 58 ); 59 60 foreach ($types as $type) { 61 $type = (object) _node_type_set_defaults($type); 62 node_type_save($type); 63 } 64 65 // Default page to not be promoted and have comments disabled. 66 variable_set('node_options_page', array('status')); 67 variable_set('comment_page', COMMENT_NODE_DISABLED); 68 69 // Don't display date and author information for page nodes by default. 70 $theme_settings = variable_get('theme_settings', array()); 71 $theme_settings['toggle_node_info_page'] = FALSE; 72 variable_set('theme_settings', $theme_settings); 73 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Nov 30 16:20:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |