Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Topic started by: Sir Osis of Liver on June 18, 2024, 06:21:00 PM

Title: Attachments progress bar
Post by: Sir Osis of Liver on June 18, 2024, 06:21:00 PM
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.
Title: Re: Attachments progress bar
Post by: Sesquipedalian on June 18, 2024, 09:07:06 PM
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.
Title: Re: Attachments progress bar
Post by: Sir Osis of Liver on June 19, 2024, 12:53:53 PM
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.
Title: Re: Attachments progress bar
Post by: shawnb61 on June 19, 2024, 02:36:51 PM
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. 

Title: Re: Attachments progress bar
Post by: Sir Osis of Liver on June 19, 2024, 09:43:32 PM
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.
Title: Re: Attachments progress bar
Post by: shawnb61 on June 19, 2024, 10:16:36 PM
Attachments.css?
Title: Re: Attachments progress bar
Post by: Sir Osis of Liver on June 19, 2024, 10:40:09 PM
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 .........
Title: Re: Attachments progress bar
Post by: Sir Osis of Liver on June 19, 2024, 10:59:59 PM
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.  :(