-
AuthorPosts
-
August 20, 2015 at 4:30 am #663020
1. Strange thing about Gallery is, need to insert at least 2 image in order for the image to enlarge when click. Else it will provide link to Gallery item in article.
2. The click and enlarge image is broken.
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
August 20, 2015 at 4:37 am #663122Hi
try thisOpen templates/ja_charity/html/layouts/joomla/content/image/gallery.php file
find and copy js scriptand insert it after line 114
<script type="text/javascript">
(function ($) {
$(document).ready(function(){
$('#<?php echo $galleryId; ?>').on('click', function (event) {
event.preventDefault();
blueimp.Gallery(<?php echo json_encode($images); ?>, {
transitionSpeed: 0,
hidePageScrollbars:false
});
});
});
})(jQuery);
</script>Save and check ,
Kindly take a backup of original file , before change .August 20, 2015 at 4:54 am #663125Hi,
Inserted the javascript as told. Almost work but not quite.
1. Image will only appear at All filter. But each time only 2 images when click next or previous.
2. At own “The Production” Category, image still broken when click.Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
August 21, 2015 at 4:36 am #663873Hi
I sent this bug report to development team for further investigation and fix .
It will take some time to investigate
,thanks in advance for your Patience in this case .Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
August 21, 2015 at 4:36 am #746210Hi
I sent this bug report to development team for further investigation and fix .
It will take some time to investigate
,thanks in advance for your Patience in this case .August 21, 2015 at 5:36 am #664176In that case, for the time being how do I make the gallery unclickable? So it won’t call up the pop up with broken image.
August 21, 2015 at 5:36 am #746216In that case, for the time being how do I make the gallery unclickable? So it won’t call up the pop up with broken image.
Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
August 21, 2015 at 7:58 am #664187Hello kehzen.
You can try with my workaround as below to solve issue:
Add the code at line : 40
function blueGalleryImp(images) {
blueimp.Gallery(images, {
transitionSpeed: 0,
hidePageScrollbars:false
});
}edit the code at line : 67-91
[PHP]<?php
$images = array();
foreach($gallery[‘src’] as $index => $src) {
$img = new stdClass();
$img->href = JUri::root(true).’/’.$src;
$img->title = $gallery[‘caption’][$index];
$images[] = $img;
}
?>
<script type=”text/javascript”>
var image<?php echo preg_replace(“/[^0-9]/”,””,$galleryId); ?> = <?php echo str_replace(“/s+/”,””,str_replace(“”,””,json_encode($images))); ?>;
</script>
<div id=”<?php echo $galleryId; ?>” onclick=”blueGalleryImp(image<?php echo preg_replace(“/[^0-9]/”,””,$galleryId); ?>);” class=”btn-fullscreen”>
<span class=”fa fa-expand fa-2x” title=”<?php echo htmlspecialchars(JText::_(‘TPL_VIEW_FULL_SCREEN’)); ?>”></span>
</div>[/PHP]edit the code at line : 95-126
[PHP]<?php if(is_array($gallery) && count($gallery[‘src’]) > 1):
$images = array();
foreach($gallery[‘src’] as $index => $src) {
$img = new stdClass();
$img->href = JUri::root(true).’/’.$src;
$img->title = $gallery[‘caption’][$index];
$images[] = $img;
}
?>
<script type=”text/javascript”>
var image<?php echo preg_replace(“/[^0-9]/”,””,$galleryId); ?> = <?php echo str_replace(“/s+/”,””,str_replace(“”,””,json_encode($images))); ?>;
</script>
<?php endif; ?>
<div id=”<?php echo $galleryId; ?>” <?php if(is_array($gallery) && count($gallery[‘src’]) > 1): ?> onclick=”blueGalleryImp(image<?php echo preg_replace(“/[^0-9]/”,””,$galleryId); ?>);” <?php endif; ?> class=”item-image ja-gallery-list”>
<?php if(is_array($gallery) && count($gallery[‘src’]) > 1): ?>
<span class=”btn-play”></span>
<span class=”gallery-mask”></span>
<?php endif; ?>
<?php echo JLayoutHelper::render(‘joomla.content.image.image’, $data); ?>
</div>[/PHP]If you’re not familiar with code, just download the attached file below and replace it into your site (always backup the old file first)
And let me know how it goes.
Have a nice day!!!
BigHug FriendBigHug
- Join date:
- September 2012
- Posts:
- 60
- Downloads:
- 17
- Uploads:
- 277
- Thanked:
- 11 times in 1 posts
August 21, 2015 at 7:58 am #746227Hello kehzen.
You can try with my workaround as below to solve issue:
Add the code at line : 40
function blueGalleryImp(images) {
blueimp.Gallery(images, {
transitionSpeed: 0,
hidePageScrollbars:false
});
}edit the code at line : 67-91
<?php
$images = array();
foreach($gallery['src'] as $index => $src) {
$img = new stdClass();
$img->href = JUri::root(true).'/'.$src;
$img->title = $gallery['caption'][$index];
$images[] = $img;
}
?>
<script type="text/javascript">
var image<?php echo preg_replace("/[^0-9]/","",$galleryId); ?> = <?php echo str_replace("/s+/","",str_replace("","",json_encode($images))); ?>;
</script>
<div id="<?php echo $galleryId; ?>" onclick="blueGalleryImp(image<?php echo preg_replace("/[^0-9]/","",$galleryId); ?>);" class="btn-fullscreen">
<span class="fa fa-expand fa-2x" title="<?php echo htmlspecialchars(JText::_('TPL_VIEW_FULL_SCREEN')); ?>"></span>
</div>edit the code at line : 95-126
<?php if(is_array($gallery) && count($gallery['src']) > 1):
$images = array();
foreach($gallery['src'] as $index => $src) {
$img = new stdClass();
$img->href = JUri::root(true).'/'.$src;
$img->title = $gallery['caption'][$index];
$images[] = $img;
}
?>
<script type="text/javascript">
var image<?php echo preg_replace("/[^0-9]/","",$galleryId); ?> = <?php echo str_replace("/s+/","",str_replace("","",json_encode($images))); ?>;
</script>
<?php endif; ?>
<div id="<?php echo $galleryId; ?>" <?php if(is_array($gallery) && count($gallery['src']) > 1): ?> onclick="blueGalleryImp(image<?php echo preg_replace("/[^0-9]/","",$galleryId); ?>);" <?php endif; ?> class="item-image ja-gallery-list">
<?php if(is_array($gallery) && count($gallery['src']) > 1): ?>
<span class="btn-play"></span>
<span class="gallery-mask"></span>
<?php endif; ?>
<?php echo JLayoutHelper::render('joomla.content.image.image', $data); ?>
</div>If you’re not familiar with code, just download the attached file below and replace it into your site (always backup the old file first)
And let me know how it goes.
Have a nice day!!!
August 24, 2015 at 5:12 am #746355Hi Mo0nlight,
You are right, I’m not familiar with php.
Uploaded your gallery.php. It worked on own category now. However, When scrolling images, it only can scroll 2 images even though I have 8 images.Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
August 24, 2015 at 8:08 am #664873Hi kehzen.
Well. the function is working fine right now.
Because every block image is one article of your website. When you click on one block, it will show the popup of all images inside the article.
And I also check you administrator, every article has only 2 images.
Maybe that’s what you wonder?
Let me know if you still have concern about this.
Mo0nlight ModeratorMo0nlight
- Join date:
- September 2014
- Posts:
- 707
- Downloads:
- 38
- Uploads:
- 107
- Thanked:
- 99 times in 97 posts
August 24, 2015 at 8:08 am #746375Hi kehzen.
Well. the function is working fine right now.
Because every block image is one article of your website. When you click on one block, it will show the popup of all images inside the article.
And I also check you administrator, every article has only 2 images.
Maybe that’s what you wonder?
Let me know if you still have concern about this.
August 25, 2015 at 7:19 am #665109Dear Mo0nlight,
I see, I got it now. I thought it supposes to browse through all the images from articles under the same category.
Thanks.
-
AuthorPosts
This topic contains 14 replies, has 4 voices, and was last updated by kehzen 9 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum