內容簡介
Similarity 外掛會列出與目前文章相似的文章清單,相似性會根據標籤、分類或兩者來決定。清單的顯示可完全自定義,包括顯示相似度程度,以值、百分比、顏色或自訂文本/程式碼等方式呈現。另外,還可以選擇隨機選取一篇較不相關的文章,加到列表的末尾。列表可以根據數值限制和(從 2.1 版本開始)匹配程度限制中的一個或兩個的限制筆數。
此外掛使用翻譯就緒,包含英文 (美國)、法文、波蘭文、德文、義大利文和西班牙文翻譯。特別感謝 Li-An (http://li-an.fr/blog/) 提供法文翻譯,Krzysztof Kudlacik (http://born66.net/) 提供波蘭文翻譯,Bjoern Buerstinghaus (http://www.buerstinghaus.net/) 提供德文、義大利文和西班牙文翻譯。
在 1.6 版本前,私人文章可能會出現在相關文章列表中,但是在 1.6 版本中,這些文章已經跳過了。在 1.7 版本中,私人文章將會出現在文章作者或其他具有閱讀私人文章能力的人的列表中。強烈建議擁有私人文章的使用者安裝 1.6 或更高版本。
這個外掛允許你在頁面模板的任何地方呼叫三個函數(全部使用相同的選項):
<?php sim_by_tag(); ?> – 基於文章標籤確定相似性
<?php sim_by_cat(); ?> – 基於文章分類確定相似性
<?php sim_by_mix(); ?> – 基於文章標籤和分類確定相似性
還有三個函數呼叫更適合在側邊欄中使用(特別是當側邊欄在主頁面上使用時):
<?php sim_by_tag_multi(); ?> – 基於多文章頁面上的第一篇文章的標籤確定相似性
<?php sim_by_cat_multi(); ?> – 基於多文章頁面上的第一篇文章的分類確定相似性
<?php sim_by_mix(_multi); ?> – 基於多文章頁面上的第一篇文章的標籤和分類確定相似性,且根據指定比例加權計算
要將類似度清單顯示為小工具,使用具有以下任意一個短代碼的文本小工具 – [SIM-BY-TAG] [SIM-BY-CAT] [SIM-BY-MIX],僅適用於單文章頁面,若要在所有頁面使用,則使用 [SIM-BY-TAG-MULTI] [SIM-BY-CAT-MULTI] 或 [SIM-BY-MIX-MULTI]
若要顯示類似度清單,而不更改您的模板,只需在選項頁面底部選擇要自動顯示的函數。
外掛標籤
開發者團隊
原文外掛簡介
Similarity displays a list of posts similar to the current post with similarity being determined based on tags, categories, or both. The display of the list is fully customizable including the ability to display the strength of the similarity as a value, percentage, color, or custom text/code. Another option allows for a less related post to be randomly selected and appended to the list. The list can be limited by one or both of a numerical limit or (as of version 2.1) match strength.
This plugin is translation ready and comes with English (U.S.), French, Polish, German, italian, and Spanish translations. Thanks to Li-An (http://li-an.fr/blog/) for providing the French translation. Thanks to Krzysztof Kudlacik (http://born66.net/) for providing the Polish translation. Thanks to Bjoern Buerstinghaus (http://www.buerstinghaus.net/) for providing the German, Italian and Spanish translations.
Prior to Version 1.6 private posts would potentially show in the list of related posts. In 1.6 these were skipped. As of version 1.7 private posts will show for the post author or others with the ability to read private posts. It is strongly recommended that users who have private posts install version 1.6 or higher.
The plugin allows for three function calls anywhere in your page templates (all use the same options):
– determines similarity based on the tags applied to the posts
– determines similarity based on the categories assigned to the posts
– determines similarity based on the tags and categories assigned to the posts
There are also three function calls that are better suited for use in sidebars (specifically when the sidebar is used on the main page)
– determines similarity based on the tags applied to the first post on milti-post pages
– determines similarity based on the categories assigned to the first post on milti-post pages
– determines similarity based on the categories and tags assigned to the first post on milti-post pages weighting each according to the ratio you assign
To display a Similarity list as a widget use a text widget with one of the following shortcodes – [SIM-BY-TAG] [SIM-BY-CAT] [SIM-BY-MIX] for single post pages only or for all pages use [SIM-BY-TAG-MULTI] [SIM-BY-CAT-MULTI] or [SIM-BY-MIX-MULTI]
To display a Similarity list without altering your templates simply select the function that you would like to auto-display at the bottom of the options page.
