81
Zap_English
Re: Publisher Random Item Image

Error : Smarty error: [in db:recipes_items_random_item.tpl line 5]: syntax error: unrecognized tag: $block['title'] (Smarty_Compiler.class.php, line 446)



82
Zap_English
Re: Publisher Random Item

ok, now it's working but it's not showing my default image



83
Zap_English
Re: Publisher Random Item

I'm not getting an image, just a blank image placeholder

the only change I made to the code was PUBLISHER_URL to RECIPES_URL and BEVERAGES_URL because I'm using clones of publisher

Is there something else that needs to be defined? image_path maybe?

Help!



84
Zap_English
Re: Publisher Random Item Image

unfortunately, that code didn't do anything except remove the highlighting from the "Read the complete article" link

The original code from my second post worked, except it didn't show the default image if no image was available in the article.

The articles have been modified to show our logo if there is no attached image



85
Zap_English
Re: Publisher Random Item Image

So where do I stick to code in the items_random_item.php file? Everywhere I've tried to insert it crashes the index page



86
Zap_English
Re: Publisher Random Item Image

it's a cloned publisher. that's why the name is different

forget the first code. i must have cut n pasted the wrong code



87
Zap_English
Re: Publisher Random Item Image

<?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));


    if (!
is_object($itemsObj)) {
        return 
$block;
    }
   

    
$block['content']       = $itemsObj->getBlockSummary(300true); //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;
}


directly from the file



88
Zap_English
Re: Publisher Random Item Image

blocks > items_random_item.php



89
Zap_English
Re: Publisher Random Item Image

unfortunately, that code crashed the index page

it's
XOOPS Version XOOPS 2.5.8.1
PHP Version 7.0.17
mySQL Version 5.5.52-MariaDB

and publisher is

'version' => '1.03',
'module_status' => 'RC 1',
'release_date' => '2016/07/06',

according to the xoops_version.php



90
Zap_English
Re: Publisher Random Item Image

ok, where should that code be placed in random_item.php




TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 38 »



Login

Who's Online

159 user(s) are online (92 user(s) are browsing Support Forums)


Members: 0


Guests: 159


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits