Skip to main content
Topic: [ADDON][WIP] In Line Attachments (Read 33648 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [ADDON][WIP] In Line Attachments

Reply #90

It can be installed but it no longer works and yes that is right, ILA made with the addon no longer show the images in 1.1.x.

The BB code for the ILA in 1.1.3 is:

Code: [Select]
[attach width=400]XXXXX[/attach]

but you don't know what XXXXX is to start with. Once you add the attachment to a post you click this button which gives the options to attach the image inline:

Screen Shot 2018-05-29 at 11.54.34 AM.png

Select your options and it adds the BB code like this:

Code: [Select]
[attach width=300]post_tmp_40_fbae146c99437cf483d1a31e1a0e3f7a[/attach]

with a temporary name that it changes to the permanent name after you post your message like this:

Code: [Select]
[attach width=300]5862[/attach]

Re: [ADDON][WIP] In Line Attachments

Reply #91

I also used ILA add-on on elkarte 1.0.x and after updating to elkarte 1.1 I did not installed this add-on. I am using the inline images function included into elkarte 1.1. I know old attachments are not displayed inline, so I did a search and replaced most of them manually. Not the best solution but I didn't have alternatives. Ila add-on was used only by a few members because there was no menu to place inline images and people hate to write bbcode
sorry for my bad english

Re: [ADDON][WIP] In Line Attachments

Reply #92

I know that and this has nothing to do with my problem. But thanks for explaining others how to use the default feature.  ;)

Re: [ADDON][WIP] In Line Attachments

Reply #93

Sorry, I added the instructions for Mrs. Chaos question.

Re: [ADDON][WIP] In Line Attachments

Reply #94

Oh, sorry.  :-[

Re: [ADDON][WIP] In Line Attachments

Reply #95

Quote from: Jorin – This was or still is an addon. It can be installed with the package manager.  ;)

Quote from: radu81 – I also used ILA add-on on elkarte 1.0.x and after updating to elkarte 1.1 I did not installed this add-on. I am using the inline images function included into elkarte 1.1.

Aha, okay. I thank both of you! :)
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: [ADDON][WIP] In Line Attachments

Reply #96

Quote from: ahrasis – The ILA problem should be supported by the addon author, I think, on creating a script to convert from ILA to default feature in 1.1.3. I suspect automatic database edits will have to come together with that script.

I promised to look if the problem can be solved via SQL. That's what I archieved right now:

Code: [Select]
select att.id_msg, att.id_attach, msg.body
from elkarte_messages msg, elkarte_attachments att
where att.id_msg=msg.id_msg
and att.attachment_type=0
order by 1,2;

...selects all messages with attachments that are not thumbnails (because we only want the real images, not the from Elk created thumbnails), sorted by message and attachment id. That's a list we can work with. Now we create a help table to work with:

Code: [Select]
create table help_msg_attachments
(
msg_id int(11),
attachment_id int(11),
body longtext,
body_new longtext,
ordinal int(11)
)
CHARSET=UTF8;

Now we can fill the table, first with only one message to play with:

Code: [Select]
insert into help_msg_attachments (msg_id, attachment_id, body)
select att.id_msg, att.id_attach, msg.body
from elkarte_messages msg, elkarte_attachments att
where msg.id_msg=91684
and att.id_msg=msg.id_msg
and att.attachment_type=0
order by 1,2;

example.png

Next step: We must find out how we handle different alignments and different types of old ILA codes (for example thumbnail or image). Maybe we have to skip this and only use thumbnails without alignment for the converted codes? Don't know the best solution right now as I used both with the old addon. Alignment for my car reviews, no alignment in other threads.

Re: [ADDON][WIP] In Line Attachments

Reply #97

Quote from: radu81 – I am using the inline images function included into elkarte 1.1.

@radu81  Where is this included inline images function??? Except the BBC tag for normal inserting of images, I can't find anything. :-[
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: [ADDON][WIP] In Line Attachments

Reply #98

Go to Admin > Forum > Attachments & Avatars > Attachments settings, and scroll down, the last setting should be "Enable inline attachments"
sorry for my bad english

Re: [ADDON][WIP] In Line Attachments

Reply #99

Oh, I get an error message there:
count(): Parameter must be an array or an object that implements Countable

What does that mean exactly?
All other pages under "Attachments & Avatars" are working normally.
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0


Re: [ADDON][WIP] In Line Attachments

Reply #101

Yes, thank you, that was it. :)
Just the alteration, that is suggest by Emanuele there, worked.

Is there a new BBC button for this, that I can or must add, or do I have to write allways something in the text like [attach] ?
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

 

Re: [ADDON][WIP] In Line Attachments

Reply #102

Yes, there is a button 
screen_418.png
sorry for my bad english

Re: [ADDON][WIP] In Line Attachments

Reply #103

I've tried it now. Everything works and looks great.
Thank you guys! :)
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: [ADDON][WIP] In Line Attachments

Reply #104


Read this thread because I'm interested in the solution .. but I cannot find the "share" button on my attachments. So, I can't use that temp image file name in the [attach] tag. What could be wrong?