Dear SmartAddons,
Thank you for your eMail.
Like I said, I am not a php programmer, but a conceptual thinker.
And I think that I have a simple solution.
I am assuming that Joomla!/K2 is storing the K2 top image in another than the images in the text that are places with the content editor.
So, in the php code that you already sent me - see below - you only have to check if there is a K2 Top Image stored. So, if I am correct, you only need to change this:
if(!empty($item['thumb'])){
$tmp[] = $item;
}
I hope to hear from you soon.
Sunny regards,
Willem
This is the code that you already sent me:
--------------------------------------------------------
function update($items){
$tmp = array();
foreach ($items as $key => $item) {
if (!isset($item['sub_title'])) {
$item['sub_title'] = $this->cutStr($item['title'], $this->max_title);
}
if (!isset($item['sub_main_content'])) {
$item['sub_main_content'] = $this->cutStr($item['content'], $this->max_main_description);
}
if (!isset($item['sub_normal_content'])) {
$item['sub_normal_content'] = $this->cutStr($item['content'], $this->max_normal_description);
}
if (!isset($item['thumb']) && $item['img'] != '') {
$item['thumb'] = $this->processImage($item['img'], $this->thumb_width, $this->thumb_height, $item['id']);
} else {
$item['thumb'] = '';
}
if($this->imagesource == 1){
$item['thumb'] = $item['img'];
}
if($item['thumb'] == ""){
if($this->themes == 'theme5'){
$item['small_thumb'] = JURI::base()."modules/mod_yt_k2_slideshowii/assets/no_images.png";
}
}else{
$item['small_thumb'] = $this->processImage($item['img'], $this->small_thumb_width, $this->small_thumb_height, $item['id']);
}
if(!empty($item['thumb'])){
$tmp[] = $item;
}
}
return $tmp;
}