PLEASE NOTE These snippets are user submitted. Use at your own risk. For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.
If you want the contents of a block to appear within a page you can use the following snippet:
To specify which block from which module, you simply edit the two following variables in the first line:
module_name = The name of the module
The number = Is the $delta of the block
For example to call the block on the Font Size module use:
Or for example to display who is a new user:
Showing more than the block body
Calls to $block['content'] only provide the block body. Here's 2 ways to provide more.
1. In comments, GWL shows how to wrap the $block data in divs. It also checks for empty content and hides empty blocks:
2. On a different page japanitrat shows how to call theme() function with a cast to object.
The theme call will provide the block wrapped in your theme's block.tpl output (assuming php template). However, it may not look exactly like a block in a given sidebar (say, block appearing in center content, but rendered as if a left sidebar block). Usually this difference comes from the absence of variables determining HTML and CSS styling written in the block.tpl file.
To make a block appear in one place, themed as if for another region, that would require inspection of your theme's template.php that is outside the scope here. For an example, review the Acquia Marina template.php, line 302, 'template_preprocess_block(), for where the 'rounded block' CSS class comes from, then triangulate with that theme's block.tpl.php.