function janrain_capture_form_node_type_form_alter in Janrain Registration 7.3
Same name and namespace in other branches
- 7.4 janrain_capture.module \janrain_capture_form_node_type_form_alter()
- 7.2 janrain_capture.module \janrain_capture_form_node_type_form_alter()
File
- ./
janrain_capture.module, line 692 - This module implements authentication endpoints for Janrain Capture.
Code
function janrain_capture_form_node_type_form_alter(&$form, &$form_state) {
$type = $form['#node_type']->type;
$group = 'janrain_capture_share';
$form[$group] = array(
'#type' => 'fieldset',
'#title' => t('Janrain Social Share'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
'#weight' => 25,
'#group' => 'additional_settings',
);
$form[$group]['content_title'] = array(
'#type' => 'markup',
'#title' => t('Content title'),
'#markup' => t('<strong>CONTENT</strong>'),
);
$sgroup = 'share_button';
$form[$group][$sgroup] = array(
'#type' => 'fieldset',
'#title' => t('Share button settings'),
'#description' => t('Display the content "share" button in the following locations for this content type:'),
);
$name = $group . '_teasers';
$vname = $name . '_' . $type;
$form[$group][$sgroup][$name] = array(
'#type' => 'checkbox',
'#title' => t('Teasers'),
'#default_value' => variable_get($vname, 0),
);
$name = $group . '_nodelink';
$vname = $name . '_' . $type;
$form[$group][$sgroup][$name] = array(
'#type' => 'checkbox',
'#title' => t('Links area'),
'#default_value' => variable_get($vname, 0),
);
$name = $group . '_nodecont';
$vname = $name . '_' . $type;
$form[$group][$sgroup][$name] = array(
'#type' => 'checkbox',
'#title' => t('Content region'),
'#default_value' => variable_get($vname, 0),
);
$name = $group . '_weight';
$vname = $name . '_' . $type;
$form[$group][$sgroup][$name] = array(
'#type' => 'weight',
'#title' => t('Weight for "share" button'),
'#title_display' => 'invisible',
'#default_value' => variable_get($vname, 40),
'#delta' => 50,
'#description' => t('Weight value for the "share" button displayed in content region.'),
);
$form[$group]['comments_title'] = array(
'#type' => 'markup',
'#title' => t('Comments title'),
'#markup' => t('<strong>COMMENTS</strong>'),
);
$sgroup = 'comments';
$form[$group][$sgroup] = array(
'#type' => 'fieldset',
'#title' => t('Comments settings'),
);
$name = $group . '_popup';
$vname = $name . '_' . $type;
$form[$group][$sgroup][$name] = array(
'#type' => 'checkbox',
'#title' => t('Automatically launch social sharing widget after comment submission'),
'#default_value' => variable_get($vname, 0),
);
$name = $group . '_attach';
$vname = $name . '_' . $type;
$form[$group][$sgroup][$name] = array(
'#type' => 'checkbox',
'#title' => t('Attach "share" link to comments'),
'#default_value' => variable_get($vname, 0),
);
}