Page 1 of 2

Tiny little hack... 0.30.3

Posted: 20 Feb 2007, 19:03
by bubbalibre
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.

Posted: 21 Feb 2007, 08:48
by tor
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

Posted: 21 Feb 2007, 09:56
by bubbalibre
Thanks Tor.

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

Posted: 23 Feb 2007, 17:17
by lelle
Beautiful work, bubbalibre :D

Posted: 23 Feb 2007, 20:58
by bubbalibre
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.

Posted: 26 Feb 2007, 19:28
by lelle
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

Posted: 26 Feb 2007, 20:38
by bubbalibre
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 ?

Posted: 27 Feb 2007, 03:27
by tor
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

Posted: 27 Feb 2007, 03:35
by bubbalibre
Sorry Tor, I didn't wait to find out...

Posted: 27 Feb 2007, 11:05
by lelle
Hi tor,

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

Posted: 27 Feb 2007, 15:08
by Johnny
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:

Posted: 27 Feb 2007, 16:14
by tor
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

Posted: 27 Feb 2007, 18:11
by Tompa
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?

Posted: 28 Feb 2007, 04:19
by bubbalibre
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.

Posted: 28 Feb 2007, 14:22
by Johnny
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