Twenty Thirteen Theme 二〇一三主题

Twenty Thirteen Theme 二〇一三主题

Codex Home → BuddyPress Theme Development → BP Theme Compatibility and the WordPress Default Themes → Twenty Thirteen Theme
Twenty Thirteen Theme

A. One column Layout
One Column Layout. Click on image to enlarge.
This is the default layout of the Twenty Thirteen theme if and only if you do not add any widget in the Secondary Widget area in Appearance > Widgets. Otherwise, the Twenty Thirteen theme will automatically have a two-column layout if you add widget to the Secondary Widget area.
If you want to add widgets in the Secondary Widget area for your site』s pages/posts but would prefer a one-column layout for all BP pages, following are the steps to do so.
1. Create a child theme of the Twenty Thirteen theme.
2. Create a new file in your new child theme folder and name it buddypress.php.
3. Copy over the content of Twenty Thirteen』s page.php file into the new buddypress.php file. Remove the get_sidebar tag just before the get_footer call in the template.
?12345678910111213141516171819     

        

                                                

    

 
4. Create a blank functions.php file in the folder of your child theme if you don』t have one yet. You will need to remove the .sidebar body class generated if any widget is added to the Secondary Widget Area which would move the alignment of the content area away from the center,
5. Add the following to the new functions.php file then save file.
?1234567891011 $value) {             if ($value == 'sidebar') unset($wp_classes[$key]);        }    endif;    return $wp_classes;}add_filter('body_class', 'mme_remove_sidebar_body_class', 20, 2);
6. Upload your Twenty Thirteen child theme folder to server.
B. Full Width Layout
Full-width Layout. Click on image to enlarge.
You can create a full-width layout for all BP pages even when the Secondary Widget Area (right sidebar) is active for rest of the site by following these steps.
1. Create a child theme of the Twenty Thirteen theme.
2. Create a new file in your new child theme folder and name it buddypress.php.
3. Copy over the content of Twenty Thirteen』s page.php file into the new buddypress.php file. Remove the get_sidebar tag just before the get_footer call in the template as well as the section with the call to post_thumbnail and save file.
?12345678910111213141516171819     

        

                                                

    

 
4. Create a blank functions.php file in the folder of your child theme if you don』t have one yet. You will need to remove the sidebar body class generated if any widget is added to the Secondary Widget Area which would show up in regular blog posts/pages,
5. Add the following to your new functions.php file then save file.
?1234567891011 $value) {             if ($value == 'sidebar') unset($wp_classes[$key]);        }    endif;    return $wp_classes;}add_filter('body_class', 'mme_remove_sidebar_body_class', 20, 2);
6. Open up your child theme』s style.css file, add the following and save file.
?1234567891011121314151617.buddypress .entry-header,.buddypress .entry-content,.buddypress .entry-summary,.buddypress .entry-meta {    max-width: 1040px;    width: 100%;} @ media (max-width: 1069px) {    .buddypress .entry-header,    .buddypress .entry-content,    .buddypress .entry-summary,    .buddypress .entry-meta {        padding-left: 20px;        padding-right: 20px;    }}
– delete the space between @ and media in media query above.
7. Upload your Twenty Thirteen child theme folder to server.
C. Two Column, Right Sidebar Layout
Two-column Layout. Click on image to enlarge.
When you add any widget to the Secondary Widget Area in Appearance > Widgets using the Twenty Thirteen theme, the right sidebar will automatically show up in all posts and pages including the BuddyPress pages. So if you plan to have the same widgets in the right sidebar throughout the site, then you can stop reading at this point as you will not have to do anything further.
However, if you want to customize the sidebar content of all your BP pages, you can do so by: a) using a plugin like Widget Logic to assign widgets to specific pages by using conditional tags or b) by creating new buddypress.php and sidebar-buddypress.php files and then registering a new widget area in your child theme』s functions.php file. The following steps are for the second option.
1. Create a child theme of the Twenty Thirteen theme.
2. Create a new file in your new child theme folder and name it buddypress.php.
3. Copy over the content of Twenty Thirteen』s page.php file into a new buddypress.php file and remove the section about retrieving the post_thumbnail. Then you will have to change get_sidebar() to get_sidebar(『buddypress』).
?12345678910111213141516171819202122232425262728293031323334353637     

        

                              <article id="post-" >                    

                        

                    

                     

                                                 '

', 'link_before' => '', 'link_after' => '' ) ); ?>                    

                     

                        <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '', '' ); ?>                    

                

                      

    

 
