Shorthand Notation For Searching BenNadel.com

Posted February 2, 2007 at 12:22 PM

I implemented this last week and have already grown to love it. It probably won't be useful to others but I thought I would throw it up here in case someone likes it. You can search my site by going to:

http://www.bennadel.com/search/YOUR_SEARCH_CRITERIA_HERE

... where everything after the "search/" will be the search criteria. This is great for me because I know what I have posted so I can be like "Oh yeah, where was that" and then search for it fast. It's not perfect, and if you search for "//" it gets the relative web paths messed up... but come on, it's just a short hand.

Post Comment  |  Ask Ben  |  Print Page




Reader Comments

Feb 2, 2007 at 12:57 PM // reply »
95 Comments

Nice, what did you use to do it?


Feb 2, 2007 at 1:55 PM // reply »
7,572 Comments

A lot of my site runs off of 404 error handling:

http://www.bennadel.com/index.cfm?dax=blog:286.view

I simply added one more piece of logic for the search section.


Feb 2, 2007 at 2:07 PM // reply »
95 Comments

I forgot about that thing, he he. Did you check out the free rewrite module for IIS? Here is my quick post about using it: http://boyank.blogspot.com/2007/01/rewriting-urls-in-iis-with-ionics-isapi.html


Apr 13, 2007 at 8:48 AM // reply »
95 Comments

I was searching your blog for something this morning so here is a quick bookmarklet I put together based on your search:

javascript:(function(){var url='http://www.bennadel.com/search/';searchString=prompt('Enter search string for BenNadel.com:','');searchString=((searchString==null)?'':searchString.replace(/^(\s+)?(.*?)(\s+)?$/gi,'$2'));if(searchString!=''){if(location.href.indexOf(url)==-1){var win=window.open(url+escape(searchString));}else{location.href=url+params+escape(searchString);}}})();


Apr 13, 2007 at 8:52 AM // reply »
7,572 Comments

Ha ha, Boyan, that's awesome. I just tried it and it works like a charm :)


Apr 13, 2007 at 8:58 AM // reply »
95 Comments

Ops,

I had a JavaScript error in the above script. Here is the updated one:
javascript:(function(){var url='http://www.bennadel.com/search/';searchString=prompt('Enter search string for BenNadel.com:','');searchString=((searchString==null)?'':searchString.replace(/^(\s+)?(.*?)(\s+)?$/gi,'$2'));if(searchString!=''){if(location.href.indexOf(url)==-1){var win=window.open(url+escape(searchString));}else{location.href=url+escape(searchString);}}})();


Apr 13, 2007 at 9:00 AM // reply »
7,572 Comments

Hmmm, it worked for me, but I wasn't trying to break it or anything (I did just one word). Looks good.


Post Comment  |  Ask Ben

Recent Blog Comments
Mar 19, 2010 at 7:26 PM
MySQL 3/4 - com.mysql.jdbc.Driver And allowMultiQueries=true
Thank you very much for this post. Adding allowMultiQueries="true" in context.xml didn't help until I added it to url as allowMultiQueries=true Good idea is to use prepared statements and it will he ... read »
Jim
Mar 19, 2010 at 4:49 PM
Nobody Puts Baby In The Corner!
Wow. This is like suddenly finding a support group for your secret shame. I'm not alone! I always liked this movie, even though it is extremely cheesy. I just wish Jennifer Grey hadn't gotten the ... read »
Mar 19, 2010 at 4:47 PM
Application.cfc OnRequest() Method Affects OnError() Arguments
@Jason and @Ben, I've been doing some CF9 refactoring on our systems and noticed an odd occurrence with onError as well. Found a way to work around my problem, but what I saw was... Background: Our ... read »
Jim
Mar 19, 2010 at 4:44 PM
Shoot 'Em Up Starring Clive Owen And Paul Giamatti
I actually enjoyed this movie quite a lot. It was different, certainly, but I think they were going for more of a Quentin Tarentino-"wow, that was weird"-vibe than an actual spoof. Once I realize ... read »
Mar 19, 2010 at 4:34 PM
An Intensive Exploration Of jQuery With Ben Nadel (Video Presentation)
Hey I guess the video is down. Is there anyway you can upload to youtube or vimeo or some other service? Greatly appreciated. ... read »
Mar 19, 2010 at 4:24 PM
ColdFusion CFPOP - My First Look
@Ben Thanks for the follow up! The root of the problem had to do with being able to trace bounced emails to specific records in a DB table. Let's say you run an email campaign and you get 1,000 bou ... read »
Mar 19, 2010 at 4:15 PM
SQL COUNT( NULLIF( .. ) ) Is Totally Awesome
Thank you Ben and Tony! Either of these work for the summary report I am working on and the info is much appreciated! I think I like Tony's a little better because I won't have to educate every ... read »
Mar 19, 2010 at 3:35 PM
ColdFusion Path Usage And Manipulation Overview
@Ben, Sorry. Clarification. expandpath worked for me in application.cfc, but not in other templates. ... read »