WebsiteBaker Community Forum

WebsiteBaker Support (2.10.x) => Modules => Topic started by: Ruud on June 19, 2017, 11:09:04 PM

Title: Improved MiniGallery v2.2
Post by: Ruud on June 19, 2017, 11:09:04 PM
Today I released MiniGallery v2.2
This version allows drag&drop uploads (as many simultanious as you like) and now also enables you to delete single images instead of removing all before new uploads.

Also the module will now use the nice Jusitified Gallery (http://miromannino.github.io/Justified-Gallery/) script that will make your gallery look much nicer when the thumbnails are different sizes.

The lightbox script for popups used is Lightcase (http://cornel.bopp-art.com/lightcase/) which is very nice, responsive and mobile/touchscreen aware.

Tested and working on WB2.8.3 (all versions) and WB2.10.0 on php5.6 and php7.1

Info and download at: Dev4me.com (https://dev4me.com/modules-snippets/opensource/minigallery-v2/)
Title: Re: Improved MiniGallery v2.2
Post by: Hans on June 19, 2017, 11:20:53 PM
 (Y) Thanks Ruud!
Title: Re: Improved MiniGallery v2.2
Post by: dbs on June 20, 2017, 09:18:16 AM
Looks good Works good. Ruud good!   (Y)
Title: Re: Improved MiniGallery v2.2
Post by: hgs on June 20, 2017, 10:07:15 AM
Download also in addon
https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=08D9A041

Update:
Works great, great upload with drag and drop and a great animation when uploading
Title: Re: Improved MiniGallery v2.2
Post by: johnbroeckaert on June 20, 2017, 12:30:30 PM
 (Y) (Y) (Y) GREAT!
THANKS!
Title: Re: Improved MiniGallery v2.2
Post by: CodeALot on June 25, 2017, 04:06:58 PM
Ruud rules. As usual :)
Title: Re: Improved MiniGallery v2.2
Post by: dbs on July 12, 2017, 07:03:09 PM
Can it be? If you switch to not squared thumbs (to masonry), the maxWidth/maxHeight is not the same as set in settings. In frontend the thumb is smaller.
Seems the justifiedGallery script adds a width/height to the imagelink, but this are not the dimensions from the image.
I can only give in settings a bigger max and try to find the right size.
Title: Re: Improved MiniGallery v2.2
Post by: Ruud on July 12, 2017, 11:07:04 PM
To make the thumbs fit the justify script will do some extra sizing (with possible upscaling).
Because it is not good to have the thumbs enlarged, the height of the row is set smaller than the actual image size. A second parameter tells the script the maximum rowheight having the actual height of the images.
The behavour is explained by the author here (http://miromannino.github.io/Justified-Gallery/getting-started/#rowheight)

The rowheight in the current minigallery version is set to 62.5% and the maximum height to 100% of the thumbnail sizes.
The actual output will be somewhere between those values.

These values are based on some testing I did with sets of images and not calculated in a scientific way.. It could be other scaling parameters might work better :)
They are set in /modules/minigal2/javascript.php :
Code: [Select]
rowHeight : <?php echo $thumbsize 1.6 ?>,
maxRowHeight : <?php echo $thumbsize  ?>,
You could experiment with this (1.6) devider to get a better view.
Title: Re: Improved MiniGallery v2.2
Post by: dbs on July 12, 2017, 11:34:52 PM
Thanks for explanation. Important for me is to know this not a fault of my template or of the module.
It works like it should. It is not a problem to adjust the maxsize in settings.
All is fine.  :-)
Title: Re: Improved MiniGallery v2.2
Post by: dbs on August 03, 2017, 10:49:50 AM
Hi, the images have all a empty alt attribute.
If i define a default alt entry in view.php, all images shows the same (logical), but this looks a little bit bad because it is showing on every image hover. Reason is the jquery.justifiedGal lery.js takes this alt for a caption.

Maybe in a next version we can add own alt attributes (but this could be a lot of work for us) or the caption will be removed.
Code: [Select]
div.caption, #lightcase-caption {display:none!important; }
Other idea?
Title: Re: Improved MiniGallery v2.2
Post by: Ruud on August 03, 2017, 11:26:09 AM
Other idea?
How about using the image filename ( removing things like _-#^. )  as alt/caption?
Title: Re: Improved MiniGallery v2.2
Post by: dbs on August 03, 2017, 11:47:18 AM
I think this is not the solution.
Because the way is to easy to take a lot of images and put they into the uploadfield, no normal user rename something.  :-)
On the other side a lot of images with the same alt attribute can't be the solution.

I would prefer: the script analyze each image -> know what is it -> puts a meaningul description into the alt attribute.
We can wait for this, Google have to do a faster work on these feature. *g*
So far i know they are on a good way.
Title: Re: Improved MiniGallery v2.2
Post by: Ruud on August 03, 2017, 12:04:38 PM
I would prefer: the script analyze each image -> know what is it -> puts a meaningul description into the alt attribute.
Let me think about that feature.  8-)

Seriously now..

You can hide the captions by adding a few lines in javascript.php.
In the justifiedGallery script call you can add the option:
Code: [Select]
captions : false, After that the hover caption will not be there.

Hiding the same caption in the lightcase popup is done by adding in the lightcase setup the option:
Code: [Select]
showCaption: false, This will hide the caption below the popups.

Title: Re: Improved MiniGallery v2.2
Post by: dbs on August 03, 2017, 12:33:44 PM
I had searched for this in the minified version but not found.
Therefore the css way is also good.
Title: Re: Improved MiniGallery v2.2
Post by: zirzy on October 04, 2017, 03:07:26 PM
Hi,

Why isn't bigger images been found (after pressing thumb) when selecting Add lightcase scripts from the settings? Only thumbs are visible.. If i don't select Add lightcase scripts, bigger images are visible when pressing thumbs but no overlay etc.

What to do?
Title: Re: Improved MiniGallery v2.2
Post by: Ruud on October 04, 2017, 03:20:58 PM
Hi,

Why isn't bigger images been found (after pressing thumb) when selecting Add lightcase scripts from the settings? Only thumbs are visible.. If i don't select Add lightcase scripts, bigger images are visible when pressing thumbs but no overlay etc.

What to do?
Using lightcase the image will be shown using javasript (jQuery + Lightcase).
If nothing happens (or it happens outside the viewport) it is typically caused by conflicting scripts or jQuery not being available.
You might get some help by the DeveloperTools console in your browser. If there are errors in javascript they should be reported there.
If that does not help to solve it, please give a link to a "problem page" so we can have a look.
Title: Re: Improved MiniGallery v2.2
Post by: zirzy on October 05, 2017, 11:39:50 AM
Yes, there was a problem with jquery. Now it's ok. Thanx Ruud  (Y)