4. Create a blank functions.php file in the folder of your child theme if you don』t have one yet. You will be creating a new widget area for BuddyPress pages as well as adding a body class to help you style your two column layout.
5. Add the following to the new functions.php file then save file.
?1234567891011121314151617181920212223 __( 'BuddyPress Sidebar Widget Area', 'mmechildtheme' ),        'id'         => 'bp-sidebar',        'description'    => __( 'Appears in the sidebar section of all BuddyPress pages.', 'mmechildtheme' ),        'before_widget' => '

',        'before_title'  => '

',        'after_title'   => '

',    ) );}add_action( 'widgets_init', 'mme_register_bp_widgets_area' ); // Add the sidebar body class for BP pages if the Secondary Widget area is not activefunction mme_add_sidebar_body_class( $classes ) {    if ( function_exists ( 'bp_loaded' ) &&  !bp_is_blog_page() && !is_active_sidebar( 'sidebar-2' )  )  {        $classes[] = 'sidebar';    }    return $classes;}add_filter( 'body_class', 'mme_add_sidebar_body_class' );
6. Create a new file named sidebar-buddypress.php in your child theme folder and add the following:
?123456789101112131415161718192021     

 
8 . Upload your Twenty Thirteen child theme folder to server. You』ll need to add at least one widget to the BP Sidebar widget area.

BuddyPress 修复工具管理屏幕

BuddyPress 修复工具管理屏幕

Codex Home → Administrator Guide → BuddyPress Repair Tools Admin Screen
BuddyPress Repair Tools Admin Screen

Occasionally, BP friend counts and other data can get out of sync. The new Tools screen lets admins manually reset these values. Go to wp-admin Menu > Tools > BuddyPress and run repair tools one at a time only, especially on large sites.
When you have a new installation, the default repair tools are for:

Count total members
Repair user 「last activity」 data

As more people register, and when you enable the Friends and Groups components, you』ll find repair tools for the additional data generated per image below:

Count friends for each user
Count groups for each user
Count total members
Repair user 「last activity」 data

存档部分:主题开发

存档部分:主题开发

Codex Home → Legacy Docs → Archived Section: Theme Development
Archived Section: Theme Development

Legacy Documents
The information contained in the pages of this section have either been updated or are deprecated completely. Legacy Docs are retained for historic reference.

启动前检查清单

启动前检查清单

Codex Home → Prelaunch Checklist
Prelaunch Checklist

Releasing BuddyPress to the world is a big deal, and takes quite a few manual steps to ensure safe & comfortable updates & upgrades are had by all. Below are the steps release leads go through with each & every release.

Note: These steps vary slightly depending on major/minor/urgency of the deployment to WordPress.org. For questions, or if something is not clear, please ping @johnjamesjacoby, @boone, or @djpaul, who are mad enough to comprehend how & why all this works the way it does. (We keep planning to automate this, but until then, please enjoy this extremely long and intimidating list of responsibilities.)

Prologue

There are two code repositories, and you』ll be tasked with compiling the BuddyPress codebase from the development repo to the deployment repo. They are separate because BuddyPress is deployed to almost all end-users from the public WordPress.org plugin repository in a way that requires some development assets to be pre-compiled (it』s not a literal 1-to-1 copy) and because BuddyPress is lucky enough to have its own Trac instance on WordPress.org.

Key

We』ll refer to these two repositories like this for the duration of these steps:

[dev] = buddypress.svn.wordpress.org[wporg] = plugins.svn.wordpress.org/buddypress/

Now that you』re familiar, sit back, relax, put on your headgear, and get ready for a trip to the atmosphere…

Pre-Release Codex, Trac, & Publicity

For minor/major full releases only.

