I set up the free Google website search for my alumni website. It lets my users search my site using a text box.
I had the idea to modify the code Google provides to create a pre-defined search string. Why? This may my users can just click the Search button and they will find results for my pre-defined categories.
(For instance, one pre-defined search string could be something like ‘Location: Boston’. That could list every alumni who lives in Boston because the ‘Location: XXX’ syntax is used on every alumni bio page.)
Anyway, part of the form code would look something like this:
I don’t know if adding quote marks will work. The HTML for quotes, though, is "
I think what you are looking to do has more to do with Google’s programming more than yours. They are looking for “query LIKE Location:Boston” and you want it to do “query IS location: boston”.
Use single quotes; they nest with double quotes just fine. If for some reason you need three layers of nested quotation marks, you are SOL as far as I am aware.
What would be cool is if, instead of a single quote and a double quote, we had an open quote and a close quote, like we do with parentheses. Much less ambiguity that way.
You cannot escape using the %22 stuff because that is URL escaping. To escape double quotes in HTML attributes you use HTML escaping - *&*quot; = ". It looks like ZipperJJ already tried to say this, but his escape sequence actually got turned into a literal double quote. vBulletin seems to honor SOME escape sequences when typed into messages and not others - curious.
Yes you could if you wanted to search the general Google database. But I’m using the free Google search that searches only pages of a certain domain. So I had to modify the VALUE code in the FORM provided by Google.
Of course, now that I’m thinking about it, I’m pretty sure Google lets you search the pages of particular domains. Yup, just checked. This is what Google says:
…
If you know the website you want to search but aren’t sure where the information is located within that site, you can use Google to search only that domain. Do this by entering what you’re looking for followed by the word “site” and a colon followed by the domain name.
For example, to find admission information on Stanford University’s site, enter:
admission site:www.stanford.edu
…
Hmm. So I guess as long as you ask Google to spider your entire site, you don’t really need to sign up for the free Google search service. You can simply create a link, like Manduck suggests.
Of course, when you sign up with Google, they let you add your logo above the search results page and let you customize some of the page. But other than that, they seems to be no benefit.