Hi Crazy,
I haven't tested it, bt maybe you could try this:
// if an actor picture can be found, display it...
$cleanedActorName = ""
$cleanedActorName = cleanstring($roles["ActorName"]);
if (is_file ("photos/" . $cleanedActorName . ".png")) {
$roles["ActorPicture"] = $cleanedActorName . ".png";
elseif (is_file ("photos/" . substring($cleanedActorName,0,1) . "/" . $cleanedActorName . ".png")) {
$roles["ActorPicture"] = substring($cleanedActorName,0,1) . "/" . $cleanedActorName . ".png";
} else { // otherwise show a placeholder
$roles["ActorPicture"] = "noactor.png";
}
$roles["ActorLink"] = "?criteria1=actor&value1=" . $roles["ActorName"];
if ($ShowOnlyActorsWithPicture == 1 && $roles["ActorPicture"] == "noactor.png") {
} else {
$i++;
$actorsinrow++;
include($_SESSION["templatefolder"] . "/" . $template . ".tpl");
}
if ($i >= $ActorLimit && $ActorLimit != 0) {
break;
}
if (($actorsinrow == $ActorsPerLine)) {
echo $Seperator;
$actorsinrow = 0;
This searches also in a subfolder for the actor pictures named like the fist lette of the actor name, e.g. "B" for "Bruce Willis"...
As I do not have the foll code here, I'm not sure about case-sensitivity...
Best regards
ternot