This is my first module to write. It is suppose to create a block for a Yahoo ranking list.
I thought that this code and using Hook_block() will make this block show up within the Block Setup List Page. However, it is not.
I am not an expert in the code, but I am trying to find my way around within all the Jumboo-Mumboo :)
Please let me know what I am missing. If I would like to add more code from Yahoo, where should I insert this code.
<?php
// $Id$
/**
* @file
* Implements various blocks Blocks for listing yahoo rank..
*/
/**
* Implementation of hook_block().
*/
function approval_block($op = 'list' , $delta = 0, $edit = array()) {
switch ($op) {
case 'list':
$blocks[0]['info'] = t('Yahoo Rank');
$blocks[0]['cache'] = BLOCK_NO_CACHE;
return $blocks;
}
}
Thank you for your help.
Comments
I wonder if its because you
I wonder if its because you have not implemented the 'view' op.
I am not sure what you mean
No I don't know what you mean
Check the manual page for
Check the manual page for hook_block, from there you can find this example: http://api.drupal.org/api/function/block_example_block/6
See how it implements both
case 'list':andcase 'view':. Try implementing the later and just providing some dummy content.