News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Better attachments handling

Started by radu81, November 22, 2013, 04:24:46 PM

Previous topic - Next topic

Arantor

Which is why I specifically even then linked it for you. But since you're not reading my posts, I think we're done here.

w5hro

First of all I have read every post down from where I first posted after I found this topic and quickly read through bits and parts of it. Your post from last night only said "Inline Attachments" so I did a search based on that. Then your other post today gave a link which I went to right away and I thought it was the same mod. Second of all I just tried that other mod and there are install problems with it as well.

I think everyone fully understands that this is free forum software and that volunteers are contributing to it in their spare time and that's a great thing. Unfortunately, your responses comes across like someone just trying to pass the buck elsewhere. That's pretty much the overall response this topic has received.

Anyway, not trying to cause trouble, but Inline attachments are in fact a useful and often necessary feature with many forums. It would be nice if it was added and maintained as a standard feature so it works correctly and not be a resource hog like phpBB3 and other forum software by slowing down page loads, etc. Many users would greatly benefit from it.

That's my final two cents worth...



radu81

for inline images you may use this mod https://github.com/Spuds/SMF-ILA like Arantor said.

I am using it on 3 SMF forums, it's still supported and works well with SMF 2.0.7. No errors during install
sorry for my bad english

w5hro

Quote from: radu81 on May 21, 2014, 01:54:27 PM
for inline images you may use this mod https://github.com/Spuds/SMF-ILA like Arantor said.

I am using it on 3 SMF forums, it's still supported and works well with SMF 2.0.7. No errors during install

It doesn't work on mine, several install errors...

Anyway, the point being if it was already part of SMF there wouldn't be a need for all of this, right?

Later...

Arantor

The point, which was made multiple times in this thre-- oh. Well, anyway. The developers are not against the idea, there are simply more important things for them to be doing and more significant interest would have been required to justify pushing the next version back even further. Mind you, conservatism is a huge part of the team's developmental ethos and some of the things in 2.1 wouldn't have been there if I hadn't just pretty much ignored the rest of the team to implement them in the first place. At the time I wasn't against the idea, as this thread shows. I just needed more justification. These days, I don't see it as my problem, just my place to point out that it is a good idea and why it should be included.

w5hro

Quote from: Arantor on May 21, 2014, 03:17:24 PM
The point, which was made multiple times in this thre-- oh. Well, anyway. The developers are not against the idea, there are simply more important things for them to be doing and more significant interest would have been required to justify pushing the next version back even further. Mind you, conservatism is a huge part of the team's developmental ethos and some of the things in 2.1 wouldn't have been there if I hadn't just pretty much ignored the rest of the team to implement them in the first place. At the time I wasn't against the idea, as this thread shows. I just needed more justification. These days, I don't see it as my problem, just my place to point out that it is a good idea and why it should be included.

Well, the in-line attachments thing is about the only thing I can see in this topic that would be worth while adding because people do use it. All of the other stuff requested like auto-resizing, etc. would be a cumbersome task and add nothing but fluff. The PM attachment thing though is a separate issue all together.

One of the first things I did when switching to SMF was search for the in-line and PM attachments mods and I was really disappointed to find what was there was somewhat outdated. Those are two main features I myself really hate no longer having, because they were both used extensively. I know I'm not alone in this either.

Just don't always be so critical when someone has a request or makes a suggestion. There may be more people out there who just never get in here and post or say anything.  That doesn't mean the request or idea is not valid.

Arantor

Yet again, not reading the posts. I'm not critical of the suggestion. I wasn't in any way against the inclusion of inline attachments. If you'd bothered to read the posts, you'd understand this. It just wasn't as important as the other stuff. SMF 2.1 is already almost 3 years old and still not released. At least 6 months delay was introduced by the things I did because I thought they were important; this is another thing that would have added at least a week's delay if not more to introduce (since mods and core code behave quite differently in practice)

I wanted to be sure before adding it that it was worth my time to implement, test, debug, test, retest and final debug, when only a few people were saying that they actually wanted it.

