[wordpress插件] Custom Profile Filters for BuddyPressBuddyPress的自定义配置文件过滤器

wordpress 插件 文章 2020-03-12 21:20 455 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

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.

开箱即用,BuddyPress会自动将用户个人资料字段中的某些单词和短语转换为链接,单击该链接即可在用户社区中搜索包含这些短语的其他个人资料。

It also removes any attempts at formatting with new lines.

它还消除了用新行进行格式化的任何尝试。

When activated, this plugin allows users to have more control over these links, in the following ways:

激活后,该插件可让用户通过以下方式对这些链接进行更多控制:

    1. Auto generated links are completely disabled.
    2. 自动生成的链接被完全禁用。

    3. By using curly brackets in a profile field, users can specify which words or phrases in their profile turn into links.

    4. 通过在个人资料字段中使用大括号,用户可以指定个人资料中哪些单词或短语变成链接。

      For example: under Interests, I might list “Cartoons about dogs”.

      例如:在兴趣下,我可能会列出“关于狗的卡通”。

      Without this plugin, Buddypress will turn the entire phrase into a link that searches the community for others who like ‘cartoons about cats’.

      如果没有此插件,Buddypress会将整个短语变成一个链接,以在社区中搜索其他喜欢“猫的卡通”的人。

      If I instead type “{Cartoons} about {cats}”, then the two words in brackets will turn into independent links.

    5. 如果我改用“关于{cats}的{Cartoons}”,则括号中的两个单词将变成独立的链接。

    6. If the ‘bbPress2 shortcode whitelist’ plugin is activated, then users can also apply admin approved shortcodes to their profile fields.

    7. 如果激活了“ bbPress2短代码白名单”插件,则用户还可以将管理员认可的短代码应用于其个人资料字段。

    8. Administrators can specify certain profile fields that link to social networking profiles.

    9. 管理员可以指定链接到社交网络配置文件的某些配置文件字段。

      If I enter my Twitter handle ‘antonchanning’ into a field labeled ‘Twitter’, for example, this plugin will bypass the default link to a BuddyPress search on ‘antonchanning’ and instead link to http://twitter.com/antonchanning.

      例如,如果我在标签为“ Twitter”的字段中输入Twitter句柄“ antonchanning”,则此插件将绕过“ antonchanning”上与BuddyPress搜索的默认链接,而是链接至http://twitter.com/antonchanning。

      (Currently this list is hardcoded, but I plan to add an admin screen in future versions. See buddypress-custom-profile-filters-bp-functions.php to configure this setting for now).

    10. (当前此列表是硬编码的,但是我计划在将来的版本中添加管理屏幕。请参阅buddypress-custom-profile-filters-bp-functions.php以立即配置此设置。)

    This plugin is forked from a similar plugin from CUNY Academic Commons of the City University of New York.

    此插件来自纽约市立大学CUNY Academic Commons的类似插件。

    Notes

    注释

    The plugin checks each profile for curly brackets and activates if it finds any.

    该插件检查每个配置文件中是否包含大括号,并在发现任何配置文件时将其激活。

    If the ‘bbPress2 shortcode whitelist’ plugin

    如果是“ bbPress2短代码白名单”插件

    is installed, any shortcodes approved by admin can be used in profile fields.

    已安装,管理员批准的任何短代码都可以在配置文件字段中使用。

    For example, codes from the ‘bbPress BBCode’

    例如,来自“ bbPress BBCode”的代码

    plugin.

    插件。

    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

    您可能想在BP配置文件编辑模板(/ wp-content / bp-themes / [您的会员主题] /profile/edit.php中插入一些简短的说明,以告诉您的网站用户如何使用这些括号

    . For example:

    例如:

    “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.

    要指定应链接的单词或短语,请添加方括号:

    Life’s a beach! I love {icecream} and {swimming}.”.”

    “ [b]生活是一片海滩![/ b]我爱{icecream}和{swimming}。”。

    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).

    可以调整BP的自动配置文件过滤器(例如,除逗号以外,还可以分析用分号分隔的列表)。

安装步骤

    1. Upload the buddypress-custom-profile-filters directory to your plugins folder
    2. buddypress-custom-profile-filters 目录上传到您的插件文件夹

    3. Activate the plugin
    4. 激活插件

    5. Edit buddypress-custom-profile-filters.php to configure
    6. 编辑buddypress-custom-profile-filters.php进行配置

下载地址
https://downloads.wordpress.org/plugin/buddypress-custom-profile-filters.1.1.zip
-EOF-

AI助手支持GPT4.0