[WordPress] 外掛分享: Server-Side Google Search

首頁外掛目錄 › Server-Side Google Search
10+
安裝啟用
尚無評分
3866 天前
最後更新
問題解決
WordPress 3.7+ v1.0.3 上架:2015-01-05

內容簡介

此外掛可在您的網站上加入 Google 自訂搜尋,但與其他外掛不同之處在於其運作於伺服器端,因此無須 JavaScript,
並能維持頁面尺寸小。

管理介面乃基於 [WP Google Search plugin] 的介面而建立
(https://wordpress.org/plugins/wp-google-search/)。

與 Google API 的接口基於 Montana State University 的 Jason Clark 所設計的 Digital Collection Search。

支援語言

英文
西班牙文 (未完成)

在 Github 上關注此專案

開發

此外掛使用wp-cli 和 PHPUnit進行測試。
進行測試需要runkit,以進行模擬功能。

從 Github 上抓取最新的原始碼:

$ git clone [email protected]:aptivate/server-side-google-search.git

安裝wp-cli

安裝PHPUnit

設置 runkit:

$ git clone https://github.com/zenovich/runkit.git
$ cd runkit
$ phpize
$ ./configure
$ sudo make install

將以下內容加入 /etc/php5/cli/php.ini 檔案:

extension=runkit.so
runkit.internal_override=1

安裝測試版本的 WordPress 環境:

cd server-side-google-search
bash bin/install-wp-tests.sh test_db_name db_user ‘db_password’ db_host version

其中:
** test_db_name 為您的一時性 WordPress 測試資料庫的名稱
** db_user 為資料庫使用者名稱
** db_password 為密碼
** db_host 為資料庫主機 (例如 localhost)
** version 為 WordPress 的版本(例如 4.2.2 或 latest)

執行測試
phpunit

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Server-Side Google Search」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This plugin adds Google Custom Search to your website, but unlike other plugins
operates on the server side, thus eliminating the need for JavaScript and
keeping the page size small.
The admin interface is based on that used by the [WP Google Search plugin]
(https://wordpress.org/plugins/wp-google-search/)
The interface with the Google API is based on Digital Collection Search by Jason Clark for Montana
State University.
Available languages

English
Spanish (incomplete)

Follow this project on Github
Development
This plugin uses wp-cli and PHPUnit for testing.
The tests require runkit for mocking functions.

Grab the latest source from github:
$ git clone [email protected]:aptivate/server-side-google-search.git

Install wp-cli

Install PHPUnit

Set up runkit:
$ git clone https://github.com/zenovich/runkit.git
$ cd runkit
$ phpize
$ ./configure
$ sudo make install

Add the following lines to /etc/php5/cli/php.ini:
extension=runkit.so
runkit.internal_override=1

Install the test WordPress environment:
cd server-side-google-search
bash bin/install-wp-tests.sh test_db_name db_user ‘db_password’ db_host version

where:
** test_db_name is the name for your temporary test WordPress database
** db_user is the database user name
** db_password is the password
** db_host is the database host (eg localhost)
** version is the version of WordPress (eg 4.2.2 or latest)

Run the tests
phpunit

文章
Filter
Apply Filters
Mastodon