News:

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

Main Menu

Attachments progress bar

Started by Sir Osis of Liver, June 18, 2024, 06:21:00 PM

Previous topic - Next topic

Sir Osis of Liver

Just curious, where is the code for the attachments progress bar in 2.1.4?  I see it in core install in Curve2, but not in custom theme that's using core Post.template.php, smf_fileUpload.js, jquery.sceditor.smf.js.  Progress bar appears briefly under each attachment when it uploads, but overall progress bar is nowhere to be seen.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sesquipedalian

https://github.com/SimpleMachines/SMF/issues/7676

There have been a few small changes since then, but that should show you what you seek to know.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Sir Osis of Liver

Well, yes, I know about that, but the overall progress bar is displayed correctly in Curve2 but not in custom theme, that's why I asked where the code is.  IIRC, this theme originally included a modified attachment feature that I had cobbled together when 2.1 was first released.  I'm trying to restore the core feature after patching up to 2.1.4, and have been mostly successful except the progress bar is missing.  Not really a big loss, but I'm concerned about causing problems with future updates.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

I think that's under .js control.  Setting the progress bar up would be in smf_fileUpload.js.  Formatting it would be in attachments.css.  There's a single line in Post.template.php.  In all files, search for "max_files_progress". 

If you've modified any of this, you might want to go back to the originals. 

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

That's what I'm trying to do, but it was a while back I modded it and don't remember which files were edited.  I've replaced Post.template.php, smf_fileUpload.js, jquery.sceditor.smf.js with core files and everything works like it's supposed to in 2.1.4, but the progress bar is still missing.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

#6
Been looking through css for past hour, no help.  Uploading core attachments.css doesn't restore progress bar.  There's this in custom.css -


#drop_zone_ui {
display: none;
}
#total_progress {
width: 50%;
display: none;
}
#max_files_progress, #max_files_progress_text {
display: none !important;
}


But removing it has no effect.

Just a sec, think I found it .........
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

Yep, here it is -


#max_files_progress, #max_files_progress_text {
    display: none !important;
}


It's in index.css and custom.css.  Was working with one file at a time from what I saw in inspector, but have to remove it in both files to restore progress bar.  Colors are a little messed up, but that's easy to fix.  Don't remember taking it out, or why I would have done so, but there's much I don't remember.  :(

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

                                     - R. Waters

Advertisement: