Posted by Drupal_is_amazing on March 12, 2009 at 10:35am
| Project: | Flexifilter |
| Version: | 6.x-1.2 |
| Component: | Code - Components |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
I often find myself wanting to have a short string of text be replaced with a large amount of static html code. Unfortunately, the simple search and replace component only has a short text field
In 'flexifilter.components.inc', line 173, I modified the function flexifilter_component_text_simple_replace:
original:
<?php
$form['replace'] = array(
'#type' => 'textfield',
'#title' => t('Replacement text'),
'#default_value' => isset($settings['replace']) ? $settings['replace'] : '',
'#required' => FALSE,
);
?>Replacement:
<?php
$form['replace'] = array(
'#type' => 'textarea',
'#title' => t('Replacement text'),
'#default_value' => isset($settings['replace']) ? $settings['replace'] : '',
'#required' => FALSE,
);
?>This just changes the textfield to a textarea, thereby allowing longer replacements.
Might be worth incorporating this change in the next version of Flexifilter-- a textarea can always hold a shorter section, but a textfield can't easily hold a larger.
Comments
#1
+1
#2
+1
#3
Patched attached.
#4