常见问题 (FAQ)

常见问题 (FAQ)

Codex Home → Legacy Docs → Archived Section: Getting Started → FAQ
FAQ

Archived file. Good only up to BP 1.5 version

Where can I track BuddyPress development?

Ask a question on the forums
Report bugs and view patches on the BuddyPress Trac server
Join the #buddypress-dev IRC room on Freenode.
Check out the BuddyPress Development Updates blog and the official BuddyPress blog
Follow development updates on Twitter – @buddypressdev
Join the Public Mailing List

What version of WordPress should I run?
WordPress 3.4+. Though it』s advised to run the latest stable version of WordPress to ensure you』re site is fully secure.
Is BuddyPress a forum script?
BuddyPress is a social networking plugin for WordPress. It is not a forum script. A stripped-down forum used to be provided for BP groups using bbPress however when bbPress was re-written to be a standalone plugin it was decided to remove the inbuilt groups forums in versions of BP from 1.7 onwards as bbPress supports them but also gives a far richer forum experience. BuddyPress Groups component. However, if you are looking for a traditional forum (setting up forum categories, forum administration, etc.), you can try the bbPress forum plugin.
Can I run BuddyPress on a Windows server?
Yes.
Where do I report bugs?
Head to: https://trac.buddypress.org/newticket please sign in with your WordPress.org username and password (sign up here)
Can BuddyPress authenticate via LDAP?
Yes. You will need to install a WordPress LDAP login plugin first of all though, then add define( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE', true ); to your wp-config.php file.
Can I run multiple instances of BuddyPress in a WP Multisite installation?
No. BuddyPress can only be activated once in either the main site or a secondary blog of a WP Multisite installation.  For WP multi-networks, try the approach listed in this post.
Registration
I don』t see the register button on my BuddyPress site!
Login to the WP admin area, navigate to 「Settings > General」, and make sure 「Anyone can register」 is checked.
If you』re using WordPress in network mode, login to the WP admin area, navigate to 「Super Admin > Options」, and under 「Allow new registrations」, select any option but 「Disabled」.
BuddyPress isn』t sending out emails (eg. activation emails, email notifications)
This appears to be a problem with certain web hosts (Bluehost primarily).
Members of the BP community have had success using:

Mail From Plugin
WP Mail SMTP Plugin
Configure SMTP Plugin

WP Mail SMTP and Configure SMTP can send a test email which often provides useful debug information. Check also with your webhost』s tech support for more information.
Activity Stream
BP 1.2 Default Theme – Set the Activity Stream as front page, blog posts on another page
1) Login to the WP backend, navigate to 「Pages > Add New」. Create an empty, new page called 「News」 or 「Blog」 or whatever you want. This page will contain the blog updates.
2) Under 「Settings > Reading」, set front page to 「Activity Stream」 and your posts page to the new page that you just created.
How do I disable activity stream comments for blog and forum posts?
1) Login to the WP backend, navigate to 「Buddypress > General settings」.
2) Under 「Disable activity stream commenting on blog and forum posts?」 Select 「Yes」.
Extending BuddyPress
Is there a compatible Facebook Connect plugin for BuddyPress?
Yes there is. Try WP-FB-AutoConnect.
Make sure under WP-FB-AutoConnect』s settings, to uncheck 「Disable BuddyPress Filters」.
Avatars
Why can』t I upload avatars on my server?
This could be a number of things, but make sure you have the GD image library installed.   It might also be permissions, so make sure the web server has correct permissions.

bp_core_add_nav_default()

bp_core_add_nav_default()

Codex Home → Developer Resources → Deprecated → bp_core_add_nav_default()
bp_core_add_nav_default()

Deprecated
This function is deprecated in BuddyPress 1.1. Please refer to bp_core_new_nav_item() going forward.
Description
Set a default action for a nav item, when a sub nav item has not yet been selected.
Usage

Parameters
$parent_idString | Required | The id of the parent navigation item (usually the slug, or the css_id if set)
$function String | Required | The name of the screen function that will display the sub-nav item screen.
$slugString | Optional | Default: false | By setting a slug you can override the $bp[『current_action』] variable. Can be used to change which navigation item is highlighted.
$user_has_access Bool | Optional | Default: true | Does the logged in user have access to this sub-nav item? You can use bp_is_home() to limit a sub-nav item to only the logged in user.
$admin_only Bool | Optional | Default: false | Can this item only be access by site administrators?
Return Values
N/A
Examples

Notes

创建自定义组件

创建自定义组件

Codex Home → Legacy Docs → Archived Section: Plugin Development → Creating a Custom Component
Creating a Custom Component

Note: If you are building a BuddyPress plugin, please make sure you have read how to check if BuddyPress is active. This is very important – the code you need is included in v1.4 of the skeleton component.
If you』re going to develop your own custom BuddyPress component then a great starting point is the 「Skeleton Component「. This is a bare-bones component that will provide a solid starting block for you to develop your component from.

bp_core_add_subnav_item()

bp_core_add_subnav_item()

Codex Home → Developer Resources → Deprecated → bp_core_add_subnav_item()
bp_core_add_subnav_item()

Deprecated
This function is deprecated in BuddyPress 1.1. Please refer to bp_core_new_subnav_item() going forward.
Description
Adds a navigation item to the sub navigation array used in BuddyPress themes.
Usage

