/ Published in: PHP
Credit goes to B. Kemler. I'm simply saving this for future reference.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Go to /components/com_k2/models/item.php line 368 and replace the Description section with this: $item->feedimage=''; if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_S.jpg')) $item->feedimage = '<img align=left style=padding-right:5px; src='.JURI::root().'media/k2/items/cache/'.md5("Image".$item->id).'_S.jpg>'; if ($params->get('feedText')=='1'){ $item->description=$item->feedimage.$item->fulltext; } else if ($params->get('feedText')=='2'){ $item->description=$item->feedimage.$item->introtext.'<br/>'.$item->fulltext; } else { $item->description=$item->feedimage.$item->introtext; }