[WordPress] 外掛分享: Yahoo BOSS

首頁外掛目錄 › Yahoo BOSS
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
60+
安裝啟用
尚無評分
5611 天前
最後更新
問題解決
WordPress 2.7+ v0.7 上架:2009-03-31

內容簡介

Yahoo BOSS 外掛讓你可以輕易在 WordPress 安裝中建立一個搜尋引擎。啟用外掛後進行設定即可輕鬆開始。此外掛並不會替換 WordPress 中的預設搜尋功能。

Yahoo Search BOSS(Build your Own Search Service)允許您使用 Yahoo 技術透過 REST API 創建搜尋引擎。目前只支援網頁內容搜尋(圖片和新聞即將支援)。您需要先取得自己的BOSS 應用程式 ID才能創建您的搜尋引擎。使用此外掛代表您同意遵守BOSS API 使用條款,請務必仔細閱讀。

為了讓您的搜尋引擎正常運作,您需要定義搜尋表單和搜尋結果的顯示位置,可使用簡單的短代碼添加到一個或多個頁面。

若要創建搜尋表單,請在頁面中加入 [boss_search_form]。

若要定義您想要顯示搜尋結果的位置,請使用 [boss_search_results]。如果沒有進行查詢,將不會顯示任何內容。

若要在頁面上顯示搜尋表單後再顯示搜尋結果,頁面內容可以如下所述。

[boss_search_form]

[boss_search_results]

使用 [pw_search] 來結合兩個短代碼。

或者,如果您更喜歡使用模板函式,也有許多模板函式可供使用。

透過修改一些選項,您就能讓此外掛正確地運作。

Yahoo App ID:在此處添加您的Yahoo BOSS 應用程式 ID。此選項為必填項目。

每頁顯示結果數:用於配置您想要在每頁顯示的搜尋結果數量。默認為 10。

格式:搜尋結果的格式。如果您想要與 AJAX 一起使用,這會很有用。默認格式為 XML。

要搜尋的網域:如果您只想搜尋特定的網站,請在此處添加網站 URL(每行一個)。

透過在 wp-config 中定義常數,即可覆蓋 Yahoo App ID。

define('YAHOO_APP_ID', 'your_app_id_goes_here');

此外掛還提供了一些可供使用的篩選器。

pw_boss_title - 應用於搜尋表單的搜尋引擎標題。篩選器函式帶有一個名為「title」的參數。

pw_boss_button - 應用於搜尋表單中啟動搜尋的按鈕。篩選器函式帶有一個名為「button text」的參數。

pw_boss_stylesheet - 應用於搜尋引擎樣式表,可提供您自己的自定義樣式表。篩選器函式帶有一個名為「default stylesheet」的參數。

pw_boss_result_info - 修改結果元數據(例如:WordPress 中有 201321 個結果的 1-10)。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.7) 或搜尋安裝

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

原文外掛簡介

The Yahoo BOSS plugin makes it easy to create a search engine in your WordPress install. Simply activate and configure and you’re off and running. This plugin does not replace the default search within WordPress.
Yahoo Search BOSS (Build your Own Search Service) allows you to create a search engine using Yahoo technologies via a REST API. Currently, only web content search (images and news coming soon) is supported. You will need to get your own BOSS application ID to create your search engine. Use of this plugin subjects you to the BOSS API Terms of Use. Please read carefully.
In order for your search engine to function correctly, you need to define where you want both the search form and the search results to show. This is done with simple shortcodes that you need to add to a page or pages.
To create the search form add [boss_search_form] to a page.
To define where you want your search results use [boss_search_results]. Nothing will show if a query hasn’t been performed.
The page contents would be the following if you wanted a search form followed by the search results.
[boss_search_form]
[boss_search_results]
Use [pw_search] to combine both shortcodes.
Alternatively, there are numerous template functions available if you prefer to use those over shortcodes.
That is all you need to do to create your custom search engine.
Administration
You need to modify a few options for the plugin to work correctly.
Yahoo App ID: add your Yahoo BOSS application ID here. This option is required.
Results per Page: use to configure how many search results you want to show on each page. Default is 10.
Format: the format of the search results. This would be useful if you want to use with AJAX. Default is XML.
Domains to Search: add site urls here if you want to limit your search to certain sites (one per line).
Extending
Yahoo App ID can be overridden with a defined constant in wp-config.
define('YAHOO_APP_ID', 'your_app_id_goes_here');

There are some filters available to use.
pw_boss_title – applied to the title of the search engine in the search form. Filter function arguments: title.
pw_boss_button – applied to the button to initiate the search in the search form. Filter function arguments: button text.
pw_boss_stylesheet – applied to the search engine stylesheet to provide your own custom stylesheet. Filter function arguments: default stylesheet.
pw_boss_result_info – modify the result meta information (1-10 of 201321 results for WordPress)

延伸相關外掛

文章
Filter
Apply Filters
Mastodon