function node_types_configure in Drupal 4
Menu callback; presents each node type configuration page.
1 string reference to 'node_types_configure'
- node_menu in modules/
node.module - Implementation of hook_menu().
File
- modules/
node.module, line 1252 - The core that allows content to be submitted to the site.
Code
function node_types_configure($type = NULL) {
if (isset($type)) {
$node = new stdClass();
$node->type = $type;
$form['submission'] = array(
'#type' => 'fieldset',
'#title' => t('Submission form'),
);
$form['submission'][$type . '_help'] = array(
'#type' => 'textarea',
'#title' => t('Explanation or submission guidelines'),
'#default_value' => variable_get($type . '_help', ''),
'#description' => t('This text will be displayed at the top of the %type submission form. It is useful for helping or instructing your users.', array(
'%type' => node_get_name($type),
)),
);
$form['submission']['minimum_' . $type . '_size'] = array(
'#type' => 'select',
'#title' => t('Minimum number of words'),
'#default_value' => variable_get('minimum_' . $type . '_size', 0),
'#options' => drupal_map_assoc(array(
0,
10,
25,
50,
75,
100,
125,
150,
175,
200,
)),
'#description' => t('The minimum number of words a %type must be to be considered valid. This can be useful to rule out submissions that do not meet the site\'s standards, such as short test posts.', array(
'%type' => node_get_name($type),
)),
);
$form['workflow'] = array(
'#type' => 'fieldset',
'#title' => t('Workflow'),
);
$form['type'] = array(
'#type' => 'value',
'#value' => $type,
);
$form['array_filter'] = array(
'#type' => 'value',
'#value' => TRUE,
);
return system_settings_form($type . '_node_settings', $form);
}
else {
$header = array(
t('Type'),
t('Operations'),
);
$rows = array();
foreach (node_get_types() as $type => $name) {
$rows[] = array(
$name,
l(t('configure'), 'admin/settings/content-types/' . $type),
);
}
return theme('table', $header, $rows);
}
}