Upload progress / status bar Upload progress / status bar
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Upload progress / status bar

Started by mbjackass, February 23, 2007, 09:50:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mbjackass

I have been reading al lot of post about the possibility for a progress bar on the coppermine upload page. And i found out that this was impossible.
But i wanted to have it anaway.

So i decited make something that is the closest thing to an progress bar,

And i come up whit the idea to use a bar that just keeps loading if you press the upload button. (so it doesnt know how long the upload wil take it just ceeps loding and loading)

I used the bar from http://www.dynamicdrive.com/dynamicindex11/xpprogressbar.htm

this bar included in coppermine can look liks this: (img is in dutch language)

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg181.imageshack.us%2Fimg181%2F7555%2Fcopperminewy2.jpg&hash=c29065a6e4422e9e341507777e4c23c0fabb599c)

This bar is just somthing so that people know that the site is bussy and the don't click again on the button or do anything stupid.
Ive testid it with ie and firefox

So how does this work:

step 1:

Copy this code between the header tags of your template: themes/YOUR_THEME/template.html

<script language="javascript" src="xp_progress.js">

/***********************************************
* WinXP Progress Bar- By Brian Gosselin- http://www.scriptasylum.com/
* Script featured on Dynamic Drive- http://www.dynamicdrive.com
***********************************************/

</script>


step 2:

Open upload.php (main directory of coppermine):

and look for:

<input type="submit" value="{$button_value}"

And past after that: onclick="javascript:bar1.showBar()"

The result wil look like this: <input type="submit" value="{$button_value}" onclick="javascript:bar1.showBar()" class="button"/>

Then past this code on the place you want the loading bar to be shown. i past it directly under the upload button (the code above is the upload button):

<script type="text/javascript">
var bar1= createBar(300,15,'white',1,'black','blue',85,7,3,"");
</script>


Than you need tho upload everything including the attached file: xp_progress.js
the xp_progress.js file need to be uploaded in the main directory

* if jou go to http://www.dynamicdrive.com/dynamicindex11/xpprogressbar.htm you can read more about chancing the color of the bar
* you must not download the xp_progress.js file from that website, i modified it a little (the bar is now

Hein Traag

Nice idea mbjackass. Your english is fine, don't worry about that ;)

Moved it to Mods sections since it is not yet a real plugin. But it does look like a nice idea to be pluginized.

De groeten
Hein

Hein Traag

Added this mod to my own CPG using Mac OS X theme and it works perfectly!

Hein

tms_shan

hey i did as you mentioned but the progress bar keeps showing even after upload:S any fix to this? please

mbjackass

Quote from: tms_shan on March 03, 2007, 12:16:50 AM
hey i did as you mentioned but the progress bar keeps showing even after upload:S any fix to this? please

If you mean by keeps showing after upload, that the bar is showing on the page were you place the uploaded images to the album you select.
Then this is how it is meant to be, becouse if you have a lot of images you need te place then that can take some time to, so the bar is showing there to. (it's supposed to show only when you press the button, olso in the next steps)
So hope this helps, otherwise i have not yet a solution to stop the bar from showing once you hit upload button and go on tho the next steps of placing images.

(i understand by reading your replay that you have used the xp_progress.js file that i included here. and not the one frome the mentioned website. otherwise the bar is always showing.)

tms_shan

thanks man, ill wait for future modification.

sibsoft

Hello,

please also check another upload progress bar http://www.sibsoft.net/xupload.html. It will show real upload progress, not just "sand watches".

Thanks

Joachim Müller

Nice implementation. However, your app "XUpload" has two main drawbacks:
  • Not free (i.e. no coppermine-compatible license)
  • Uses Perl (while Coppermine uses PHP)

Of course it's a nice idea to implement such a feature in a language that is closer to the operating system it runs on - using Ajax to generate the client-server feedback is a good idea as well. However, there are cross-platform issues with such solutions. What I was trying to say: nice one - power-users should go ahead and give it a try. Not a solution for the mainstream (i.e. coppermine target audience) imo.

Bazzah

Has anyone had this working in firefox? I am using FF 2.0.0.6 and it won't show the bar. It works fine in Internet Explorer

pvisser

Thank It works fine. just is it posible to ad a message above the bar like MOMENT PLEASE! when starting?

Hellraiser666

Quote from: mbjackass on February 23, 2007, 09:50:20 AM

Then past this code on the place you want the loading bar to be shown. i past it directly under the upload button (the code above is the upload button):

in whatever line I find the Upload button?

marianowo


m3lvm