I'd ask you not to be so critical of me but it's kind of hard to discuss the matter with someone who is clearly only seeing what they want to see and damn everything else.

radu81

Try to post the errors, I'm sure it's some kind of conflict with other mods. The ILA mod Is not outdated
sorry for my bad english

w5hro

#68
Quote from: Arantor on May 21, 2014, 03:40:33 PM
I'd ask you not to be so critical of me but it's kind of hard to discuss the matter with someone who is clearly only seeing what they want to see and damn everything else.

I have been reading all the posts from when I started posting yesterday on from there. However, I did state up front that I didn't read all of post within the topic before I started. I read the first few posts then quickly scanned thought the rest here and there and I got the jest of it. Some of these topics spread over the span of a few years and I don't have the time to read every single post.

Anyway, it's not really any big deal, but to me it looked like the topic author was jumped on pretty quick in the beginning even when they stated repeatedly that it wasn't their intention. That sort of set the tone for the topic in the beginning. Not everyone has the time to read every post and maybe the tone had change somewhat over time, but at first glance it didn't come across that way. That's why I said up front I hadn't read all of them in case I missed something.

Again, it's no big deal...

Quote from: radu81 on May 21, 2014, 04:22:53 PM
Try to post the errors, I'm sure it's some kind of conflict with other mods. The ILA mod Is not outdated

I will need to install part of it manually on the testing server first, its in the subs.php file. I do have other mods so that could be why. I also have highslide installed too so we will see what happens. My main concern is how it embeds photos. If it works with highslide then maybe it does embed the thumbnails. I wont use it if it doesn't.

w5hro

I was able to install the in-line attachment mod, but it's not what I need or want, plus my highslide install would need some additional modifications because it didn't work when pics were placed inline, only when left at the end as ordinary attachments.

The main issue is the fact you cannot make attachments already uploaded inline. It's a one shot deal for new uploads only. What it needs are check boxes beside each attachment already uploaded that you can check with a "place in-line" button. Maybe the same "Uncheck the attachments you no longer want attached:" box could be used for both things.

Anyway, it was worth a shot, but that mod won't work for me so I already uninstalled it. Without the ability to place attachments in-line or back out-of line without deleting and re-uploading them it's a deal breaker.

Hope this feedback helps..

Kindred

no mod or feature will ever change the old attachments...   every mod is going to be "from this moment forward"

Even if we implemented it as a feature in the new version, it would not insert them inline for old posts.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

radu81

QuoteI also have highslide installed too so we will see what happens.
I don't know what highslide mod you are using, but if you use the HS4SMF mod from Spuds I can confirm that both mods works well toghether. You can check them in the homepage of my 2 websites in my signature

QuoteIf it works with highslide then maybe it does embed the thumbnails
It does

QuoteThe main issue is the fact you cannot make attachments already uploaded inline.
You can, you only need to place the code where you want to embed them. In the same way other scripts works, even paid like XF.
sorry for my bad english

w5hro

Quote from: radu81 on May 22, 2014, 02:31:16 AM
QuoteI also have highslide installed too so we will see what happens.
I don't know what highslide mod you are using, but if you use the HS4SMF mod from Spuds I can confirm that both mods works well toghether. You can check them in the homepage of my 2 websites in my signature

I'm using the Highslide mod that was available in the modification section of this site so that's probably why and I had to modify it a little to make it work like I wanted it to. Mainly by modifying the index.template.php file and replaciing the highslide.css file completely. Now it works great, but that mod is probably missing the code where its needs to be for the inline attachments mod. Any ideas on where to put it? It would take me a little while to manually uninstall it and replace it with the one via your link.

Quote from: radu81 on May 22, 2014, 02:31:16 AM
QuoteIf it works with highslide then maybe it does embed the thumbnails
It does

Yeah, I saw that right away where you could embed the full file size or the thumbnail. I honestly don't see why anyone would want to ever embed the full size file. That's what phpBB3 does and why its such a resource hog and makes page loads take forever :P

