function _quotes_admin_settings in Quotes 5
Displays the admin settings form.
1 string reference to '_quotes_admin_settings'
- quotes_menu in ./
quotes.module - Implementation of hook_menu().
File
- ./
quotes.module, line 1588
Code
function _quotes_admin_settings() {
$form = array();
$count = db_result(db_query("SELECT COUNT(*) FROM {node} n where n.type='quotes' AND n.status=1"));
$form['count'] = array(
'#type' => 'item',
'#value' => t('There are currently !count published quotations.', array(
'!count' => $count,
)),
);
$form['display'] = array(
'#type' => 'fieldset',
'#title' => t('Display Options'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#description' => t('These options are for general theming.'),
);
$form['display']['quotes_leader'] = array(
'#type' => 'textfield',
'#title' => t('Author leader'),
'#default_value' => variable_get('quotes_leader', '—'),
'#description' => t('The text placed before the author attribution (e.g. "—" for an em-dash or "•" for a bullet).'),
);
$form['display']['quotes_author_link'] = array(
'#type' => 'checkbox',
'#title' => t('Make author a link'),
'#default_value' => variable_get('quotes_author_link', FALSE),
'#description' => t('If selected, the author text will be a link to show all quotes by that author.'),
);
$form['display']['quotes_author_bio'] = array(
'#type' => 'radios',
'#options' => array(
0 => t("Don't display"),
1 => t('Include text'),
2 => t('Include as a link'),
),
'#title' => t("Include author's bio"),
'#default_value' => variable_get('quotes_author_bio', FALSE),
'#description' => t("If selected, the author's biography will be shown on the Quotes page."),
);
$form['display']['quotes_per_page'] = array(
'#type' => 'textfield',
'#title' => t('Quotes per page'),
'#size' => 6,
'#default_value' => variable_get('quotes_per_page', 10),
'#description' => t('The number of quotes included on a page.'),
);
$form['display']['quotes_edit_link'] = array(
'#type' => 'checkbox',
'#title' => t('Add an "edit" link'),
'#default_value' => variable_get('quotes_edit_link', TRUE),
'#description' => t('If selected, an "edit" link will be shown for each quote.'),
);
$form['myquotes'] = array(
'#type' => 'fieldset',
'#title' => t('My Quotes links'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['myquotes']['quotes_showlink'] = array(
'#type' => 'checkbox',
'#title' => t('Show link to users\' quotes'),
'#default_value' => variable_get('quotes_showlink', TRUE),
'#description' => t('Uncheck this to disable the link to each users\' "my quotes" page when viewing a node.'),
);
$form['myquotes']['quotes_show_myquotes'] = array(
'#type' => 'checkbox',
'#title' => t('Show the "my quotes" menu item'),
'#default_value' => variable_get('quotes_show_myquotes', 1),
'#description' => t('Uncheck this to disable the "my quotes" menu item for all users.'),
);
$form['user'] = array(
'#type' => 'fieldset',
'#title' => t('User Options'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#description' => t('These options are for users.'),
);
$form['user']['quotes_user_recent'] = array(
'#type' => 'checkbox',
'#title' => t('Add a "Recent quotes" link on the "My account" page?'),
'#default_value' => variable_get('quotes_user_recent', flase),
);
return system_settings_form($form);
}