you can see a working demo on this sitehttp://restaurant.bleekk.com/modules/xoopsfeeds/
(it is a theme that I am currently working on)
as soon as I have finished the block to display also the feeds I will release it
function publisher_items_random_item_show($options)
{
$block = array();
$publisher = PublisherPublisher::getInstance();
// creating the ITEM object
$itemsObj = $publisher->getHandler('item')->getRandomItem('', array(PublisherConstants::PUBLISHER_STATUS_PUBLISHED));
if (!is_object($itemsObj)) {
return $block;
}
$block['content'] = $itemsObj->getBlockSummary(300, true); //show complete summary but truncate to 300 if only body available
$block['id'] = $itemsObj->itemid();
$block['url'] = $itemsObj->getItemUrl();
$image = $itemsObj->getMainImage();
$block['image'] = $image['image_path'];
if(!$block['image']){
$block['image'] = "path_to_your_default_image";
}
$block['lang_fullitem'] = _MB_PUBLISHER_FULLITEM;
return $block;
}
<img src="<{$block.image}>"/>