Post Archive
› October 26, 2002
mtRefSearch for the googli
I also really wanted to get searchii working, but for some reason (almost definitely my fault), I could quite make it happy here, I'll keep trying.
Comments
1. October 26, 2002 03:23 AM
2. October 26, 2002 10:49 AM
Quote this comment
eliot Posted…
oooh.. searchii looks real nice. i’ll have to see about getting that installed on my site too.3. October 26, 2002 11:13 AM
Quote this comment
Nate Posted…
Sil and Eliot, thanks for commenting–when I installed searchhi (sorry for the misspelling above), it did not throw any errors, and it seemed to be doing something, but after taking quite a while to parse through the homepage it ended up somehow breaking the layout. I should point out that I only tested it in IE 5.2 for Mac, and only on my homepage. Sil–a very minor note, the example code for including the js file on your site does not have the slash in the close script tag. I’ll try putting searchhi on one of the pages here for further testing this evening. Weekend chores are calling.4. October 26, 2002 01:47 PM
Quote this comment
Stuart Posted…
I must stop signing myself as sil, because no-one realises that it’s my initials. :) Anyway, searchhi shouldn’t break pages, because it just walks the DOM tree, but Castle Kryogenix is deficient in the Mac division and therefore it remains untested on Macs. If you could test it with something like Mozilla/Chimera it would become apparent whether it’s an IE5.2/Mac bug or a searchhi bug...5. October 26, 2002 02:14 PM
Quote this comment
Nate Posted…
Well, I put it on the legal page, and it’s working in IE Mac 5.2 (search google for “materials for webgraphics”). That page does not happen to have MT-RefSearch btw. Also, all the example of searchhi on your site works fine in IE Mac 5.2 also. So now it’s either a problem with combining searchhi and MT-RefSearch, or it’s a problem with my homepage. Next up I’ll add MT-RefSearch to the legal page.6. October 26, 2002 02:28 PM
Quote this comment
Nate Posted…
Ok, that’s odd.. now MT-RefSerach is a no show. Weird. Oh–I misquoted the google search above for the legal page “material from webgraphics” is what it should have been. In anycase Stuart (sorry about the name thing), your code definitely works as it should in IE Mac 5.2, and so does Eliot’s. If I discover what’s been going on when I have more time this evening, I’ll report it here. I wonder if there’s an easy way to fold the two features together? Although they are currently different languages (javascript for searchhi and php for Mt-Refsearch). I suppose Mt-Refsearch already collects the search term out of the url and makes it a variable, so perhaps there’s a way to pass it right to the javascript? I’m just so not a programmer... maybe one day.7. October 26, 2002 03:34 PM
Quote this comment
Stuart Posted…
There shouldn’t really be any interaction between Perl and Javascript; they’re each passed a referrer, but the Perl is passed a referrer by the web server, whereas the Javascript is passed it by the browser. I don’t know how MT-RefSearch works, but it’ll obviously change the page somehow before the JS gets hold of it; searchhi walks through the DOM of the page and checks each text node for any of the searched-for words, and then replaces a given word with <span class=“searchword”>word</span>, and span.searchword is styled to display differently. There shouldn’t be a problem, unless MT-RefSearch changes the page in such a way that the searchword is no longer in the content, which seems unlikely.8. October 26, 2002 03:55 PM
Quote this comment
Nate Posted…
Hmmm.. MT-Refsearch (php based, not perl based btw) is using the predefined php server variable $HTTP_REFERER which works as follows (from php.net):The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
Investigation continues...
9. October 26, 2002 06:19 PM
Quote this comment
huphtur Posted…
the heck with javascript! stricly php.10. October 27, 2002 12:04 AM
Quote this comment
evan Posted…
Sorry I’m late on this, but I built the same sort of functionality on my site a while back when I noticed just how many people come to my site after searching google for my name. I used some http_refer as well as query string checking to let those people see a personalized message and a link to an “about me” page–to help the user figure out if I’m the Evan Rose they’re looking for. Check it out. I also have this set up in my portfolio because it uses php query strings and anchor links for users looking for a specific item of work (you’d have to see it in action to know what I’m talking about–and even then, its easy to miss).11. October 27, 2002 12:11 AM
Quote this comment
evan Posted…
Well don’t I feel like a retard. The link included in my last post doesn’t return the result like it used to (due the unreliability of http_refer or another of my scripts, perhaps [a poor workman always blames his tools]), but, visiting my site after clicking this very similar link does the trick. How odd that ampersands don’t get encoded on defocus from this form field. Is that supposed to occur?12. October 28, 2002 01:54 AM
Quote this comment
Adriaan Posted…
I have not been able to connect to eliot.landrum.cx, which you link to for the MT-RefSearch. Is the link correct?13. October 31, 2002 12:22 AM
Quote this comment
eliot Posted…
sorry my website was down for a few days.. let’s see if i can answer a few questions... nate: no, all my script does is insert a little text box that lists search results. it’s not javascript, so it has no interaction with the browser. most browsers support the referrer variable, but if it has been turned off then there is no harm done to my script. it just just doesn’t display any results.14. October 31, 2002 08:10 PM
Quote this comment
alba Posted…
this is very useful, i’ve configured and installed it but it doesn’t seem to be working/appearing. the documentation is a little light. my next email is to eliot and see what’s up. looks great on your site though.15. December 8, 2002 04:04 AM
Quote this comment
eliot Posted…
alba–did you happen to get it working? sorry the documentation is light.. a much improved version is coming out shortly if you can wait a bit...16. January 9, 2003 03:44 PM
Quote this comment
eliot Posted…
not sure if anyone noticed, but the new version of MT-RefSearch is out.17. January 27, 2003 09:21 AM
Quote this comment
Torres Posted…
Where is googli ?18. April 4, 2004 02:56 PM
Quote this comment
Abdul Qayyum Posted…
Please put your comments in paragraph tags, no auto-line-breaking anymore.
I am Very Hampy With Googli. Googli is Very Very Fast Thank You Googli Thank You
sil Posted…
Interesting. Was searchhi just flat not working, or was it producing Javascript errors? There’s a slightly newer version as of a couple of weeks ago as well, which might help?