../Msgboard/General customization/It's back! New and improved HTML toolbars in IE & ExplorerHome
grigri - 30 Mar. 2004 - 12:24:

It's back! New and improved HTML toolbars in IE & Explorer

I finally dredged up my old code from my dungeon drive, re-wrote it all from scratch and so far, it seems to work fine :)

Don't worry, I've got rid of the yellow flashy screen, you won't be seeing that again.

The example file included is purposefully left useless and ugly. I want you lot to write interesting toolbar scripts and post them here :)

Download it here [14KB]
 
30 Mar. 2004 - 19:39 grigri
I've fixed some bugs and changed a few things, so if you downloaded it to try it out, download it again!

The example file has been updated. It's still ugly (yes, on purpose!) but not completely useless as it demonstrates a bit of plastic's request. Not a lot, but a bit :)

Anyway, I wouldn't mind a few comments...
 
30 Mar. 2004 - 20:42 plastic
Omg! I tried out your earlier version this afternoon, found it fully capable to do whatever the old version could, splash gone ofcourse is cool ;). The new features, well, above my head again (besides basic calling of a page in main frame), though I wouldn't mind seeing some scripting done here, looks like there's a lot possible.

Then I see my request working, somewhat, that's sooo cool. It perfectly reads <link> tags, seems easy enough to add them. Not sure if I should add this here, or in other thread, and sorry I'm only capable of commenting on this specific thing, but on that functionality:

- the js expects absolute url's, but they're commonly given relative. When given that way, clicking redirects to something like "http://../toc.html", http attached before, which results in 404;

- You're defining some UI stuff (colors/cursor) in js, I'd love it if you would be able to have it write classes and id's instead. Well, the span id= is in html part, but I'd love to be able to define disabled look with css, thus an extra level needed, maybe (like I used both the span and a in my example).

Anyway, I'm excited :).
 
30 Mar. 2004 - 22:37 grigri
I just wrote the html/js quickly, I'm sure someone else could do a lot better, and make it css-based. In fact, I'm counting on it :)

As for the relative/absolute link thing, you're absolutely right. The only way I can possibly think of fixing this is using js code in the bar to create a new, hidden link object (<A>) on the main frame, set its href and call its click method. I'll see if it's possible...
 
31 Mar. 2004 - 20:00 OzonesDeck
I'm having trouble initializing the .dll I cannot find the registry key listed :
[HKEY_CURRENT_USER\Software\VB and VBA Program Settings\ToolBandHTML\Settings]

What do I need to do?
 
31 Mar. 2004 - 22:46 grigri
The registry key is only there if you create it - you don't need it to work, it will function with the default value.

As to initializing the dll, it needs to be registered with regsvr32.exe, as explained in the readme file. Make sure you have the vb6 runtimes installed too.
 
09 Apr. 2004 - 19:52 kmr
Actualy it is not explained in the readme. You should probably change that. ;)
 
09 Apr. 2004 - 20:06 kmr
I have an error every time I launch Internet explorer, when I access window.external.Document. Is that why you had the error handler but commented it out?
Also how do I access the window object of the browser? (So I can call window.location.back() )
 
26 Apr. 2004 - 07:28 kmr
Oh common man I really want to recreate the buttons using html so I don't have to hack system files every time I want to change my icons.
I'm going to improve the html file you have there. But please make the window object accessible from code. I can help out if you need. I'm not very knowledgable in win32 programming (I know the basics) and I'm so much better at c++ than vb but if you point me in the right direction I can try.
Thanks.
 
26 Apr. 2004 - 08:29 grigri
window.external should return the IWebBrowser interface pointer. In my tests it worked fine. The problem with window.external.Document is that it points different objects depending on the type of document you've loaded, for example if a HTML document is loaded then it returns a DOMDocument but if a folder is loaded then it returns IShellFolder. If nothing is loaded, or the document hasn't finished loading, it might return NULL, so basically test for that possibility in your js code.

Honestly, I'd go over the code if it would change anything. I'm hosting a WebBrowser control, whose IDocHostUIHandler interface I've replaced, handling the GetExternal() method by returning the IWebBrowser2 interface pointer the object was passed through it's IObjectWithSite::SetSite() method. There doesn't seem to be any different way to do it, and like I said it works in my tests, you just need to be prepared for window.external.Document to return NULL.
 
