EE 1
EE 2
Google Search Results

Developer

Derek Hogue - Amphibian Design

3rd Party (Free)

54 downloads (last 90 days)

GNU General Public License v3 Download v1.0.3

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Entry API
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

The Google Search Results plugin leverages the Google Web Search API to retreive search results for your site (or via your Google Custom Search Engine) and display them using good ole' EE templates.

Note: the Google Web Search API that this plugin uses has been officially deprecated by Google, and will cease to function on November 1st 2013. The EE2 version, Google Custom Search, uses the new replacement API.

To use, simply create a search form for your site with a text input named ‘q’ and submit it via POST or GET to a template containing the Google Search Results tag pair.  See the README in the download for a full documentation of the tag parameters and available variables.

Here’s an example template:

{exp:google_search_results site="yoursite.com"}
    
    {if search_results}
        <p>You searched for <strong>{keywords}</strong> and got 
        {total_search_results} {if total_search_results == "1"}result{if:else}results{/if}.</p>
    {/if}
        
    {results}
    
        {if count == "1"}<ul>{/if}
        
        <li>
            <h3><a href="{url}">{title}</a></h3>
            <p>{excerpt}</p>
            <p><small>{url} <a href="{cached_url}">(cached)</a></small></p>
        </li>
        
        {if count == total_page_results}</ul>{/if}
        
    {/results}
        
    {if no_search_results}
        <p>Sorry, no results for <strong>{keywords}</strong>.</p>
    {/if}
    
    {if paginate}
        <p>Page {page_number} of {total_pages} : {pagination}</p>
    {/if}
    
    {if last_results_page && results_overflow}
        <p><a href="{google_results_url}">View all {total_google_search_results} results on Google</a></p>
    {/if}
    
{/exp:google_search_results}

NOTE: Currently the Google Web Search API limits queries to 8 results per page, with a total of 64 results for any given query.

This plugin has been tested with EE 1.6.8. The EE2 version can be found here. If you’re running PHP < 5.2, you’ll need to upload the included JSON.php file to your /system/lib/ directory. Also, cURL support and OpenSSL are required!

Download Google Search Results

EE Version Downloads Add-On Version Release Date
1.x Download 1.0.3 2010-09-23 01:00 AM

Google Search Results Links

This entry was created April 7, 2010, 6:24 am.
This entry was last updated June 22, 2011, 4:44 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

1 Review:

Ruairidh Galbraith 09.23.10

Rating - {addon_rating_average}

This plugin has just been added to my must-have add-ons list for EE1.6.x. Clients have complained about EE’s built-in search and they love Google Search Results. It just works. Also, Derek (the developer) was more than helpful when I encountered an error and he had a fix for me within 24 hours(!)