Quote from: radu81 on May 22, 2014, 02:31:16 AM
QuoteThe main issue is the fact you cannot make attachments already uploaded inline.
You can, you only need to place the code where you want to embed them. In the same way other scripts works, even paid like XF.

Can you give me an example? One thing I noticed is it looks like it creates funky file names. I went into the Attachment Integrity Check feature and when I ran it some weird file id names came up.

radu81

QuoteNow it works great, but that mod is probably missing the code where its needs to be for the inline attachments mod. Any ideas on where to put it? It would take me a little while to manually uninstall it and replace it with the one via your link.
never used that mod, so cannot help. You may ask in the support topic of that mod

QuoteYeah, I saw that right away where you could embed the full file size or the thumbnail. I honestly don't see why anyone would want to ever embed the full size file. That's what phpBB3 does and why its such a resource hog and makes page loads take foreve
My forum is a small one, it has almost 10 years and less than 400 users. It will never grow up much, the market for hyundai sports cars is very small in Italy. So I'm not worry to embed full images. Take a look at this topic sharkracingclub.it/index.php?topic=2245.0 . It has 5 inline images and it loads in 0.179 seconds. For me it's good enough. I have also the mod Resize Attached Images which resize all images at 1024px width.

For the last question take a look on how ILA mod works. You can choose how to insert inline images (thumbnail, full, link) and the mod automaticaly insert the bbcode
QuoteAdd an inline attachment
Example:
[attachimg=1 align=left width=400]
This will show a left-aligned image resized to 400 pixels wide with the post text flowing around it. Execpt for the attachment tag and its number all other parameters are optional
[attach=1]
This will show the attachment as a thumbnail if available, if no thumbnail is available it will use a full sized image. The image will be in line with the text of your post.

Options:
attach=x, attachimg=x, attachurl=x, attachmini=x where x is the attachment number
align=left, center, right
width=### (number in pixels)
Modes available
You can choose the inline mode you want for your attachment:
Thumbnail [attach=x] Your image will be shown as a thumbnail
Full-size Image [attachimg=x] Your image will be shown using its full dimensions up to the viewing size allowed by the forum. Images larger than the viewing size allowed by the forum will be displayed at the forum maximum and be click-able to full size
Text Link [attachurl=x] Only a link is show with size and view details. By clicking on it, the image is displayed.
Short Text Link [attachmini=x] Only a link is shown without any details. By clicking on it, the image is displayed.

You can choose how to align the inline image:
align=left The image is aligned to the left and the text will flow around it
align=right The image is aligned to the right and the text will flow around it
align=center The image is centered and the text will be below it

You can choose how wide to show the image:
width=123 The image is displayed 123pixels wide
If the width specified is larger than the image or larger than the forum allows the largest allowable width will be used
Can be used to shrink a thumbnail as well [attach=1 width=50] will display a 50px wide thumbnail

How to use it?
Step 1 :
In the file selection, select the attachment file you want to upload;
Step 2 :
Select the inline mode, if any, you want using the list box "Inline modes";
Step 3 :
Repeat the steps for each attachment you want to upload. Move and edit the tags in the message body to suit your needs.
sorry for my bad english

w5hro

Quote from: Kindred on May 22, 2014, 01:01:46 AM
no mod or feature will ever change the old attachments...   every mod is going to be "from this moment forward"

Even if we implemented it as a feature in the new version, it would not insert them in line for old posts.

Is that because it would not be able to tell which file size is which with uploaded attachments (photos) already there?

I quickly played around and was able to embed a photo with the below just to see what would happen. It was embedding image number 183. Of course 183 is only 1 of the 3 sizes of that same photo. Is it because it wouldn't be able to tell that there are 3 different photos of that same photo? Would the mod add additional or different charters to the file names to newly uploaded photos that the old ones wouldn't have?

I'm trying to understand the issue.

[img]http://my_domain.com/index.php?action=dlattach;topic=51.0;attach=183;image[/img]




Kindred

The issue is that the mod only changes the code for future inputs...

