Tag Archives: search

Firefox Extension: Search Everywhere

Have you ever been at a web site and wanted to find something on it but couldn’t because the site either lacked search functionality or had a useless one? Did you want a tool to help in your predicament? Here’s one that I’ve found helpful: Search Everywhere by Paul Komarek. It was developed by a colleague of mine, and as a search junky, I got to be one of the beta testers. It’s now officially on the Firefox Add-ons page.

The extension was designed “to search the outgoing links from any webpage”. A use case for that is if you’re on a particular site and wanted to learn more about a particular topic, you would use this extension to search the keyword on Google and it would look up the keyword through the site and other sites the current site linked to, on the premise that the current site would link to relevant/related resources.

When I started using this, there was no way to specifically search for results in the current site, so I requested it and Paul implemented it in the latest version. This one little addition has made the feature much more useful to me. I could have manually done a [site:domain keyword] query but that would have taken more effort.

Of course, the extension can only provide results as long as Google has indexed the site. Also, a heads-up that it might take a few seconds to get results when doing a search involving linked sites… probably due to the Custom Search Engine having to go fetch and process the linked sites. A SiteSearch is as quick as any Google Search so that would seem to confirm that theory.

How to Change the Search Engine on Opera Mobile Default Homepage

When Opera announced that it had “named Yahoo as the exclusive provider of mobile search on … Opera Miniâ„¢ and Opera Mobileâ„¢“, there were mixed responses, depending on people’s preferences.

The seemingly easiest solution for those with different preferences is to change the browser homepage to the desired search engine, or any page in general. That’s what I did initially. I then realized that having a homepage that is located on a remote server would make the browser take longer to load as it tries to access the site and download then render its contents.

I decided to edit the homepage file that Opera uses. This may or may not work for you. I’m using Opera Mobile 8.65beta on Windows Mobile 6 Pocket PC Phone. I saw that the homepage was a local file so I navigated to it.

On my setup, home.html is located in: \Application Data\Opera\startpage\

While connected via ActiveSync, click on Explorer. Navigate to the file and copy it to the hard drive. Open the file in your favorite html editor, using code view.

Go to your favorite search engine, either the regular or mobile version based on your preferences/needs. View the source. Search for the part of the code that renders the search form. It should start with <form and end with </form>. Copy the code.

Return to the home.html file that you’re editing. Search the code for the form tags and replace it with what was copied from the preferred search engine.

Double-check the action attribute in the form tag. If it is a relative path, you will need to edit it since it won’t work when used in a file that is local to the mobile device. Go back to the search engine page and get the full path to prepend to the path in the action attribute path. If the path is a full path that starts with “http://” then you’re golden and good to go.

Save the file on the hard drive. Copy the file over to the Pocket PC. Check out the file in Opera. While you’re editing the homepage to have the preferred search engine, you can edit for any other reason, like adding links to favorite pages.

Linked Custom Search Engines

When I first learned of Linked Custom Search Engines from Google Co-op, I didn’t really get it. When I got the explanation, I then saw the potential.

Previously, to create a custom search engine, we needed to go into a control panel to give Google a list of sites we want it to show results from. Depending on the topic or purpose of the CSE, this didn’t scale.

With linked CSE, we only need to give Google a page that contains links to sites that we want to show results from. Google then generates a custom search engine with those sites as sources. This is great for themed sites that link to related sites. It helps the user find additional information from other sites that the current site has linked to. For example, a linked CSE at a Mac website will tend to show results from sites that are related to all things Mac.

For my blog, I wanted to create a CSE that would encompass all the sites that I have linked to, either in posts or blog roll. Since I try to link to quality sites, I tend to get good quality, related results. I called my cse, Thu’s Blogosphere. It shows results from my blog and from all the links on my page that lists all posts. As I add links in my posts, the CSE will automatically get new links to add to my CSE. Google was also smart to cache the data so that my cse doesn’t take forever to load up each time due to the hundreds of links I have.

Having a page that lists all blog posts helps increase the coverage of links, as can be seen in the resulting xml file that Google generates on the fly based on the inputted page. The xml file from my blog home page alone doesn’t contain as many urls.

To conceptualize the difference that this makes compared to regular web search, a search for [cat] in my blogosphere will show results about four-legged feline pets. A regular search for [cat] also includes results about the Cats musical, and the company, Caterpillar.

The links page to feed to Google doesn’t need to be like the one I’m using. It was just easier for me to build a page with all of my blog links by showing all my posts. It would be more efficient to show a page that contains only links. I just couldn’t figure out how to do that.

Google AJAX Search Results in WordPress

Not even a day had passed since I figured out How to Integrate Google Custom Search Engine Results into WordPress Blog Template and I figured another way to integrate search results into WordPress.

As described at the site, “Google AJAX Search API lets you put Google Search in your web pages with JavaScript.”

One of the drawbacks to the earlier method was that the results were in an iframe, so it was less integrated in the look of the site. Another thing I wanted was to be able to switch from searching my blog to more general search.

The second method using Ajax allows for customizing css of the search results, and it has tab functionality to show different types of results.

Someone had already implemented Ajax Search in Blogger. I used the provided template to come up with a slimmed-down version of the code to put into my WordPress blog.

At first, I was going to put the search results in a separate page. But I didn’t know how to do the search form for it, so I did what the ajax blogger did and put it right on the page where the search is executed. You can view the source if you want the search code. I put the search form in a widget in the sidebar.

I wrote the code so that the “More results” link goes to my template but it’s not working for some reason. I saw in an example where it worked, though. It’s a new feature so hopefully it’s just a temporary issue. Update: It turned out it was because I didn’t include the hl parameter, which was required. Oops.

Another thing I wanted to do was take advantage of the new feature, “Linked Custom Search Engines” to show results that were not only from my blog, but from sites I link to. This would have greater focus than a general web search, and would show results from related sites when mine doesn’t have the results. However, the results aren’t what I had expected so I need to do some more research to refine the custom search engine.

Update: I won’t be dropping the other search page because it comes in handy as a template for search results. I can use the Ajax search for results on the page, but for additional results, I have to fall back on the non-Ajax search.

Update: After investing a lot of time to ensure that this worked throughout my blog, I found that there is an Ajax search plugin. I installed it to see if it would meet my needs. It’s definitely convenient to have a plugin, but it doesn’t support CSE, for example. However, for someone who doesn’t already have this functionality, the plugin is a great option.

How to Integrate Google Custom Search Engine Results into WordPress Blog Template

I was checking out the control panel for my blog’s Google Custom Search Engine and saw something under the Code tab that I hadn’t noticed before: Search box and search results code for your website

I was intrigued at the thought of having the search results show up with my blog’s theme. After completing my search page, I thought I’d share how to do it.

First, create a new page in the theme’s folder called _search.php and upload it with the following content:
Continue reading