function vkxp_admin_node_settings in VK CrossPoster 7
Same name and namespace in other branches
- 6 vkxp.admin.inc \vkxp_admin_node_settings()
- 6.2 vkxp.admin.inc \vkxp_admin_node_settings()
Page callback. Return form with node settings.
1 string reference to 'vkxp_admin_node_settings'
- vkxp_menu in ./
vkxp.module - Implements hook_menu().
File
- ./
vkxp.admin.inc, line 149 - Contains vkxp settings forms.
Code
function vkxp_admin_node_settings() {
$form = array();
$form['node_types'] = array(
'#type' => 'fieldset',
'#title' => t('Node types'),
);
$form['node_types']['vkxp_node_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Node types to crosspost'),
'#options' => node_type_get_names(),
'#default_value' => variable_get('vkxp_node_types', array()),
);
$form['vkxp_body'] = array(
'#type' => 'fieldset',
'#title' => t('Messages'),
);
$form['vkxp_body']['vkxp_post_object'] = array(
'#type' => 'select',
'#title' => t('Message body'),
'#description' => t('Select what to post as wall message'),
'#options' => array(
'title' => t('Node title'),
'body' => t('Node body'),
'title_body' => t('Node title and node body'),
),
'#default_value' => variable_get('vkxp_post_object', 'body'),
);
$form['vkxp_body']['vkxp_cut_message'] = array(
'#type' => 'checkbox',
'#title' => t('Cut message'),
'#default_value' => variable_get('vkxp_cut_message', 1),
);
$form['vkxp_body']['vkxp_cut_message_length'] = array(
'#type' => 'textfield',
'#title' => t('Cut if message length more than'),
'#field_suffix' => t('symbols'),
'#size' => 4,
'#default_value' => variable_get('vkxp_cut_message_length', 255),
);
return system_settings_form($form);
}