26 Apr. 2004 - 08:44 kmr
TextIcon

Alright thanks, I'll try. Can I throw something here while I'm at it? Would be cool to have access to the history so back and forward could be just like the original ones in IE.
 
26 Apr. 2004 - 09:04 kmr
Got it.
MSDN reference.

onclick="window.external.GoBack()"
 
26 Apr. 2004 - 10:46 kmr
Toolband for IE only (Change the icon paths).
 
27 Apr. 2004 - 20:11 plastic
Holy dunnowhat. I found that impressive kmr, recreation of common buttons on toolbar, fully working here. What I skipped and apparently not caught were your examples above. I dunno what I thought they were, but just now found they were about the <link /> functionality, which I would love to have.

Obviously, you know it suffers the inherited problem with relative paths, but you managed to get display done with .css, and functionality so far intact, very, very cool.
 
27 Apr. 2004 - 20:23 beaker
kmr, can you post a screenshot? It would help us knuckleheads figure out what you're doing ;p

 
27 Apr. 2004 - 21:35 kmr
Toolband screenshot. Shows the one for folders I'm working on.

I was going to fix the relative paths thing just didn't have the time yet.
 
27 Apr. 2004 - 21:48 spyder
[off topic] haha. someone liked the rokey.net icons :P

now, that looks impresive, the level of customization is big, i can imagine some 5-7 SPU buttons there :)

i'll try to catch up with this.
 
29 Apr. 2004 - 11:02 kmr
Toolband.
For SPU, I'm still trying to figure out what's the best way to open links in the same window.
 
30 Apr. 2004 - 21:58 kmr
Fixed relative path thing. This will work in most cases:Icon.
 
02 May. 2004 - 00:40 plastic
Yay! kmr, you rule, perfectly. As far as I can see now (need to find some time), I could just build that bar :) - thanks a lot!
 
02 May. 2004 - 01:01 kmr
No problem :)
 
01 Jun. 2004 - 20:36 OzonesDeck
Okay, still playing with it. GREAT job Grigri! How would I aproach pulling up the HTML for the main window's document. Say, into a variable, there by allowing a bit of script to search through the current page for a specified string?
 
04 Jun. 2004 - 20:53 kmr
var html = window.external.Document.body.innerHTML
or something like that.
 
06 Jun. 2004 - 04:53 OzonesDeck
Cool, I'll give it a shot. How bout the URL? window.external.Document.location.url ?
 
07 Jun. 2004 - 02:59 kmr
Yeah, or window.external.LocationURL
 
09 Jun. 2004 - 00:08 OzonesDeck
Awesome! Thanx. Ok, tweaking with the folder options now.... how would I navigate to the desktop of the current user? Or at least determine the user name of the current user ( since it would be C:/Documents And Settings/%USERNAME%/Desktop/ )
 
09 Jun. 2004 - 02:01 kmr


WshShell = new ActiveXObject("WScript.Shell");
DesktopPath = WshShell.SpecialFolders.Item("Desktop");
window.external.Navigate( DesktopPath );
 
10 Jun. 2004 - 02:35 OzonesDeck
Allright! How about the other special folders: Favorites, My Documents, and My Pictures?

 
11 Jun. 2004 - 01:58 kmr
11 Jun. 2004 - 02:37 beaker
There comes a point when a man must learn to fish for himself.
 
27 Jul. 2004 - 18:34 plastic
Dragging this one up, newb question again. I did build that link toolbar, though still fighting with making it look pretty. Or, actually kmr build that toolbar, I just copied and pasted some stuff to make it complete...

Wanted to add some more buttons, using regular links to open something in main window. Something in script you created, kmr, disables this. Iframe dummy with id="main" and link target="main" doesn't work anymore.

More specifically, I wanted to link to an html page on local disk and add two favelets (disable/enable css, as found here).
 
27 Jul. 2004 - 23:32 kmr
From the readme:

To make the main window browse to a new location, you can script it:

window.external.Navigate("http://www.cognitive-software.com");

(just use as href)
 
28 Jul. 2004 - 18:21 plastic
Thanks kmr, I saw that, just couldn't get it to work, bad with all that. But I dove into those favelets/bookmarklets stuff, randomly (ok, looking for patterns :p) experimenting. Didn't even know you could do a regular link like this:

<a href="javascript:void(window.external.document.location='whatever.html')">

Got favelets to toggle css and grayscale working now, having trouble with some others, still playing and getting stuff working slowly This one might have a simple answer, but whatever I try, doesn't work:

<a href="javascript:void(window.resizeTo(640,480))">

Been trying variations with window, external, parent, top and so on, but I'm not sure custom toolbar even thinks of itself as a child window of the browser...
 
28 Jul. 2004 - 18:27 kmr
Not really related and I don't why that is but I'm pretty sure you can't resize the toolbar itself. It didn't work in the taskbar either.

To resize the actual window, I used this:


/*
Resizes the window
*/
function SetSize(Left, Top, Width, Height) {
window.external.Left = Left;
window.external.Top = Top;
window.external.Width = Width;
window.external.Height = Height;
}


I'm not sure the void part is necessary, you could just do:


<a href="SetSize(0,0,100,100)">Resize</a>
 
28 Jul. 2004 - 20:16 plastic
Void not, 'javascript:SetSize was, yikes, it works :), thanks. Wasn't after resizing toolbar indeed, wanted whole window.

Hehe, I was fiddling with doing a custom screensize dropdown list (no question, just a story). I seem to be able to size windows to, like, nothing. They're there, just not visible anymore, cool :p.
 
28 Jul. 2004 - 20:26 grigri
Glad to see this is being put to some good use :)

btw the toolbar window isn't actually a child of the browser. The toolbar can't resize (using the resizeTo() method) itself because it doesn't have this functionality built-in. I could add it, if required.

The void() bit just means "don't return a value". Usually, these functions will return a value and this may cause navigation (within the toolbar window) to a blank document.

I'd like to see any finished toolbars, if there are any :)
 
29 Jul. 2004 - 01:10 plastic
Wow, /me is happy. Got a dropdown list with common sizes to resize browser, toggle buttons to disable/enable css and grayscale mode, buttons to validate html and css, and a button for japanese pages (translate with babelfish).

Still need to style it all a bit (will prolly get lost trying some more), maybe should turn this into two blocks, that <link rel="" /> toolbar and a webdeveloper kinda bar and paste code here, grigri (other people's code anyway, check out http://www.favelets.com/ and related).

Lucky guess, if

window.external.document.location

doesn't work to refer to page in main browser window (validators),

window.external.document.URL

does sometimes. Probably obvious, just not for a beginner like me ;).
 
29 Jul. 2004 - 02:31 plastic
Hehe, I guess this is directed to kmr, mostly, but darn, I've been missing out, majorly - html in UI rules.

That is, added more buttons, one that gives a 'last modified' popup for current page and one that checks links in current page, using W3C service again.

But it started a while back, new install, due to fresh trouble :p. Wanted big and readable, so set quicklaunch icons and some to 32x32 (and font to trebuchet huge, enabled cleartype, all different). Problem, taskswitch, small icons. Only one solution, grigri's TaskswitchHTML, kmr's Omegabar for it. /me still lacks good icons, but that icon-only, 32x32 taskswitch works. Address bar in taskbar didn't resize either, kmr's runbox as a new toolbar fixed that too. After that, finally ready for active desktop, serious, I just didn't know this ruled majorly...

Doing css only dropdown menu's, random image jscript and more, size of it all is still less than that 1280x1024 wallpaper and it runs smooth as anything...

/end transmission. Guess that was just a thank you to kmr and grigri - I really feel empowered to mold it my way this time.
 
29 Jul. 2004 - 02:42 kmr
Hehe ;) plastic is using html in UI, I want a screenshot :). Ask anything and I'll be glad to help.
 
29 Jul. 2004 - 23:32 plastic
Heh, screenshots when I get those looks done, takes a bit (?). Anyway, kinda done with this toolbar for now: link_tb.zip. Has:
  • Buttons for 15 common <link /> uses (well, more, some share a button) - all code by and credit to kmr;
  • Dropdown list to resize browser window (640x480 up to 1600x1200, but edit source and add whatever) - credit to Tantek, see info page added and linked from bar);
  • Additional buttons to toggle css, grayscale, table borders visibility on/off, validate html, css and links (W3C), popup last modified message, translate Japanese to English (Babelfish). Credits on info page.
