In the mod flexcontent, I want to make it so that instead of getting the lastimage in the content, it gets the cbavatar. Any ideas?
Here is the code:
[code:1] $imageurl = NULL;
$imagealt = NULL;
if ($lastimage){
$item->images = explode( "\n", $item->images );
$item->lastimage = end($item->images);
$item->lastimage = explode ("|", $item->lastimage);
if($debug){
echo "<pre>";
print_r($item->lastimage);
echo "</pre>";
}
$imageurl=$item->lastimage[0];
if (count($item->lastimage)>2){
$imagealt=$item->lastimage[2];
}else{
$imagealt="";
}
}
[/code:1]