Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extra Gallery
#26
fancybox lightbox is built into core...
You just have to add the link and data attributes to your thumbs, see how its done in uploads.

You have to change languages in in your profile.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#27
Title and Name mean the same thing.
Its a bit confusing as to which one is the ID for referencing.
Also are IDs case sensitive?

I still have wrong filepaths, ill test on a fresh install.

Again where exactly are the thumbs supposed to be ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#28
(2015-03-15, 03:51:33)shawn_a Wrote: Title and Name mean the same thing.
Its a bit confusing as to which one is the ID for referencing.
Also are IDs case sensitive?

I still have wrong filepaths, ill test on a fresh install.

Again where exactly are the thumbs supposed to be ?

Title is something different that name. Use title to store gallery title that you can show on webpage. Name is and gallery ID or unique identificator.
It works the same as in 18n gallery plugin.

You have to pass gallery name to eg_return_gallery function as a first parameter
Read in plugin description here:  http://get-simple.info/extend/plugin/extra-gallery/858/ 
It's case sensitive.

Thumb are stored in /data/ExtraGallery/thumbs dir.
http://flexphperia.net - my portfolio
Reply
#29
You should probably put the ID field first, its confusing to have title first.


Doesnt work still.
My output has nothing for thumbs filename

PHP Code:
eg_return_gallery('test'→ array•3 {
'name' → str•4 'test'
'title' 
→ str•10 'test title'
'items' 
→ array•7 {
[
0→ array•4 {
'filename' → str•43 'uploads/gallery/alejandroescamilla-book.jpg'
'width' 
→ int 4855
'height' → int 1803
'thumb-0' → array•3 {
'filename' → str•20 'ExtraGallery/thumbs/'
'width' 
→ NULL
'height' → NULL

}



ok if I manually crop it creates my thumbs folder and puts the thumb in there.
I assumed there were auto thumbs in this plugin, i guess it does not.

My thumbs field is still wrong in the array however.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#30
Ok it is all working now, i had auto crop set to none when i created the gallery , and thumbs do not get generated after they are added to a gallery. I had to recreate the gallery.

A regenerate thumbs would be nice, in case you change settings.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#31
ok i figured out what i was expecting, it is not creating thumbs if auto crop is set to none.

If i set height to 100 I expected a 100px wide thumb to be created with aspect ratio preserved.
same for height.

if both were set to 100, say square i expected it to pick the largest dimension and aspect scale to that, and if auto crop was set to fill, it would crop from middle a square.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#32
FYI
better imagemanipulation will be available in 3.4
https://github.com/GetSimpleCMS/GetSimpl...t-68239106
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#33
(2015-04-16, 00:08:00)shawn_a Wrote: ok i figured out what i was expecting, it is not creating thumbs if auto crop is set to none.

If i set height to 100 I expected a 100px wide thumb to be created with aspect ratio preserved.
same for height.

if both were set to 100, say square i expected it to pick the largest dimension and aspect scale to that, and if auto crop was set to fill, it would crop from middle a square.

shawn_a,

In gallery list table every column has header that indecates what's is gallery title and what is gallery name, so there shoulkd be no confusions with that if you look at that.

I'm not sure where you have problems with thumbnails
I'm assuming you have mistake in your post, I've marked it on red color, you're talking about width of course not height

If you define width or height you will be locked to that dimesnsions while cropping images, it's easy.
If you do not define any of this you will be able to crop image as you want.

There is also auto cropping settings that will generate automatically thumbnail when image is added to gallery:
fill - will generate images exactly as definied width and height, so it will crop image to fill to dimensions
fit - will resize image keeping it's aspect ratio

Every time you changes settings you better start from creating new gallery, settings should not be changed while using.
http://flexphperia.net - my portfolio
Reply
#34
Yeah i thought the width and height were for auto thumbnails, not manual cropping, since every item had a thumbnail field in output.

so here is my list now that I understand how it works.

* Auto thumbnails would be a nice feature
* Move name/ID as the primary field on edit and column list instead of the second field, would be better UI and less confusing.
* If manual thumbs and no thumb exists, do not output a partial path in "thumbnail" output as it does now

PHP Code:
// blank thumbnail, should be null, or not exist
'thumb-0' → array•3 {
'filename' → str•20 'ExtraGallery/thumbs/' 

* thumbnails are not publicly accessible
/data/ExtraGallery/thumbs is a private store, and not public
GSTHUMBNAILPATH would be a better place for thumbs, and use your own prefix for the filenames as is standard, gsgallery.name.ext
* regenerate any auto thumbs if settings change, or offer the manual ability to do so.
* add fancybox to images
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#35
(2015-04-21, 22:56:33)shawn_a Wrote: Yeah i thought the width and height were for auto thumbnails, not manual cropping, since every item had a thumbnail field in output.

so here is my list now that I understand how it works.

* Auto thumbnails would be a nice feature
* Move name/ID as the primary field on edit and column list instead of the second field, would be better UI and less confusing.
* If manual thumbs and no thumb exists, do not output a partial path in "thumbnail" output as it does now


PHP Code:
// blank thumbnail, should be null, or not exist
'thumb-0' → array•3 {
'filename' → str•20 'ExtraGallery/thumbs/' 

* thumbnails are not publicly accessible
/data/ExtraGallery/thumbs  is a private store, and not public
GSTHUMBNAILPATH would be a better place for thumbs, and use your own prefix for the filenames as is standard, gsgallery.name.ext
* regenerate any auto thumbs if settings change, or offer the manual ability to do so.
* add fancybox to images


shawn_a,

From your list I'm planing only to fix bug with partial path when no thumb generated.

Auto generating thumbnails is already implemented, please see ExtraGallery settings and my previous reply.

/data/ExtraGallery/thumbs location is public accessible, it works, I'm using it on many web pages. I've prefer this location for better control of unused thumbnails and to prevent some misleading when user uploads image and GS generates automatically it's own thumb in GSTHUMBNAILPATH (name of thumb may be name that ExtraGallery will false positive recognize as it's thumb).


Plugin updated, v.1.02
http://flexphperia.net - my portfolio
Reply
#36
But you ARE creating thumbs for uploads...

GS does not generate thumbs the same name as uploads, it uses 2 prefixes thumbsm., and thumbnail.
With a thumbnail prefix ( this is further expanded upon as "thumbtype" in 3.4 ) it is somewhat mitigated for collisions, no one is going to generate a thumb called thumbs/extragallery.mykittykat.jpg on accident for example.

also 3.4 has thumbnail getters and setters for getting and generating thumbs based on thumbtype ( draft atm ), which would be automatically available to users if using this location and naming.

for example i18n gallery is already compatible, as it uses
i18npic. prefix
( it also uses a size prefix after that, but that is besides the point )

I will have to look over the code for this plugin again, but I feel it is very core worthy, with some minor adjustments and some front end output functions and hooks.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#37
I dont have a "fit" option..
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#38
(2015-04-22, 07:15:17)shawn_a Wrote: But you ARE creating thumbs for uploads...

GS does not generate thumbs the same name as uploads, it uses 2 prefixes thumbsm., and thumbnail.
With a thumbnail prefix ( this is further expanded upon as "thumbtype" in 3.4 ) it is somewhat mitigated for collisions, no one is going to generate a thumb called thumbs/extragallery.mykittykat.jpg on accident for example.

also 3.4 has thumbnail getters and setters for getting and generating thumbs based on thumbtype ( draft atm ), which would be automatically available to users if using this location and naming.

for example i18n gallery is already compatible, as it uses
i18npic. prefix
( it also uses a size prefix after that, but that is besides the point )

I will have to look over the code for this plugin again, but I feel it is very core worthy, with some minor adjustments and some front end output functions and hooks.

shawn_a,

I never tested this plugin GS 3.4. Maybe when it will be released I can use some code from core.

Yes fit method is not implemented I have it in development version but it missing many many lines of code.
http://flexphperia.net - my portfolio
Reply
#39
New version: 1.03

- new image size validator: validate image width or height by specified ranges

http://get-simple.info/extend/plugin/extra-gallery/858/
http://flexphperia.net - my portfolio
Reply
#40
hello, any chance to help create a front end gallery? or just a light to a newbie start study to create? thanks..
Reply
#41
I would avoid it, this plugin is not mature enough and slightly buggy.

It does not create thumbnails automatically.. at least I can never get it to.
The names are case sensitive, and you cannot change the case once saved, very annoying when using a name or id argument in code.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#42
if you want to play with it your output would be something like this.
load it with dynpages plugin or get_component

PHP Code:
// component {% gallery %}
$galleryItems eg_return_gallery('Test');
debugLog($galleryItems);

echo 
"<h2>Gallery ".$galleryItems['title']."</h2>";
echo 
"<ul>";
array_walk($galleryItems['items'],'output');
echo 
"</ul>";

function 
output($item,$key){
    GLOBAL 
$SITEURL;
    echo 
"<div>";
    echo 
'<a href="'.$SITEURL.'/data/'.$item['filename'].'" rel="lightbox">';
    echo 
'<img src="'.$SITEURL.'/data/'.$item['thumb-0']['filename'].'">';
    echo 
"</a>"
    echo 
"</div>";



I think you have to have the auto thumbnails setup before you create the gallery, in the plugins/settings
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#43
(2015-07-22, 06:29:24)shawn_a Wrote: I would avoid it, this plugin is not mature enough and slightly buggy.

It does not create thumbnails automatically.. at least I can never get it to.
The names are case sensitive, and you cannot change the case once saved, very annoying when using a name or id argument in code.

I have never problems with that what you writing. Of course the name is case sensitive, I don't remember but it's the same in I18N Gallery. Thumbnails creates automatically if you only select that option in settings.
http://flexphperia.net - my portfolio
Reply
#44
New version: 1.04

- bug fixes, now all gallery names are case insensitive

http://get-simple.info/extend/plugin/extra-gallery/858/
http://flexphperia.net - my portfolio
Reply
#45
thanks for the reply.. i will try this and i hove some more option here.. but i will try to make this work.
Reply
#46
You should make auto thumbs the default when installing.
( you can use GSIMAGEWIDTH to set it )


Because there is no way other than recreating your gallery to get them to generate.
Or auto regen if they do not exist on viewing the gallery config.

having the backend settings available per gallery would be kind of a nice feature also.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#47
(2015-07-22, 23:57:39)shawn_a Wrote: You should make auto thumbs the default when installing.
( you can use GSIMAGEWIDTH to set  it )


Because there is no way other than recreating your gallery to get them to generate.
Or auto regen if they do not exist on viewing the gallery config.

having the backend settings available per gallery would be kind of a nice feature also.

I think that GSIMAGEWIDTH  is for other purposes than galleries. Setting thumbnail width automatically is not good idea for me.

You can install plugin as many times as you need and use every instance with different settings (see plugin description).
http://flexphperia.net - my portfolio
Reply
#48
Hi there,

I may have found a bug in the gallery array, concerning the thumbs filenames:

While ['thumb-0']['filename'] holds a string equal to "ExtraGallery/thumbs/images/filename-123-456-....jpg",
['thumb-1']['filename'] has a value of "images/filename-234-567-....jpg", skipping the "ExtraGallery/thumbs/" part. Both images get scaled correctly and reside in the thumbs/image directory.

Perhaps it's a result of different settings for both: thumb-0 is set to required and autocrop, while thumb-1 goes with optional setting and manual cropping. As said before, in both cases the thumbnails where stored without problems, only the filenames (i.e. paths) differ.

So, is this intended behaviour or do you have an idea, why this happens?

ExtraGallery v1.04,
GetSimple v3.3.6,
php 5.3.29

If you need further information, I can post config files and/or some sample return array.

ps.: For my website in development, I have translated ExtraGallery to german (de), if you're interessted in a copy of the lang file, just tell me how to share it to you.
Reply
#49
Atratus, bug fixed in new 1.05 version.
http://flexphperia.net - my portfolio
Reply
#50
(2015-08-13, 16:15:59)mganko Wrote: Atratus, bug fixed in new 1.05 version.

Thank you!
Reply




Users browsing this thread: 2 Guest(s)