Create release version page on codex (https://codex.buddypress.org/releases/version-1-5-5/)Create version page to codex Releases page (https://codex.buddypress.org/releases/).Review recent rockstars and release credits (props). Change as needed.Updates to bp-about page.Draft blog post.If this is a major release, check to see whether there are tickets closed against a minor release that will not happen due to the major release. (For example, 3.3.0 was subsumed into 4.0.0.) If so, reassign those tickets to the major release milestone, and delete the unused milestone.

Version Bumps (in dev)

For major releases (2.7.0), switch to: /trunk/.
svn switch https://buddypress.svn.wordpress.org/trunk/
For minor releases (2.7.1), switch to relative branch: branches/2.7/
svn switch https://buddypress.svn.wordpress.org/branches/2.7/
For Beta and Release Candidate releases (2.7.1-beta1), switch to: /trunk/.
svn switch https://buddypress.svn.wordpress.org/trunk/

Change version in bp-loader.php (plugin header)Change version in src/bp-loader.php (plugin header)Change $this->version (setup_globals()) in class-buddypress.phpChange stable-tag readme.txt (major and minor releases)Change tested-up-to readme.txt (major and minor releases)Change version in package.jsonUse the latest version of npm and: npm install and then npm shrinkwrapAdd 「Upgrade Notice」 & 「Changelog」 entries for this version in readme.txt (major and minor releases)Commit changes

Tagging/Branching (in dev)

N.B. Once created, a tag cannot be removed or edited nor trunk merged to it so please ensure all necessary updates to trunk are committed before creating the tag copy from it.

For major releases (2.7.0), branch from trunk, then tag from new branch.
svn cp https://buddypress.svn.wordpress.org/trunk/ https://buddypress.svn.wordpress.org/branches/2.7
svn cp https://buddypress.svn.wordpress.org/branches/2.7 https://buddypress.svn.wordpress.org/tags/2.7.0
For minor releases (2.7.1), tag from relevant branch.
svn cp https://buddypress.svn.wordpress.org/branches/2.7 https://buddypress.svn.wordpress.org/tags/2.7.0
For Beta and Release Candidate releases (2.7.0-beta1), create tag from trunk.
svn cp https://buddypress.svn.wordpress.org/trunk https://buddypress.svn.wordpress.org/tags/2.7.0-beta1

Deploying to [wporg]

You』ll probably want to checkout the entire BuddyPress repository from WordPress.org. This way you can navigate the entire trunk/branches/tags structure, and more easily make changes as necessary.

svn co https://plugins.svn.wordpress.org/buddypress/

Omit externals – that will save you lots of time. Checkout into a temporary directory…

Export the development version of BuddyPress you intend to deploy to users: svn co https://buddypress.svn.wordpress.org/tags/2.7.1/ . --force --ignore-externals.Use the latest version of npm and run: npm install and then composer install && grunt build. (You may need to globally update npm, or other such fun stuff. Your mileage may vary.)Overwrite the contents of the trunk directory with the contents of build in the [wporg] checkout.If it』s a beta or a release candidate, make sure the Stable tag in both trunk and the newly created tag are the same and are the one of current stable version of BuddyPress. Run svn stat to check if you need to svn add or svn delete filesCreate an svn tag from trunk using svn cp trunk tags/2.7.1 . If it』s not a beta or a release candidate, make sure the Stable tag in both trunk and the newly created tag are the same and are the one of the new version of BuddyPress. This is needed to make sure GlotPress will successfully update Translation strings.Commit & cross fingers!Verify the zip file for the tag, which will be at a URL of the format https://downloads.wordpress.org/plugins/buddypress.4.0.0.zipAsk Paul Gibbs to update https://github.com/buddypress/BuddyPress-build (via git-svn he has locally).Ask Boone Gorges to go to https://packagist.org/packages/buddypress/buddypress and click 「Update」.

Trac cleanup

If any tickets remain in milestone, close them or reassign them to a future milestone.Close milestone.Ensure that milestone exists for next major and minor releases.Create a Version for the completed release.

Announcements

Publish blog post on buddypress.orgUpdate version number in the Downloads page on the buddypress.org.Write a blog post on bpdevel.wordpress.comForum announcement in buddypress.org/supportSend tweets from the BP twitter accounts.

Version Bumps (in dev)

If a major x.y release, bump trunk version numbers to alpha in bp-loader.php (2.1-alpha).Bump relevant branch version numbers to alpha in bp-loader.php (2.1-alpha).If a major x.y release, sync [dev] trunk and [wporg] trunk.

GlotPress Translation Strings

Development strings are here: https://translate.wordpress.org/projects/wp-plugins/buddypress/devThe source of the buddypress.pot is: https://plugins.svn.wordpress.org/buddypress/trunk/buddypress.potRegular updates by running: grunt release and pushing to https://plugins.svn.wordpress.org/browser/buddypress/trunk/ will make #Polyglots translators happyThis also allows for relatively easy 「string freezes」 as new releases near

适度的活动流

适度的活动流

Codex Home → Administrator Guide → Moderate Activity Streams
Moderate Activity Streams

BuddyPress provides admin dashboard panels to help you manage all the different activities throughout the site, similar to the way you manage comments and other content. This screen is customizable in the same ways as other management screens, and you can act on activities using the on-hover action links or the Bulk Actions.
There are many different types of activities. Some are generated automatically by BuddyPress and other plugins, and some are entered directly by a user in the form of status update. To help manage the different activity types, use the filter dropdown box to switch between them.
In the Activity column: above each activity it says 「Submitted on,」 followed by the date and time the activity item was generated on your site. Clicking on the date/time link will take you to that activity on your live site. Hovering over any activity gives you options to reply, edit, spam mark, or delete that activity.
In the In Response To column: if the activity was in reply to another activity, it shows that activity』s author』s picture and name, and a link to that activity on your live site. If there is a small bubble, the number in it shows how many other activities are related to this one; these are usually comments. Clicking the bubble will filter the activity screen to show only related activity items.
Activity Management Screen. Click on image to enlarge.
Sections
General type
Options
All
Spam

Search All Activity form
Bulk Actions (Apply)
Options
Mark As Spam
Not Spam
Delete Permanently

Show All Activity Types (Filter)
Options
Created a group
Friendships accepted
Joined a group
Member changed profile pPicture
New friendships
New group forum post
New group forum topic
New member registered
New post comment posted
New post published
New site created (multisite only)
Posted a status update
Replied to a status update

Pagination
List of Sitewide Activities
Columns Activity Management Screen: Multisite-Network. Click on image to enlarge.
Author: Username and Avatar
Activity: Date and Excerpt of Activity
Options
Reply
Edit
Spam
Delete Permanently

In Response To

View Activity link only (for original posts)
For replies to original posts:
Elements
Original Poster』s Avatar
Original Poster』s Username
View Activity link (of original post)
Comment bubble link with number of related activities to that original post ID => goes to a new Activity Management Screen panel: 「Activity related to ID #__」 with a list of all the activities related to the original post

⇒ Related: Activity Streams – Front End

视频 (Videos)

视频 (Videos)

Codex Home → Getting Started → Videos
Videos

Herding Cats with the BuddyPress Activity Component
BuddyPress is great for building niche community sites. But, in the hands of the right developer, BP can power much more than just social networks. The Activity component is a prime example of this flexibility.

BuddyPress Rules – The Road To Rewrites Is Paved With Pretty Permalinks
This session discusses how WordPress Rewrite Rules API integration for BuddyPress 1.8 was planned, architected, built, and patched.

Beyond the Default: Explorations and Experiments in BuddyPress
For years BuddyPress was tied to a specific theme and creating a custom theme had a steep learning curve. BuddyPress now has theme independence. This presentation looks beyond the default, to new UI』s, new possibilities.

BuddyPress 101
This is an introduction into the use of BuddyPress on an existing WordPress-powered web site. NOTE: this video may be of an earlier version of BuddyPress.

Advanced BuddyPress Plugin Development

Beyond the Blog with BuddyPress and bbPress
This presentation showcases some favorite BuddyPress and bbPress installations. It explains what makes them great, why they』ve succeeded, and provides tips and tricks you can implement to take your BuddyPress and bbPress powered site far beyond the blog.

标记为垃圾邮件管理屏幕

标记为垃圾邮件管理屏幕

Codex Home → Administrator Guide → Mark as Spam Admin Screen
Mark as Spam Admin Screen

Site Administrators on non-Multisite installations can now perform spam actions from Dashboard > Users > All Users just like Super Administrators of Multisite installations have been able to do.

用户提交指南

用户提交指南

Codex Home → BuddyPress Theme Development → User Submitted Guides
User Submitted Guides

These are short tutorials and guides submitted by the BuddyPress community designed to help you with custom theme aspects of your BuddyPress site.

存档部分:开发人员资源

存档部分:开发人员资源

Codex Home → Legacy Docs → Archived Section: Developer Resources
Archived Section: Developer Resources

Legacy Documents
The information contained in the pages of this section have either been updated or are deprecated completely. Legacy Docs are retained for historic reference.

通知 (Notifications)

通知 (Notifications)

Codex Home → Administrator Guide → Notifications
Notifications

The notifications component was added to BuddyPress 1.9 and works identically to the previous core notifications functionality, but now separates everything into it』s own component. This page will give you a quick overview of it』s functionality.
An example of the new Notifications component
Functionality Overview
Notifications are a central aspect of the user experience on a BuddyPress site. By default new notifications are displayed in the admin bar profile menu, right next to the navigation menus, some themes even integrate the notification counter in other places (like in the header or sidebar of a page).
Notifications are sent out to your community members as soon as one of the following things happen:
Activity

A member mentions you in an update @username」
A member replies to an update or comment you』ve posted

The Notifications menu on BuddyPress.org
Messages

A member sends you a new message

Friends

A member sends you a friendship request
A member accepts your friendship request

Groups

A member invites you to join a group
Group information is updated
You are promoted to a group administrator or moderator
A member requests to join a private group for which you are an admin

Group Forums

Receive notifications of your own posts?

Every user can view their read and unread notifications on their 「Notifications」 page on their profile and easily:

Mark notifications as 「read」
Mark notification as 「unread」
Delete notification (in batches if needed)

Email Notifications
User can enable and disable receiving emails when new notifications are received. This can be done through their Settings > Email page.

Plugin Integrations
Some plugins can add their own notifications events that can be triggered by activity of your member. A good example is BBPress which sends notifications on new topics and topic replies.
Related Resources

BuddyPress Notifications Extension example from BBPresss 2
bp_notifications_add_notification()