Home Page Forums Blog Articles Videos Search Register Advertise






Go Back   Practical Machinist - Largest Manufacturing Technology Forum on the Web > Manufacturing Today > General New

General New General metalworking, machine tool, and woodworking machinery discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-29-2009, 05:54 PM
Keith Krome Keith Krome is offline
Hot Rolled
 
Join Date: Dec 2005
Location: Auburn, Alabama
Posts: 709
Default Firefox search engine and McMaster-Carr

In firefox one can highlight a passage of text, then right click on it and produce a google search or one of many search engines. There is a selection of search engine add ons at https://addons.mozilla.org/en-US/fir...:all?sort=name

Is there anyway to add a McMaster-Carr search engine so it exhibits the same behavior, only using the McMaster Carr "find products" field?

I can see me doing that with certain items, highlighting a key word, and doing a McMaster-Carr search by simple right clicking and pulling down a menu.

Would this be something that McMaster would prompt Firefox/mozilla to do, or can someone with only g-code & some ancient FORTRAN experience configure Firefox to do this?

Last edited by Keith Krome; 05-29-2009 at 06:24 PM. Reason: spelling/typo/grammar
Reply With Quote
  #2  
Old 05-29-2009, 06:22 PM
Chip Chester's Avatar
Chip Chester Chip Chester is offline
Aluminum
 
Join Date: Dec 2007
Location: Central Ohio USA
Posts: 187
Default

Keith,
I seems like that would be a Firefox plugin authored by McMaster Carr. you might plead your case to them.

Chip
Reply With Quote
  #3  
Old 05-29-2009, 07:28 PM
John Welden's Avatar
John Welden John Welden is offline
Cast Iron
 
Join Date: Mar 2009
Location: Kirkland, WA
Posts: 327
Default

McMaster has the best Ecommerce web site on the planet. Best built in search by far. I wouldn't be surprised if they would make a firefox plugin.
Reply With Quote
  #4  
Old 05-29-2009, 08:11 PM
David Utidjian David Utidjian is online now
Stainless
 
Join Date: Jun 2006
Location: Mahwah, NJ
Posts: 1,628
Default

Well... it was just too intriguing so I wrote one, and it works.

one mo...

-DU-
Reply With Quote
  #5  
Old 05-29-2009, 08:27 PM
David Utidjian David Utidjian is online now
Stainless
 
Join Date: Jun 2006
Location: Mahwah, NJ
Posts: 1,628
Default

I figured since Mozilla/Firefox is Open Source Software (OSS) it should be possible to find out how to write one. And it is....

I followed the instructions on this page (liked from the plugins page).

And in a few minutes with a text editor I came up with this:

Code:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>McMaster-Carr</ShortName>
<Description>Searches McMaster-Carr for stuff</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://www.mcmaster.com/gfx/products_catalog_115.gif</Image>
<Url type="text/html" method="GET" template="http://www.mcmaster.com/#{searchTerms}">
</Url>
<Url type="application/x-suggestions+json" template="suggestionURL"/>
<moz:SearchForm>http://www.mcmaster.com</moz:SearchForm>
</OpenSearchDescription>
Which I saved as McMaster-Carr.xml and then copied it to my
/home/utidjian/.mozilla/firefox/6r872f7x.default/searchplugins/
folder.
I am using Linux and if you are also the utidjian sub-folder name and the 6r872f7x.default sub-folder names will be different on your Linux system.
It should also work for Firefox in Windows but I don't know yet where Windows puts search plugins for Firefox. I will find out.
It may or may not work in Windows IE7. There are some caveats on the instructions page linked to above. If someone can rewrite it to work in IE7 that would be cool.

The icon comes out a bit mangled. I couldn't find a proper favico.ico icon on the McMaster site though there presumably is one. If anyone findsor makes a better icon please post it here.

The usual disclaimers apply. The above .xml file works for me. Your mileage may vary. As with all OSS code there is no warranty and if you break it or it breaks something of yours you get to keep all the pieces

