82
Customizing BuddyPress And Impressing Your Friends David “DANGER” Bisset davidbisset.com / @dimensionmedia WoRDCAMP TAMPA 2014 #WCTPA

WPSessions - Thinking Outside The Box With BuddyPress

Embed Size (px)

Citation preview

Page 1: WPSessions - Thinking Outside The Box With BuddyPress

Customizing BuddyPress And Impressing Your Friends

David “DANGER” Bisset davidbisset.com / @dimensionmedia WoRDCAMP TAMPA 2014 #WCTPA

Page 2: WPSessions - Thinking Outside The Box With BuddyPress

What Are We Not Going To Talk About?

Page 3: WPSessions - Thinking Outside The Box With BuddyPress

What Are We Not Going To Talk About?

HOW TO GET FRIENDS

Page 4: WPSessions - Thinking Outside The Box With BuddyPress

What Are We Not Going To Talk About?

FRIENDS = CLIENTS

Page 5: WPSessions - Thinking Outside The Box With BuddyPress

What Are We Going To Talk About?

WHAT IS BUDDYPRESS?

Page 6: WPSessions - Thinking Outside The Box With BuddyPress

What Are We Going To Talk About?

WHAT IS BUDDYPRESS?WHAT IS THE DEFAULT?

Page 7: WPSessions - Thinking Outside The Box With BuddyPress

What Are We Going To Talk About?

WHAT IS BUDDYPRESS?WHAT IS THE DEFAULT?

WHAT OTHERS HAVE DONE

Page 8: WPSessions - Thinking Outside The Box With BuddyPress

What Are We Going To Talk About?

WHAT IS BUDDYPRESS?WHAT IS THE DEFAULT?

CODING EXAMPLES FOR DEVELOPERS

WHAT OTHERS HAVE DONE

Page 9: WPSessions - Thinking Outside The Box With BuddyPress

What Are We Going To Talk About?

WHAT IS BUDDYPRESS?WHAT IS THE DEFAULT?

CODING EXAMPLES FOR DEVELOPERS

START THINKING DIFFERENT

WHAT OTHERS HAVE DONE

Page 10: WPSessions - Thinking Outside The Box With BuddyPress

BPTESTDRIVE.ORG

Page 11: WPSessions - Thinking Outside The Box With BuddyPress

Extended Profile Fields

ACCOUNT SETTINGS

FRIEND CONNECTIONS

PRIVATE MESSAGING

ACTIVITY STREAMS

GROUPSNOTIFICATIONS

SITE TRACKING

PROFILE PRIVACY

THEME COMPATIBILITY

Page 12: WPSessions - Thinking Outside The Box With BuddyPress

REGISTRATION

Page 13: WPSessions - Thinking Outside The Box With BuddyPress
Page 14: WPSessions - Thinking Outside The Box With BuddyPress

Activity Streams

Page 15: WPSessions - Thinking Outside The Box With BuddyPress

ACTIVITY STREAMS

Page 16: WPSessions - Thinking Outside The Box With BuddyPress

ACTIVITY STREAMS

Page 17: WPSessions - Thinking Outside The Box With BuddyPress

EXTENDED PROFILE FIELDS

Page 18: WPSessions - Thinking Outside The Box With BuddyPress

EXTENDED PROFILE FIELDS

Page 19: WPSessions - Thinking Outside The Box With BuddyPress

EXTENDED PROFILE FIELDS

Page 20: WPSessions - Thinking Outside The Box With BuddyPress

EXTENDED PROFILE FIELDS

Page 21: WPSessions - Thinking Outside The Box With BuddyPress

ACCOUNT SETTINGS

Page 22: WPSessions - Thinking Outside The Box With BuddyPress

FRIEND CONNECTIONS

Page 23: WPSessions - Thinking Outside The Box With BuddyPress

Friendship Connections

Page 24: WPSessions - Thinking Outside The Box With BuddyPress

Friendship Connections

Page 25: WPSessions - Thinking Outside The Box With BuddyPress

PRIVATE MESSAGING

