Login

Drupal 5.x: hide input filter tips

stplanken | October 29, 2008 - 22:43 | 3 years ago

Since I only allow plain text to be entered in comment forms, I wanted to hide the filter tips that are displayed on the comment form. You can accomplish that by adding two functions to your template.php:

<?php
/*
*hide input filter tips
*/
function phptemplate_filter_tips($format, $long = FALSE) {
  return
'';
}
function
phptemplate_filter_tips_more_info() {
  return
'';
}
?>

If you already have an existing template.php file in your theme folder, omit the &lt;?php and ?&gt; and add both functions.

Both functions override theme functions in filter.module. The function phptemplate_filter_tips() overrides theme_filter_tips() that returns the actual help text displayed for each filter. We simply replace it with an empty string.

The function phptemplate_filter_tips_more_info() overrides theme_filter_tips_more_info() that displays the link to the help page.

Tags: Drupal, Drupal5

Post new comment

Image CAPTCHA
Enter the characters shown in the image.

Current weather Sundre

Current Conditions: 1.3°C

Observed at: Sundre Airport 07:00 AM MDT Saturday 19 May 2012
Temperature: 1.3°C
Pressure / Tendency: 102.1 kPa rising
Humidity: 83 %
Dewpoint: -1.4°C
Wind: WNW 4 km/h
Air Quality Health Index: N/A