function adsense_search_block_configure in Google AdSense integration 7
Implements hook_block_configure().
File
- old/
search/ adsense_search.module, line 77 - Displays Google AdSense ads on Drupal pages.
Code
function adsense_search_block_configure($delta) {
$ad = _adsense_search_get_block_config($delta);
$channel_list[''] = t('None');
for ($channel = 1; $channel <= ADSENSE_MAX_CHANNELS; $channel++) {
$channel_list[$channel] = $channel . ' : ' . variable_get('adsense_ad_channel_' . $channel, ADSENSE_AD_CHANNEL_DEFAULT);
}
$form['info'] = array(
'#type' => 'textfield',
'#title' => t('Block description'),
'#default_value' => $ad ? $ad[0] : '',
'#maxlength' => 64,
'#description' => t('A brief description of your block. Used on the <a href="@overview">block overview page</a>.', array(
'@overview' => url('admin/structure/block'),
)),
'#required' => TRUE,
'#weight' => -19,
);
$form['ad_channel'] = array(
'#type' => 'select',
'#title' => t('Channel'),
'#default_value' => $ad ? $ad[1] : '',
'#options' => $channel_list,
);
return $form;
}