Help! How can I completely remove the "Formatting guidelines" from the comment form? In other words, I would like to have a comment input box, and below, just have the "post" button.

I do hope this is possible. If it is not, I might move to WordPress, because I am begining to think that in some regards Drupal is fairly inflexible.

Comments

Brian@brianpuccio.net’s picture

This isn't the most elegant solution, but it has been mentioned before if you searched. Go through the filter.module, and look for lines that look something like this:

  $output .= '<h2>'. t('Filters') .'</h2>'. form($form);

  // Composition tips (guidelines)
  $tips = _filter_tips($format, false);
  $extra = l(t('More information about formatting options'), 'filter/tips');
  $tiplist = theme('filter_tips', $tips, false, $extra);
  if (!$tiplist) {
    $tiplist = t('<p>No guidelines available.</p>');
  }
  $group = t('<p>These are the guidelines that users will see for posting in this input format. They are automatically generated from the filter settings.</p>');
  $group .= $tiplist;
  $output .= '<h2>'. t('Formatting guidelines') .'</h2>'. $group;

Change them to your heart's content.

patrickharris’s picture

Thanks a lot for your help.

Wiggles’s picture

Want the same thing, and found this post. My problem is that I do not know what to do with these lines to remove the darn thing. It does not work just to remove them.

Thanks

naudefj’s picture

Wow! One would expect to find this in a config panel or a template.

Best regards.

Frank

zach harkey’s picture

I completely agree. These "Formatting guidelines" get ridiculous fast. Especially in custom Flexinodes where you can easily have 3 or 4 different text areas. There is just no reason why all of the guidelines should be listed in their entirety for every text field; it's not like you can have different Formatting for different text fields within the same form.

Overall, "Formatting guidelines" are implemented way to heavy handed in drupal. This is a perfect example of where an accessible pop up window would really make things easier on the user.

-zach
------------------------
harkey design

: z

smilodon’s picture

Brian, You are right about the file where to look for it, but you pointed at very wrong section of the wile. And no one helped that guy, who asked what lines to edit.

Ok heres what you need to do:
Open filter.module with wordpad.
Press ctrl+f to search a line -> * Format a set of filter tips.

/**
 * Format a set of filter tips.
 *
 * @ingroup themeable
 */
function theme_filter_tips($tips, $long = false, $extra = '') {
  $output = '';

  $multiple = count($tips) > 1;
  if ($multiple) {
    $output = t('Input formats') .':';
  }

  if (count($tips)) {
    if ($multiple) {
      $output .= '<ul>';
    }
    foreach ($tips as $name => $tiplist) {
      if ($multiple) {
        $output .= '<li>';
        $output .= '<strong>'. $name .'</strong>:<br />';
      }

      $tips = '';
      foreach ($tiplist as $tip) {
        $tips .= '<li'. ($long ? ' id="filter-'. str_replace("/", "-", $tip['id']) .'">' : '>') . $tip['tip'] . '</li>';
      }

      if ($tips) {
        $output .= "<ul class=\"tips\">$tips</ul>";
      }

      if ($multiple) {
        $output .= '</li>';
      }
    }
    if ($multiple) {
      $output .= '</ul>';
    }
  }

//  return $output;
}

The above code is already edited to disable the short help text for input formats. All you need to do is to uncomment the line "return $output;" with adding this "//" (without quotes) infront of the command. This does not disable the ability to choose between different formats if some exctra formats are allowed. And this does not hide the "More information about formatting options" link at the end. If you need to remove the whole thing, then find the line "* Generate a selector for choosing a format in a form." in filter.module and test uncommenting "$output"-s. Note, that there are several of those for different purpouses.

There really should be somekind of ability to change theses obtions in admin panel... or at least somekind of tutorial in the FAQ... maybe someone could add at least my explanation to the faq, if there is no time to make a completed one.

PS:note, this also disables the /filter/tips page functionality.

Wiggles’s picture

Thanks allot! That did the trick! Appreciate that you took the time to help!

Marandb’s picture

Thank you VERY much for the tips. It was a huge help.

-- Marand B.

monjohn’s picture

I am also trying to customize comments. I am trying to create a module that will allow the user to vote on a node and comment on the vote in the comment section. I have two questions.

First, how do I get the node id number while in the comment?

Second, I would like to add the voting mechanism to the "add comment" page. I looked in the API and found the following code which I have tried to use:

function mymodule_comment ($comment, $op) {
  if ($op == 'insert' || $op == 'update') {
    //this is where I want to call my function that will allow them to vote
  }
}
 

When I add a comment, I don't see any difference.

Any suggestions?

Webinationstation’s picture

does anyone have a current fix for this issue? the filter.module looks different in drupal 6.x.x

zach harkey’s picture