function xbbcode_list_admin_settings in Extensible BBCode 5
Same name and namespace in other branches
- 8 xbbcode_list/xbbcode_list.module \xbbcode_list_admin_settings()
- 6 xbbcode_list/xbbcode_list.module \xbbcode_list_admin_settings()
- 7 xbbcode_list/xbbcode_list.module \xbbcode_list_admin_settings()
1 string reference to 'xbbcode_list_admin_settings'
- xbbcode_list_menu in xbbcode_list/
xbbcode_list.module
File
- xbbcode_list/
xbbcode_list.module, line 107
Code
function xbbcode_list_admin_settings() {
$form = array();
$form['xbbcode_list_default'] = array(
'#type' => 'radios',
'#title' => t("Default list type"),
'#description' => t("Choose whether [list] is numbered or non-numbered by default. Users can override the default by using [ul] or [ol]."),
'#options' => array(
'ol' => t("Numbered"),
'ul' => t("Non-numbered"),
),
'#default_value' => variable_get('xbbcode_list_default', 'ul'),
);
$form['ol'] = array(
'#type' => 'fieldset',
'#title' => t("Ordered list settings"),
'#collapsible' => true,
'#collapsed' => true,
'#description' => t("Configure how to display lists with numbered items."),
);
$form['ul'] = array(
'#type' => 'fieldset',
'#title' => t("Unordered list settings"),
'#collapsible' => true,
'#collapsed' => true,
'#description' => t("Configure how to display lists with numbered items."),
);
$form['ol']['xbbcode_list_ol_default'] = array(
'#type' => 'radios',
'#title' => t("Ordered list default"),
'#description' => t("Ordered lists will look like this by default. The style can be overridden with [ol=dotted] and [ol=levels]"),
'#options' => array(
'sectioned' => t("Sectioned: <br />" . "<ol class='sectioned'>" . " <li>Level 1" . " <ol class='sectioned'>" . " <li>Level 2" . " <ol class='sectioned'>" . " <li>Level 3</li>" . " <li>Level 3, 2</li>" . " </ol>" . " </li>" . " </ol>" . " </li>" . "</ol>" . "<strong>Sectioned lists require a browser with CSS 2.0 support.</strong>"),
'hierarchy' => t("Levels: <br />" . "<ol class='numeric'>" . " <li>Level 1" . " <ol class='lower-alpha'>" . " <li>Level 2" . " <ol class='lower-roman'>" . " <li>Level 3</li>" . " <li>Level 3, 2</li>" . " </ol>" . " </li>" . " </ol>" . " </li>" . "</ol>"),
),
'#default_value' => variable_get('xbbcode_list_ol_default', 'hierarchy'),
);
$form['ol']['xbbcode_list_ol_hierarchy'] = array(
'#type' => 'textfield',
'#title' => t("Style hierarchy"),
'#description' => t("Enter a comma-separated list of styles that will be used by nested lists. Valid styles are: upper-roman, lower-roman, numeric, upper-alpha, lower-alpha, none. Deeper levels will repeat the lowest level."),
'#default_value' => variable_get('xbbcode_list_ol_hierarchy', 'numeric, lower-alpha, lower-roman'),
'#autocomplete_path' => 'admin/settings/xbbcode/lists/autocomplete/ol',
);
return system_settings_form($form);
}