Page 26: WPSessions - Thinking Outside The Box With BuddyPress

PRIVATE MESSAGING

Page 27: WPSessions - Thinking Outside The Box With BuddyPress

PRIVATE MESSAGING

Page 28: WPSessions - Thinking Outside The Box With BuddyPress

GROUPS

Page 29: WPSessions - Thinking Outside The Box With BuddyPress

GROUPS

Page 30: WPSessions - Thinking Outside The Box With BuddyPress

BuddyPress “Big Wins”

• OPEN SOURCE

• WORKS WITH ALMOST ANY WORDPRESS THEME

• CONTROL YOUR OWN DATA (NSA PERMITTING)

• CUSTOMIZATION - YOU ARE IN CONTROL

• Great for internal sites, proof of concepts

Page 31: WPSessions - Thinking Outside The Box With BuddyPress

Is Like Saying...

SAYING BUDDYPRESS JUST “ADDS SOCIAL TO A SITE”

WORDPRESS IS JUST “BLOG SOFTWARE”

Page 32: WPSessions - Thinking Outside The Box With BuddyPress

FACEBOOK

Page 33: WPSessions - Thinking Outside The Box With BuddyPress

LINKEDIN

Page 34: WPSessions - Thinking Outside The Box With BuddyPress

TWITTER

Page 35: WPSessions - Thinking Outside The Box With BuddyPress

GOOGLE PLUS

Page 36: WPSessions - Thinking Outside The Box With BuddyPress

INSTAGRAM

Page 37: WPSessions - Thinking Outside The Box With BuddyPress

INSTAGRAM

Page 38: WPSessions - Thinking Outside The Box With BuddyPress

The World (And Your Client) Doesn’t Need Another Facebook

IT NEEDS A SOLUTION CUSTOM TAILORED FOR CLIENTS THAT MAKE SENSE

Page 39: WPSessions - Thinking Outside The Box With BuddyPress

STRAIGHT-FORWARD CONCEPTS

LET’S TAKE A LOOK

Page 40: WPSessions - Thinking Outside The Box With BuddyPress

RUNNERNETWORK.COMSOCIAL NETWORK SPECIALLY DESIGNED FOR RUNNERS

Page 41: WPSessions - Thinking Outside The Box With BuddyPress

RUNNERNETWORK.COMSOCIAL NETWORK SPECIALLY DESIGNED FOR RUNNERS

Page 42: WPSessions - Thinking Outside The Box With BuddyPress

GOVLOOP.COM“KNOWLEDGE NETWORK FOR GOVERNMENT"

Page 43: WPSessions - Thinking Outside The Box With BuddyPress

GOVLOOP.COM“KNOWLEDGE NETWORK FOR GOVERNMENT"

Page 44: WPSessions - Thinking Outside The Box With BuddyPress

LIVENINJA.COMLIVE VIDEO CHAT COMMUNITY + NETWORKING

Page 45: WPSessions - Thinking Outside The Box With BuddyPress

LIVENINJA.COMLIVE VIDEO CHAT COMMUNITY + NETWORKING

Page 46: WPSessions - Thinking Outside The Box With BuddyPress

STUDYCROSSING.COMINTERACTIVE STUDY GROUPS USING BUDDYPRESS / BBPRESS

Page 47: WPSessions - Thinking Outside The Box With BuddyPress

STUDYCROSSING.COMINTERACTIVE STUDY GROUPS USING BUDDYPRESS / BBPRESS

Page 48: WPSessions - Thinking Outside The Box With BuddyPress

STUDYCROSSING.COMINTERACTIVE STUDY GROUPS USING BUDDYPRESS / BBPRESS

Page 49: WPSessions - Thinking Outside The Box With BuddyPress

STUDYCROSSING.COMINTERACTIVE STUDY GROUPS USING BUDDYPRESS / BBPRESS

Page 50: WPSessions - Thinking Outside The Box With BuddyPress

STUDYCROSSING.COMINTERACTIVE STUDY GROUPS USING BUDDYPRESS / BBPRESS

