function share42_block_configure in Share42 - social sharing buttons 7
Implements hook_block_configure().
File
- ./
share42.module, line 38 - Main file for the Share42 module.
Code
function share42_block_configure($delta = '') {
if ($delta == 'share42') {
$form = array();
$form['share42_top1'] = array(
'#title' => t('Offset without scroll'),
'#description' => t('Distance from the top of the page to the "sticky" panel (in pixels).'),
'#default_value' => variable_get('share42_top1', 200),
);
$form['share42_top2'] = array(
'#title' => t('Offset with scroll'),
'#description' => t('Distance from the top of the visible area of the page to the floating panel (in pixels).'),
'#default_value' => variable_get('share42_top2', 50),
);
$form['share42_margin'] = array(
'#title' => t('Horizontal margin'),
'#description' => t('Horizontal displacement of the panel. If you want to move it to the left, for example, by 70 pixels, set the value to "-70", but if you want to move it to the right, for example, by 50 pixels, set this value to "50".'),
'#default_value' => variable_get('share42_margin', -70),
);
foreach ($form as $key => $value) {
$form[$key]['#type'] = 'textfield';
$form[$key]['#size'] = 3;
$form[$key]['#maxlength'] = 4;
$form[$key]['#element_validate'] = array(
'element_validate_number',
);
}
return $form;
}
}