function smileys_admin_settings in Smileys 6
Same name and namespace in other branches
- 5 smileys.module \smileys_admin_settings()
1 string reference to 'smileys_admin_settings'
- smileys_menu in ./
smileys.module - Implementation of hook_menu().
File
- ./
smileys.admin.inc, line 23
Code
function smileys_admin_settings() {
_smileys_check_filter();
$form = array();
$form['smileys_selectbox'] = array(
'#type' => 'fieldset',
'#title' => t('Smileys select-box settings'),
);
$form['smileys_selectbox']['smileys_enable_for'] = array(
'#type' => 'markup',
'#value' => '<strong>' . t('Enable smileys select box for:') . '</strong>',
);
$form['smileys_selectbox']['smileys_enable_for_nodes'] = array(
'#type' => 'checkbox',
'#title' => t('Nodes'),
'#default_value' => variable_get('smileys_enable_for_nodes', 0),
);
$form['smileys_selectbox']['smileys_enable_for_comments'] = array(
'#type' => 'checkbox',
'#title' => t('Comments'),
'#default_value' => variable_get('smileys_enable_for_comments', 0),
);
$form['smileys_selectbox']['smileys_node_types_content'] = array(
'#type' => 'checkboxes',
'#title' => t('On the following node types'),
'#description' => t('Select the node types you want to enable Smileys select-box for.'),
'#default_value' => variable_get('smileys_node_types_content', array()),
'#options' => node_get_types('names'),
);
$form['smileys_selectbox']['smileys_select_box_expanded'] = array(
'#type' => 'checkbox',
'#title' => t('Expand select-box fieldset by default'),
'#default_value' => variable_get('smileys_select_box_expanded', TRUE),
);
$form['smileys_widgetbox'] = array(
'#type' => 'fieldset',
'#title' => t('Smileys dialog window settings'),
);
$form['smileys_widgetbox']['smileys_enable_dialog'] = array(
'#type' => 'checkbox',
'#title' => t('Enable Smileys dialog window'),
'#description' => t('Adds a <em>[more...]</em> link to the end of smileys in select box, which when clicked, opens an inline widget to insert smileys. The widget is an inline popup like approach, allowing ease of usability.'),
'#default_value' => variable_get('smileys_enable_dialog', TRUE),
);
$form['smileys_widgetbox']['smileys_dialog_titles'] = array(
'#type' => 'checkbox',
'#title' => t('Enable Titles in dialog window'),
'#description' => t('Groups smileys under their package name.'),
'#default_value' => variable_get('smileys_dialog_titles', TRUE),
);
$form['smileys_widgetbox']['smileys_dialog_draggable'] = array(
'#type' => 'checkbox',
'#title' => t('Make the popup dialog draggable'),
'#default_value' => variable_get('smileys_dialog_draggable', FALSE),
);
$form['smileys_widgetbox']['smileys_dialog_resizable'] = array(
'#type' => 'checkbox',
'#title' => t('Make the popup dialog resizable'),
'#default_value' => variable_get('smileys_dialog_resizable', FALSE),
);
$form['smileys_widgetbox']['smileys_dialog_height'] = array(
'#type' => 'textfield',
'#title' => t('Dialog height (in pixels)'),
'#description' => t('Enter a value between 200 and 650. Enter <em>0</em> for automatic height (recommended).'),
'#size' => 5,
'#required' => TRUE,
'#default_value' => variable_get('smileys_dialog_height', 0),
);
$form['smileys_widgetbox']['smileys_dialog_width'] = array(
'#type' => 'textfield',
'#title' => t('Dialog width (in pixels)'),
'#description' => t('Enter a value between 200 and 650.'),
'#size' => 5,
'#required' => TRUE,
'#default_value' => variable_get('smileys_dialog_width', 400),
);
return system_settings_form($form);
}