Little different depending on the theme, but I'll use our themes as an example. Backup your theme first.
Put a file named blocks.php in the theme folder, paste the html from the blocks.html file the theme is currently using in there.
Then replace:
Code:
<font class="block-title">$title</font>
With:
Code:
<?php
if (!empty($title)) {
$img_name=explode(" ",$title);
$img_nametwo=$img_name[0];
if(file_exists("themes/YOUR_THEME/images/blocks/$img_nametwo.gif")) {
echo "<IMG SRC=\"themes/YOUR_THEME/images/blocks/$img_nametwo.gif\">";
} else {
echo "<font class=\"blocktitle\">$title";
}
}
?>
And replace:
Code:
<font class="content">$content</font>
With:
Code:
<?php
echo "<font class=\"content\">$content</font>\n"
?>
Then in your theme.php replace:
Code:
function themesidebox($title, $content) {
if (@file_exists($content)) {
$fp = fopen ($content, "r");
$content = fread($fp, filesize($content));
fclose ($fp);
$content = "?>$content<?";
$content = eval($content);
} else if (eregi("^http", $content)) {
$fp = fopen ($content, "r");
$content = fread($fp, 65535);
fclose ($fp);
}
$tmpl_file = "themes/YOUR_THEME/blocks.html";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;
}
With:
Code:
function themesidebox($title, $content) {
include("themes/YOUR_THEME/blocks.php");
}
Make up your block title image gifs, and put them in themes\YOUR_THEME\images\blocks. The name of the block must match the name of the image (name the block modules and it will look for modules.gif). All references to YOUR_THEME need to be changed to your theme name.