News:

Wondering if this will always be free?  See why free is better.

Main Menu

Simplifying attachments

Started by Sir Osis of Liver, May 10, 2022, 12:54:58 AM

Previous topic - Next topic

Sir Osis of Liver

I've replaced the new and improved attachments feature in Post.template.php with the 2.0 code.  It's much simpler and less confusing, and seems to work fine in pc and mobile view. Am assuming it will cause some problems, what should I be looking out for?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

Does it work? Does it work without errors? Have you tested everything in it?
If all is yes, you should be fine - It's a template, nothing really meaningful functionality wise should be there.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

Just getting an undefined index error, which is easy enough to fudge, but it seems to work fine.  Will kick it around some tomorrow.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Antechinus

Won't you lose the ability to do inline attachments?

GL700Wing

Quote from: Antechinus on May 10, 2022, 02:47:43 AMWon't you lose the ability to do inline attachments?
Not if I modify the Post and PM Inline Attachments mod to support the changes made by @Sir Osis of Liver ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

FrizzleFried

Any chances of bringing this to the masses when you've completed? I can't speak for 2.1.2's tweaks (I think there have been some) as I've not installed yet,  but 2.1.1's attachment system could certainly use some UI improvement.

FrizzleFried

I can now speak for 2.1.2 (i just insalled it in my sandbox and I see no UI difference between 2.1.1 and 2.1.2)... it's UI is just obtuse compared to the ILA mod from 2.0.x.. (sorry guys,  it just is... I wish it wasn't,  but it is.  Again, why the extra step of having to click UPLOAD?).


Antechinus

Quote from: GL700Wing on May 10, 2022, 05:13:44 AM
Quote from: Antechinus on May 10, 2022, 02:47:43 AMWon't you lose the ability to do inline attachments?
Not if I modify the Post and PM Inline Attachments mod to support the changes made by @Sir Osis of Liver ...
You're a glutton for punishment. :D

Quote from: FrizzleFried on May 10, 2022, 07:53:33 AMIts UI is just obtuse compared to the ILA mod from 2.0.x.. (sorry guys,  it just is... I wish it wasn't,  but it is.  Again, why the extra step of having to click UPLOAD?).
Might be worth a mod to handle this automatically. Not sure how much code it would be, but I suspect not much.

Sir Osis of Liver

I don't consider myself to be much dumber than your typical forum member (I may well be), but it's way too complicated.  Too many steps, too many buttons, too much information.  Used it several times here, still find it confusing.  A bad solution to something that wasn't a problem. :P
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Antechinus

#9
It could be streamlined a bit. A change of presentation might help. I don't find it confusing myself, but it is more of a nuisance than it needs to be.

ETA: TBH I think the default icons sizes there are just plain idiotic. The paperclip icon is just ugly, and there is absolutely no need for it to be 128x128. The whole thing can be made much more compact with a 48x48 icon and the removal of a lot of superfluous padding.

Also, the drag/drop box with the "Upload all" button should be above the attachments. That way people would find it much easier to use and be less likely to forget to "Upload all".

ETA again: And don't get me started on the markup. I might start ranting about people who don't realise a div is not the only block level element on the planet, and therefore think that absolutely everything has to have a div around it. :P

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Quote from: Antechinus on May 10, 2022, 04:45:16 PMMight be worth a mod to handle this automatically. Not sure how much code it would be, but I suspect not much.

You just replace the one block of code that handles attachments from 2.0 Post.template.php to 2.1 template.  Haven't done anything else to it.  Responsive css could use a tweak or two, but otherwise it seems to work just like 2.0.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Antechinus

I don't want it to work just like 2.0. I want to keep the ability to use inline attachments without requiring a mod. :P

Oh and drag/drop is worth keeping too, IMO.

Sir Osis of Liver

Quote from: Antechinus on May 10, 2022, 06:18:06 PMI want to keep the ability to use inline attachments without requiring a mod.
Isn't that what img tags are for?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

No, not really, because img tags do other things. That said, the attach bbc will still work - if you can work out what the ids are.

Sir Osis of Liver

Modify doesn't work right.  If you add another attachment when other attachments exist, only the new one is displayed under post, and if you Modify and remove that one, it leaves dead space below quickbuttons.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Antechinus

Quote from: Sir Osis of Liver on May 10, 2022, 06:42:29 PM
Quote from: Antechinus on May 10, 2022, 06:18:06 PMI want to keep the ability to use inline attachments without requiring a mod.
Isn't that what img tags are for?
I thought you wanted to simplify the process. :P

Antechinus

Had a thought about this. Attachment previews get a green border when uploaded, or a red border when deleted. It may be worth adding a yellow or orange border by default, so that there is a visual indication that something needs to be done (ie: upload the thing).

Combine that with the "Upload all" button at the top, and I think it would reduce the number of grumbles a bit.

Advertisement: