dnadesign/silverstripe-googlesitesearch 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dnadesign/silverstripe-googlesitesearch

Composer 安装命令:

composer require dnadesign/silverstripe-googlesitesearch

包简介

Add Google Site Search to your SilverStripe Site.

README 文档

README

Requirements

  • SilverStripe 4

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

统计信息

  • 总下载量: 6.18k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 14
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2013-09-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固