Keith Devens .com |
Wednesday, July 9, 2008 | ![]() |
| The function of wisdom is to discriminate between good and evil. – Cicero | ||
|
| ← Girls, please don't get breast implants | Client-side word highlighter → |

M. Bean wrote:
Donncha O Caoimh (http://blogs.linux.ie/xeer/) wrote:
Great minds think alike!
I spent some time at the weekend working on something similar. I highlighted searches on my own site, but I never thought of highlighting Google searches! Cool idea!
Donncha.
Keith (http://www.keithdevens.com/) wrote:
It didn't even dawn on me that this type of thing was even possible.
I got the idea from Dean Allen. I'd been meaning to try it out for a long time, and it worked pretty well. That's why I was looking for a list of search engine syntaxes yesterday. I didn't get to use any of that code from MT Ref or whatever, but it gave me an idea of how to structure mine.
So, right now this thing works with Google, Yahoo, MSN, AOL, AltaVista, Overture, Ask Jeeves, and AlltheWeb. As I get searches engine hits in my referrers I've been making sure they work, and adding things when they don't. I may do it for searches within my web site someday too.
jim wrote:
got this at the top of my page
Notice: Undefined index: path in /home/keith/kbdcms/Modules/searchengine_module.php on line 78
when i tried your search link from Google back here.
Keith (http://www.keithdevens.com/) wrote:
Thanks, small silly error. Fixed.
Keith (http://www.keithdevens.com/) wrote:
Actually, I shouldn't even call it an error... it was a typo.
202.89.189.183 wrote:
there's no real way to highlight that with regular expressions, since you could have an arbitrary nesting of HTML
Then you have answered your own question. That's the way Google does it and I have yet to see it cause problems in the rendering of a page. Sure it's disgusting when you look at the source code, but on the surface everything seems to be situation normal:
http://72.14.203.104/search?q=cache:74P3...+for+a+list+of+search+engine%22&hl=en
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.216s.
(Used 8 db queries)

That is really slick dude. It didn't even dawn on me that this type of thing was even possible.