? move_preprocess_node_block.patch ? node_signatures.patch ? node_signatures_0.patch ? node_signatures_1.patch ? includes/.theme.inc.swp ? modules/user/.user.module.swp ? sites/default/files ? sites/default/settings.php Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.464 diff -u -p -r1.464 theme.inc --- includes/theme.inc 22 Jan 2009 03:18:30 -0000 1.464 +++ includes/theme.inc 25 Jan 2009 16:35:50 -0000 @@ -1982,17 +1982,18 @@ function template_preprocess_node(&$vari $variables['node_url'] = url('node/' . $node->nid); $variables['title'] = check_plain($node->title); $variables['page'] = (bool)menu_get_object(); - + if ($node->build_mode == NODE_BUILD_PREVIEW) { + unset($node->content['links']); } - + // Render taxonomy links separately. $variables['terms'] = !empty($node->content['links']['terms']) ? drupal_render($node->content['links']['terms']) : ''; - + // Render all remaining node links. $variables['links'] = !empty($node->content['links']) ? drupal_render($node->content['links']) : ''; - + // Render any comments. $variables['comments'] = !empty($node->content['comments']) ? drupal_render($node->content['comments']) : ''; @@ -2011,6 +2012,16 @@ function template_preprocess_node(&$vari $variables['submitted'] = ''; $variables['picture'] = ''; } + + // Add the signature of the user to the variables if its activated for this contenttype. + if (variable_get('user_signatures', 0) && variable_get('user_signature_node_' . $node->type, TRUE)) { + $variables['author'] = user_load($variables['uid']); + $variables['signature'] = $variables['author']->signature; + } + else { + $variables['signature'] = ''; + } + // Clean up name so there are no underscores. $variables['template_files'][] = 'node-' . str_replace('_', '-', $node->type); $variables['template_files'][] = 'node-' . $node->nid; Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.686 diff -u -p -r1.686 comment.module --- modules/comment/comment.module 23 Jan 2009 14:23:27 -0000 1.686 +++ modules/comment/comment.module 25 Jan 2009 16:35:54 -0000 @@ -1781,7 +1781,10 @@ function template_preprocess_comment(&$v $variables['links'] = isset($variables['links']) ? theme('links', $variables['links']) : ''; $variables['new'] = $comment->new ? t('new') : ''; $variables['picture'] = theme_get_setting('toggle_comment_user_picture') ? theme('user_picture', $comment) : ''; - $variables['signature'] = $comment->signature; + + if (variable_get('user_signatures', 0) && variable_get('user_signature_node_' . $node->type, TRUE)) { + $variables['signature'] = $comment->signature; + } $variables['submitted'] = theme('comment_submitted', $comment); $variables['title'] = l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid")); $variables['template_files'][] = 'comment-' . $node->type; Index: modules/node/content_types.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v retrieving revision 1.63 diff -u -p -r1.63 content_types.inc --- modules/node/content_types.inc 22 Jan 2009 05:01:39 -0000 1.63 +++ modules/node/content_types.inc 25 Jan 2009 16:35:55 -0000 @@ -170,7 +170,7 @@ function node_type_form(&$form_state, $t '#title' => t('Display post information'), '#default_value' => variable_get('node_submitted_'. $type->type, TRUE), '#description' => t('Enable the submitted by Username on date text.'), - ); + ); $form['old_type'] = array( '#type' => 'value', '#value' => $type->type, Index: modules/node/node.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.tpl.php,v retrieving revision 1.6 diff -u -p -r1.6 node.tpl.php --- modules/node/node.tpl.php 31 Dec 2008 12:02:22 -0000 1.6 +++ modules/node/node.tpl.php 25 Jan 2009 16:35:55 -0000 @@ -20,6 +20,7 @@ * - $terms: the themed list of taxonomy term links output from theme_links(). * - $submitted: themed submission information output from * theme_node_submitted(). + * - $signature: Authors signature. * * Other variables: * - $node: Full node object. Contains data that may not be safe. @@ -68,10 +69,15 @@
+ +
+ +
+
- \ No newline at end of file + Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.960 diff -u -p -r1.960 user.module --- modules/user/user.module 22 Jan 2009 12:46:07 -0000 1.960 +++ modules/user/user.module 25 Jan 2009 16:36:00 -0000 @@ -967,6 +967,21 @@ function user_block_view($delta = '') { } /** + * Implementation of hook_form_node_type_form_alter(). + */ +function user_form_node_type_form_alter(&$form, $form_state) { + if (variable_get('user_signatures', 0)) { + $type = $form['#node_type']; + $form['display']['user_signature_node'] = array( + '#type' => 'checkbox', + '#title' => t('Display user signatures'), + '#default_value' => variable_get('user_signature_node_' . $type->type, TRUE), + '#description' => t('Enable the display of the author signature at the node.'), + ); + } +} + +/** * Process variables for user-picture.tpl.php. * * The $variables array contains the following arguments: @@ -1668,7 +1683,7 @@ function user_edit_form(&$form_state, $u } // Signature: - if (variable_get('user_signatures', 0) && module_exists('comment') && !$register) { + if (variable_get('user_signatures', 0) && !$register) { $form['signature_settings'] = array( '#type' => 'fieldset', '#title' => t('Signature settings'), @@ -1678,7 +1693,7 @@ function user_edit_form(&$form_state, $u '#type' => 'textarea', '#title' => t('Signature'), '#default_value' => $edit['signature'], - '#description' => t('Your signature will be publicly displayed at the end of your comments.'), + '#description' => t('Your signature will be publicly displayed at the end of your nodes/comments.'), ); } Index: themes/bluemarine/node.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/bluemarine/node.tpl.php,v retrieving revision 1.8 diff -u -p -r1.8 node.tpl.php --- themes/bluemarine/node.tpl.php 31 Dec 2008 12:02:23 -0000 1.8 +++ themes/bluemarine/node.tpl.php 25 Jan 2009 16:36:00 -0000 @@ -8,7 +8,13 @@

-
+
+ +
+ +
+ +
Index: themes/garland/node.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/garland/node.tpl.php,v retrieving revision 1.7 diff -u -p -r1.7 node.tpl.php --- themes/garland/node.tpl.php 31 Dec 2008 12:02:23 -0000 1.7 +++ themes/garland/node.tpl.php 25 Jan 2009 16:36:00 -0000 @@ -15,6 +15,12 @@
+ +
+
+ +
+
Index: themes/pushbutton/node.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/themes/pushbutton/node.tpl.php,v retrieving revision 1.6 diff -u -p -r1.6 node.tpl.php --- themes/pushbutton/node.tpl.php 4 Jan 2009 16:19:39 -0000 1.6 +++ themes/pushbutton/node.tpl.php 25 Jan 2009 16:36:00 -0000 @@ -8,11 +8,17 @@
-
+
+ +
+ +
+ +
- + - +