Spyglass

Developer

Isaac Raway - Airways

3rd Party (Free)

GNU General Public License v3

EE Version Support

  • ExpressionEngine 2

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
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Plugin

Tags

Spyglass performs a text search on entry titles and custom fields.

New!! Now open source! GitHub page coming soon.

Spyglass performs very fast searches on plain text content stored in most types of fieldtypes as well as matrix column data.

Features

  • Based on {exp:channel:entries} tag, allowing any of it’s parameters to be used in addition to the keyword search - this allows very powerful search forms to be built
  • Provides all of the variables, conditional variables, and variable pairs provided by {exp:channel:entries}
  • Fast database based search based on keywords
  • No more redirect to a search results page: Spyglass directly runs the search when data is available in GET or POST
  • Form tag provides access to GET and POST variables without the need for another extension
  • Search queries can be bookmarked
  • Automatic and customizable excerpting
  • Automatic keyword highlighting in excerpts

Parameters

Additional Parameters

     
  • fields - list of core fields (such as title), custom fields, and matrix columns to search
  •  
  • keywords - if not specified, all post fields are used to perform the search
  •  
  • ignore - fields to ignore when creating keywords (such as a “submit” button)
  •  
  • field_separator - separator for the field list - defaults to a pipe
  •  
  • keyword_separator - separator for keywords - defaults to a space
  •  
  • debug - set to “yes” to print debug information
  •  
  • search_matrix_fields - set to “no” to disable matrix column searches (automatically skipped if Matrix is not installed)
  •  
  • search_seolite - set to “no” to disable SEO Lite searches (automatically skipped if SEO Lite is not installed)

Variables

Example Template

Create a template named search/results with this code:



{exp:spyglass:form action="search/results"}
  <h1>Search</h1>
  <form method="get">
      <input type="text" name="q" value="{get_q}" size="100"/>
      <input type="submit" value="go" />
  </form>
  {if get_q}
      <h2>Search for {get_q}</h2>
  {/if}
{/exp:spyglass:form}
{exp:spyglass:search channel="posts" fields="title|page_body" 
    keyword_limit="4" parse="inward" index_check="yes"}
  
  <h3 class="search-result">{title}</h3>
  <div class="search-excerpt">
  {exp:spyglass:excerpt}
        {page_body}
  {/exp:spyglass:excerpt}
  </div>
{/exp:spyglass:search}

Then, anywhere you would like a search form, include the same form tag as above:


{exp:spyglass:form action="search/results"}
  <h1>Search</h1>
  <form method="get">
      <input type="text" name="q" value="{get_q}" size="100"/>
      <input type="submit" value="go" />
  </form>
{/exp:spyglass:form}

This will cause the form element to be pre-filled with the active search query, if there is one.

MetaSushi EE Add-ons Newsletter

To stay up to date with the latest ExpressionEngine add-on news from MetaSushi, be sure to subscribe to the MetaSushi EE Add-ons Newsletter today (very low volume).

This entry was created November 1, 2011, 8:21 am.
This entry was last updated October 31, 2016, 10:24 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!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!