-DU-
Reply With Quote
  #6  
Old 05-29-2009, 08:47 PM
The real Leigh's Avatar
The real Leigh The real Leigh is offline
Diamond
 
Join Date: Nov 2005
Location: Maryland
Posts: 4,474
Default

Quote:
Originally Posted by David Utidjian View Post
It should also work for Firefox in Windows but I don't know yet where Windows puts search plugins for Firefox.
Hi David,

Default location for Windows XP Pro: C:\Program Files\Mozilla Firefox\searchplugins

Can't speak for other versions of windoze.

- Leigh
Reply With Quote
  #7  
Old 05-29-2009, 08:50 PM
David Utidjian David Utidjian is online now
Stainless
 
Join Date: Jun 2006
Location: Mahwah, NJ
Posts: 1,628
Default

Thanks Leigh.

I will go and test it as soon as I find a machine around here that boots Windows. I know I have one somewhere...

-DU-
Reply With Quote
  #8  
Old 05-29-2009, 09:05 PM
The real Leigh's Avatar
The real Leigh The real Leigh is offline
Diamond
 
Join Date: Nov 2005
Location: Maryland
Posts: 4,474
Default

Quote:
Originally Posted by David Utidjian View Post
I will go and test it as soon as I find a machine around here that boots Windows. I know I have one somewhere...
Look in the little house out back with the new moon carved above the door.

Perhaps next to the cob pile. Appropriate storage location.

And don't trip over the Sears catalog.

- Leigh
Reply With Quote
  #9  
Old 05-29-2009, 09:21 PM
David Utidjian David Utidjian is online now
Stainless
 
Join Date: Jun 2006
Location: Mahwah, NJ
Posts: 1,628
Default

Leigh,

Found a Windows XP box.

Version:
Microsoft Windows XP
Professional
Version 2002
Service Pack 3

Firefox
Version:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10
Which I guess means version 3.0.10

And yes the file works. I don't get any little icon at all, just a blank sheet of paper with the corner turned up... but then PM shows up the same way in tabs.

I used the exact file as listed in my previous post, pasted it into Notepad, saved as McMaster-Carr.xml (ANSI format) and copied into
C:\Program Files\Mozilla Firefox\searchplugins
re-started Firefox and then did a search for "screws". Works fine.

Thanks again Leigh

Oh and the PM icons... well I know how much you are (smitten) by them

-DU-
Reply With Quote
  #10  
Old 06-01-2009, 11:57 AM
Keith Krome Keith Krome is offline
Hot Rolled
 
Join Date: Dec 2005
Location: Auburn, Alabama
Posts: 709
Default

Thanks DU, that is what I was looking for.

Unfortunately, I'm using an Apple running OS X. (Normally, I'd say "fortunately" but in this case I'm having some trouble).

I've tried to do the same, putting an .xml file in my searchplugins folder.

It doesn't seem to work for me, I'm still trying to figure out why.

On your box, you get a choice of search engine in the search box? You can now select McMaster-Carr from that menu?

Thanks again, stuff like this makes this board awesome.
Reply With Quote
  #11  
Old 06-01-2009, 03:08 PM
Keith Krome Keith Krome is offline
Hot Rolled
 
Join Date: Dec 2005
Location: Auburn, Alabama
Posts: 709
Default

Awesome. Works like I want it to


DU, everyone else, thanks. I hope some of you guys use it.

Here was apparently the problem:

I opened up a pre-existing search engine file, and noticed that it had a particular font (or lack thereof) in the text editor. When I originally saved the file, I selected .xml from a pull-down menu and it saved a file that when opened, had a different font. Apparently the default behavior of TextEdit is rich text format (RTF) and it seemed to save it in that format as well, but I'm not really familiar with .xml so I didn't exactly know. I went into preferences and selected plain text as the default new document format. I then saved the DU's code verbatim into the document, saved it as .xml by typing .xml at the end of the filename, and hit save.

