View source
<?php
function contentanalysis_admin_settings() {
$params = array(
'title' => t('Default analyzers'),
'description' => t('Select the analyzers you want enabled by default.'),
);
$form['contentanalysis_default_analyzers'] = contentanalysis_get_analyzer_form_element($params);
$form['contentanalysis_analyzerchecklist'] = array(
'#type' => 'checkbox',
'#title' => t('Enable analyzer checklist report'),
'#default_value' => variable_get('contentanalysis_analyzerchecklist', 1),
);
$form['contentanalysis_node_edit_form_collapsed'] = array(
'#type' => 'checkbox',
'#title' => t('Collapse the content analysis fieldset on the node edit form'),
'#default_value' => variable_get('contentanalysis_node_edit_form_collapsed', 0),
);
$options = array(
'both' => t('Display both dialog and inline reports.'),
'dialog' => t('Display dialog report only.'),
'inline' => t('Display inline reports only.'),
'multibutton' => t('Provide buttons to enable the user to select report options.'),
);
$form['contentanalysis_node_report_display'] = array(
'#type' => 'radios',
'#title' => t('Node edit report style'),
'#options' => $options,
'#default_value' => variable_get('contentanalysis_node_report_display', 'both'),
'#description' => t('Select the style of report you would like when launching from the node edit form. Dialog is the standard modal report. Inline inserts recommendations directly into the node edit form.'),
);
$form['contentanalysis_node_parse_options'] = array(
'#type' => 'fieldset',
'#title' => t('Node parsing options'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['contentanalysis_node_parse_options']['contentanalysis_node_parse_nodetitle_prepend'] = array(
'#type' => 'checkbox',
'#title' => t('Prepend node title to body'),
'#default_value' => variable_get('contentanalysis_node_parse_nodetitle_prepend', 1),
'#description' => t('Most Drupal sites format node views by putting the node title as a page header above the node body. If your site is formatted this way, check this box. If node titles are not used as headers, uncheck the option.'),
);
$form['contentanalysis_node_parse_options']['contentanalysis_node_parse_nodetitle_tags'] = array(
'#type' => 'textfield',
'#title' => t('Node title tags'),
'#default_value' => variable_get('contentanalysis_node_parse_nodetitle_tags', '<h2>[node_title]</h2>'),
'#description' => t('If your node title is included on node views, include any formating tags it is enclosed within. Default is <h2>[node_title]</h2>'),
);
$form['contentanalysis_advanced'] = array(
'#type' => 'fieldset',
'#title' => $a . t('Advanced'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['contentanalysis_advanced']['contentanalysis_host'] = array(
'#type' => 'textfield',
'#title' => t('Host'),
'#description' => t('Use this field to enter an alternative url for the content analysis api ajax calls.'),
'#default_value' => variable_get('contentanalysis_host', ''),
);
$form = system_settings_form($form);
return $form;
}