function _language_sections_settings in Language Sections 6
Same name and namespace in other branches
- 5 language_sections.module \_language_sections_settings()
- 6.2 language_sections.module \_language_sections_settings()
- 7.2 language_sections.module \_language_sections_settings()
1 call to _language_sections_settings()
File
- ./
language_sections.module, line 109
Code
function _language_sections_settings($mod_id, $mod_name, $prefix, $def_pattern) {
//require_once(dirname(__FILE__) . '/help.html');
$form[$mod_id] = array(
'#type' => 'fieldset',
'#title' => t($mod_name),
'#collapsible' => TRUE,
);
/*
$form[$mod_id]['help'] = array(
'#type' => 'markup',
'#value' => '<p>Help goes here.</p>',
);
*/
$field = $prefix . 'cache';
$form[$mod_id][$field] = array(
'#type' => 'checkbox',
'#title' => t("Allow caching"),
'#default_value' => variable_get($field, FALSE),
'#description' => t("Allow the filtered text to be cached by the Drupal core, which may improve site performance. NOTE: Depending on your site configuration, this may cause text for the wrong language to be displayed. Even if this is set, other modules might still prevent the text from being cached."),
);
$field = $prefix . 'alt';
$use_alt = variable_get($field, FALSE);
$form[$mod_id][$field] = array(
'#type' => 'checkbox',
'#title' => t("Use alternative pattern"),
'#default_value' => $use_alt,
'#description' => t("If set, {$mod_name} can be defined using the pattern given below. Otherwise, the default pattern will be used."),
);
$field = $prefix . 'pattern';
$form[$mod_id][$field] = array(
'#type' => 'textfield',
'#title' => t("Alternative pattern"),
'#size' => 64,
'#maxlength' => 128,
'#default_value' => $use_alt ? variable_get($field, $def_pattern) : $def_pattern,
'#description' => t("If enabled above, this pattern will be used for finding the {$mod_name} in the text. Initially, this is set to the {$mod_name} module's internal default. NOTE: You should not change the number of parenthesised groups in the expression."),
);
return $form;
}