function weather_es_block in Weather_es 6.3
Same name and namespace in other branches
- 5 weather_es.module \weather_es_block()
- 6 weather_es.module \weather_es_block()
- 6.2 weather_es.module \weather_es_block()
@author jmsirvent
File
- ./
weather_es.module, line 353
Code
function weather_es_block($op = 'list', $delta = 0, $edit = array()) {
switch ($op) {
case 'list':
$blocks[0]['info'] = t('Weather_es: system-wide');
$blocks[1]['info'] = t('Weather_es: custom user');
return $blocks;
case 'configure':
return $form;
case 'view':
default:
//drupal_add_js(drupal_get_path('module', 'weather_es') .'/js/weather_es.js');
// System weather_es block
if ($delta == 0 and user_access('access content')) {
$title = t('System weather');
$content = block_weather_es_contents(0);
}
elseif ($delta == 1 and user_access('administer custom weather_es block')) {
$title = t('User weather');
$content = block_weather_es_contents(1);
}
$block['subject'] = $title;
$block['content'] = $content;
return $block;
}
}