Restart firefox and ta-da! McMaster Carr, just a right click away!

Go OSS (Open Source Software)

Edit:

PS, this also killed two birds with one stone. I did not like the fact that TextEdit's default behavior was RTF. I could save as a .txt file from a pull down menu, but now I'm much happier with TextEdit as well.
Reply With Quote
  #12  
Old 06-01-2009, 03:18 PM
Perry Harrington Perry Harrington is offline
Stainless
 
Join Date: Oct 2006
Location: Santa Cruz, CA
Posts: 1,600
Default

Here's an interesting bit, simple to make a page:

http://www.captain.at/howto-firefox-...rch-engine.php
Reply With Quote
  #13  
Old 06-01-2009, 06:12 PM
David Utidjian David Utidjian is online now
Stainless
 
Join Date: Jun 2006
Location: Mahwah, NJ
Posts: 1,628
Default

Keith,

Good you got it sorted out. I didn't try it on Mac OS X even though most of the computers here are Macs. I install Linux (Fedora 10) on most of them and dual boot.

The last couple of stanzas may be superfluous:
Code:
<Url type="application/x-suggestions+json" template="suggestionURL"/>
<moz:SearchForm>http://www.mcmaster.com</moz:SearchForm>
Not sure if those are needed.

I used gedit (gnome editor) to edit this code. I usually use vi in a terminal on both Mac and Linux.

Perry,

That is cool. There is also a link off of the link I gave earlier for setting it up on the server (McMaster-Carr) that allows the user to add the feature from the server site. Perhaps we can get Milacron to do that and then have a PM search option "built in" to our browsers (hmmm... )

-DU-
Reply With Quote
  #14  
Old 06-01-2009, 06:58 PM
The real Leigh's Avatar
The real Leigh The real Leigh is offline
Diamond
 
Join Date: Nov 2005
Location: Maryland
Posts: 4,474
Default

Quote:
Originally Posted by David Utidjian View Post
Thanks again Leigh
You're quite welcome, Dave.

Glad it worked.

- Leigh
Reply With Quote
  #15  
Old 06-02-2009, 12:50 PM
gneedel gneedel is offline
Plastic
 
Join Date: Jun 2009
Location: Jackson, TN
Posts: 2
Default

I joined to post this. I took your code and added the icon to it. The favicon for mcmaster was located at www.mcmaster.com/favicon.ico

