Customize a block title
This snippet is aimed at someone who wants to change the titles of just one or two core or module blocks using Drupal 4.7. If there are a large number of block titles you want to change, a better approach is to use the locale module to substitute your preferred titles for the default titles.
Note that this functionality is provided through the Admin area in Drupal 5 and later.
To change a specific block title, you can add a conditional statement to your block template file. Here's an example for Drupal 4.7. This is a modification of the standard block.tpl.php that comes with Blumarine or other templates for the phptemplate engine. It changes the name of the "Navigation" block to "My Tools" and the "Who's online" block to "Who's Online".
<?php
if ($block->module == 'user' && $block->delta == 1) {
$block->subject = t('My Tools');
}
else if ($block->module == 'user' && $block->delta == 3) {
$block->subject = t('Who\'s Online');
}
?>
<div class="block block-<?php print $block->module ?>" id="block-<?php print $block->module ?>-<?php print $block->delta ?>">
<h2 class="title"><?php print $block->subject; ?></h2>
<div class="content"><?php print $block->content; ?></div>
</div>Note that some themes, like the box_grey theme, don't include their own block.tpl.php. There is a default file that's in the /engines/phptemplate folder. You can copy this to your theme folder and change it. You can also use what I have posted above. The only difference is that the default phptemplate version doesn't have the <div> shown as <div class="title">.
More helpful info on blocks is found here: http://drupal.org/node/11813
