How can I get rid of this strings near the comments form?

Aurum@drupal.ht... - August 9, 2006 - 08:49

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.

Try to disable the help

george@dynapres.nl - August 9, 2006 - 11:22

Try to disable the help module.

Disable tips in css

george@dynapres.nl - August 9, 2006 - 11:25

Or you could edit your css to include something like:

ul.tips {
  display: none;
}

Lost line...

Aurum@drupal.ht... - August 9, 2006 - 16:38

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

comment_form description

george@dynapres.nl - August 9, 2006 - 17:39

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.

It didn't work...

Aurum@drupal.ht... - August 9, 2006 - 18:29

It didn't work...

Oops, there were some more

george@dynapres.nl - August 9, 2006 - 20:17

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.

It worked!

Aurum@drupal.ht... - August 10, 2006 - 07:17

Thank you, gjmjr!

By the way, maybe sombody

Aurum@drupal.ht... - August 10, 2006 - 07:48

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

Probably the filter module,

shadowshifter - August 10, 2006 - 08:44

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 :)

Yep: filter.module, I also

george@dynapres.nl - August 10, 2006 - 14:35

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.

shadowshifter, thanks! the

Aurum@drupal.ht... - August 10, 2006 - 14:38

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

theme-based suggestions

rmiotke - August 15, 2006 - 04:52

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);
}

thank you! can I have some more?

Gabriel Radic - March 15, 2007 - 16:20

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.

Fix for Drupal 5.1

Gabriel Radic - March 15, 2007 - 16:28

OK, I figured it out.

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

<?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!

good fix is there any problem

cgjohnson - January 4, 2008 - 20:24

with it?

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

thanks!

 
 

Drupal is a registered trademark of Dries Buytaert.