Hi!
Tell me please, how can I get rid of this strings near the comments form:

    * Web and e-mail addresses are automatically converted into links.
    * Allowed HTML tags: <h1> <h2> <h3> <h4> <h5> <h6> <em> <strong> <code> <del> <blockquote> <q> <sub> <p> <br> <pre> <ul> <ol> <li> <dl> <dt> <dd> <a> <b> <u> <i> <sup>
    * Lines and paragraphs break automatically.
    * You may post code using bla-bla-bla tags.

More information about formatting options

I want only "Preview" and "Submit" buttons were placed under the comments form.

Comments

mo6’s picture

Try to disable the help module.

mo6’s picture

Or you could edit your css to include something like:

ul.tips {
  display: none;
}
Aurum@drupal.htdogs.ru’s picture

Thank you, gjmjr, it worked. But how can I remove the line "More information about formatting options" ?

mo6’s picture

Missed that:

  #comment_form div.form-item div.description {
    display: none;
  }

should do the trick, in Drupal 4.7. It seems that in Drupal 4.6 the comment form lacks a proper id to easily select the description.

Aurum@drupal.htdogs.ru’s picture

It didn't work...

mo6’s picture

Oops, there were some more changes from 4.6 to 4.7. That's nasty, there's no way to differentiate the line in the form. You could try to filter all links in the comment_form. That could have some side effects on other links embedded in forms, so this is far from ideal:

 #comment_form a {
    display: none;
  }

Of course, if only IE6 was more CSS2-compliant life would be a lot easier.

Aurum@drupal.htdogs.ru’s picture

Thank you, gjmjr!

Aurum@drupal.htdogs.ru’s picture

By the way, maybe sombody knows non-CSS's way to do it? Which files must be edited?

ryivhnn’s picture

Probably the filter module, at a guess. I don't advise hacking modules unless it's an absolute last resort though, otherwise you have to hack them again when you upgrade, and sometimes old hacks won't work with new upgraded modules :)

works at bekandloz | plays at technonaturalist

mo6’s picture

Yep: filter.module, I also wouldn't patch it. Once you start patching you'll lose track of your changes and this will be a great pain when the next security update of Drupal is released.

Aurum@drupal.htdogs.ru’s picture

shadowshifter, thanks! the problem is resolved!
I hacked the filter and the comment modules.

rmiotke’s picture

for hiding filter tips, always and everywhere, in template.php you can add:

function phptemplate_filter_tips($tips, $long = false, $extra = '') {
return '';
}

and for hiding that extra stupid link for more help on formatting options, the easiest solution i think, though it still requires hardcoding, is adding the following to template.php:

function phptemplate_markup($element) {
if ($element['#value'] == l(t('More information about formatting options'), 'filter/tips')) return '';
return theme_markup($element);
}

Gabriel R.’s picture

Hello rmiotke,

thanks for the suggestion It worked for the input format tips, but not for the "More information ..." link.

Any ideas would be appreciated.

Thanks again.

PS: Customizing the template is much more sane than touching the core modules.

Gabriel R.’s picture

OK, I figured it out.

In Drupal 5.1, to remove the "More information ..." line, add the following line of code to template.php:

 function phptemplate_markup($element) {
if ($element['#value'] == '<p>'.l(t('More information about formatting options'),'filter/tips').'</p>') return '';
return theme_markup($element);
} 

Notice the extra <p> tags!

cgjohnson’s picture

with it?

Any updated, non-hack way to hide filter and formatting options text?

thanks!

ShannonK’s picture

Since these posts are so old, I'm wondering if now there is another way to do this?

I have Drupal version 6.14

john.kenney’s picture

I use the following in my 6.x template.php file:

function themename_filter_tips($tips, $long = FALSE, $extra = '') {
  global $user;
  module_load_include("inc", "filter", "filter.pages");
  return ($user->uid == 1) ? theme_filter_tips($tips, $long, $extra) : '';
}
function themename_filter_tips_more_info () {
  global $user;
  return ($user->uid == 1) ? theme_filter_tips_more_info() : '';
}

change 'themename' to your themename.

Someone else wrote it for me, so I can't completely explain how it works (i.e., i think there may be some extra code bits that aren't strictly required), but it removes the tips.

dn2012’s picture

Where can I find this fix in Drupal 7.x?

dn2012’s picture

I'd like to know how to do remove the comment tips on the bottom whenever someone types a comment-it's bulky and unnecessary.

The solutions listed don't seem to work because they're older versions of Drupal. Is there a fix on Drupal 7.x?

ryivhnn’s picture

Try

  function [theme_name]_form_comment_form_alter(&$form, &$form_state, $form_id)
  {
    $form['comment_body']['#after_build'][] = 'remove_tips';
  }
 
  function remove_tips(&$form)
  {
    unset($form['und'][0]['format']['guidelines']);
    unset($form['und'][0]['format']['help']);
    return $form;
  }

in your template.php or Simplify depending on whether you want a module or are happy to hack. If you do the template.php thing you will still have to hide the select box with css, I haven't yet found a way to unset it without destroying the editor :)

works at bekandloz | plays at technonaturalist