From e998857eb8a5ef4d2ebe381a57c19b1b355fe4ef Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Wed, 19 Aug 2009 13:31:14 +0000 Subject: #516138 by yched, KarenS, quicksketch, bangpound, et al.: CC-FREAKING-K IN CORE! OH YEAH! :D --- modules/node/node.module | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 7eda3b89b..94373e834 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -40,12 +40,25 @@ function node_help($path, $arg) { $output .= '

' . t('The administrative content page allows you to review and manage your site content. The node module makes a number of permissions available for each content type, which may be set by role on the permissions page.', array('@content' => url('admin/content'), '@permissions' => url('admin/settings/permissions'))) . '

'; $output .= '

' . t('For more information, see the online handbook entry for Node module.', array('@node' => 'http://drupal.org/handbook/modules/node/')) . '

'; return $output; + case 'admin/content': return ' '; // Return a non-null value so that the 'more help' link is shown. + case 'admin/structure/types/add': return '

' . t('Each piece of content is of a specific content type. Each content type can have different fields, behaviors, and permissions assigned to it.') . '

'; + + case 'admin/structure/node-type/' . $arg[3] . '/fields': + return '

' . t('This form lets you add, edit, and arrange fields within the %type content type.', array('%type' => node_type_get_name($arg[3]))) . '

'; + + case 'admin/structure/node-type/' . $arg[3] . '/display': + return '

' . t('This form lets you configure how fields and labels are displayed when %type content is viewed in teaser and full-page mode.', array('%type' => node_type_get_name($arg[3]))) . '

'; + + case 'admin/structure/node-type/' . $arg[3] . '/display/' . $arg[5]: + return '

' . t('This form lets you configure how fields should be displayed when rendered %type content in the following contexts.', array('%type' => node_type_get_name($arg[3]))) . '

'; + case 'node/%/revisions': return '

' . t('The revisions let you track differences between multiple versions of a post.') . '

'; + case 'node/%/edit': $node = node_load($arg[1]); $type = node_type_get_type($node); @@ -173,6 +186,25 @@ function node_field_build_modes($obj_type) { return $modes; } +/** + * Implement hook_field_extra_fields(). + */ +function node_field_extra_fields($bundle) { + $extra = array(); + + if ($type = node_type_get_type($bundle)) { + if ($type->has_title) { + $extra['title'] = array( + 'label' => $type->title_label, + 'description' => t('Node module element.'), + 'weight' => -5, + ); + } + } + + return $extra; +} + /** * Gather a listing of links to nodes. * -- cgit v1.2.3