Giter Site home page Giter Site logo

sminnee / silverstripe-googlesitesearch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dnadesign/silverstripe-googlesitesearch

0.0 1.0 0.0 26 KB

Basic Integration of Google Site Search into SilverStripe

License: BSD 3-Clause "New" or "Revised" License

PHP 32.36% CSS 7.39% JavaScript 40.95% Scheme 19.29%

silverstripe-googlesitesearch's Introduction

Google Site Search Module

Maintainer Contact

Requirements

  • SilverStripe 3.1

Documentation

Adds the ability for a user to search the site through Google Site Search. This is done via a new Page in the CMS (GoogleSiteSearchPage) and results are fetched from Google via ajax. The search form and results are free to style via CSS.

  1. Sign up for www.google.com/sitesearch

  2. Install this module to your site root folder named googlesitesearch

  3. Rebuild your database using dev/build

  4. Enter your Google CSE CX and key values in the CMS under a new instance of the newly added GoogleSiteSearchPage or through the config flag GoogleSiteSearchPage.cse_key and GoogleSiteSearchPage.cse_cx respectively.

  5. Add the default search form to your controller (or use your own extension for styling / changing the form). In mysite/_config/googlesitesearch.yml add the following:

    Controller: extensions:

    • GoogleSiteSearchDefaultFormExtension
  6. Add a search form to your Page.ss template $GoogleSiteSearchForm

Ensure you read the Google Custom Search Terms before installing the module and agree to the terms and conditions https://www.google.co.nz/cse/docs/tos.html

Customization

Full HTML control is available by providing a custom GoogleSiteSearchPage template on the page. Since the results are loaded via AJAX, John Resig's Micro Templating is used to provide basic utility templates in results, header and footer templates.

Out of the box a basic header message and pagination in the footer is provided but you are free to alter the page as you need to. More documentation on the available data to output to the template (such as file information) is at developers.google.com/custom-search/v1/using_rest

silverstripe-googlesitesearch's People

Contributors

jonom avatar meurashka avatar wilr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.