I converted it to base 64 data(which is what you need for the icon to be carried within the xml file. Everything works good now. I posted the xml file on my website so if people want it they can just download it and drop it into C:\Program Files\Mozilla Firefox\searchplugins


You can download the xml file here http://www.robogreg.com/wp-content/u...6/mcmaster.xml
Reply With Quote
  #16  
Old 06-02-2009, 01:40 PM
David Utidjian David Utidjian is online now
Stainless
 
Join Date: Jun 2006
Location: Mahwah, NJ
Posts: 1,628
Default

Quote:
Originally Posted by gneedel View Post
I joined to post this.
Just curious but HTH did you get cued to the discussion in the first place? Been lurking a while?

Quote:
I took your code and added the icon to it. The favicon for mcmaster was located at www.mcmaster.com/favicon.ico
I swear I tried that first and it only came up with what looked like a blank sheet of paper (or something). Perhaps I misspelled favicon.ico.

Thanks gneedel.

Only potential problem I can see is the filename may have to match the ShortName. McMaster-Carr =/= mcmaster. It may barf on some systems. I will try it on Mac OS X, Linux and Windows when I get to work.

-DU-
Reply With Quote
  #17  
Old 06-02-2009, 02:32 PM
gneedel gneedel is offline
Plastic
 
Join Date: Jun 2009
Location: Jackson, TN
Posts: 2
Default

Quote:
Originally Posted by David Utidjian View Post
Just curious but HTH did you get cued to the discussion in the first place? Been lurking a while?


-DU-

I have been to the site before but don't read it actively. One of my friends IMed me last night saying he found the mcmaster firefox search. I wasn't there and he didn't provide a link so a quick google search lead me to this tread. I plan on sticking around though if people don't mind too much

When I get home I might try making some more of these searches for MSC, Digikey, and a few others I know i would like. Thanks for the thread.

Greg
Reply With Quote
  #18  
Old 06-02-2009, 02:45 PM
Keith Krome Keith Krome is offline
Hot Rolled
 
Join Date: Dec 2005
Location: Auburn, Alabama
Posts: 709
Default

Thanks Greg.

Now I have McMaster search engine icon goodness. Now it seems just as polished and finished as the others.

Google is just an internet version of McMaster Carr search.

Pretty soon I'll be "I mcmastered this last night..." and "I mcmastered that the other day..."

Reply With Quote
  #19  
Old 06-02-2009, 09:34 PM
rkward's Avatar
rkward rkward is offline
Aluminum
 
Join Date: Jul 2007
Location: USA - Midwest
Posts: 160
Default

I have a fix for the missing/generic icon for those of you interested:

The new XML file is as follows:
Code:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>McMaster-Carr</ShortName>
<Description>Searches McMaster-Carr</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,
AAABAAIADRAAAAEAGADoAgAAJgAAABAQAAABAAgAaAUAAA4DAAAoAAAADQAAACAAAAABABgAAAAA
AMACAABgAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAhKGfhKKjvtDQAAAAAAAAAAAAAAAAAAAAAAAA
AAAAZQAAAFp+d1CCelKxr0KuuDuVnUOBhYGpqQAAAAAAAAAAAAAAAAAAAGUAAABflYkfbWExvrgl
yM0TvL8hrK06pqVSqKZ9vL0AAAAAAAAAAABlAAAAjMS4JIl7IMrDEM/XHcDME6GrIq2xI7OzKbO1
UKqnqdPRAAAAZQAAAJbRxyaMgx3LzBDP4QnF0gWutwu0uAi3uAm1uCaxrZjb2QAAAGUAAACP1M4l
lpMdzdcW0esYyNgPsbwLq7ILtbsHs7ojrrCg3N0AAABlAAAAhtXTIaClG9LgGNbwE8vaELa4HLO2
EbC5BLa9HLCzmNvZAAAAZQAAAIfX1CKfohvT4BXZ8hvR2hiOhhKEeRSvrQa0uhmvtJfd3AAAAGUA
AACG19Eim5sk3OYV3/cL1eIdnJoVhH0dub0Os8QUr7iG1tUAAABlAAAAjdnTL6GeK9/nGeL7Bdnv
Fr/JF6u1DLHCDLTIDLO8dtHSAAAAZQAAAInQyhJ9ezbm7h7j/BbV7RDO3g/H2Au+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gMEBQYGBgcICQkKAAAAAAAAAAAAAAAAAAAAAADx/wAAgD8A
AIAPAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAD//wAA
</Image>
<Url type="text/html" method="GET" template="http://www.mcmaster.com/#{searchTerms}">
</Url>
<Url type="application/x-suggestions+json" template="suggestionURL"/>
<moz:SearchForm>http://www.mcmaster.com</moz:SearchForm>
</OpenSearchDescription>
David, thanks for your original submission on this to get things started. I have really never used the search feature that much. Rather I use the bookmarks toolbar and new tabs all day long.
Reply With Quote
  #20  
Old 06-03-2009, 12:38 PM
atty atty is offline
Aluminum
 
Join Date: Mar 2007
Location: Kingman, Az.
Posts: 96
Thumbs up

Great work, Guys. I wrestled with that icon for a couple of hours and only managed to botch my cache pages for McMaster.

Excellent search addition.....and it now looks factory.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:28 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
Ad Management plugin by RedTyger