Request: Download manager intergration; Mockup provided

Talk about add-ons and extension development.
Locked
User avatar
Paradox52525
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere
Contact:

Post by Paradox52525 »

"Catching Clicks" has not been added to the extension yet, it's on the horizon for the next version. Currently DownloadWith adds context menu entries for links (and links only, so if you right click a webpage it will not have downloadwith entries. They are only there when you right click a link). My modified version also overlays a second radiobutton w/ textbox onto the first download dialog box that lets you open your download in a download manager rather than open or save through the browser.

I'm not sure why you're having install difficulty though. Are you on Mozilla or Firefox? What version(s)? My modified version is not yet mozilla compatible (Firefox only) though hopefully this will be fixed soon. It shoudl still work for the context menu entries though. What platform/OS are you running?
varaonaid
Posts: 30
Joined: December 22nd, 2003, 9:04 am

More info re: extension installation

Post by varaonaid »

Thanks for your reply. I'm running Firefox 0.8 on a WinXP (home version) machine. Maybe I'm doing something wrong. I downloaded the modified extension taht I found in this forum (had a different file extension like .xpi I think) and then after I downloaded it, I clicked on it. XP didn't know what to open it with so I chose Firefox as the program to open it and then I get the error message I previously mentioned. I'd really appreciate the help. Sorry if it's just ignorance on my part. Let me know what you think :)
User avatar
Paradox52525
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere
Contact:

Post by Paradox52525 »

Oooh, for some reason open with Firefox doesn't properly launch XPI installers. Open up Firefox and go to File, Open File, then pick the file that way. It should work that way.
User avatar
Rowne Mastaile
Posts: 1434
Joined: December 21st, 2003, 3:05 pm
Location: Housed in a swirling neosma of scintillating thought and turgid ideas.
Contact:

Post by Rowne Mastaile »

I'm not sure but I think the whole editor.xul thing is a chrome.rdf error from a badly uninstalled extension. Well, I say that because I goofed an uninstall once before in the past (the first time I did it). Luckily I had a backup so there was no harm done by it. However, if you don't have a backup of your profile directory then it might be hard to fix the error.

What I suggest is that you do this:

[XP] Start > Run > Application Data

[95/98/Me] Start > Run > \windows\Application Data

If you're using 95/98/Me and \win... doesn't work. Try prefixing it with your drive letter, whichever drive windows might be on, such as c:\win... or whatever it might be.

With that done, rename Phoenix to Phoenix.old (we'll get back to this later, it's just for testing purposes). Start Firefox then install DownloadWith from the ExtensionRoom page, with that installed install Paradox's DownloadWith. I'm not sure whether you need the original DownloadWith for Paradox's to work but that's what I've always done.

If it works perfectly then there's an issue somewhere in your profile. The best thing to do then is to copy out the important files from Phoenix.old and drop them into the new Phoenix directory that would've been created by Firefox. These files are as follows and can be found in Application Data\Phoenix.old\Profiles\DEFAULT\????????.SLT, where ???????? is a collection of random letters and numbers generated for your profile.

From the main dir you'll want:

Cookies.txt
Cookperm.txt
Signons.txt
Categories.dat
Formhistory.dat
History.dat
User.js
Prefs.js
Popupcount.dat - Only if you use the Popup Count extension.

And then there's a directory in there called CHROME, from that you'll need:

Userchrome.css
Usercontent.css

Drop the first group of files into the new profile in Phoenix, and the css files into the CHROME dir of that new profile. Then start Firefox. All your options and stuff will be preserved thanks to prefs.js and the other files, but you'll need to reinstall your extensions.

If it doesn't work then delete the new Phoenix directory and rename Phoenix.old to Phoenix. Then try going to your "Program Files" directory and locating Firefox. Rename that to Firefox.old and try a fresh install. If that doesn't work, delete the new dir and rename Firefox.old back to Firefox.

If none of this works then you might have an issue with the extension and something on your system, perhaps one of the utilities or programs you run. Possibly a virus scanner because having a resident virus scanner can do as much harm as good.

Um... what else is there?

Oh! If removing the profile dir does work and you do have to reinstall your extensions, note that he problem might have been with one of those extensions you're about to reinstall. Be very watchful as you're reinstalling them and you'll probably find the culprit (but as I said before, I more strongly suspect it's an uninstall that would've caused this error rather than an install... but still...). If you do, post back here so Paradox can find a way to fix it. ^.^

