Author Topic: Improved MiniGallery v2.2  (Read 1880 times)

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Improved MiniGallery v2.2
« 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 script that will make your gallery look much nicer when the thumbnails are different sizes.

The lightbox script for popups used is 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

Offline Hans

  • Posts: 912
  • Gender: Male
Re: Improved MiniGallery v2.2
« Reply #1 on: June 19, 2017, 11:20:53 PM »
 (Y) Thanks Ruud!
Hans - Nijmegen - The Netherlands

Offline dbs

  • Betatester
  • **
  • Posts: 7977
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Improved MiniGallery v2.2
« Reply #2 on: June 20, 2017, 09:18:16 AM »
Looks good Works good. Ruud good!   (Y)

Offline hgs

  • Betatester
  • **
  • Posts: 1110
    • EFG MG
Re: Improved MiniGallery v2.2
« Reply #3 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
« Last Edit: June 20, 2017, 10:17:55 AM by hgs »
LG Harald

"Fange nie an, aufzuhören - höre nie auf, anzufangen." Marcus Tullius Cicero (106-43 v.Chr.)

Offline johnbroeckaert

  • Posts: 186
  • Gender: Male
Re: Improved MiniGallery v2.2
« Reply #4 on: June 20, 2017, 12:30:30 PM »
 (Y) (Y) (Y) GREAT!
THANKS!
It is a happy talent to know how to play!

Offline CodeALot

  • Posts: 430
  • Gender: Male
Re: Improved MiniGallery v2.2
« Reply #5 on: June 25, 2017, 04:06:58 PM »
Ruud rules. As usual :)

Offline dbs

  • Betatester
  • **
  • Posts: 7977
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Improved MiniGallery v2.2
« Reply #6 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.

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Improved MiniGallery v2.2
« Reply #7 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

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.

Offline dbs

  • Betatester
  • **
  • Posts: 7977
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Improved MiniGallery v2.2
« Reply #8 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.  :-)

Offline dbs

  • Betatester
  • **
  • Posts: 7977
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Improved MiniGallery v2.2
« Reply #9 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?

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Improved MiniGallery v2.2
« Reply #10 on: August 03, 2017, 11:26:09 AM »
Other idea?
How about using the image filename ( removing things like _-#^. )  as alt/caption?

Offline dbs

  • Betatester
  • **
  • Posts: 7977
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Improved MiniGallery v2.2
« Reply #11 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.

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Improved MiniGallery v2.2
« Reply #12 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.


Offline dbs

  • Betatester
  • **
  • Posts: 7977
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Improved MiniGallery v2.2
« Reply #13 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.

Offline zirzy

  • Posts: 168
Re: Improved MiniGallery v2.2
« Reply #14 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?

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Improved MiniGallery v2.2
« Reply #15 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.

Offline zirzy

  • Posts: 168
Re: Improved MiniGallery v2.2
« Reply #16 on: October 05, 2017, 11:39:50 AM »
Yes, there was a problem with jquery. Now it's ok. Thanx Ruud  (Y)

 

postern-length