Osclass Support Forums

Osclass plugin support => Blog and News Plugin => Topic started by: Locan on July 08, 2018, 03:40:14 PM

Title: Image Gallery popup for article
Post by: Locan on July 08, 2018, 03:40:14 PM
i have been use lightGallery.js for image popup in article page and it work fine for icon and   thumbnails but  it's not show  big image



function method

 <script type="text/javascript">
 $('#lightgallery').lightGallery({
    mode: 'lg-fade',
    cssEasing : 'cubic-bezier(0.25, 0, 0.25, 1)'
});
</script>
 

http://sachinchoolur.github.io/lightGallery/demos/

https://github.com/sachinchoolur/lightGallery

can you help me  MB-theme?

regard
Title: Re: Image Gallery popup for article
Post by: MB Themes on July 09, 2018, 09:07:27 AM
@Locan
I've added this library to 1.0.7, let me know if I missed something.
Title: Re: Image Gallery popup for article
Post by: Koala on July 09, 2018, 09:44:04 AM
 it's work for only feature image. other images that add by url from tool bar not work.
Title: Re: Image Gallery popup for article
Post by: Locan on July 09, 2018, 10:02:54 AM
Oh awesome you are dear...
I will try it when I arrived home

Thank you so much 👍👍👍
Title: Re: Image Gallery popup for article
Post by: Locan on July 10, 2018, 02:11:19 AM
it's work for only feature image. other images that add by url from tool bar not work.
.  You are right image pop up work only in feature image. How make it pop up all image
Title: Re: Image Gallery popup for article
Post by: Koala on July 10, 2018, 07:25:47 AM
watch this article use this feature
https://www.motor1.com/news/250612/nissan-gt-r50-by-italdesign/
Title: Re: Image Gallery popup for article
Post by: MB Themes on July 10, 2018, 08:47:50 AM
In file:
oc-content/plugins/blog/js/user.js

Find code:
Code: [Select]
  // LIGHT GALLERY
  $('.blg-primary-img').lightGallery({
    mode: 'lg-fade',
    thumbnail:true,
    cssEasing : 'cubic-bezier(0.25, 0, 0.25, 1)'
  });

Replace it with:
Code: [Select]
  $('.blg-content img').each(function() {
    $(this).attr('data-src', $(this).attr('src'));
    $(this).wrap('<a class="blg-lb" data-src="' + $(this).attr('src') + '"></a>');
  });

  $('.blg-content').lightGallery({
    mode: 'lg-fade',
    thumbnail: true,
    selector: '.blg-lb',
    cssEasing : 'cubic-bezier(0.25, 0, 0.25, 1)'
  });
Title: Re: Image Gallery popup for article
Post by: Locan on July 10, 2018, 01:57:43 PM
work well thank you,
thank you so much dear
Title: Re: Image Gallery popup for article
Post by: MB Themes on July 10, 2018, 07:30:43 PM
@Locan
Welcome