Index: vud_comment/vud_comment.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/vote_up_down/vud_comment/vud_comment.install,v retrieving revision 1.2 diff -u -p -r1.2 vud_comment.install --- vud_comment/vud_comment.install 31 May 2010 03:59:40 -0000 1.2 +++ vud_comment/vud_comment.install 17 Dec 2010 22:38:57 -0000 @@ -27,6 +27,7 @@ function vud_comment_uninstall() { drupal_uninstall_schema('vud_comment'); variable_del('vud_comment_node_types'); variable_del('vud_comment_widget'); + variable_del('vud_comment_widget_display'); variable_del('vud_comment_votes'); variable_del('vud_comment_reset'); } \ No newline at end of file Index: vud_comment/vud_comment.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/vote_up_down/vud_comment/vud_comment.module,v retrieving revision 1.10 diff -u -p -r1.10 vud_comment.module --- vud_comment/vud_comment.module 5 Dec 2010 08:37:39 -0000 1.10 +++ vud_comment/vud_comment.module 17 Dec 2010 22:38:57 -0000 @@ -48,6 +48,13 @@ function vud_comment_admin_settings() { '#default_value' => variable_get('vud_comment_widget', 'plain'), '#options' => vud_widget_get_names(), ); + $form['vud_comment_widget_display'] = array( + '#type' => 'radios', + '#title' => t('Widget display'), + '#description' => t('Select where the voting widget will be displayed.
Add <?php print $comment->vud_comment_widget ?> to your comment.tpl.php for display in theme.'), + '#default_value' => variable_get('vud_comment_wdget_display', 1), + '#options' => array(0 => 'Via theme', 1 => 'Content body'), + ); $form['vud_comment_votes'] = array( '#type' => 'radios', '#title' => t('Votes display'), @@ -99,7 +106,11 @@ function vud_comment_comment(&$comment, if ($comment_allow && user_access('use vote up/down on comments')) { $tag = variable_get('vud_tag', 'vote'); $widget = variable_get('vud_comment_widget', 'plain'); - $comment->comment = theme('vud_widget', $comment->cid, 'comment', $tag, $widget) . $comment->comment; + $comment->vud_comment_widget = theme('vud_widget', $comment->cid, 'comment', $tag, $widget); + if (variable_get('vud_comment_widget_display', 1) == '1') { + $comment->comment = $comment->vud_comment_widget . $comment->comment; + } } break; }