Page 51: WPSessions - Thinking Outside The Box With BuddyPress

Great Ways To Customize BuddyPress

GROUPS EXTENSION API EXTENDING MEMBER PROFILES

CUSTOM NOTIFICATIONS Gamification

SHARING FILES AND DOCUMENTS LIVE CHAT / VIDEO

MOBILE APPS

Page 52: WPSessions - Thinking Outside The Box With BuddyPress

Great Ways To Customize BuddyPress

GROUPS EXTENSION API EXTENDING MEMBER PROFILES

CUSTOM NOTIFICATIONS Gamification

SHARING FILES AND DOCUMENTS LIVE CHAT / VIDEO

MOBILE APPS

Page 53: WPSessions - Thinking Outside The Box With BuddyPress

MEMBER PROFILE METADATA

LET’S TAKE A LOOK

Page 54: WPSessions - Thinking Outside The Box With BuddyPress

function bpupex_update_lat_lon( $user_id, $posted_field_ids, $errors ) {

if ( empty( $errors ) ) {

// safely get the address information

$address = sanitize_text_field( $_POST['field_4'] );$address2 = sanitize_text_field( $_POST['field_5'] );$city = sanitize_text_field( $_POST['field_6'] );$state = sanitize_text_field( $_POST['field_7'] );$zip = sanitize_text_field( $_POST['field_8'] );

if ( $address && $city && $state && $zip ) {

$full_address = urlencode($address . ' ' . $address2 . ' ' . $city . ', ' . $state . ' ' . $zip);

$request_url = "http://maps.googleapis.com/maps/api/geocode/xml?address=".$full_address."&sensor=true";

$xml = wp_remote_get( $request_url, array( 'timeout' => 120, 'sslverify' => false ) );

$xml_response = simplexml_load_string( $xml['body'] );

if ( $xml_response->status->__toString() == "OK" ) {

$lat = $xml_response->result->geometry->location->lat->__toString();$lon = $xml_response->result->geometry->location->lng->__toString();

xprofile_set_field_data ('Latitude', $user_id, $lat);xprofile_set_field_data ('Longitude', $user_id, $lon);

}

} else {

// clear the fields

xprofile_set_field_data ('Latitude', $user_id, false);xprofile_set_field_data ('Longitude', $user_id, false);

}

}

}add_action( 'xprofile_updated_profile', 'bpupex_update_lat_lon', 10, 3 );

Page 55: WPSessions - Thinking Outside The Box With BuddyPress

xprofile_set_field_data ('Longitude', $user_id, false);

add_action( 'xprofile_updated_profile', 'bpupex_update_lat_lon', 10, 3 );

Page 56: WPSessions - Thinking Outside The Box With BuddyPress

GROUPS EXTENSION API

LET’S TAKE A LOOK

Page 57: WPSessions - Thinking Outside The Box With BuddyPress

MEmbers OWN ACTIVITY STREAM OWN FORUM (bbPRESS)

OWN METADATA OWN PRIVACY / INVITE SYSTEM

BuddyPress Groups Have:

Page 58: WPSessions - Thinking Outside The Box With BuddyPress

GROUPS EXTENSION APIExample: Virtual Classroom

Page 59: WPSessions - Thinking Outside The Box With BuddyPress

GROUPS EXTENSION APIExample: Crowdfunding Site

Page 60: WPSessions - Thinking Outside The Box With BuddyPress
Page 61: WPSessions - Thinking Outside The Box With BuddyPress
Page 62: WPSessions - Thinking Outside The Box With BuddyPress

GAMEIFICATION

LET’S TAKE A LOOK

Page 63: WPSessions - Thinking Outside The Box With BuddyPress

Achievements For WordPressDeveloper: Paul Gibbs

Achievements gamifies your WordPress site with challenges, badges, and points. Badges and points are the funnest way to reward and encourage members of your community to participate. Leaderboards and rankings bring friendly competition to your community.

HTTP://WORDPRESS.ORG/PLUGINS/ACHIEVEMENTS/