Figured I'd run it in 2k and 98 before posting. Coukldn't get ToolBandHTML running in 2k (somebody has it running, maybe ?), and it seems different versions of required font, Lucida sans unicode, lack characters, and display differs bits. Will need to do some work there, maybe. Seems to work ok in 98/IE6.

Early shift tomorrow, so I rushed it a little. There's still things needed, like the dropdown refreshing and more. But no fun if I keep asking questions and never show where I am ;).
 
29 Jul. 2004 - 23:59 kmr
I like it. Now I'm wondering if we could get the same thing for Moz... harder I bet. Oh well.
 
30 Jul. 2004 - 00:20 plastic
Well, people do stuff like that, but they don't have a grigri to enable them to make their own choices :p...

http://www.chrispederick.com/work/firefox/webdeveloper/

Installed that one, but it's a little too much, and for link tags

http://cdn.mozdev.org/linkToolbar/

That one is cool, same functionality, but in statusbar, feels natural.
 
30 Jul. 2004 - 03:09 beaker
plastic, very nice! I'm very impressed :) I really like the W3c links as well as the window size dropdowns, quite slick.

For some reason the NavButtons div is all disabled on my pc. Am I missing something?
 
30 Jul. 2004 - 16:22 plastic
Hehe, yes, you're missing something. They will be disabled on most pages, as most don't use the <link /> tag, or for linking a stylesheet only. This article explains (in words, but you'll see some buttons enabled too):

http://www.euronet.nl/~tekelenb/WWW/LINK/

Edit: and again, it's not me you should be impressed by. I just gave the looks, kmr did the coding really, and all the buttons after the resize dropdown I modded a little from online available favelets. Will never be a coder, I'm afraid :p.
 
30 Jul. 2004 - 18:36 beaker
I see I missed a big something. After my current app-coding project, I think I'll be updating http://beaker.virtualplastic.net/ :)
 
30 Jul. 2004 - 18:38 beaker
If a coder you're not, then a wonderful gatherer/modder you are ;p
 
30 Jul. 2004 - 18:45 Driphter
So far I'm loving ToolBandHTML!!! The possibillities seem endless. If it's not to much trouble do you think you could e-mail me the source? Maybe I'll try to entertain the idea of porting this to moz.
 
31 Jul. 2004 - 05:50 kmr
plastic's being modest, as usual; I do see the improvement in understanding the javascripts though.

Acually that's what I meant, an HTML toolbar for Moz, not just <link /> support.
 
05 Aug. 2004 - 20:36 plastic
Yeah, I got you on that, then skipped to link toolbars that did something alike - what I meant with 'don't have a grigri to enable them to make their own choices'. Something alike this is bound to appear as an extension, when asked in proper channels, I reckon.

Anyway, I really blame grigri for getting me obsessed about this thing, couldn't stop and did nothing much besides working and experimenting here last days...

Version 2.

Skipped to glyphs, font rendering differed too much across platforms/IE versions and added lots of things, including lots of js just to get the buttons to react properly. Bloated, still fast here.

What you get is a linkbar that also does "link rev=" now (though seldom used), and the most amazing summary of favelets available online imho. Yet it's tiny, as it's 3in1 with scrolling now. 4 even, need to work on 'folderpath' for local dirs kmr added.

But I was gonna ask kmr and other people familiar with js to look at two things:

The 'view connected .css and .js' button doesn't function at all. It's the favelet found here, works as such, just can't find the place to adapt the js to work in the toolbar...

And there's the comparing windows favelets by pixy. They do work, fully for local pages (where they'll be used mostly anyway), yet second window doesn't resize/moveto on online pages. I'm missing some insight on the resizeTo solution kmr posted above (and I used).
 
06 Aug. 2004 - 03:28 OzonesDeck
Plastic, resizeTo(x,y) becomes problematic if the URL isn't local. My workaround for this has been to load the window with either about:blank or a blank-ish .HTML template file, then ResizeTo, then set a timeout for about 500 for a redirect on the child window so that the URL is local untill AFTER the window is resized.

Hope that helps!
 
06 Aug. 2004 - 03:41 beaker
plastic, are you sure you linked the correct file? No glyphs here, and I'm not seeing the new buttons you're talking about. In fact, this file is barely newer than the last version (date/time of file anyhow).
 
06 Aug. 2004 - 11:36 plastic
Oops, sorry beaker. Copied the link to old version, forgot to change. Corrected now.

