the file random_item.php is not a large file
where does that code go?
<?php /* You may not change or alter any portion of this comment or credits of supporting developers from this source code or any supporting source code which is considered copyrighted (c) material of the original comment or credit authors. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /** * @copyright The XUUPS Project http://sourceforge.net/projects/xuups/ * @license http://www.fsf.org/copyleft/gpl.html GNU public license * @package Beverages * @subpackage Blocks * @since 1.0 * @author trabis <lusopoemas@gmail.com> * @author The SmartFactory <www.smartfactory.ca> */ // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined'); include_once dirname(__DIR__) . '/include/common.php'; /** * @param $options * * @return array */ function beverages_items_random_item_show($options) { $block = array(); $beverages = BeveragesBeverages::getInstance(); // creating the ITEM object $itemsObj = $beverages->getHandler('item')->getRandomItem('', array(BeveragesConstants::BEVERAGES_STATUS_PUBLISHED)); $mainImage = $itemsObj->getMainImage(); // check to see if GD function exist if (!function_exists('imagecreatetruecolor')) { $block['item_image'] = $mainImage['image_path']; } else { $block['item_image'] = PUBLISHER_URL . '/thumb.php?src=' . $mainImage['image_path'] . '&w=' . $imgwidth; // No $imgheight for autoheight option } 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(); $block['title'] = $itemsObj->title(); // irmtfan $block['lang_fullitem'] = _MB_BEVERAGES_FULLITEM; return $block; }