Page 64: WPSessions - Thinking Outside The Box With BuddyPress

myCREDDeveloper: Gabriel Merovingi

myCRED is an adaptive points management system that lets you award / charge your users for interacting with your WordPress powered website.

HTTPS://WORDPRESS.ORG/PLUGINS/MYCRED/

Page 65: WPSessions - Thinking Outside The Box With BuddyPress

BadgeOS Community Add-OnDeveloper: Credly / webdevstudios

BadgeOS™ turns your WordPress site into an achievement and badging system. And with BuddyPress enabled on your site, achievements are not only awarded by demonstrating skills and knowledge, but also by participating in community activities.

HTTP://WORDPRESS.ORG/PLUGINS/BADGEOS-COMMUNITY-ADD-ON/

Page 66: WPSessions - Thinking Outside The Box With BuddyPress

SCOUT.PCLS.USPIERCE COUNTY LIBRARY (WA)

Page 67: WPSessions - Thinking Outside The Box With BuddyPress

www.conference.com/groups/session-name

www.conference.com/SESSIONS/session-name

www.PROJECTSOCIAL.com/PROJECTS/PROJECT-name

www.SHARESTORIES.com/STORIES/STORY-name

www.MYFAMILY.com/FAMILIES/FAMILY-name

Page 68: WPSessions - Thinking Outside The Box With BuddyPress
Page 69: WPSessions - Thinking Outside The Box With BuddyPress

CUSTOM NOTIFICATIONS

LET’S TAKE A LOOK

Page 70: WPSessions - Thinking Outside The Box With BuddyPress

CUSTOM NOTIFICATIONS