Thanks, OzonesDeck, might have to do something like that. First bet would be to see why functions kmr wrote above (though I split them) don't work here:

function SetSize(Width, Height)
{
window.external.Width = Width;
window.external.Height = Height;
}

function SetPos(Left, Top)
{
window.external.Left = Left;
window.external.Top = Top;
}


They do work for first and any other window... Ofcourse, second window shouldn't be addressed with 'window.external', yet new functions without 'external' don't get hold of the window either.
 
06 Aug. 2004 - 14:06 plastic
Regarding thew view linked css and scripts favelet, I know get it to display and link scripts/css of current page:

<a href="javascript:A=0,T='',S={g:function(d){var x=d.styleSheets,i=0,y,j=0;while(i<x.length){M('link',x[i].href);y=x[i++].imports;while(y && j<y.length)M('@import',y[j++].href)}x=d.scripts;i=0;while(i<x.length)M('script',x[i++].src)},r:function(){var i=0,f=frames;S.g(window.external.document);while(i<f.length){A=1;S.g(f[i++].document)}with(open('','','width=620,height=200,scrollbars,resizable').document){write(T);close()}}};M=function(n,s){if(s){if(A){A=0;T+='<br>frame<br>'}T+='['+n+'] <a href="'+s+'">'+s+'</a><br>'}};S.r()">&nbsp;</a>

Output is ok, just as if you bookmark the original favelet - stilleye. Difference with using it as a favorite: popup window takes the identity of page itself, hence relative url's are working perfectly when clicked in popup. That's not happening yet with popup I get, looking for the hook and code to alter.
 
07 Aug. 2004 - 03:44 beaker
plastic, if you try and say you aren't talented I'm gonna have to lob a papaya at you! ~~~~~~~~~~~~~~~o

This is very cool! I think I'm going to combine this html toolbar and my links bar (just show the icons and no text) to save space. Keep up the good work :)

EDIT: For those of us who don't turn off underlined links, you'll want to add the following to the <style> section:

a {text-decoration: none;}
 
07 Aug. 2004 - 17:28 Smurf
Hello

1
 
07 Aug. 2004 - 17:48 Smurf
Hello Again

1 sorry musta hit wrog key
2 nice job to whom put this site together and thoses who keep it going
very interesting,informant,educational thing going on here again nice job to whom
3 not shure were i should be posting stuff yet but long storry short iv built 3 pc and now i like to make my 1 i use look nice now iv made a few mods but not nearly enough
4 im trying to change the default icon folders i seen somthing on here but mines not coensiding with the info here im confused can some 1 HELP me ? can be imed when on msn neonblue at hotmail dot com will check back ty. very nice job here HATS OFF TO ---
 
08 Aug. 2004 - 00:00 plastic
Heya Smurf, you're in XP, I reckon. Folder and drive icons are hard to change there. Lots of people just replace them inside shell32.dll, kinda like the only way to have it done for everything (be careful).

Thank you beaker, I take some pride in this version :p (css, that is), and thanks for pointing out overlooking the underlines.
 
10 Aug. 2004 - 11:41 Smurf
nice to meet u plastic

yes i pklayed with shell32.dll but with no luck so im looking 4 more info on it i dont know if its the red icon that im trying to replace it with is not right or what but thanks to my erd commander i was able to get back in and fix what i did. it seem like it shuffeld things around when i added just that 1 red icon but im just trying get more info on it be4 i go doing it again

ps sorry 4 not responding 4 few days got used pc plaging with . and yes im xp pro all on proofile but thanks plastic 4 your quick responce iv looked at here...thanks again


new ?? any1 run SuSe and xp pro or dose any 1 know off a tool to use to beable to see on the linuxs partition without having to reinstall

 
10 Aug. 2004 - 11:54 Smurf
i found out somthing new hide your hard drives,removable,floppies, i did a quick surch here i didnt see anything on the subject so if any1 knows 4 sure that its not on this site i would gladly send info in to the host of site or how ever u go about doing so every 1 can see iv try it and dose work . :)
 
Please log-in to post.
You need to be logged in to post. To log-in, or to register an account go -there.
 
Options
Login | Help | Profile | User list | Display last  
 days 


../Msgboard/General customization/It's back! New and improved HTML toolbars in IE & ExplorerTop

xhtml 1.1