? modules/filter/.filter.module.marks Index: modules/filter/filter.module =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v retrieving revision 1.132 diff -u -p -r1.132 filter.module --- modules/filter/filter.module 7 Aug 2006 15:04:14 -0000 1.132 +++ modules/filter/filter.module 9 Aug 2006 01:25:22 -0000 @@ -41,18 +41,17 @@ function filter_help($section) {

Note that (1) the default format is always available to all roles, and (2) all filter formats can always be used by roles with the "administer filters" permission even if they are not explicitly listed in the Roles column of this table.

'); case 'admin/settings/filters/'. arg(3): - return t(' -

Every filter performs one particular change on the user input, for example stripping out malicious HTML or making URLs clickable. Choose which filters you want to apply to text in this input format.

-

If you notice some filters are causing conflicts in the output, you can rearrange them.

', array('%rearrange' => url('admin/settings/filters/'. arg(3) .'/order'))); + $output = '

'. t('Every filter performs one particular change on the user input, for example stripping out malicious HTML or making URLs clickable. Choose which filters you want to apply to text in this input format.'). '

'; + $output .= '

'. t('If you notice some filters are causing conflicts in the output, you can rearrange them.', array('%rearrange' => url('admin/settings/filters/'. arg(3) .'/order'))). '

'; + return $output; case 'admin/settings/filters/'. arg(3) .'/configure': - return t(' -

If you cannot find the settings for a certain filter, make sure you\'ve enabled it on the view tab first.

', array('%url' => url('admin/settings/filters/'. arg(3)))); + return '

'. t('If you cannot find the settings for a certain filter, make sure you\'ve enabled it on the view tab first.', array('%url' => url('admin/settings/filters/'. arg(3)))). '

'; case 'admin/settings/filters/'. arg(3) .'/order': - return t(' -

Because of the flexible filtering system, you might encounter a situation where one filter prevents another from doing its job. For example: a word in an URL gets converted into a glossary term, before the URL can be converted in a clickable link. When this happens, you will need to rearrange the order in which filters get executed.

-

Filters are executed from top-to-bottom. You can use the weight column to rearrange them: heavier filters \'sink\' to the bottom.

'); + $output = '

'. t('Because of the flexible filtering system, you might encounter a situation where one filter prevents another from doing its job. For example: a word in an URL gets converted into a glossary term, before the URL can be converted in a clickable link. When this happens, you will need to rearrange the order in which filters get executed.'). '

'; + $output .= '

'. t('Filters are executed from top-to-bottom. You can use the weight column to rearrange them: heavier filters \'sink\' to the bottom.'). '

'; + return $output; } } @@ -447,13 +446,12 @@ function filter_admin_format_form($forma // Composition tips (guidelines) $tips = _filter_tips($format->format, FALSE); - $extra = l(t('More information about formatting options'), 'filter/tips'); - $tiplist = theme('filter_tips', $tips, FALSE, $extra); + $tiplist = theme('filter_tips', $tips, FALSE); if (!$tiplist) { - $tiplist = t('

No guidelines available.

'); + $tiplist = '

'. t('No guidelines available.').'

'; } - $group = t('

These are the guidelines that users will see for posting in this input format. They are automatically generated from the filter settings.

'); - $group .= $tiplist; + $group = '

'. t('These are the guidelines that users will see for posting in this input format. They are automatically generated from the filter settings.').'

'; + $group .= $tiplist . theme('filter_tips_more_info');; $output = '

'. t('Formatting guidelines') .'

'. $group; } $output = drupal_get_form('filter_admin_format_form', $form) . $output; @@ -799,7 +797,7 @@ function filter_form($value = FILTER_FOR $value = filter_resolve_format($value); $formats = filter_formats(); - $extra = l(t('More information about formatting options'), 'filter/tips'); + if (count($formats) > 1) { $form = array( @@ -829,12 +827,12 @@ function filter_form($value = FILTER_FOR $tips = _filter_tips(variable_get('filter_default_format', 1), FALSE); $form['format']['guidelines'] = array( '#title' => t('Formatting guidelines'), - '#value' => theme('filter_tips', $tips, FALSE, $extra), + '#value' => theme('filter_tips', $tips, FALSE), ); } $form[] = array( '#type' => 'markup', - '#value' => $extra, + '#value' => theme('filter_tips_more_info'), ); return $form; } @@ -912,7 +910,7 @@ function _filter_tips($format, $long = F * * @ingroup themeable */ -function theme_filter_tips($tips, $long = FALSE, $extra = '') { +function theme_filter_tips($tips, $long = FALSE) { $output = ''; $multiple = count($tips) > 1; @@ -952,6 +950,16 @@ function theme_filter_tips($tips, $long } /** + * Format a link to the more extensive filter tips. + * + * @ingroup themeable + */ + +function theme_filter_tips_more_info () { + return '

'. l(t('More information about formatting options'), 'filter/tips'). '

'; +} + +/** * @name Standard filters * @{ * Filters implemented by the filter.module.