這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Compound Searcher

外掛說明

The plugin gives search boxes on the blog additional functionalities for operators among search words, such as Google’s. The other supported operators than the standard ‘and’ search are OR, -(exclude), *(any string) and parenthesis.

The plugin contains SearchWordsSQL and Genericons libraries. These are subject to the respective licenses. If you want to redistribute this plugin with Genericons, you may have to comply with GPLv2 (not lesser).

Search Operators

  • Specify words separated by space(s) to search posts containing all the words.
  • Quote a string containing space(s) by double quotes to search posts which contain phrase(s) consisted of those words only in the order.
  • Insert an asterisk (*) in a word without any space to search posts which contain the word(s) regardless of what the part of the asterisk is.
  • Prepend a minus sign (-) without any space to a word to search posts which do not contain the word(s).
  • Specify two words separated by ” OR ” in upper case to search posts which contain either of words or both. This takes precedence over words separated by space(s) only.
  • You can combine the above expression. Use a pair of parenthesis to group expressions if needed.

It searches in the bodies and titles of posts in a case-insensitive manner.

安裝方式

Requires PHP 5.3.6 or later with mbstring enabled. Tested on PHP 5.3.10.

  1. Extract the archive into the “/wp-content/plugins/” directory.
  2. Activate the plugin through the “Plugins” menu in WordPress.
  3. Configure the settings in the general settings page.

常見問題集

The help icon is displayed on the weird location.

The feature could be incompatible with some themes and browsers. Twenty Twelve and Twenty Thirteen seem to be incompatible so far.

Are the searches case-insensitive?

Yes if your backend RDBMS is a MySQL.

What fields does it search in?

The body and title, including HTML tags in them.

The search result is incorrect. It seems to do a standard search, rather than a compound search.

If your query had a syntax error for a compound search, the search would fall back to the standard search mode. Check an error log of your server (e.g. Apache).

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Compound Searcher〉的開發相關工作。

參與者

將〈Compound Searcher〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

0.1.3

  • Fix incorrect html for the icon.

0.1.2

  • Now the plugin runs independently of the name of the plugin directory.
  • Changed the license from LGPLv3 to LGPLv2.1 or later.

0.1.1

  • changed the plugin directory name.

0.1

  • Initial release.