ElkArte Community

Extending Elk => Addons => Addons ideas and questions => Topic started by: Jorin on January 26, 2018, 02:01:03 am

Title: [1.1.1] size of attached images and migrated ILA BBC
Post by: Jorin on January 26, 2018, 02:01:03 am
1. Take a look here please:

https://www.elkarte.net/community/index.php?topic=4907.0

Why is the attached image so small?

2. I tried [attachimg=1] for the attached image, but it didn't work. So I asked myself: "What will happen with my migrated BBC rergarding attached images using the ILA addon when I upgrade to 1.1.1?"  :o
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on January 26, 2018, 07:39:36 am
As I explained you a long while ago (don't remember exactly the day, but more or less two years ago) if you are using the ILA addon, a little addon to tweak the behaviour will be needed.
Migrate the data during the upgrade was not really feasible: it would have basically meant re-parse all the messages to look for potential ILA attachments and impose on any upgrade the overhead of the check, compared to the need to build a more manageable addon or even a custom something to convert the ILA tags to the new ones.

It's not a bug, because the attach tag of the core ILA work (and actually it is completely different, being "attach" and not "attachimg" or "attachurl" or "attachmini" or "attachthumb") differently from the ones of the addon. It is meant to work with the button next to each image and not by typing by hands the numbers in the text area (not because it would not work, but simply because you are not likely to know the id of the attachment).
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on January 26, 2018, 12:20:57 pm
I think we need a way to also post inline images at full width, with just one click, without editing the code of attached images like @Spuds‍ suggested in another topic where someone else asked for this feature.

For the upgrade you csn use the search function included in elkarte and search for the old codes provided by ILA add-on and replace them manually. A few days ago I did this test on my forum and probably in an hour or max 2 hours i can replace all the older codes provided by ila add-on. 
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on January 26, 2018, 06:54:13 pm
I think there is a little bug in the ordering of the bbcodes that prevent the non-thumbnail to be picked up.
Anyway, I guess ILA attachments should respect the max-image width set for images as well (that I'm not sure is the case right now).

That said, sizing could be something like the attachment (at least, that's what I had in mind).
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on January 26, 2018, 07:14:00 pm
I'd say to keep it more simple: thumbnail or full attachment.
(Link-5475)
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on January 27, 2018, 03:56:57 pm
I'm not sure how reliable is the layout there to add long stuff...

What about like this?
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on January 27, 2018, 06:36:23 pm
I like it, and I prefer this option compared to the first you posted. Let's see what the other members think about it.

p.s. will this modification require a lot of work, or it is something simple to add? just curiosity
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on January 28, 2018, 07:37:46 am
I was thinking to test it out here and in case push it to 1.1.2.
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on January 28, 2018, 12:35:32 pm
BTW, I was looking at the code to see how to arrange everything and I would hear from you how the system should behave in the various cases.
I have my ideas, but since I do not use the feature that much they may be wrong on my assumptions.

There are two options that can define the maximum size of an attached image shown in-line in a post:
1) attachment can be set to show as thumbnail or not,
2) images can be set to a certain max size (width/height) because of the embedding limits.

So we can have these conditions:
1) attachments as thumbnails
2) attachments not as thumbnails with attach width/height smaller than BBC limits
3) attachments not as thumbnails with attach width/height bigger than BBC limits

For me, these should be the outcomes:
1) always use the thumbnail also when shown in-line,
2) show what the user asks for (i.e. thumbnail or full image or image at a certain size),
3) show what the user asks for but limited to the max-width/height defined for BBC (i.e. thumbnail, or full image limited at max-width/height or iamge at certain size provided the size is smaller than max-width/height set by the admin).

ETA: attached some new stuff. O:-)
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on January 28, 2018, 05:31:12 pm
Quote1) attachments as thumbnails
Ok for inline images as thumbnail, there isn't much to say about. The thumbnail is created based on the thumbail dimensions set into ACP, and the user should click to view the full size.


Quote3) show what the user asks for but limited to the max-width/height defined for BBC (i.e. thumbnail, or full image limited at max-width/height or iamge at certain size provided the size is smaller than max-width/height set by the admin).
I'd say this is correct, if we set limits for inline images, those limits should be respected but also overwritten by max-width based on screen resolution.

For me, max width and max height could be removed from ACP, but that's just my opinion. Probably someone is using these settings, so better keep them ..  I always used the full image resized to the maximum width available on screen.
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: Ruth on January 29, 2018, 01:11:44 am
It is looking quite good - but is it necessary to be done in this way? It is a feature which will make "old inline-attachments" looking proper now. But would this new feature be useful, if you don't had any inline-attachments before 1.1.1?

