The block for onthisside sample module does not appear
chinni12 - March 23, 2008 - 15:21
I have followed instructions to create module "onthisside". I enabled module. I am able to go to "blocks" and selected right side bar in the drop down box. I guess this step in turn enables block. I changed to different page , but I can't see block. Is there any reason for "onthisside" not showing up?I even enabled permission for anonymous and authenticated users. I also created blog and changed date to 7 days back. Right now I copied contents for following methods into onthisdie.module file.
function onthisdate_block($op='list', $delta=0)
function onthisdate_help($path, $arg)

It would help if you showed
It would help if you showed the function onthisdate_block so people can see what it does.
The block for onthis date sample module does not appear
Thanks for quick reply. Since I got the code for "on this date" from drupal tutorial I did not post the code. Anyway, I just fixed the problem.
The following code caused problem to disappear block from the page.
if ($block_content == '') {
// no content from a week ago, return nothing.
return;
The sample assumes to create blog exactly one week back. I have not updated date of blog as exactly one week. As soon as I removed where clause in sql statement to display all links, it started showing the block. I had thought page will show block with subject and empty contents. The above code was executing all the time.I guess the sample should have returned some content as $block instead of empty return so that beginners can understand the problem.