hiddenriver Posted October 15, 2006 Report Share Posted October 15, 2006 EditThe Google gadget has moved. The new version of the gadget is at http://thinkpond.org/content/view/12/.I wrote a google gadget that shows the status of all my torrents from my google home page.To add it, go to http://www.google.com/ig, signing in if necessary. Click the link to customize your home page if you haven't done it already. Click "Add more to this page" in the top left. Click "Add by URL" to the right of the search button. Enter http://river.hidden.googlepages.com/uTorrent.xml as the URL. Click "Back to home page" in the top left. Then configure it. You'll need to enable the WebUI guest user and find out your IP address. It'll might take a while to load the first time.Let me know what you think and I'll maybe make some improvements.EditDoesn't work in Internet Explorer! And it probably never will. Sorry.Edit (Ultima): Adding XML source in case the link ever goes down...<iframe id="torrent_frame_0" width=0 height=0 scrolling=auto marginwidth=0 marginheight=0 frameborder=0 src=""></iframe> <iframe id="torrent_frame_1" width=0 height=0 scrolling=auto marginwidth=0 marginheight=0 frameborder=0 src=""></iframe> <script type="text/javascript"> var prefs = new _IG_Prefs(__MODULE_ID__); var address = prefs.getString("address"); var port = prefs.getInt("port"); var guest = prefs.getString("guest"); var period = prefs.getInt("period"); var guestUrl = "http://" + guest + "@" + address + ":" + port + "/gui/guest.html"; // document.write("<iframe id=\"torrent_frame\" width=100% height=100% scrolling=auto marginwidth=0 marginheight=0 frameborder=0 src=\"" + guestUrl + "\"></iframe>"); var currentFrameIdx = 0; function hideFrame(frameIdx) { var frame = _gel("torrent_frame_" + frameIdx); frame.width = 0; frame.height = 0; } function showFrame(frameIdx) { var frame = _gel("torrent_frame_" + frameIdx); frame.width = "100%"; frame.height = "100%"; } function refreshFrame(frameIdx) { var frame = _gel("torrent_frame_" + frameIdx); frame.src = guestUrl; } function handleTimeout() { var otherFrameIdx = 1 - currentFrameIdx; hideFrame(currentFrameIdx); showFrame(otherFrameIdx); refreshFrame(currentFrameIdx); currentFrameIdx = otherFrameIdx; window.setTimeout('handleTimeout()', period * 60 * 1000); } showFrame(1 - currentFrameIdx); refreshFrame(1 - currentFrameIdx); window.setTimeout('handleTimeout()', period * 60 * 1000); </script> Link to comment Share on other sites More sharing options...
muwa Posted October 15, 2006 Report Share Posted October 15, 2006 Good job. Tried it with Google Pages and it works great. Thanks Link to comment Share on other sites More sharing options...
Ultima Posted October 15, 2006 Report Share Posted October 15, 2006 Now that is an interesting idea =o Link to comment Share on other sites More sharing options...
Conrad Poohs Posted October 16, 2006 Report Share Posted October 16, 2006 Very cool idea!I hope you don't mind, but I grabbed your source code and made a few improvement:-Title changed to "µTorrent"-Added: "Admin Login" setting, which is used to link gadget title to full WebUI-Added: Show: 5/10/20/40 Torrents setting-Shortened other option labels to avoid text wrapping @ 1024 screen resolutionhttp://conradpoohs.com/uTorrent.xmlIf you want to host this version, I'll take it off my webspace to avoid confusing others. Link to comment Share on other sites More sharing options...
ICleolion Posted October 16, 2006 Report Share Posted October 16, 2006 Very nice, thanks for this. The amount of webui inspired add-ons is growing nicely We are gonna need that extra sub forum soon Firon Link to comment Share on other sites More sharing options...
hiddenriver Posted October 16, 2006 Author Report Share Posted October 16, 2006 Thanks Conrad. I made a few cosmetic changes and updated the version I'm hosting. The most important change was adding your name as a contributor! I don't mind you hosting it, in fact I bet your server is more reliable than google pages! But I do intend to make more changes in the future and there is no need for the code to fork. If it ever gets popular, maybe I'll find somewhere more central to host it. Thanks again. Link to comment Share on other sites More sharing options...
Ultima Posted October 16, 2006 Report Share Posted October 16, 2006 You could always place everything in webui.zip, and access it via http://IP:port/gui/uTorrent.xml Or if your files conflict, place it in a subdirectory of webui.zip, so that you access it via http://IP:port/gui/googlegadget/uTorrent.xmlOr something like that anyway. It makes sense too that way, since µTorrent has to be running for it to work. Of course, that means tiny modification with regards to login and stuff, but at least it sorta decentralizes everything. Link to comment Share on other sites More sharing options...
hiddenriver Posted October 16, 2006 Author Report Share Posted October 16, 2006 That's an interesting idea Ultima. I wouldn't have thought of that. There's at least one problem I think of. Google won't connect to a server using a username or password and the WebUI guest account still requires that you enter a username. If that was changed it should work though.That's why the google gadget embeds the WebUI in a frame. The javascript security model prevents it from connecting to the utorrent server directly and it can't do it through the google content fetch system because of the username. If the username was removed, the gadget could ask google to fetch the WebUI page for it and then do stuff with the result, like remove columns that don't fit in a google gadget screen area and size the gadget automatically based on the number of torrents. It could also do stuff like notify you when torrents complete and a bunch of other stuff. Just an idea Another useful feature for doing this kind of think would be an XML description of the torrents. HTML is okay but its more difficult to parse and it's likely to change with future versions of utorrent. Link to comment Share on other sites More sharing options...
Alpha-Toxic Posted October 16, 2006 Report Share Posted October 16, 2006 hmmm...have u tried enabling the guest account in uT? Perhaps if u use a blank username for the guest account u *may* get round google's limits. Link to comment Share on other sites More sharing options...
Ultima Posted October 16, 2006 Report Share Posted October 16, 2006 Nope, I doubt that'd work, as the guest name can't be blank.@hiddenriver: That's what I was afraid of... grr... (I don't use google.com/ig, which is why I wasn't sure ) So it doesn't work even with http://guestname@IP:post/gui/uTorrent.xml ? Link to comment Share on other sites More sharing options...
Alpha-Toxic Posted October 16, 2006 Report Share Posted October 16, 2006 lol, i knew i shoud try it first Link to comment Share on other sites More sharing options...
hiddenriver Posted October 17, 2006 Author Report Share Posted October 17, 2006 Ultima: actually there's a chance it will work. I know for sure that the google gadget API does not allow you to fetch data from a username / protected site (because that was the first thing I tried!) But it may be possible for google to download the gadget xml with a username / password. I'll try that when I get a chance... I give it 50/50 EditI don't think it works. I was able to put uTorrent.xml into WebUI.xml and view it in firefox locally with http://user:pass@address:port/gui/uTorrent.xml. I verified that the port was open on my firewall and tried the same URL with google and it said it couldn't download it. I tried using port 80 in case it didn't like unusual ports. Didn't work I'm pretty sure it just doesn't like URLs with a username or password and I can understand why! Link to comment Share on other sites More sharing options...
Ultima Posted October 17, 2006 Report Share Posted October 17, 2006 Aw... Oh well, worth the try, at least Link to comment Share on other sites More sharing options...
zman3 Posted October 17, 2006 Report Share Posted October 17, 2006 ok kill me if you want but the web ui works in ie7 and this does not anything i can do to the code ?EDIT:I'm hosting the xml on my own server so i can make changes Link to comment Share on other sites More sharing options...
Conrad Poohs Posted October 17, 2006 Report Share Posted October 17, 2006 zman3: IE7 (like IE6) doesn't support username@host URLs. Microsoft disabled it a year or two ago after some security issues. Unfortunately, they don't offer any alternative way to send a username as part of an URL.If you're lucky, the release version of WebUI might have an option to allow guest access without an account. Link to comment Share on other sites More sharing options...
zman3 Posted October 17, 2006 Report Share Posted October 17, 2006 well how annoying of microsoft lol thanks Link to comment Share on other sites More sharing options...
Lord Alderaan Posted October 17, 2006 Report Share Posted October 17, 2006 During my mIRCscripting I did some research and found out that a http authorization (a username:password in a url) is sent as part of the request header to the web server as:Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=Where dXNlcm5hbWU6cGFzc3dvcmQ= is the base64 encoded username:passwordWebsite that encodes/decodes base64:http://makcoder.sourceforge.net/demo/base64.php?process=Encode&plain=username:passwordI dunno if you can send custom headers and if its posible to encode base64 on the fly. In fact I know nothing about google gadgets but maybe it helps with the IE support... Link to comment Share on other sites More sharing options...
hiddenriver Posted October 17, 2006 Author Report Share Posted October 17, 2006 There's no way of adding a header to the HTTP request unfortunately. The only hope for IE support is Microsoft reinstating username:password@ in urls or an option to disable authentication for guests in WebUI. Link to comment Share on other sites More sharing options...
ICleolion Posted October 17, 2006 Report Share Posted October 17, 2006 IE support for those users who really want ithttp://forum.utorrent.com/viewtopic.php?id=14600 Link to comment Share on other sites More sharing options...
AnonymousOne Posted October 22, 2006 Report Share Posted October 22, 2006 This is from a friend of mine GECS @ www.bitspyder.net .... he added this to a post of mine when I told everyone about the new WebUI---------If you are going to use this syntax http://user:pass@host.domin and you use IE6 then you have to be sure that you have disabled the security that prohibits this syntax."How to disable the new default behavior for handling user information in HTTP or HTTPS URLsTo disable the new default behavior in Windows Explorer and Internet Explorer, create iexplore.exe and explorer.exe DWORD values in one of the following registry keys and set their value data to 0.For all users of the program, set the value in the following registry key: HKEY_LOCAL_MACHINESoftwareMicrosoftInternet ExplorerMainFeatureControlFEATURE_HTTP_USERNAME_PASSWORD_DISABLEFor the current user of the program only, set the value in the following registry key: HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMainFeatureControlFEATURE_HTTP_USERNAME_PASSWORD_DISABLE"Source : http://support.microsoft.com/kb/834489/en-us Link to comment Share on other sites More sharing options...
Ultima Posted October 22, 2006 Report Share Posted October 22, 2006 Yeah, mentioned a while ago, but that problem isn't the issue at hand. The problems is that Google doesn't accept those kinds of URLs in the first place, which makes attempting to log in in that fashion rather useless. Link to comment Share on other sites More sharing options...
mcdjork Posted October 22, 2006 Report Share Posted October 22, 2006 Does anyone who knows how feel like adding a feature in the settings that lets you choose whether you want to display downloading, uploading, all or active torrents? I'm seeding too many to display them all, and if I were to just be able to see the active torrents, this gadget would be far more useful. Thanks! Link to comment Share on other sites More sharing options...
AnonymousOne Posted October 22, 2006 Report Share Posted October 22, 2006 I have never used google so I don't know the benifits of it ... but what I did do was use my Windows Active desktop. You can put about 4 or 5 different web pages/sites in as your wall paper ... works great ... If you leave user name and password blank it will prompt you for it when the page loads / computer boots.Win XP---------Right click on desktopClick propertiesClick Desktop tabat bottom click Customize Desktopclick Web tabClick NEWPut in any web page / site you want such as http://address:port/gui/guest.html or http://address:port/gui/uTorrent.xmlClick OK"add item to active desktop?" Click OK or click customize to enter in a username and pass. (guest account doesn't work because password is required)Once entered it will try to sync the page first ... this will fail if you did not use a username and password. That is OK.Click OKClick oketc ...Blank Page will appear on screen and then a prompt for username and password.Once user info is entered it will work normally.To refresh your stats ... right click on anything ... a pop up list will appear ... click refresh.I sort my torrents by clicking the DONE colum. It may seem that it doesn't work .. but in a few seconds the colum will be sorted .. I like the 0% at the top and the 100% at the bottom but you set it how you like :-)Another page I like to have in my active desktop is http://www.celebscentral.net/spreadtheword.aspUse the right click refresh to change picsUse right click open in a new window to see pic in full.Anonwww.bitspyder.netbest e-Learning only tracker Link to comment Share on other sites More sharing options...
hiddenriver Posted November 20, 2006 Author Report Share Posted November 20, 2006 I finally put together a site to host the utorrent Google gadget together with some instructions. The newest version is at http://thinkpond.org/content/view/12/. If you're using the old one I originally posted here, don't worry it will continue to work! Link to comment Share on other sites More sharing options...
SpookyET Posted December 10, 2006 Report Share Posted December 10, 2006 A Netvibes module would be cool. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.