Parameters
$parent_idString | Required | The id of the parent navigation item (usually the slug, or the css_id if set)
$slug String | Required | The URL slug for the sub-nav item.
$name String | Required | The display name for the sub-nav item.
$link String | Required | The URL of the sub-nav item, without the slug. This is basically the URL of the main nav item.
$function String | Required | The name of the screen function that will display the sub-nav item screen.
$css_id String | Optional | Default: $slug value | The ID to give the navigation item in HTML for CSS styling.
$user_has_access Bool | Optional | Default: true | Does the logged in user have access to this sub-nav item? You can use bp_is_home() to limit a sub-nav item to only the logged in user.
$admin_only Bool | Optional | Default: false | Can this sub-nav item only be access by site administrators?.
Return Values
N/A
Examples

Notes

语言和翻译

语言和翻译

Codex Home → Languages and Translations
Languages and Translations

Like WordPress, BuddyPress has the built in capability to be used in any language. The instructions below assume you have already configured WordPress in Your Language and Installing WordPress in Your Language.
Like WordPress, you don』t have to lift a finger to apply BuddyPress translations or translation updates. Most sites are now able to automatically apply these updates in the background. If your site is capable of one-click updates without entering FTP credentials, then your site should be able to automatically update translations.
Official BuddyPress translation files (buddypress-xx_XX.po/mo) are loaded to wp-content/languages/plugins/.
Note: the buddypress.pot file provided with each new update is not a translation, but only the translatable strings catalog.
Is your language missing?
BuddyPress translation packages are only updated if the translation is at 100% translated, if you do not see your language after updating your translations, please consider contributing to the the BuddyPress translation project, to get started see Translating WordPress and post any questions you have on the WordPress Polyglots blog.
Manually overriding the translations
1. Get latest (stable) version of BuddyPress and dev
Go to https://translate.wordpress.org/projects/wp-plugins/buddypress and select your preferred language e.g. Portuguese (Brazil)
Select 'Stable (latest release)' or 'Development (trunk)'.
Select 'all current' as '.po' and click 『Export』 and save this file to a folder on your computer, do the same again this time selecting '.mo'
Rename each file to buddypress-language_COUNTRY.extension
eg.
wp-plugins-buddypress-stable-pt-br.po to buddypress-pt_BR.po and
wp-plugins-buddypress-stable-pt-br.mo to buddypress-pt_BR.mo
2. How to use custom language files
You can use your own translation version to fit your needs. Add it to /wp-content/languages/buddypress/. This new directory will not be automatically updated, so it is a safe place to store your custom work. BuddyPress will check for this directory as first. If nothing is found, it will use the translation stored wp-content/languages/plugins/. You can use both directories, so you will never miss an official translation and continue to use your own one. Simply remind to control your work after each BuddyPress update, with help of the buddypress.pot file.
Upload as described or copy the translation files from wp-content/languages/plugins/ to /wp-content/languages/buddypress/.
To create or modify a custom translation you need to use a translation tool, like poEdit or similar, to generate a compiled .mo file.
If the /wp-content/languages/ or /wp-content/languages/plugins/ or /wp-content/languages/buddypress/ folders do not exist, create them.
Using FTP upload both the .po and .mo files to of your WordPress installation.

核心 (Core)

核心 (Core)

Codex Home → Developer Resources → Action Reference → Core
Core

bp-core.php

bp_core_render_notice
bp_core_clear_cache

bp-core/bp-core-activation.php

activate_header
bp_activation_extras

bp-core/bp-core-adminbar.php

bp_adminbar_logo
bp_adminbar_menus

bp-core/bp-core-ajaxhandler.php

wp_ajax_[post action]

bp-core/bp-core-avatars.php

bp_core_render_avatar_cropper
bp_core_avatar_save (removed since BP 1.2)
bp_core_render_avatar_upload_form
bp_core_delete_avatar

bp-core/bp-core-settings.php

bp_notification_settings

bp-core/bp-core-signup.php

signup_header
signup_blogform
signup_extra_fields
signup_hidden_fields
signup_finished
preprocess_signup_form

bp-core/bp-core-templatetags.php

bp_styles
bp_custom_profile_boxes
bp_custom_profile_sidebar_boxes

bp-core/directories/bp-core-directory-members.php

bp_core_directory_members_content
bp_core_directory_members_sidebar

Simplified Chinese (zh_CN)

Simplified Chinese (zh_CN)

Codex Home → Languages and Translations → Simplified Chinese (zh_CN)
Simplified Chinese (zh_CN)

This page needs to be updated. Link below leads to a page linking to the Chinese section which has not been updated since 2010.

WordPress Chinese Group – ——
Download it at:
Dreamcolor』s Cote

The PO and MO files are already for the last stable. So they will been updateed any time. But you can find newest zip file on the download page.

博客 (Blogs)

博客 (Blogs)

Codex Home → Developer Resources → Action Reference → Blogs
Blogs

bp-blogs.php

bp_blogs_screen_my_blogs
bp_blogs_screen_recent_posts
bp_blogs_screen_recent_comments
bp_blogs_screen_create_a_blog
bp_blogs_format_activity
bp_blogs_new_blog
bp_blogs_new_blog_post
bp_blogs_new_blog_comment
bp_blogs_remove_blog
bp_blogs_remove_blog_for_user
bp_blogs_remove_post
bp_blogs_remove_comment
bp_blogs_remove_data_for_blog
bp_blogs_remove_data

bp-blogs/directories/bp-blogs-directory-blogs.php

bp_blogs_directory_blogs_content
bp_blogs_directory_blogs_sidebar