Perhaps someone with an eye for php and the latest nightlies could look at this. I used to have this script which would show an image/icon when the post belonged to one of four possible categories. But now it's not working anymore. When I echo $categoryname; it will give a list of áll the categories, resulting in a wrong picturename, like cat1cat2cat3.gif, so showing nothing at all.
<?php
function the_category_image() {
$categories = get_the_category();
foreach ($categories as $category) {
echo $category->cat_name;
$category->cat_name = stripslashes($category->cat_name);
$categoryname = $category->cat_name;
$picture = $categoryname.".gif";
$dirname = 'http://www.spoenk.nl/weblog-beta/plaatjes/';
switch($categoryname) {
case 'groot':
$alt = 'grotere afbeelding beschikbaar';
break;
case 'interactief':
$alt = 'min of meer interactief';
break;
case 'geluid':
$alt = 'geluid toegevoegd';
break;
case 'video':
$alt = 'videofragment';
break;
}
if(file_exists($dirname.$picture)) {
echo "<img src=\"".$dirname.$picture."\" alt=\"".$alt."\" title=\"".$alt."\">";
} else {
}
}
}
?>