Programmatically place blocks?
To alter the region where blocks defined by other modules are placed, you can implement hook_block_info_alter(), which receives the following arguments:


$blocks (passed by reference): the array containing the block definitions, keyed by module, and delta
$theme: the theme for which the blocks are being defined
$code_blocks: the blocks as defined from the hook_block_info() implementations, before their values are overridden by the values obtained from the database