function wctpa_format_notifications_comments( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {

if ( 'new_comment' === $action ) {$link = get_permalink( $item_id );$title = __( 'New Comment On '.get_the_title( $item_id ), 'buddypress' );

if ( (int) $total_items > 1 ) {$text = sprintf( __('You have %d new comments', 'buddypress' ), (int) $total_items );$filter = 'wctpa_bp_notifications_multiple_new_comment_notification';

} else {if ( !empty( $secondary_item_id ) ) {

$text = sprintf( __('You have %d new comment on %s', 'buddypress' ), (int) $total_items, get_the_title( $item_id ) );

} else {$text = sprintf( __('You have %d new comment', 'buddypress' ), (int) $total_items );

}$filter = 'wctpa_bp_notifications_single_new_comment_notification';

}}

if ( 'string' === $format ) {$return = apply_filters( $filter, '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $text ) .

'</a>', (int) $total_items, $text, $link, $item_id, $secondary_item_id );} else {

$return = apply_filters( $filter, array('text' => $text,'link' => $link

), $link, (int) $total_items, $text, $link, $item_id, $secondary_item_id );}

do_action( 'wctpa_format_notifications_comments', $action, $item_id, $secondary_item_id, $total_items );

return $return;}

Page 71: WPSessions - Thinking Outside The Box With BuddyPress

CUSTOM NOTIFICATIONS

function wctpa_format_notifications_comments( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {

if ( 'new_comment' === $action ) {$link = get_permalink( $item_id );$title = __( 'New Comment On '.get_the_title( $item_id ), 'buddypress' );

if ( (int) $total_items > 1 ) {$text = sprintf( __('You have %d new comments', 'buddypress' ), (int) $total_items );$filter = 'wctpa_bp_notifications_multiple_new_comment_notification';

} else {if ( !empty( $secondary_item_id ) ) {

$text = sprintf( __('You have %d new comment on %s', 'buddypress' ), (int) $total_items, get_the_title( $item_id ) );

} else {$text = sprintf( __('You have %d new comment', 'buddypress' ), (int) $total_items );

}$filter = 'wctpa_bp_notifications_single_new_comment_notification';

}}

if ( 'string' === $format ) {$return = apply_filters( $filter, '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $text ) .

'</a>', (int) $total_items, $text, $link, $item_id, $secondary_item_id );} else {

$return = apply_filters( $filter, array('text' => $text,'link' => $link

), $link, (int) $total_items, $text, $link, $item_id, $secondary_item_id );}

do_action( 'wctpa_format_notifications_comments', $action, $item_id, $secondary_item_id, $total_items );

return $return;}

Page 72: WPSessions - Thinking Outside The Box With BuddyPress

CUSTOM NOTIFICATIONS

function wctpa_format_notifications_comments( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) {

if ( 'new_comment' === $action ) {$link = get_permalink( $item_id );$title = __( 'New Comment On '.get_the_title( $item_id ), 'buddypress' );

if ( (int) $total_items > 1 ) {$text = sprintf( __('You have %d new comments', 'buddypress' ), (int) $total_items );$filter = 'wctpa_bp_notifications_multiple_new_comment_notification';

} else {if ( !empty( $secondary_item_id ) ) {

$text = sprintf( __('You have %d new comment on %s', 'buddypress' ), (int) $total_items, get_the_title( $item_id ) );

} else {$text = sprintf( __('You have %d new comment', 'buddypress' ), (int) $total_items );

}$filter = 'wctpa_bp_notifications_single_new_comment_notification';

}}

if ( 'string' === $format ) {$return = apply_filters( $filter, '<a href="' . esc_url( $link ) . '" title="' . esc_attr( $title ) . '">' . esc_html( $text ) .

'</a>', (int) $total_items, $text, $link, $item_id, $secondary_item_id );} else {

$return = apply_filters( $filter, array('text' => $text,'link' => $link

), $link, (int) $total_items, $text, $link, $item_id, $secondary_item_id );}

do_action( 'wctpa_format_notifications_comments', $action, $item_id, $secondary_item_id, $total_items );

return $return;}

Page 73: WPSessions - Thinking Outside The Box With BuddyPress

CUSTOM NOTIFICATIONS

Page 74: WPSessions - Thinking Outside The Box With BuddyPress

The Best BuddyPress Sites ARE THE ONES WHERE THERE’s NO CLUE

BUDDYPRESS WAS USED

Page 75: WPSessions - Thinking Outside The Box With BuddyPress

The Best BuddyPress Sites ARE THE ONES WHERE THERE’s NO CLUE

BUDDYPRESS WAS USED

Page 76: WPSessions - Thinking Outside The Box With BuddyPress

Software As A Service (SaaS)Flox Developer: John JAMES JACOBY

first WordPress-powered application to jump into hosting full-featured social networks.

HTTPS://FLOX.IO/ HTTPS://STORE.FLOX.IO/DOWNLOADS/BUDDIOS/

Page 77: WPSessions - Thinking Outside The Box With BuddyPress

Software As A Service (SaaS)Flox Developer: John JAMES JACOBY

first WordPress-powered application to jump into hosting full-featured social networks.

HTTPS://FLOX.IO/ HTTPS://STORE.FLOX.IO/DOWNLOADS/BUDDIOS/

Page 78: WPSessions - Thinking Outside The Box With BuddyPress

The Challenge: NOT MANY UNIQUE / NICHE

BUDDYPRESS THEMES EXIST

Page 79: WPSessions - Thinking Outside The Box With BuddyPress

Don’t Sit There!GET INVOLVED!

Page 80: WPSessions - Thinking Outside The Box With BuddyPress

Resources:BUDDYPRESS.ORG CODEX

Bp-TRICKS.com - BuddyPress Web Hosting GUIDE

wordpress.tv/tag/buddypress

github.com/dimensionmedia

Page 81: WPSessions - Thinking Outside The Box With BuddyPress

PEOPLE TO FOLLOW@jjj @bmess @pgibbs @boone @buddypressdev @BoweFrankema @karmatosed

@modemlooper @r-a-y @slaFFik @imath @pollyplummer @konradsroka @rociovaldi

Page 82: WPSessions - Thinking Outside The Box With BuddyPress

THANK YOU.David “SHOULD HAVE HAD A V8” Bisset davidbisset.com / @dimensionmedia