Gossamer Forum
Home : Products : Links 2.0 : Customization :

Search Bookmarklet

Quote Reply
Search Bookmarklet
I got this idea after the previous post on bookmarklets. This is based off of the google search and various other search engines. Two versions are available. The first will do the search from the window you currently have opened. the second will open a new window and do a search.

Here's the non-windowed version: http://www.fullmoonshining.com/...st/bookmarklet.shtmlAnd

Here is the windowed version: http://www.fullmoonshining.com/...rklet_windowed.shtmlJust follow the instructions on the page to build your search bookmarklet.

Once you've created your own, you will be able to click on the search bookmarklet and produce a prompt which will allow you to search your links database. Or you can highlight some text and then hit the search bookmarklet and it will do a search. Hope this is useful.
Later,
Paul

http://www.fullmoonshining.com a place for Pearl Jam fans.


Quote Reply
Re: Search Bookmarklet In reply to
Could this be ammended to do a search in a pop-up window like Gotze's add one does?

m.

Quote Reply
Re: Search Bookmarklet In reply to
I not sure I know what you mean. You can give mine a try here http://www.fullmoonshining.com/...st/bookmarklet.shtmlI have tried to give more detailed instructions on the page. If you run into any problems, don't hesitate to ask.
Hope that helps.
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: Search Bookmarklet In reply to
It does pop up a window and then you enter the search query. It is kind of cool! Whether people will use it, is another thing.

thanks

Quote Reply
Re: Search Bookmarklet In reply to
I also have some search bookmarklets for the users of my site:
http://www.gotzespace.dk/links/search.cgi

If the user highlights/marks text and clicks on the bookmarklet button, a search for this is made directly in my directory. If the user just clicks on the bookmarklet, a dialogue pop-up window allows hin/her to enter a keyword.

There are two versions, one for using the same broswer window, and one for having a new window. Oh, actually there are four versions, because they are browser-specific.

To use this for your site, get the bookmarklet and just change the path to your site. Then put it as a link somewhere at your site.

John


Quote Reply
Re: Search Bookmarklet In reply to
Cool. I didn't realize you had already made a search bookmarklet, otherwise I might not have done it. Great job on making four different ones.
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: Search Bookmarklet In reply to
What I meant was adjust it so that the results appear in a pop-up window, just like the add form does with gotze's original bookmarklet...

m.

Quote Reply
Re: Search Bookmarklet In reply to
Not sure, let me hack at it over the weekend. Gotze I noticed your search doesn't open a new window, any ideas? Also, my search now allows you to highlight text and do a search:
http://www.fullmoonshining.com/...st/bookmarklet.shtml Thanks for the input.Smile
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: Search Bookmarklet In reply to
Thanks for this terrific add-on!
It seems Links has finally entered the 'Javascript era'... Wink

Quote Reply
Re: Search Bookmarklet In reply to
Thanks alot for the kind comments thomas1. I've found the bookmarklet to be useful. Thanks again,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: Search Bookmarklet In reply to
cranepaul,

I see you have found a work around for the frame problem in my bookamrklet. Great!! Cool

As for opening a new window, you want to change to this:

javascript:q=(document.frames.length?'':document.selection.createRange().text);for(i=0;i<document.frames.length;i++){q=document.frames.document.selection.createRange().text;if(q!='')break;}if(q=='')void(q=prompt('Enter text to search the Master List. You can also highlight a word on this web page before clicking New Search.',''));if(q)void(open('http://www.fullmoonshining.com/cgi-bin/links/search.cgi?query='+escape(q)+"&submit=Search"))

John

Quote Reply
Re: Search Bookmarklet In reply to
Cool. Thank's Gotze for the tip. I have added the enhancements. You can now create two version. One that opens in the same window here: http://www.fullmoonshining.com/...st/bookmarklet.shtmlAnd

The new one here:
http://www.fullmoonshining.com/...rklet_windowed.shtmlThanks Again Gotze.

Also, I took out the reference in the prompt that says search The Master List or something to that affect. Now it just says search. Sorry for leaving that in. Now it's completely user-friendly.
Later,
Paul

http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: Search Bookmarklet In reply to
Thanks, works perfectly... in IE only, shame :(

I know it's quite straight forward to do different versions that work in both browsers, but is it possible to do one command line that works for both browsers, or are the implementations of JAVAscript too different?

m.
Quote Reply
"both" browsers? In reply to
What do you mean "both" browsers?
there aren't just two browsers, you know.
There are these strange people that use Opera, or whatever (even WebTV, some).

Quote Reply
Re: "both" browsers? In reply to
First time I been called strange in a while! Tongue

An Opera user. Laugh

Martin Webster
--
Cebidae's UK Internet Resource
http://www.cebidae.co.uk/
Quote Reply
Re: "both" browsers? In reply to
Moby, which version of Netscape are you running? I know it doesn't work with Netscape 6, but I haven't tested it with any of the 4.x series. I actually don't have 4.x installed only 6. If I get a chance I will try and make it, but since IE pretty much controls the market right now, it's not a top priority. Thanks for the suggestion and kind comments.
Later,
Paul


http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Re: Search Bookmarklet In reply to
Try this code for other search engine results:
just replace the search engines code in both search_results.html and search_error.html with this:

<p align=center><b>Try Our Meta Search to find results on MultiSearch Engines</b></p>

<FORM action="http://www.greenbuck.com/cgi-bin/search.cgi" target="_blank">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="75%" BGCOLOR="#ffffff">
<TR><TD><center><Input Type="text" Name="query" value="<%query%>" Size="30">
<Input Type="submit" Value="search" size=15></center>
</TD>
</TR>

<TR><TD><center><FONT face="verdana, arial, geneva" size=2>
<Input Type="Radio" Name="site" Value="altavista" checked> AltaVista
<Input Type="Radio" Name="site" Value="goto"> GoTo
<Input Type="Radio" Name="site" Value="google"> Google
<Input Type="Radio" Name="site" Value="infospace"> InfoSpace
<Input Type="Radio" Name="site" Value="hotbot"> HotBot
<Input Type="Radio" Name="site" Value="inforocket"> InfoRocket
</font></center>
</TD></TR>
</TABLE>
</form>


Quote Reply
Re: Search Bookmarklet In reply to
alexcron,

What does that have to do the with search bookmarklets? And please post to only one thread.

--Drew
Quote Reply
Re: "both" browsers? In reply to
Fair point :)

Quote Reply
Re: "both" browsers? In reply to
I've tried it in a few versions of NS 4.6 and 4.72.

There's a javascript error... 'document.frames has no properties.'

m.

Quote Reply
Re: Moby, Netscape compliance In reply to
Moby, it now works as far a I know. I tested it with Netscape 6 and it works fine. Although, you cannot highlight the text and do a search, sorry. Anyway, test it with Netscape 4.x and let me know. I will try and fix the highlighting issue later. Thanks again for the suggestion. You can get the Netscape version here:
http://www.fullmoonshining.com/...ookmarklet_net.shtml


http://www.fullmoonshining.com for Pearl Jam Fans
Quote Reply
Search Bookmarklet - on a Mac? In reply to
I follow instructions but cannot get it to work. I have a Mac - could this be the problem?
Steve

Quote Reply
Re: [cranepaul] Search Bookmarklet In reply to
A really nice add-on. But can it somehow search the title or the URL insted ?


God love simple things - Like Links