To change the old stuff, it would have to go through every message in the database, find every attachment, then process every attachment to see if it fit the "inline requirements" and then query you on what to do with inserting those attachments

In other words, a HUGE amount of work... especially on a forum with any large number of posts and/or attachments
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Pah, don't let a little thing like reality get in the way, will you?

w5hro

Quote from: radu81 on May 22, 2014, 10:51:05 AM
For the last question take a look on how ILA mod works. You can choose how to insert in-line images (thumbnail, full, link) and the mod automatically insert the bbcode
QuoteAdd an inline attachment
Example:
[attachimg=1 align=left width=400]
This will show a left-aligned image resized to 400 pixels wide with the post text flowing around it. Execpt for the attachment tag and its number all other parameters are optional
[attach=1]
This will show the attachment as a thumbnail if available, if no thumbnail is available it will use a full sized image. The image will be in line with the text of your post.

Options:
attach=x, attachimg=x, attachurl=x, attachmini=x where x is the attachment number
align=left, center, right
width=### (number in pixels)
Modes available
You can choose the inline mode you want for your attachment:
Thumbnail [attach=x] Your image will be shown as a thumbnail
Full-size Image [attachimg=x] Your image will be shown using its full dimensions up to the viewing size allowed by the forum. Images larger than the viewing size allowed by the forum will be displayed at the forum maximum and be click-able to full size
Text Link [attachurl=x] Only a link is show with size and view details. By clicking on it, the image is displayed.
Short Text Link [attachmini=x] Only a link is shown without any details. By clicking on it, the image is displayed.

You can choose how to align the inline image:
align=left The image is aligned to the left and the text will flow around it
align=right The image is aligned to the right and the text will flow around it
align=center The image is centered and the text will be below it

You can choose how wide to show the image:
width=123 The image is displayed 123pixels wide
If the width specified is larger than the image or larger than the forum allows the largest allowable width will be used
Can be used to shrink a thumbnail as well [attach=1 width=50] will display a 50px wide thumbnail

How to use it?
Step 1 :
In the file selection, select the attachment file you want to upload;
Step 2 :
Select the inline mode, if any, you want using the list box "Inline modes";
Step 3 :
Repeat the steps for each attachment you want to upload. Move and edit the tags in the message body to suit your needs.

Yes, but my question was can you place old attachments (photos) in-line that were already there before you installed the mod? Are you saying that once you install the mod you can just enter the code manually within a post to manually link those old photos and the attach=1 attach=2 will automatically recognize those old files with the different sizes? Anyway, that's what I'm trying to find out. Something just doesn't sound right...

It seems to me if it were possible to do there would be a much easier way of doing it instead of using that mod and even for new uploads as well. A simple "place-inline" button beside each file upload box with the ability to press that button to upload the file before submitting the post itself. You place the cursor in the post where you want the file/image to appear and press "place in-line' and it uploads the file. Then when you are done you submit the post. At the same time you could go back if you wanted and place an attached file in-line if you didn't already do it or forgot. It shouldn't require manually entering any code. Only manually deleting code to remove the file from in-line to where it then appears at the bottom of the post like normal attachments.

w5hro

#78
Quote from: Kindred on May 22, 2014, 12:41:43 PM
The issue is that the mod only changes the code for future inputs...

To change the old stuff, it would have to go through every message in the database, find every attachment, then process every attachment to see if it fit the "inline requirements" and then query you on what to do with inserting those attachments

In other words, a HUGE amount of work... especially on a forum with any large number of posts and/or attachments

Right, but I wasn't saying the mod should automatically change every attachments that's already there. That would be stupid even if you could make it work. There are a few posts already in my forums that I would like to be able to go back and place some of the images in-line. At the same time after the mod being able to go back an place in-line new attachments already there if and when necessary without having to delete and then re-uploading them again to do it.

I think we were just not on the same page...


Arantor

(and this is why implementing it in core is nowhere near the simple task people think it is and why complex testing is required - and why a suitable amount of 'is this actually necessary' needs to be asked first because of the effort required)

Advertisement: