Find the best CSE for a topic. Submit Your CSE by commenting below



Add to Google Add to google? or Firefox Plugin

Thursday, November 30, 2006

Dissecting the search box code



The google guideline clearly mentions"The code for the search box will be generated for you to cut and paste into your site". But Plenty of examples can be seen which dissect the google code. One of the most controversial is the removal of the "Google Custom Search" line which is present in the search box. It surely is violating the google guidelines.

Its fairly simple to do. Just add Value="" in the line Input name="q". If google is really serious they may modify the script or penalise those who are removing the google line. The other things that are done involve changing the word that is displayed in the search button. I have seen varaints such as "Find", "Locate"...etc. This is done by replacing the value="search" with value="Find".

If you have seen the google homepage more carefully, you would have noticied the "Feeling Lucky" button beside the "Google search" button. If you hit this button, you are directly taken to the first search result site. This is not still implemented in CSE's. If you try changing the name="sa" for the button it does not seem to affect the search results in any way.Hopefully google will provide these options in the long run.

And if you feel the search box is very long for you liking, you can decrease its length by changing the size="40" to a more appropriate size. This can be useful if your search box is not fitting on your side bar. Generally the side bar is long enough to fit the Google CSE. However, it can become a little long in some side bars. You can reduce to sya 30 or 35 to fit it in. If the side bar is still smaller than this, you better increase the size of your side bar.

0 Comments:

Post a Comment

<< Home

Post to Del.icio.us Furl It