function talk_admin_form in Talk 7
Same name and namespace in other branches
- 5 talk.module \talk_admin_form()
- 6 talk.module \talk_admin_form()
Menu call back for admin form.
1 string reference to 'talk_admin_form'
- talk_menu in ./
talk.module - Implementation of hook_menu().
File
- ./
talk.module, line 85 - Comments are displayed in a separate 'talk' tab, for node types you wish
Code
function talk_admin_form() {
$form = array();
if (module_exists('help')) {
$token_list_link = l(t('View token list'), 'admin/help/token', array(
'attributes' => array(
'target' => '_blank',
),
));
}
else {
$token_list_link = '';
}
$form['talk_page'] = array(
'#type' => 'textfield',
'#title' => t('Title of the "talk" page'),
'#default_value' => talk_title(NULL, 'page'),
'#description' => t('If token is enabled, you can use tokens like [node:title] or [node:nid]. ' . $token_list_link),
);
$form['talk_link'] = array(
'#type' => 'textfield',
'#title' => t('Link from the node "links" to the "talk" page'),
'#default_value' => talk_title(NULL, 'link'),
'#description' => t('If token is enabled, you can use tokens like [node:title] or [node:nid]. Leave blank to disable. ' . $token_list_link),
);
$form['talk_tab'] = array(
'#type' => 'textfield',
'#title' => t('Link from the node "tab" to the "talk" page'),
'#default_value' => talk_title(NULL, 'tab'),
'#description' => t('If token is enabled, you can use tokens like [node:title] or [node:nid]. ' . $token_list_link),
);
$form['talk_page_no_comments'] = array(
'#type' => 'checkbox',
'#title' => t('Display a "talk" page if there are no comments'),
'#default_value' => variable_get('talk_page_no_comments', TRUE),
'#description' => t('If the talk page is shown when there are no comments, users will be able to add new comments from the talk page even when there are no comments; otherwise, comments will have to be added in a different method, such as via the "add new comment" link on nodes.'),
);
$form['talk_addcmnt_teaser'] = array(
'#type' => 'checkbox',
'#title' => t('Display comment summary in teasers'),
'#default_value' => variable_get('talk_addcmnt_teaser', TRUE),
'#description' => t('If checked, then the comment summary (# of comments, # of new comments, "Add new comment") links will be displayed for node teasers. [Default: ON]'),
);
return system_settings_form($form);
}