Maybe I don't understand completly what you are talking about. O:-)
 
We use the attachments in full-size, 780 pixel width, no thumbnails are shown, but they always had to be enabled in the settings (in 780 px width), otherwise it did not look as expected . Inline-attachments are working perfect in this size.

Our members would get very confused about more than one opinion to make inline-attachments. I think, they could not handle this new feature and I fear they will make a mess with their attachments very often. ::)

Would it be possible to disable this new feature, if we don't need it?

And another question:

Will this addon http://addons.elkarte.net/utility/Attachment-Resize.html work with this new feature?
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on January 29, 2018, 01:58:44 am
This s just a visual goodie to make it easier to better control inline attachments. It doesn't affect what has been done in the past.

The way I'm building it, I guess for your specific needs you will edit the theme removing all but the default options.

BTW, this is all possible even today, I'm not adding anything else than a way to see these options from the user interface. ;)
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: Ruth on January 29, 2018, 02:32:56 am
Thank you for the explaination, Emanuele.

There are such a lot of very nice and useful features and possibilies in ElkArte, I like them very much.

But only a very few of our members are using them. They want to do everything the way, they always did it - or the way, they know it from other forums.  ::) Maybe they are too old to learn and handle new things.  ;) 

So I have a lot to explain to them and to help them...and this is getting more and more.
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on January 29, 2018, 05:37:48 pm
I think I have it done, maybe tomorrow evening I'll upload everything here to give it a try. O:-)
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on January 30, 2018, 05:53:31 pm
I did it... and for the moment is not completely broken (even though it's probably still not totally coherent as described above).
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on February 02, 2018, 03:47:33 am
No comments? O:-)
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: Ruth on February 02, 2018, 12:40:29 pm
It is looking quite good, Emanuele. I did not see, it was already there by writing in the forum.

It seems not to work completley for me, just tested:

full size (Link-5497)

thumbnail (Link-5498)

Custom size seems not to work? (Berta) Nothing to see from this picture in my post?
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on February 02, 2018, 02:34:32 pm
Now should be fixed!
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on February 02, 2018, 05:04:53 pm
Test

Thumbnail
(Link-5505)

300 px
(Link-5507)

Full image
(Link-5509)
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on February 02, 2018, 05:11:24 pm
Nice, but still needs some small fixes.
The thumbnail and custom size seems to work fine, but the full image is displayed as thumbnail.
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on February 03, 2018, 07:21:55 am
That's point 1 from https://www.elkarte.net/community/index.php?topic=4908.msg35753#msg35753
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on February 03, 2018, 10:26:59 am
It is not displayed as full image because full image option is disabled on this forum?
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on February 03, 2018, 11:23:08 am
Yep, the attachments are set to show as thumbnails.
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on February 03, 2018, 02:08:20 pm
Now I can say that the attachment part in elkarte is complete, nice work!  8)
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on April 02, 2018, 08:17:21 pm
Quote from: radu81 – It is not displayed as full image because full image option is disabled on this forum?
Quote from: emanuele – Yep, the attachments are set to show as thumbnails.
Sorry if I insist on this, I thought that full image was disabled only here on elkarte.net, but as I can see in the Ila.integrate.php, full image will be shown only if there are the attributes like width or height or align. If one of those attributes exists, the ;thumb part will be removed from the link to show the full image.
I understand now how it works, but I think it's not intuitive, or at least it wasn't intuitive for me. I expected to see the full image even without other attributes.
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: emanuele on April 07, 2018, 04:10:06 pm
https://github.com/elkarte/Elkarte/pull/3157/commits/0ec60495e41f6c8a959bed7d400afaff6371fd70
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: radu81 on April 09, 2018, 06:00:39 pm
I overwrited my Ila.integrate.php with this file and I see the thumbnail instead of the full image, but also the thumbnail under the post.

I don't know how you intend to handle the full images inline, for now they are displayed only if there is a custom size or an alignment. If there are not any intentions to display the full image even if there is no attribute, is there a way to bypass this and display the full image inline (even without attributes)?
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: Jorin on June 04, 2018, 07:18:29 am
Quote from: emanuele – I think I have it done, maybe tomorrow evening I'll upload everything here to give it a try. O:-)

x-reference to: https://www.elkarte.net/community/index.php?topic=1450.msg37497#msg37497

@emanuele Are you still working on a script to transform old ILAs? Or did I miss something? @Ruth seems to have something to convert her old ILAs?
Title: Re: [1.1.1] size of attached images and migrated ILA BBC
Post by: Ruth on June 07, 2018, 04:59:38 am
Hm? We never used inline attachments with SMF or ElkArte before... or are using them now, Jorin.