You are here

function smileys_admin_settings in Smileys 5

Same name and namespace in other branches
  1. 6 smileys.admin.inc \smileys_admin_settings()
1 string reference to 'smileys_admin_settings'
smileys_menu in ./smileys.module
Implementation of hook_menu().

File

./smileys.module, line 276

Code

function smileys_admin_settings() {
  $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 widget-box settings'),
  );
  $form['smileys_widgetbox']['smileys_enable_widget'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Smileys Popup box'),
    '#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_widget', 0),
  );
  return system_settings_form($form);
}