News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Uploading an attachment immediately after selecting an attachment.

Started by User2, January 28, 2023, 06:39:48 AM

Previous topic - Next topic

Sir Osis of Liver

You can remove the thumbnail with this -


.attach-preview {
display: none;
}


But don't think it's a good idea.  Reducing the size of the thumb is giving me grief.  >:(


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

                                     - R. Waters

User2

Sir Osis of Liver, I have removed the preview, but the height is still large. Is it difficult to reduce the height of the attachment?
And is it still possible to remove the size of the attachment? I don't need to know what the size of the attachment is.

Sir Osis of Liver

You can reduce the height of .infobox to 85px, any more than that and delete button will be displayed below it.  Would require editing template to fix that, which is not a good idea.


.infobox {
color: #222;
background: #cfc;
border-top: 1px solid green;
border-bottom: 1px solid green;
height:  85px;
}


You're knocking yourself out to do something that will have to be redone when 2.1.4 is released.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

User2

Sir Osis of Liver, is it still possible to remove the size of the attachment? I don't need to know what the size of the attachment is.

Quote from: Sir Osis of Liver on February 01, 2023, 08:14:58 PMWould require editing template to fix that, which is not a good idea.
Why is this a bad idea? Is this difficult to do or for some other reason?

Kindred

because it will probably break future upgrades... like the next one that modifies attachment behavior
Сл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."

Sir Osis of Liver

So far you haven't made any changes that aren't easily reversed - one edit to smf_fileUpload.js, some classes added to index.css.  But if you start messing with templates you're more likely to run into problems with next upgrade.  The more changes you make, the more diffucult it will be to find and undo them.  Wait until 2.1.4 is released, see what the upgraded attachments feature looks like, then you can do some customizing.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

User2

Sir Osis of Liver, is it still possible to remove the size of the attachment? I don't need to know what the size of the attachment is.

Sir Osis of Liver

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

                                     - R. Waters

User2

Sir Osis of Liver, I also wanted to remove the progress bar. At first I couldn't figure out what it was at all: I was thinking what kind of text input field, because I thought it was just some kind of horizontal line. It was only when I uploaded a few files that I realized that this was a progress bar. I think it will also be a long mystery for visitors.

Sir Osis of Liver

You can remove it with this -


.progress_bar {
display: none !important;
}


But it's a bad idea for two reasons:

- If a member uploads a large file, it will look like nothing's happening until upload is completed (dead air).
- It may break things in other templates.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

User2

Sir Osis of Liver, is it possible to change the position of the Delete button in a simple way? As I understand it, now the Delete button is aligned to the lower right corner. Is it possible to make the button align to the right edge in the middle or to the upper right corner?

Kindred

dude, you are seriously trying to completely design a new theme, piece by piece, one line at a time.

I suggest that you start trying to learn how CSS works and use the inspector tool of your browser.
Сл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."

User2

Sir Osis of Liver, hello, is it difficult to do what I asked in post #30?

Sir Osis of Liver

Quote from: Kindred on February 04, 2023, 01:25:10 PMI suggest that you start trying to learn how CSS works and use the inspector tool of your browser.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

User2

Sir Osis of Liver, this is my last question, I don't plan to make any more changes on my forum. Therefore, because of this question alone, I do not have such an opportunity to study CSS, because I do other things.
If this is a difficult question that could ruin the forum, then I don't need it. If this is a simple solution, like the others that you suggested in this topic, then you can apply.

Sir Osis of Liver

<sigh> We all do other things.

Not the best way to do it, but it works as a temporary solution -


.attach-ui .button {
margin: -45px 0 0 0;
}


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

                                     - R. Waters

User2

Sir Osis of Liver, when can problems occur with these changes? When the next patch is released?
I don't plan to make any more changes unless I plug in some mod in the future.

Now I accidentally saw (I use F12 and clicked Toggle device toolbar), if you change the position of the Delete button and the height of the attachment, then in Smartphone mode the elements are not where they should be.

Diego Andrés

1- Items could overlap but it might not be an issue...
2- No release date, when it's ready. You can track progress on GitHub.
3- Would need to add a css media query for that. I'm not following the topic much but hopefully Sir Osis can point you in the right direction.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Kindred

Or he could start learning some css rather than having people rewrite his whole theme one line at a time

And Yes,  any time you make a change,  you need to test on PC, tablet, and phone sized screens at thr very least
Сл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."

User2

Sir Osis of Liver, thank you for participating in this topic.
You have solved the main tasks, the remaining (height of the attachment) is insignificant.
On my forum, many attachments are not attached (up to five), so the height of the attachments will not create difficulties.

Advertisement: