Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • infocubic Friend
    #1045247

    Hi,

    How do I create link to the each slider images in JA slider module.

    Pls note the source: From Image Folder

    URL: http://www.tracebee.com

    Saguaros Moderator
    #1045650

    Hi,

    You will need to customize this module a little bit. Try with my tweak as below:

    • Go to file: [root]/modules/mod_jaslideshow/helpers/helper.php
    • Find the renderImage function (at approx line 1107) and replace with this:

      function renderImage($title, $image, $params, $width = 0, $height = 0, $attrs = '', $returnURL = false, $item_link = "" )
      {
      global $database, $_MAMBOTS, $current_charset;
      if ($image) {
          $title = strip_tags($title);
          $thumbnailMode = $params->get('source-articles-images-thumbnail_mode', 'crop');
          $aspect = $params->get('source-articles-images-thumbnail_mode-resize-use_ratio', '1');
          $aspect = $aspect == '1' ? true : false;
          $crop = $thumbnailMode == 'crop' ? true : false;
          $jaimage = JAImage::getInstance();
          if ($thumbnailMode != 'none' && $jaimage->sourceExited($image)) {
              $imageURL = $jaimage->resize($image, $width, $height, $crop, $aspect);
              if ($returnURL) {
                  return $imageURL;
              }
              if ($imageURL == $image) {
                  $width = $width ? "width=\"$width\"" : "";
                  $height = $height ? "height=\"$height\"" : "";
                  $image = "<img src=\"$imageURL\"   alt=\"{$title}\" title=\"{$title}\" $width $height $attrs />";
              } else {
                  $image = "<img src=\"$imageURL\"  $attrs  alt=\"{$title}\" title=\"{$title}\" />";
              }
          } else {
              if ($returnURL) {
                  return $image;
              }
              $width = "";
              $height = "";
              if ($params->get('source-articles-images-thumbnail_mode', 'crop') != 'none') {
                  $width = $width ? "width=\"$width\"" : "";
                  $height = $height ? "height=\"$height\"" : "";
              }
              $image = "<img $attrs src=\"$image\" alt=\"{$title}\" title=\"{$title}\" $width $height />";
          }
      } else {
          $image = '';
      }
      
      if(!empty($item_link))
      {
      $image = '<a href="'.$item_link.'" target="_blank">'.$image.'</a>';
      }
      // clean up globals
      return $image;
      }

    I attach this helper.php file here so you can compare easily.


    1. helper.php_.zip
    infocubic Friend
    #1046326

    I have set this, but the link is not appearing on whole image and does not looking good.

    Can I get the helper.php original file ? so the I can restore it back.

    Saguaros Moderator
    #1046419

    You can download the module package and get the file there: https://www.joomlart.com/downloads/joomla-templates/ja-biz/

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

This topic contains 3 replies, has 2 voices, and was last updated by  Saguaros 7 years, 4 months ago.

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