Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • dfgrbac Friend
    #193422

    After upgrading Slideshow Lite to fix the editing problem with Azrul system bot, suddenly the second and third images for each slide have stopped displaying. Can you please fix this?

    Please do not upgrade other template software because it will wipe out the color and image theme configuration. I never really could successfully understand the instructions on how to avoid that.

    Ninja Lead Moderator
    #517261

    The latest JA Slideshow Lite module has been changed a little bit in custom.php file. I just updated it into your JA Zite Template, the issue has been fixed now. Please check again.

    For your reference, below is the tweak I have made:

    – Open /templates/ja_zite/html/mod_jaslideshowlite/custom.php file

    Replace:


    defined('_JEXEC') or die('Restricted access');

    // rebuild data
    $imgtypes = array('bg', 'first', 'second', 'thumb');
    $items = array();

    for ($i = 0, $il = count($images); $i < $il; $i++) {

    $iname = basename($images[$i]);
    $itype = 'img';
    $count = 0;

    //check if exist
    str_replace($imgtypes, '', $iname, $count);

    if ($count && ($match = preg_split ('/[-_.]/', $iname))) {
    $iname = $match[0];
    $itype = (!empty($match[1]) && in_array($match[1], $imgtypes)) ? $match[1] : 'img';
    }

    if (!isset($items[$iname])) {
    $items[$iname] = new stdClass;
    $items[$iname]->caption = '';
    $items[$iname]->title = '';
    $items[$iname]->cls = 'leftright';
    }

    $items[$iname]->$itype = $images[$i];
    if(strlen(trim($captionsArray[$i]))) {
    $items[$iname]->caption = trim($captionsArray[$i]);
    }

    if($itype == 'img' || $itype == 'bg'){
    if(!empty($classes[$i])){
    $items[$iname]->cls = $classes[$i];
    }

    if(!empty($titles[$i])){
    $items[$iname]->title = $titles[$i];
    }
    }

    if ($showThumbnail && ($itype == 'img' || $itype == 'bg')) {
    $items[$iname]->thumb = $thumbArray[$i];
    }
    }

    With:


    defined('_JEXEC') or die('Restricted access');

    // rebuild data
    $imgtypes = array('bg', 'first', 'second', 'thumb');
    $items = array();

    for ($i = 0, $il = count($images); $i < $il; $i++) {

    $iname = basename($images[$i]);
    $itype = 'img';
    $count = 0;
    $ext = array('png','gif','jpg','jpeg','PNG','GIF','JPG','JPEG');

    //check if exist
    str_replace($imgtypes, '', $iname, $count);

    if ($count && ($match = preg_split ('/[-_.]/', $iname))) {
    $iname = $match[0];
    $itype = (!empty($match[1]) && in_array($match[1], $imgtypes)) ? $match[1] : 'img';
    }

    if (!isset($items[$iname])) {
    $items[$iname] = new stdClass;
    $items[$iname]->caption = '';
    $items[$iname]->title = '';
    $items[$iname]->cls = 'leftright';
    }

    $items[$iname]->$itype = $images[$i];
    if(strlen(trim($captionsArray[$i]))) {
    $items[$iname]->caption = trim($captionsArray[$i]);
    }

    if($itype == 'img' || $itype == 'bg'){
    if(!empty($classes[$i])){
    $items[$iname]->cls = $classes[$i];
    }

    if(!empty($titles[$i])){
    $items[$iname]->title = $titles[$i];
    }
    }
    foreach($ext as $imgType){
    if( file_exists(JPATH_SITE . '/' . $params->get('folder') . '/' . $iname . '-first.' . $imgType) ){
    $items[$iname]->first = $params->get('folder') . '/' . $iname . '-first.' . $imgType ;
    break;
    }
    }

    foreach($ext as $imgType){
    if( file_exists(JPATH_SITE . '/' . $params->get('folder') . '/' . $iname . '-second.' . $imgType )){
    $items[$iname]->second = $params->get('folder') . '/' . $iname . '-second.' . $imgType ;
    break;
    }
    }

    if ($showThumbnail && ($itype == 'img' || $itype == 'bg')) {
    $items[$iname]->thumb = $thumbArray[$i];
    }
    }

    dfgrbac Friend
    #517306

    Thank you so much, Ninja Lead! It seems to be working fine now.

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  dfgrbac 10 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum