Thanks to this tutorial, I cam up with this block-generating module:
function myblockmodule_block_info(){
$block['myadblocks'] = array(
'info' => t('My first ad blcoks'),
'cache' => DRUPAL_NO_CACHE,
);
return $block;
}
/**
* Define what our block is going to look like.
* Implements hook_block_view().
*/
function myblockmodule_block_view($block_key){
$block = array();
if($block_key == 'myadblocks'){ //We only want to define the content of OUR block
//This is the title of the block.
$block['subject'] = t('First ad block comes here');
//Define the block content.
$block['content'] = 'some fancy script comes here';
}
return $block;
}
I am wondering how to extend the module to create 2 blocks instead of one?