I have no idea whether any of this will help you, I only hope it will because as I said, I've seen this error before and it seems to be down to a bad profile. So I thought explaining how to fix up your profile might help you.
User avatar
nexx
Posts: 736
Joined: July 29th, 2003, 1:23 am
Location: Brisbane, Australia
Contact:

Post by nexx »

Hey Paradox i have another suggestions. With the DownloadWith context menu, it adds the URL to the context menu.
eg: Right Click > 'DownloadWith' > 'Getright http://www.foo.com/bar.zip'

The problem im having with this imo, is that often URL's are VERY long, particularly ones from redirects etc. And a menu item half the width of my screen is annoying :)
I had a quick play around with the code but it seems it needs that url there to send it to the application and i really dont know any coding :/
I've resorted to a userchrome.css entry which sets a max-width of #downloadwith-menu for now.

Any help appreciated :)
<a href="http://users.bigpond.net.au/nexx1/oxpmenu/" title="Office XP Menus">Office XP Menus</a> || <a href="http://scragz.com/tech/mozilla/firefox-unofficial-branding.php"> Unofficial Firefox Branding</a>
TychoQuad
Posts: 1263
Joined: December 11th, 2002, 12:30 am
Location: Australia

Post by TychoQuad »

I would like an option to skip the second menu there altogether, and have Download with Getright appear in the main rightclick menu. Perhaps an option somewhere in Downloadwith to specify a default download manager? Perhaps a toolbar icon?
User avatar
Rowne Mastaile
Posts: 1434
Joined: December 21st, 2003, 3:05 pm
Location: Housed in a swirling neosma of scintillating thought and turgid ideas.
Contact:

Post by Rowne Mastaile »

I second this, or third it as the case might be. I'm not entirely sure, that is to say I support this regardless; which sounds better than the wording I had used.

The problem with menus in Firefox is that they're not... very good at detecting the edges of the screen. Menus in IE are usually very large anyway but if you click near the top of your screen in IE, it docks the menu to the edge of the screen; whereas in Firefox it simply scrolls off into the nowhere-land of the outer edges of one's monitor.

Normally I wouldn't be one to suggest an extension but it seems fitting here, perhaps someone will want to create a topic about it, maybe I will... perhaps.

Anyway, yes, keeping the right-click menu relatively entry-free is a good idea. Having the option of removing the 'DownloadWith' segment from the right click would be helpful. So I agree with all that's been said here. I still think though that big menus wouldn't be such an issue if Firefox docked its menus. That's just my opinion though, something I've noticed.

It's fine as it is though, as I don't use Getright or any other download managers, my right-click menus are relatively clean anyway but still, this is a neat option.

I'm not sure how plausible it is but eventually it would be nice to see someone create an extension (I'd do it myself if I were that knowledgable about XUL, whereas I'm not) which would do the docking but could also override the right-click menu with an overlay similar to Paradox's download menu (I'm not sure whether this would be possible) and the point of this overlay would be to allow you to remove any entry from any instance. So even if something put clutter there, you could remove it.

I'm not sure how possible this is... but if it were possible, it sure would make a good extension.
gbitten
Posts: 18
Joined: February 1st, 2003, 9:36 am
Contact:

Post by gbitten »

nexx wrote:Hey Paradox i have another suggestions. With the DownloadWith context menu, it adds the URL to the context menu.
eg: Right Click > 'DownloadWith' > 'Getright http://www.foo.com/bar.zip'

The problem im having with this imo, is that often URL's are VERY long, particularly ones from redirects etc. And a menu item half the width of my screen is annoying :)
I had a quick play around with the code but it seems it needs that url there to send it to the application and i really dont know any coding :/
I've resorted to a userchrome.css entry which sets a max-width of #downloadwith-menu for now.

Any help appreciated :)


I´m plannig to cut menus with long url, like:
Right Click > 'DownloadWith' > 'Getright http://www.foo.com/.../bar.zip'
It isn´t difficult do that but this is not my priority.
For now, with Paradox´s help, I am plannig to release DW with automatic download for specifics file types, work with redirect URL and make Paradox´s change works on Mozilla suite
Seikatsu
Posts: 5
Joined: March 28th, 2004, 4:51 am

Post by Seikatsu »

@Paradox/gbitten Is it possible to add an option to also pass the referrer (the url where the download link is located) into the download manager? :)
Last edited by Seikatsu on March 28th, 2004, 11:31 pm, edited 1 time in total.
User avatar
Rowne Mastaile
Posts: 1434
Joined: December 21st, 2003, 3:05 pm
Location: Housed in a swirling neosma of scintillating thought and turgid ideas.
Contact:

Post by Rowne Mastaile »

I think I can answer this one! <pleased>

The trick with that is that unlike [URL] (which is global), passing the referer would require knowledge of how the program you're sending the referer to works. For example, you can send a referer to wGET but it requires a --switch. Whereas with an URL you can just run wGET http://blah.com/thisfile.7z and it'll download. Whereas you can do the same with GetRight. Getright http://blah.com/thisfile.7z and WackGet and loads of others. Anything that supports an URL from the command-line.

However, adding the referer would require knowing the switch of the download manager in question and that would require coding in extra stuff to support those managers (bloat). This is generally not a good idea. What'd be best is if a general 'variable' was allowed for the referer. Such as [REF] which functions similarly to URL. So you could pass [URL] straight to your program and [REF] could come after a switch in the arguments string.

Though since I'm not really aware of such functions, DownloadWith might already have this. I should look into it. I probably will and I'll get back to you but if it doesn't, that's probably the best way to do it and then add the relevant switch yourself.
Seikatsu
Posts: 5
Joined: March 28th, 2004, 4:51 am

Post by Seikatsu »

I don't understand why you said what you said because what you said seemed too apparent, I was asking for the extension to be able to pass a referrer like the [URL] argument already available (maybe a [REF] like you suggested) and not anything about download managers or how they work...

I know that wGet has a --referer switch and Internet Download Accelerator has "ida.exe [URL] [REFERRER]" which then this argument would only pertain to these or to any other program that included such an option. I don't see why this referrer argument would be too hard to implement, it would only need to get the URL of the original page where the link was located at...
User avatar
Rowne Mastaile
Posts: 1434
Joined: December 21st, 2003, 3:05 pm
Location: Housed in a swirling neosma of scintillating thought and turgid ideas.
Contact:

Post by Rowne Mastaile »

That's exactly what I was saying, I just wanted to make sure we were on the same page. And that you were talking about a 'referer variable' rather than 'referer support'. The latter would involve including the switches for every program in the extension itself and that would rather suck. I was just seeing if we were talking about the same thing, that's all.

Yes, I support a [REF] variable too, that'd be nice to see. Any explicit support though wouldn't, it'd detract from the versatility and openness of the extension.
SimmonsJ2K
Posts: 920
Joined: February 3rd, 2004, 2:45 pm
Location: Michigan
Contact:

Post by SimmonsJ2K »

Tycho, Paradox, and gbitten recieve my thanks for a great idea!

One quick question though, any possibility for an addition of Net Transport support?

Thanks again
User avatar
Paradox52525
Posts: 1219
Joined: April 23rd, 2003, 9:13 am
Location: Middle of nowhere
Contact:

Post by Paradox52525 »

Hrmm, I had thought about referrer support, it is doable as long as the download manager is capable of recieving referrers passed via command line. You would of course need to know the command line switches, and I doubt many DL managers support this, but I know a few of them do. I'm not really sure if this is necessary. Most download managers are able to either generate referrers based on the actual download URL, or pull the referrer URL from open browser windows (not many can do this with Moz/FF I suspect, but I believe a few of them can). In my experiences I've never had a referrer related problem with download managers, so I'm not sure how necessary this actually is. Does anyone have example sites where downloads get blocked from your download managers because of referrers?

Simmons, DownloadWith should support any download manager that can take a download URL as a command line parameter. If Net Transport does, then you can just add it like any other. I looked at Net Transport's site briefly and didn't see anything about command line parameters, but try adding it with just the argument of [URL]. Sometimes download managers support command line parameters but don't publish them anywhere. If NT doesn't support command line parameters then there's really no way for us to support it in DownloadWith. You could always e-mail the developers of Net Transport and see if NT hasunpublished command line parameters, or ask them to add command line parameters as a feature request. If you do manage to find any working ones, please post them here for other people, and so we can add them to our list.
AnonEmoose
Posts: 2031
Joined: February 6th, 2004, 11:59 am

Post by AnonEmoose »

copied from Leech extension to create a referrer which wget can use perhaps it can be modified to work DownloadWith with any file downloader

Code: Select all

 // create a referer URI from current page
   var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
   var refnsiURI  = ioService.newURI(baseurl, null, null);
      
   var i;   
   for (i = 0; i < urls.length; i++)
   {
      var url = urls[i].href;
Locked