If you want to have a default icon that shows for all categories that don’t have a specific icon, put this else in:
else {
$filename = $icon_url . “General” . $icon_ext;
$content .= “<img class=’caticon’ src='” . $icon_dir . $filename . “‘”;
$content .= ” align='” . $icon_align;
$content .= “‘ alt='” . $cat_to_use . ” Icon’ />\n”;
$text = $content . $text;
}
between $text = $content . $text;
}
and
return $text;
in the original code.
Replace the word General with the category icon you want to use.
so the final if looks like this:
if(file_exists($icon_path . $cat_to_use . $icon_ext))
{
$filename = $icon_url . $cat_to_use . $icon_ext;
$content .= “<img class=’caticon’ src='” . $icon_dir . $filename . “‘”;
$content .= ” align='” . $icon_align;
$content .= “‘ alt='” . $cat_to_use . ” Icon’ />\n”;
$text = $content . $text;
} else {
$filename = $icon_url . “General” . $icon_ext;
$content .= “<img class=’caticon’ src='” . $icon_dir . $filename . “‘”;
$content .= ” align='” . $icon_align;
$content .= “‘ alt='” . $cat_to_use . ” Icon’ />\n”;
$text = $content . $text;
}
return $text;