-
AuthorPosts
-
infocubic Friend
infocubic
- Join date:
- September 2011
- Posts:
- 105
- Downloads:
- 71
- Uploads:
- 66
- Thanks:
- 8
- Thanked:
- 1 times in 1 posts
June 30, 2017 at 9:52 am #1045247Hi,
How do I create link to the each slider images in JA slider module.
Pls note the source: From Image Folder
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
July 3, 2017 at 7:40 am #1045650Hi,
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.
infocubic Friendinfocubic
- Join date:
- September 2011
- Posts:
- 105
- Downloads:
- 71
- Uploads:
- 66
- Thanks:
- 8
- Thanked:
- 1 times in 1 posts
July 5, 2017 at 12:56 pm #1046326I 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
July 6, 2017 at 2:06 am #1046419You can download the module package and get the file there: https://www.joomlart.com/downloads/joomla-templates/ja-biz/
-
AuthorPosts
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