[WordPress] 外掛分享: Custom Profile Filters for BuddyPress

首頁外掛目錄 › Custom Profile Filters for BuddyPress
100+
安裝啟用
★★★☆☆
3.3/5 分(3 則評價)
3946 天前
最後更新
問題解決
v0.3.1 上架:2009-06-20

內容簡介

預設情況下,BuddyPress 會自動將用戶資料的欄位中的某些字詞和詞語轉換為連結,當點擊時搜索用戶社區中包含這些詞語的其他用戶資料。啟用此外掛後,使用者和管理員可以以下列方式對這些連結進行更多控制:

1)通過在用戶資料欄位中使用方括號,用戶可以指定哪些詞語會變成連結。例如:在興趣欄位下,我可能會列出“有關狗的卡通”。預設情況下,BuddyPress 會將整個詞語轉換為連結,並搜索社區中其他喜歡有關狗的卡通的用戶資料。如果我改為輸入“[Cartoons] about [dogs]”,則方括號中的兩個單詞將變為獨立的連結。

2)管理員可以指定某些用戶資料欄位根本不會變成連結。外掛的標準設置是標記為“Phone”,“IM”和“Skype ID”的欄位不會成為可連結的(畢竟在社群中搜索應該是唯一的手柄並不是明智的選擇)。請參閱 custom-profile-filters-for-buddypress.php 以配置此設置。

3)管理員可以指定某些用戶資料欄位鏈接到社交網路用戶資料。例如,如果我在標記為“Twitter”的欄位中輸入我的 Twitter 帳號“boonebgorges”,那麼此插件將繞過預設連結到 BuddyPress 上的“boonebgorges”搜索,而是鏈接到 http://twitter.com/boonebgorges。請參閱 custom-profile-filters-for-buddypress-bp-functions.php 以配置此設置。

此外掛是紐約市立大學 CUNY Academic Commons 的一部分。請參閱 http://commons.gc.cuny.edu 了解更多有關此酷炫項目的資訊。

注意事項

此外掛會檢查每個用戶資料是否存在方括號,並在發現任何括號後啟動。如果未發現方括號,將啟動預設自動篩檢過濾器。

您可能希望在 BP 用戶資料編輯模板(/wp-content/bp-themes/[your-member-theme]/profile/edit.php)中插入一個小的說明,告訴您網站的使用者如何使用這些方括號。這是我使用的編輯提示:

“您在個人資料中的詞語可以連結到包含相同詞語的其他成員的個人資料頁面。要指定需轉換為連結的詞語,請添加方括號:例如,'我喜歡[English literature]和[technology]'。如果未指定任何內容,將自動選擇詞語。”

未來的功能包括:管理員選項卡與切換按鈕;能夠調整 BP 的自動用戶資料篩檢過濾器(例如,可以剖析逗號分隔列表)。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Out of the box, BuddyPress automatically turns some words and phrases in the fields of a user’s profile into links that, when clicked, search the user’s community for other profiles containing those phrases. When activated, this plugin allows users and administrators to have more control over these links, in the following ways:
1) By using square brackets in a profile field, users can specify which words or phrases in their profile turn into links. For example: under Interests, I might list “Cartoons about dogs”. By default, Buddypress will turn the entire phrase into a link that searches the community for others who like cartoons about dogs. If I instead type “[Cartoons] about [dogs]”, then the two words in brackets will turn into independent links.
2) Administrators can specify certain profile fields that will not turn into links at all. The standard setting for the plugin is that fields labeled ‘Phone’, ‘IM’, and ‘Skype ID’ will not become linkable (it doesn’t make much sense to search a community for what should be a unique handle, after all). See custom-profile-filters-for-buddypress.php to configure this setting.
3) Administrators can specify certain profile fields that link to social networking profiles. If I enter my Twitter handle ‘boonebgorges’ into a field labeled ‘Twitter’, for example, this plugin will bypass the default link to a BuddyPress search on ‘boonebgorges’ and instead link to http://twitter.com/boonebgorges. See custom-profile-filters-for-buddypress-bp-functions.php to configure this setting.
This plugin was created as part of the CUNY Academic Commons of the City University of New York. See http://commons.gc.cuny.edu to learn more about this bodacious project.
Notes
The plugin checks each profile for square brackets and activates if it finds any. If no square brackets are found, the default automatic filter will kick in.
You might want to insert a small explanation into your BP profile edit template (/wp-content/bp-themes/[your-member-theme]/profile/edit.php that tells your site’s users how to use these brackets. Here’s what I use:
“Words or phrases in your profile can be linked to the profiles of other members that contain the same phrases. To specify which words or phrases should be linked, add square brackets: e.g. “I enjoy [English literature] and [technology].” If you do not specify anything, phrases will be chosen automatically.”
Future features include: admin tab with toggle switch; ability to tweak BP’s automatic profile filter (e.g. to parse semi-colon separated lists in addition to commas).

延伸相關外掛

文章
Filter
Apply Filters
Mastodon