Tiny little hack... 0.30.3

How are you using your Bubba? Got ideas for a cool modification? Share!
bubbalibre
Posts: 117
Joined: 01 Feb 2007, 09:33
Location: Paris, France

Tiny little hack... 0.30.3

Post by bubbalibre » 20 Feb 2007, 19:03

Edit for Excito's team: I'm using this beautiful picture of the bubba from your website for myself and I just realize it was included in the archive. I can remove it if this is a problem.

Hi everyone,

I'm very happy with the update !

Here is my tiny little hack again. Nothing new, except that long names in the downloader are trimed to 50 characters and the sizes are more precise.

Image
The site design is still by gorotron (I used blueberry this time) and the new icons in the file manager are from Nuvola.

Oh ! And I tweaked the file manager a bit :
  • - the headings of the table are aligned with the other rows
    - long names are trimed to 40 character
    - the download icon is now after the name, so files and folders names are aligned
Image

The modified files can be downloaded as an archive: Remember : always make a backup before you try anything.

I hope you'll enjoy it.
Tell me what you think.

tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor » 21 Feb 2007, 08:48

Hi bubbalibre,

Please go ahead and use our pictures for this.

Nice work once again :)

Now that we got the latest update out the door. We will most likely give the downloadmanager and filemanager some more love. And as said before we would love to use some of your ideas on this.

/Tor
Co-founder OpenProducts and Ex Excito Developer

bubbalibre
Posts: 117
Joined: 01 Feb 2007, 09:33
Location: Paris, France

Post by bubbalibre » 21 Feb 2007, 09:56

Thanks Tor.

If I can can assist in any way, just say so.

lelle
Posts: 69
Joined: 02 Jan 2007, 20:25
Location: Stockholm, Sweden

Post by lelle » 23 Feb 2007, 17:17

Beautiful work, bubbalibre :D

bubbalibre
Posts: 117
Joined: 01 Feb 2007, 09:33
Location: Paris, France

Post by bubbalibre » 23 Feb 2007, 20:58

Hi, lelle. I'm glad it pleases you.

It seems I forgot something when I switch the hack to version 0.30.3.
Long names aren't trimmed in the downloader as I was saying.

To do so, you can modify the dllist.php file. Just replace each

Code: Select all

<? print $val["name"] ?>
into

Code: Select all

<? print substr($val["name"], 0, 50) ?>
Or you could just download the archive again.


To the developers : you should really use "echo", which is a command, instead of "print", which is a function. So an "echo" doesn't return anything... and runs a little bit faster.

lelle
Posts: 69
Joined: 02 Jan 2007, 20:25
Location: Stockholm, Sweden

Post by lelle » 26 Feb 2007, 19:28

Hi bubbalibre,

It looks like the script does not display the file size correctly when the file is greater than 2GB.

For instance, when downloading a DVD ISO file (4.3GB), the following is displayed:

DL: 31 KB/s (2.1 / 2048 MB) - UL: 0 KB/s (0 MB) - ratio: 0

bubbalibre
Posts: 117
Joined: 01 Feb 2007, 09:33
Location: Paris, France

Post by bubbalibre » 26 Feb 2007, 20:38

lelle wrote:Hi bubbalibre,

It looks like the script does not display the file size correctly when the file is greater than 2GB.

For instance, when downloading a DVD ISO file (4.3GB), the following is displayed:

DL: 31 KB/s (2.1 / 2048 MB) - UL: 0 KB/s (0 MB) - ratio: 0
Hi lelle,

I checked it out and you're right. Unfortunatly I don't know how to fix this...

The value that I use comes directly from the Downloader class (ipc.php). The function 'receive_command' communicates directly with the ftd process. I guess the problem comes from ftd itself, but I may be wrong.

Any idea Tor ?

tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor » 27 Feb 2007, 03:27

Hi,

This could very likely be a bug in our code (Sounds like a 32bit problem). A question though, the download succeeds? It is only the reporting that is wrong?

/Tor
Co-founder OpenProducts and Ex Excito Developer

bubbalibre
Posts: 117
Joined: 01 Feb 2007, 09:33
Location: Paris, France

Post by bubbalibre » 27 Feb 2007, 03:35

Sorry Tor, I didn't wait to find out...

lelle
Posts: 69
Joined: 02 Jan 2007, 20:25
Location: Stockholm, Sweden

Post by lelle » 27 Feb 2007, 11:05

Hi tor,

Yes, the download finishes ok, it's just the file size that is wrong

Johnny
Posts: 50
Joined: 20 Feb 2007, 14:42
Location: Sweden

Post by Johnny » 27 Feb 2007, 15:08

bubbalibre: How do I copy your files to my bubba so that it will show up as nicely as in your screenshot?

Forgive me for my novice question :oops:

tor
Posts: 703
Joined: 06 Dec 2006, 12:24
Contact:

Post by tor » 27 Feb 2007, 16:14

lelle:

Good to here that the download went well. I checked our code and it is most likely a bug. Expect a fix in next update.

/Tor
Co-founder OpenProducts and Ex Excito Developer

Tompa
Posts: 81
Joined: 03 Feb 2007, 12:50

Post by Tompa » 27 Feb 2007, 18:11

tor: I haven't actually tried this update, but I'm having a similar problem as lelle with the download page. For some big torrent files it states that the percentage is 100% even though it's not.

The download continues and eventually it's completed but there's no way of telling this other than looking at the download speed reaching 0.

I'm thinking maybe this could be related to the same issue you described?

bubbalibre
Posts: 117
Joined: 01 Feb 2007, 09:33
Location: Paris, France

Post by bubbalibre » 28 Feb 2007, 04:19

Johnny: You will need to be root to copy the files to /usr/share/web-admin/

Before you try anything, backup this directory !

Since you can't connect to a shared folder as root (which is good for security reasons), you can copy the files to your home directory (on the bubba) in a new directory, say "bubba-admin"

Then connect with ssh and go to the folder in which you copied the files earlier:

Code: Select all

cd bubba-admin
Switch to root:

Code: Select all

su root
Copy all the files to the web-admin directory:

Code: Select all

cp -r * /usr/share/web-admin/
That's it.

Johnny
Posts: 50
Joined: 20 Feb 2007, 14:42
Location: Sweden

Post by Johnny » 28 Feb 2007, 14:22

bubbalibre: Thanks for helping out here. Just one more simple question before I dare to proceed. Is this the correct command for making a backup of the files:

Code: Select all

cp /usr/share/web-admin /usr/share/web-admin.backup
/Johnny

Locked