From fe39e8483c2e4aa82df041312b0ba196d1cad457 Mon Sep 17 00:00:00 2001 From: root <root@rivolta.investici.org> Date: Wed, 1 Dec 2010 00:41:26 +0000 Subject: [PATCH] Adding plugin bp-template-pack --- .../bp-template-pack/bp-template-pack.php | 361 ++++++++++++++++++ wp-content/plugins/bp-template-pack/bp.css | 251 ++++++++++++ .../plugins/bp-template-pack/readme.txt | 27 ++ .../templates/activity/activity-loop.php | 45 +++ .../templates/activity/entry.php | 76 ++++ .../templates/activity/index.php | 104 +++++ .../templates/activity/post-form.php | 62 +++ .../templates/blogs/blogs-loop.php | 64 ++++ .../templates/blogs/create.php | 36 ++ .../templates/blogs/index.php | 55 +++ .../templates/forums/forums-loop.php | 79 ++++ .../templates/forums/index.php | 111 ++++++ .../templates/groups/create.php | 262 +++++++++++++ .../templates/groups/groups-loop.php | 60 +++ .../templates/groups/index.php | 57 +++ .../templates/groups/single/activity.php | 38 ++ .../templates/groups/single/admin.php | 312 +++++++++++++++ .../templates/groups/single/forum.php | 53 +++ .../templates/groups/single/forum/edit.php | 68 ++++ .../templates/groups/single/forum/topic.php | 111 ++++++ .../templates/groups/single/group-header.php | 46 +++ .../templates/groups/single/home.php | 75 ++++ .../templates/groups/single/members.php | 54 +++ .../templates/groups/single/plugins.php | 39 ++ .../groups/single/request-membership.php | 18 + .../templates/groups/single/send-invites.php | 77 ++++ .../templates/members/index.php | 60 +++ .../templates/members/members-loop.php | 75 ++++ .../templates/members/single/activity.php | 48 +++ .../members/single/activity/permalink.php | 17 + .../templates/members/single/blogs.php | 24 ++ .../templates/members/single/friends.php | 34 ++ .../members/single/friends/requests.php | 41 ++ .../templates/members/single/groups.php | 37 ++ .../members/single/groups/invites.php | 39 ++ .../templates/members/single/home.php | 56 +++ .../members/single/member-header.php | 56 +++ .../templates/members/single/messages.php | 29 ++ .../members/single/messages/compose.php | 38 ++ .../members/single/messages/messages-loop.php | 73 ++++ .../members/single/messages/notices-loop.php | 54 +++ .../members/single/messages/single.php | 98 +++++ .../templates/members/single/plugins.php | 45 +++ .../templates/members/single/profile.php | 24 ++ .../members/single/profile/change-avatar.php | 60 +++ .../templates/members/single/profile/edit.php | 117 ++++++ .../members/single/profile/profile-loop.php | 59 +++ .../templates/registration/activate.php | 58 +++ .../templates/registration/register.php | 309 +++++++++++++++ 49 files changed, 3992 insertions(+) create mode 100644 wp-content/plugins/bp-template-pack/bp-template-pack.php create mode 100644 wp-content/plugins/bp-template-pack/bp.css create mode 100644 wp-content/plugins/bp-template-pack/readme.txt create mode 100644 wp-content/plugins/bp-template-pack/templates/activity/activity-loop.php create mode 100644 wp-content/plugins/bp-template-pack/templates/activity/entry.php create mode 100644 wp-content/plugins/bp-template-pack/templates/activity/index.php create mode 100644 wp-content/plugins/bp-template-pack/templates/activity/post-form.php create mode 100644 wp-content/plugins/bp-template-pack/templates/blogs/blogs-loop.php create mode 100644 wp-content/plugins/bp-template-pack/templates/blogs/create.php create mode 100644 wp-content/plugins/bp-template-pack/templates/blogs/index.php create mode 100644 wp-content/plugins/bp-template-pack/templates/forums/forums-loop.php create mode 100644 wp-content/plugins/bp-template-pack/templates/forums/index.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/create.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/groups-loop.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/index.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/activity.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/admin.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/forum.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/forum/edit.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/forum/topic.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/group-header.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/home.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/members.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/plugins.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/request-membership.php create mode 100644 wp-content/plugins/bp-template-pack/templates/groups/single/send-invites.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/index.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/members-loop.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/activity.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/activity/permalink.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/blogs.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/friends.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/friends/requests.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/groups.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/groups/invites.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/home.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/member-header.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/messages.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/messages/compose.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/messages/messages-loop.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/messages/notices-loop.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/messages/single.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/plugins.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/profile.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/profile/change-avatar.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/profile/edit.php create mode 100644 wp-content/plugins/bp-template-pack/templates/members/single/profile/profile-loop.php create mode 100644 wp-content/plugins/bp-template-pack/templates/registration/activate.php create mode 100644 wp-content/plugins/bp-template-pack/templates/registration/register.php diff --git a/wp-content/plugins/bp-template-pack/bp-template-pack.php b/wp-content/plugins/bp-template-pack/bp-template-pack.php new file mode 100644 index 000000000..635daaa21 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/bp-template-pack.php @@ -0,0 +1,361 @@ +<?php +/* +Plugin Name: BuddyPress Template Pack +Plugin URI: http://wordpress.org/extend/plugins/bp-template-pack/ +Description: Add support for BuddyPress to your existing WordPress theme. This plugin will guide you through the process step by step. +Author: apeatling +Version: 1.0.2 +Author URI: http://buddypress.org/developers/apeatling/ +*/ + +/***** + * Initialize the plugin once BuddyPress has initialized. + */ + +function bp_tpack_deactivate() { + /* Cleanup */ + delete_option( 'bp_tpack_disable_js' ); + delete_option( 'bp_tpack_disable_css' ); + delete_option( 'bp_tpack_configured' ); +} +register_deactivation_hook( __FILE__, 'bp_tpack_deactivate' ); + +function bp_tpack_init() { + global $wp_themes; + + /* Check to make sure the active theme is not bp-default */ + if ( 'bp-default' == get_option( 'template' ) ) + return false; + + /* Load the default BuddyPress AJAX functions */ + if ( !(int)get_option( 'bp_tpack_disable_js' ) ) { + require_once( BP_PLUGIN_DIR . '/bp-themes/bp-default/_inc/ajax.php' ); + + /* Load the default BuddyPress javascript */ + wp_enqueue_script( 'bp-js', BP_PLUGIN_URL . '/bp-themes/bp-default/_inc/global.js', array( 'jquery' ) ); + } + + /* Add the wireframe BP page styles */ + if ( !(int)get_option( 'bp_tpack_disable_css' ) ) + wp_enqueue_style( 'bp-css', plugins_url( $path = basename( dirname( __FILE__ ) ) ) . '/bp.css' ); +} +add_action( 'bp_init', 'bp_tpack_init' ); + +function bp_tpack_add_theme_menu() { + add_theme_page( __( 'BP Compatibility', 'bp-template-pack' ), __( 'BP Compatibility', 'bp-template-pack' ), current_user_can( 'switch_themes' ), 'bp-tpack-options', 'bp_tpack_theme_menu' ); +} +add_action( 'admin_menu', 'bp_tpack_add_theme_menu' ); + +function bp_tpack_theme_menu() { + $theme_dir = WP_CONTENT_DIR . '/themes/' . get_option('stylesheet') . '/'; + + if ( !empty( $_GET['finish'] ) ) + update_option( 'bp_tpack_configured', 1 ); + + if ( !empty( $_GET['reset'] ) ) + delete_option( 'bp_tpack_configured' ); + + if ( !file_exists( $theme_dir . 'activity' ) && !file_exists( $theme_dir . 'blogs' ) && !file_exists( $theme_dir . 'forums' ) && !file_exists( $theme_dir . 'groups' ) && !file_exists( $theme_dir . 'members' ) && !file_exists( $theme_dir . 'registration' ) ) { + $step = 1; + + if ( !empty( $_GET['move'] ) ) { + $step = 2; + $error = false; + + /* Attempt to move the directories */ + if ( !bp_tpack_move_templates() ) + $error = true; + } + + /* Make sure we reset if template files have been deleted. */ + delete_option( 'bp_tpack_configured' ); + } else + $step = 3; + + if ( !empty( $_POST['bp_tpack_save'] ) ) { + /* Save options */ + if ( !empty( $_POST['bp_tpack_disable_css'] ) ) + update_option( 'bp_tpack_disable_css', 1 ); + else + delete_option( 'bp_tpack_disable_css' ); + + if ( !empty( $_POST['bp_tpack_disable_js'] ) ) + update_option( 'bp_tpack_disable_js', 1 ); + else + delete_option( 'bp_tpack_disable_js' ); + } + + if ( !(int)get_option( 'bp_tpack_configured' ) ) { +?> + <div class="wrap"> + <h2>Making Your Theme BuddyPress Compatible</h2> + + <p>Adding support for BuddyPress to your existing WordPress theme can be a straightforward process by following the setup instructions on this page.</p> + + <?php switch( $step ) { + case 1: ?> + + <h2>Step One</h2> + + <p>BuddyPress needs some extra template files in order to display its pages correctly. This plugin contains these extra templates, but right now they are in the plugin directory. They need to be inside your + active theme directory to work correctly. First of all we can try moving them automatically, please click the button below to attempt to move the templates:</p> + + <p><a class="button" href="?page=bp-tpack-options&move=1">Move Template Files</a></p> + + <?php break; ?> + + <?php case 2: ?> + + <h2>Step Two</h2> + + <?php if ( $error ) : ?> + + <p><strong>Moving templates failed.</strong> There was an error when trying to move the templates automatically. That's okay though as we probably don't have the + correct permissions. You're going to have to move the template files manually.</p> + + <p>You will need to connect to your WordPress files using FTP. When you are connected browse to the following directory:<p> + + <p><code><?php echo dirname( __FILE__ ) . '/templates/' ?></code></p> + + <p>In this directory you will find six folders. If you want to use all of the features of BuddyPress then you must move all six directories to the following folder:</p> + + <p><code><?php echo $theme_dir ?></code></p> + + <p>If you decide that you don't want to use a feature of BuddyPress then you can actually ignore the template folders for these features. For example, if you don't want + to use the groups and forums features, you can simply not copy the /groups/ and /forums/ template folders to your active theme. If you're confused then just copy + all six folders and you'll be fine.</p> + + <p>Once you have correctly copied the folders into your active theme, please use the button below to move onto step three.</p> + + <p><a href="?page=bp-tpack-options" class="button">I've finished moving template folders</a></p> + + <?php else : ?> + + <p><strong>Templates moved successfully!</strong> This is great news, BuddyPress templates are now in the correct position in your theme which means you can skip step two and <a href="?page=bp-tpack-options">move on to step three</a>.</p> + + <?php endif; ?> + + <?php break; ?> + <?php case 3: ?> + <h2>Step Three</h2> + + <p>Now that the template files are in the correct location, click through your site (you can come back to this page at any point). You should see a BuddyPress admin bar at the top of the page, try visiting some of the links in the "My Account" menu. You should find that BuddyPress pages now work and are displayed.</p> + + <p>If you find that the pages are not quite aligned correctly, or the content is overlapping the sidebar, you will need to tweak the template HTML. Please follow the "fixing alignment" instructions below. If the content in your pages is aligned in the correct place then you can skip to the "Finishing Up" section at the bottom of this page.</p> + + <h3>Fixing Alignment</h3> + + <p>By default BuddyPress templates use this HTML structure:</p> + +<p><pre><code style="display: block; width: 40%; padding-left: 15px;"> +[HEADER] + +<div id="container"> + <div id="content"> + [PAGE CONTENT] + </div> + + <div id="sidebar"> + [SIDEBAR CONTENT] + </div> +</div> + +[FOOTER] + +</code></pre></p> + + <p>If BuddyPress pages are not aligned correctly then you will need to modify some of the templates to match your theme's HTML structure. The best way to do this is to FTP to your theme's files at:</p> + + <p><code><?php echo $theme_dir ?></code></p> + + <p>Then open up the <code>page.php</code> file (if this does not exist use <code>index.php</code>). Make note of the HTML template structure of the file, specifically the <code><div></code> tags that surround the content and sidebar.</p> + + <p>You will need to change the HTML structure in the BuddyPress templates that you copied into your theme to match the structure in your <code>page.php</code> or <code>index.php</code> file. The files that you need to edit are as follows (leave out any folders you have not copied over in step two):</p> + + <ul style="list-style: disc; margin-left: 40px;"> + <li><?php echo '/activity/index.php' ?></li> + <li><?php echo '/blogs/index.php' ?></li> + <li><?php echo '/forums/index.php' ?></li> + <li><?php echo '/groups/index.php' ?></li> + <li><?php echo '/groups/create.php' ?></li> + <li><?php echo '/groups/single/home.php' ?></li> + <li><?php echo '/groups/single/plugins.php' ?></li> + <li><?php echo '/members/index.php' ?></li> + <li><?php echo '/members/single/home.php' ?></li> + <li><?php echo '/members/single/plugins.php' ?></li> + <li><?php echo '/registration/register.php' ?></li> + + <?php if ( bp_core_is_multisite() ) : ?> + <li><?php echo '/blogs/create.php' ?></li> + <li><?php echo '/registration/activate.php' ?></li> + <?php endif; ?> + </ul> + + <p>Once you are done matching up the HTML structure of your theme in these template files, please take another look through your site. You should find that BuddyPress pages now fit inside the content structure of your theme.</p> + + <h3>Finishing Up</h3> + + <p>You're now all done with the conversion process. Your WordPress theme will now happily provide BuddyPress compatibility support. Once you hit the finish button you will be presented with a new permanent theme options page allowing you to tweak some settings.</p> + + <p><a href="?page=bp-tpack-options&finish=1" class="button-primary">Finish</a></p> + <p> </p> + + <?php break;?> + + <?php } ?> + </div> + +<?php } else { // The theme steps have been completed, just show the permanent page ?> + + <div class="wrap"> + + <h2>BuddyPress Theme Compatibility</h2> + + <?php if ( !empty( $_GET['finish'] ) ) : ?> + <div id="message"> + <p><strong>Congratulations, you have completed the BuddyPress theme compatibility setup procedure!</strong></p> + </div> + <?php endif; ?> + + <form action="" name="bp-tpack-settings" method="post" style="width: 60%; float: left; margin-right: 3%;"> + + <p><strong><input type="checkbox" name="bp_tpack_disable_css" value="1"<?php if ( (int)get_option( 'bp_tpack_disable_css' ) ) : ?> checked="checked"<?php endif; ?> /> Disable BP Template Pack CSS</strong></p> + <p> + <small style="display: block; margin-left:18px; font-size: 11px">The BuddyPress template pack comes with basic wireframe CSS styles that will format the layout of BuddyPress pages. You can + extend upon these styles in your theme's CSS file, or simply turn them off and build your own styles.</small> + </p> + + <p style="margin-top: 20px;"><strong><input type="checkbox" name="bp_tpack_disable_js" value="1"<?php if ( (int)get_option( 'bp_tpack_disable_js' ) ) : ?> checked="checked"<?php endif; ?> /> Disable BP Template Pack JS / AJAX</strong></p> + <small style="display: block; margin-left:18px; font-size: 11px">The BuddyPress template pack will automatically integrate the BuddyPress default theme javascript and AJAX functionality into your + theme. You can switch this off, however the experience will be somewhat degraded.</small> + + <p class="submit"> + <input type="submit" name="bp_tpack_save" value="Save Settings" class="button" /> + </p> + </form> + + <div style="float: left; width: 37%;"> + <p style="line-height: 180%; border: 1px solid #eee; background: #fff; padding: 5px 10px;"><strong>NOTE:</strong> To remove the "BuddyPress is ready" message you will need to add a "buddypress" tag to your theme. You can do this by editing the <code>style.css</code> file of your active theme and adding the tag to the "Tags:" line in the comment header.</p> + + <h4>Navigation Links</h4> + + <p>You may want to add new navigation tabs or links to your theme to link to BuddyPress directory pages. The default set of links are:</p> + <ul> + <li>Activity: <a href="<?php echo get_option('home') . '/' . BP_ACTIVITY_SLUG . '/'; ?>"><?php echo get_option('home') . '/' . BP_ACTIVITY_SLUG . '/'; ?></a></li> + <li>Members: <a href="<?php echo get_option('home') . '/' . BP_MEMBERS_SLUG . '/'; ?>"><?php echo get_option('home') . '/' . BP_MEMBERS_SLUG . '/'; ?></a></li> + <li>Groups: <a href="<?php echo get_option('home') . '/' . BP_GROUPS_SLUG . '/'; ?>"><?php echo get_option('home') . '/' . BP_GROUPS_SLUG . '/'; ?></a></li> + <li>Forums: <a href="<?php echo get_option('home') . '/' . BP_FORUMS_SLUG . '/'; ?>"><?php echo get_option('home') . '/' . BP_FORUMS_SLUG . '/'; ?></a></li> + <li>Register: <a href="<?php echo get_option('home') . '/' . BP_REGISTER_SLUG . '/'; ?>"><?php echo get_option('home') . '/' . BP_REGISTER_SLUG . '/'; ?></a> (registration must be enabled)</li> + + <?php if ( bp_core_is_multisite() ) : ?> + <li>Blogs: <a href="<?php echo get_option('home') . '/' . BP_BLOGS_SLUG . '/'; ?>"><?php echo get_option('home') . '/' . BP_BLOGS_SLUG . '/'; ?></a></li> + <?php endif; ?> + </ul> + + <h4>Reset Setup</h4> + <p>If you would like to run through the setup process again please use the reset button (you will start at step three if you haven't removed the template files):</p> + <p><a class="button" href="?page=bp-tpack-options&reset=1">Reset</a></p> + </div> + +<?php + } +} + +function bp_tpack_move_templates() { + $destination_dir = WP_CONTENT_DIR . '/themes/' . get_option('stylesheet') . '/'; + $source_dir = WP_CONTENT_DIR . '/plugins/' . basename( dirname( __FILE__ ) ) . '/templates/'; + + $dirs = array( 'activity', 'blogs', 'forums', 'groups', 'members', 'registration' ); + + foreach ( (array)$dirs as $dir ) { + if ( !bp_tpack_recurse_copy( $source_dir . $dir, $destination_dir . $dir ) ) + return false; + } + + return true; +} + +function bp_tpack_recurse_copy( $src, $dst ) { + $dir = @opendir( $src ); + + if ( !@mkdir( $dst ) ) + return false; + + while ( false !== ( $file = readdir( $dir ) ) ) { + if ( ( $file != '.' ) && ( $file != '..' ) ) { + if ( is_dir( $src . '/' . $file ) ) + bp_tpack_recurse_copy( $src . '/' . $file, $dst . '/' . $file ); + else { + if ( !@copy( $src . '/' . $file, $dst . '/' . $file ) ) + return false; + } + } + } + + @closedir( $dir ); + + return true; +} + + +/***** + * Add support for showing the activity stream as the front page of the site + */ + +/* Filter the dropdown for selecting the page to show on front to include "Activity Stream" */ +function bp_tpack_wp_pages_filter( $page_html ) { + if ( 'page_on_front' != substr( $page_html, 14, 13 ) ) + return $page_html; + + $selected = false; + $page_html = str_replace( '</select>', '', $page_html ); + + if ( bp_tpack_page_on_front() == 'activity' ) + $selected = ' selected="selected"'; + + $page_html .= '<option class="level-0" value="activity"' . $selected . '>' . __( 'Activity Stream', 'buddypress' ) . '</option></select>'; + return $page_html; +} +add_filter( 'wp_dropdown_pages', 'bp_tpack_wp_pages_filter' ); + +/* Hijack the saving of page on front setting to save the activity stream setting */ +function bp_tpack_page_on_front_update( $oldvalue, $newvalue ) { + if ( !is_admin() || !is_site_admin() ) + return false; + + if ( 'activity' == $_POST['page_on_front'] ) + return 'activity'; + else + return $oldvalue; +} +add_action( 'pre_update_option_page_on_front', 'bp_tpack_page_on_front_update', 10, 2 ); + +/* Load the activity stream template if settings allow */ +function bp_tpack_page_on_front_template( $template ) { + global $wp_query; + + if ( empty( $wp_query->post->ID ) ) + return locate_template( array( 'activity/index.php' ), false ); + else + return $template; +} +add_filter( 'page_template', 'bp_tpack_page_on_front_template' ); + +/* Return the ID of a page set as the home page. */ +function bp_tpack_page_on_front() { + if ( 'page' != get_option( 'show_on_front' ) ) + return false; + + return apply_filters( 'bp_tpack_page_on_front', get_option( 'page_on_front' ) ); +} + +/* Force the page ID as a string to stop the get_posts query from kicking up a fuss. */ +function bp_tpack_fix_get_posts_on_activity_front() { + global $wp_query; + + if ( !empty($wp_query->query_vars['page_id']) && 'activity' == $wp_query->query_vars['page_id'] ) + $wp_query->query_vars['page_id'] = '"activity"'; +} +add_action( 'pre_get_posts', 'bp_tpack_fix_get_posts_on_activity_front' ); + +?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/bp.css b/wp-content/plugins/bp-template-pack/bp.css new file mode 100644 index 000000000..83822ce0e --- /dev/null +++ b/wp-content/plugins/bp-template-pack/bp.css @@ -0,0 +1,251 @@ +/* Load the default admin bar styles */ +@import url( ../buddypress/bp-themes/bp-default/_inc/css/adminbar.css ); + +/** + * The following are basic CSS styles to give BuddyPress pages their absolute basic formatting. + * You should extend/override these styles in your standard theme CSS to match your theme. + */ + +/*** + * Navigation tabs + */ +div.item-list-tabs { + margin: 15px 0; + padding: 5px 0; + border-bottom: 1px solid #ddd; + overflow: hidden; + clear: both; +} + +div.item-list-tabs ul { + list-style: none; + margin: 0; + padding: 0; + line-height: 200%; +} + div.item-list-tabs ul li { + float: left; + margin-right: 5px; + } + div.item-list-tabs#subnav ul li a { + border: none; + padding: 0; + } + + div.item-list-tabs ul li.last { float: right; } + +/*** + * Object Lists (groups/members/forums/blogs) + */ + +ul.item-list { + margin: 20px 0; + padding: 0; + list-style: none; +} + ul.item-list li { position: relative; } + ul.item-list div.item-avatar { + float: left; + } + + ul.item-list div.item { + margin-left: 65px; + } + + ul.item-list div.action { + position: absolute; + top: 0; + right: 15px; + text-align: right; + } + + +/*** + * Content Object Headers + */ + +div#item-header { + padding-bottom: 15px; + overflow: hidden; +} + div#item-header div#item-header-avatar { + float: left; + margin-right: 15px; + } + + div#item-header div#item-header-content { + float: left; + } + +/*** + * Activity Stream Post Form + */ + +form#whats-new-form { + overflow: hidden; + padding-bottom: 20px; +} + form#whats-new-form #whats-new-avatar { + float: left; + } + + form#whats-new-form h5 { + clear: none; + margin-left: 76px; + } + + form#whats-new-form #whats-new-content { + margin-left: 54px; + padding-left: 22px; + } + + form#whats-new-form #whats-new-textarea { + padding: 8px; + border: 1px inset #ccc; + margin-bottom: 10px; + } + form#whats-new-form textarea { + width: 100%; + height: 60px; + font-size: 14px; + font-family: inherit; + color: #555; + border: none; + margin: 0; + padding: 0; + } + + form#whats-new-form #whats-new-submit { + float: right; + margin: 0; + } + +/*** + * Activity Stream Post Form + */ + +ul.activity-list { + margin: 0; + padding: 0; +} + +ul.activity-list li { + overflow: hidden; + padding: 20px 0; +} + ul.activity-list li img.avatar { + float: left; + width: 60px; + height: 60px; + } + + ul.activity-list li div.activity-content { + margin-left: 75px; + } + + ul.activity-list li div.activity-comments { + margin: 15px 0 0 38px; + } + ul.activity-list li div.activity-comments ul li { + padding: 5px 0; + } + + ul.activity-list li div.activity-comments img.avatar { + width: 25px; + height: 25px; + } + + ul.activity-list li div.acomment-content, ul.activity-list li div.acomment-meta { + margin-left: 35px; + } + + ul.activity-list li div.activity-inreplyto { + margin: 15px 0 0 75px; + font-size: 11px; + } + +/*** + * Input Forms + */ + +/* Activity comment forms */ + +form.ac-form { display: none; } /* JS will show this */ + +div.activity-comments form { + display: none; + margin: 10px 0 10px 33px; + padding: 8px; +} + + div.activity-comments div#message { + margin-top: 15px; + margin-bottom: 0; + } + + div.activity-comments form.loading { + background-image: url( ../images/ajax-loader.gif ); + background-position: 2% 95%; + background-repeat: no-repeat; + } + + div.activity-comments form .ac-textarea { + padding: 8px; + border: 1px inset #ccc; + margin-bottom: 10px; + } + div.activity-comments form textarea { + width: 100%; + height: 60px; + border: none; + padding: 0; + } + div.activity-comments form input { + margin-top: 5px; + } + + div.activity-comments form div.ac-reply-avatar { + float: left; + } + + div.activity-comments form div.ac-reply-content { + margin-left: 25px; + padding-left: 15px; + } + +/* Standard Input Forms */ + +form.standard-form label, form.standard-form span.label { + display: block; + margin: 15px 0 5px 0; +} + form.standard-form div.checkbox label, + form.standard-form div.radio label { + font-weight: normal; + margin: 5px 0 0 0; + } + + form.standard-form textarea { + width: 75%; + height: 120px; + } + +/* Send Invites Form */ +form#send-invite-form { + margin-top: 20px; +} + div#invite-list { + height: 400px; + overflow: scroll; + padding: 5px; + width: 160px; + margin: 10px 0; + } + +/* Directory search forms */ + +form.dir-form div.dir-search { + float: right; + width: 45%; + margin: 0 0 25px 0; +} diff --git a/wp-content/plugins/bp-template-pack/readme.txt b/wp-content/plugins/bp-template-pack/readme.txt new file mode 100644 index 000000000..75a9d5b3c --- /dev/null +++ b/wp-content/plugins/bp-template-pack/readme.txt @@ -0,0 +1,27 @@ +=== Plugin Name === +Contributors: apeatling +Tags: buddypress, themes, compatibility, convert, integration +Requires at least: WordPress 2.9.1 / BuddyPress 1.2 +Tested up to: WordPress 2.9.2 / BuddyPress 1.2 +Stable tag: 1.0.2 + +== Description == + +Add support for BuddyPress to your existing WordPress theme. This plugin will guide you through the process +step by step. Once you are finished, your existing WordPress theme will be able to manage and display all BuddyPress +pages and content. The process is completely reversible and does not modify any of your existing template files. + +== Installation == + +Download and install the plugin using the built in WordPress plugin installer. +If you download the plugin manually, upload the plugin to "/wp-content/plugins/bp-template-pack/". + +Activate the plugin in the "Plugins" admin panel using the "Activate" link. + +Head to the "Appearance > BP Compatibility" menu and follow the step-by-step instructions. + +== Changelog == + +* 1.0.2 - Feb 22 2010 - fixed shorthand php tag. +* 1.0.1 - Feb 20 2010 - fixed possible issue with group home template. +* 1.0 - Feb 18 2010 - initial release. \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/activity/activity-loop.php b/wp-content/plugins/bp-template-pack/templates/activity/activity-loop.php new file mode 100644 index 000000000..0f85e86f0 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/activity/activity-loop.php @@ -0,0 +1,45 @@ +<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_activity_loop() */ ?> + +<?php do_action( 'bp_before_activity_loop' ) ?> + +<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?> + + <?php /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */ ?> + <noscript> + <div class="pagination"> + <div class="pag-count"><?php bp_activity_pagination_count() ?></div> + <div class="pagination-links"><?php bp_activity_pagination_links() ?></div> + </div> + </noscript> + + <?php if ( empty( $_POST['page'] ) ) : ?> + <ul id="activity-stream" class="activity-list item-list"> + <?php endif; ?> + + <?php while ( bp_activities() ) : bp_the_activity(); ?> + + <?php include( locate_template( array( 'activity/entry.php' ), false ) ) ?> + + <?php endwhile; ?> + + <?php if ( bp_get_activity_count() == bp_get_activity_per_page() ) : ?> + <li class="load-more"> + <a href="#more"><?php _e( 'Load More', 'buddypress' ) ?></a> <span class="ajax-loader"></span> + </li> + <?php endif; ?> + + <?php if ( empty( $_POST['page'] ) ) : ?> + </ul> + <?php endif; ?> + +<?php else : ?> + <div id="message" class="info"> + <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ) ?></p> + </div> +<?php endif; ?> + +<?php do_action( 'bp_after_activity_loop' ) ?> + +<form action="" name="activity-loop-form" id="activity-loop-form" method="post"> + <?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ) ?> +</form> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/activity/entry.php b/wp-content/plugins/bp-template-pack/templates/activity/entry.php new file mode 100644 index 000000000..b56913095 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/activity/entry.php @@ -0,0 +1,76 @@ +<?php /* This template is used by activity-loop.php and AJAX functions to show each activity */ ?> + +<?php do_action( 'bp_before_activity_entry' ) ?> + +<li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>"> + <div class="activity-avatar"> + <a href="<?php bp_activity_user_link() ?>"> + <?php bp_activity_avatar( 'type=full&width=100&height=100' ) ?> + </a> + </div> + + <div class="activity-content"> + + <div class="activity-header"> + <?php bp_activity_action() ?> + </div> + + <?php if ( bp_get_activity_content_body() ) : ?> + <div class="activity-inner"> + <?php bp_activity_content_body() ?> + </div> + <?php endif; ?> + + <?php do_action( 'bp_activity_entry_content' ) ?> + + <div class="activity-meta"> + <?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?> + <a href="<?php bp_activity_comment_link() ?>" class="acomment-reply" id="acomment-comment-<?php bp_activity_id() ?>"><?php _e( 'Reply', 'buddypress' ) ?> (<span><?php bp_activity_comment_count() ?></span>)</a> + <?php endif; ?> + + <?php if ( is_user_logged_in() ) : ?> + <?php if ( !bp_get_activity_is_favorite() ) : ?> + <a href="<?php bp_activity_favorite_link() ?>" class="fav" title="<?php _e( 'Mark as Favorite', 'buddypress' ) ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a> + <?php else : ?> + <a href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php _e( 'Remove Favorite', 'buddypress' ) ?></a> + <?php endif; ?> + <?php endif;?> + + <?php do_action( 'bp_activity_entry_meta' ) ?> + </div> + </div> + + <?php if ( 'activity_comment' == bp_get_activity_type() ) : ?> + <div class="activity-inreplyto"> + <strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> - <?php bp_activity_parent_content() ?> · + <a href="<?php bp_activity_thread_permalink() ?>" class="view" title="<?php _e( 'View Thread / Permalink', 'buddypress' ) ?>"><?php _e( 'View', 'buddypress' ) ?></a> + </div> + <?php endif; ?> + + <?php do_action( 'bp_before_activity_entry_comments' ) ?> + + <?php if ( bp_activity_can_comment() ) : ?> + <div class="activity-comments"> + <?php bp_activity_comments() ?> + + <?php if ( is_user_logged_in() ) : ?> + <form action="<?php bp_activity_comment_form_action() ?>" method="post" id="ac-form-<?php bp_activity_id() ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display() ?>> + <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=25&height=25' ) ?></div> + <div class="ac-reply-content"> + <div class="ac-textarea"> + <textarea id="ac-input-<?php bp_activity_id() ?>" class="ac-input" name="ac_input_<?php bp_activity_id() ?>"></textarea> + </div> + <input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ) ?> →" /> <?php _e( 'or press esc to cancel.', 'buddypress' ) ?> + <input type="hidden" name="comment_form_id" value="<?php bp_activity_id() ?>" /> + </div> + <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ) ?> + </form> + <?php endif; ?> + </div> + <?php endif; ?> + + <?php do_action( 'bp_after_activity_entry_comments' ) ?> +</li> + +<?php do_action( 'bp_after_activity_entry' ) ?> + diff --git a/wp-content/plugins/bp-template-pack/templates/activity/index.php b/wp-content/plugins/bp-template-pack/templates/activity/index.php new file mode 100644 index 000000000..191166654 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/activity/index.php @@ -0,0 +1,104 @@ +<?php get_header() ?> + + <div id="container"> + <div id="content"> + + <?php if ( !is_user_logged_in() ) : ?> + <h3><?php _e( 'Site Activity', 'buddypress' ) ?></h3> + <?php endif; ?> + + <?php do_action( 'bp_before_directory_activity_content' ) ?> + + <?php if ( is_user_logged_in() ) : ?> + <?php locate_template( array( 'activity/post-form.php'), true ) ?> + <?php endif; ?> + + <?php do_action( 'template_notices' ) ?> + + <div class="item-list-tabs activity-type-tabs"> + <ul> + <?php do_action( 'bp_before_activity_type_tab_all' ) ?> + + <li class="selected" id="activity-all"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ) ?>"><?php printf( __( 'All Members (%s)', 'buddypress' ), bp_get_total_site_member_count() ) ?></a></li> + + <?php if ( is_user_logged_in() ) : ?> + + <?php do_action( 'bp_before_activity_type_tab_friends' ) ?> + + <?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?> + <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> + <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_FRIENDS_SLUG . '/' ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ) ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li> + <?php endif; ?> + <?php endif; ?> + + <?php do_action( 'bp_before_activity_type_tab_groups' ) ?> + + <?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?> + <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?> + <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/' . BP_GROUPS_SLUG . '/' ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li> + <?php endif; ?> + <?php endif; ?> + + <?php do_action( 'bp_before_activity_type_tab_favorites' ) ?> + + <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?> + <li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/favorites/' ?>" title="<?php _e( "The activity I've marked as a favorite.", 'buddypress' ) ?>"><?php printf( __( 'My Favorites (<span>%s</span>)', 'buddypress' ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) ?></a></li> + <?php endif; ?> + + <?php do_action( 'bp_before_activity_type_tab_mentions' ) ?> + + <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . BP_ACTIVITY_SLUG . '/mentions/' ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ) ?>"><?php printf( __( '@%s Mentions', 'buddypress' ), bp_get_loggedin_user_username() ) ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '(%s new)', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) ?></strong><?php endif; ?></a></li> + + <?php endif; ?> + + <?php do_action( 'bp_activity_type_tabs' ) ?> + </ul> + </div><!-- .item-list-tabs --> + + <div class="item-list-tabs no-ajax" id="subnav"> + <ul> + <li class="feed"><a href="<?php bp_sitewide_activity_feed_link() ?>" title="RSS Feed"><?php _e( 'RSS', 'buddypress' ) ?></a></li> + + <?php do_action( 'bp_activity_syndication_options' ) ?> + + <li id="activity-filter-select" class="last"> + <select> + <option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option> + <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option> + <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option> + <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option> + + <?php if ( bp_is_active( 'forums' ) ) : ?> + <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option> + <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option> + <?php endif; ?> + + <?php if ( bp_is_active( 'groups' ) ) : ?> + <option value="created_group"><?php _e( 'Show New Groups', 'buddypress' ) ?></option> + <option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option> + <?php endif; ?> + + <?php if ( bp_is_active( 'friends' ) ) : ?> + <option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ) ?></option> + <?php endif; ?> + + <option value="new_member"><?php _e( 'Show New Members', 'buddypress' ) ?></option> + + <?php do_action( 'bp_activity_filter_options' ) ?> + </select> + </li> + </ul> + </div><!-- .item-list-tabs --> + + <div class="activity"> + <?php locate_template( array( 'activity/activity-loop.php' ), true ) ?> + </div><!-- .activity --> + + <?php do_action( 'bp_after_directory_activity_content' ) ?> + + </div><!-- #content --> + </div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer() ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/activity/post-form.php b/wp-content/plugins/bp-template-pack/templates/activity/post-form.php new file mode 100644 index 000000000..04a726088 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/activity/post-form.php @@ -0,0 +1,62 @@ +<form action="<?php bp_activity_post_form_action() ?>" method="post" id="whats-new-form" name="whats-new-form"> + + <?php do_action( 'bp_before_activity_post_form' ) ?> + + <?php if ( isset( $_GET['r'] ) ) : ?> + <div id="message" class="info"> + <p><?php printf( __( 'You are mentioning %s in a new update, this user will be sent a notification of your message.', 'buddypress' ), bp_get_mentioned_user_display_name( $_GET['r'] ) ) ?></p> + </div> + <?php endif; ?> + + <div id="whats-new-avatar"> + <a href="<?php echo bp_loggedin_user_domain() ?>"> + <?php bp_loggedin_user_avatar( 'width=60&height=60' ) ?> + </a> + </div> + + <h5> + <?php if ( bp_is_group() ) : ?> + <?php printf( __( "What's new in %s, %s?", 'buddypress' ), bp_get_group_name(), bp_get_user_firstname() ) ?> + <?php else : ?> + <?php printf( __( "What's new %s?", 'buddypress' ), bp_get_user_firstname() ) ?> + <?php endif; ?> + </h5> + + <div id="whats-new-content"> + <div id="whats-new-textarea"> + <textarea name="whats-new" id="whats-new" value="" /><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_attr( $_GET['r'] ) ?> <?php endif; ?></textarea> + </div> + + <div id="whats-new-options"> + <div id="whats-new-submit"> + <span class="ajax-loader"></span> + <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e( 'Post Update', 'buddypress' ) ?>" /> + </div> + + <?php if ( function_exists('bp_has_groups') && !bp_is_my_profile() && !bp_is_group() ) : ?> + <div id="whats-new-post-in-box"> + <?php _e( 'Post in', 'buddypress' ) ?>: + + <select id="whats-new-post-in" name="whats-new-post-in"> + <option selected="selected" value="0"><?php _e( 'My Profile', 'buddypress' ) ?></option> + + <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100&populate_extras=0' ) ) : while ( bp_groups() ) : bp_the_group(); ?> + <option value="<?php bp_group_id() ?>"><?php bp_group_name() ?></option> + <?php endwhile; endif; ?> + </select> + </div> + <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" /> + <?php elseif ( bp_is_group_home() ) : ?> + <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" /> + <input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id() ?>" /> + <?php endif; ?> + + <?php do_action( 'bp_activity_post_form_options' ) ?> + + </div><!-- #whats-new-options --> + </div><!-- #whats-new-content --> + + <?php wp_nonce_field( 'post_update', '_wpnonce_post_update' ); ?> + <?php do_action( 'bp_after_activity_post_form' ) ?> + +</form><!-- #whats-new-form --> diff --git a/wp-content/plugins/bp-template-pack/templates/blogs/blogs-loop.php b/wp-content/plugins/bp-template-pack/templates/blogs/blogs-loop.php new file mode 100644 index 000000000..ce3d57555 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/blogs/blogs-loop.php @@ -0,0 +1,64 @@ +<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?> + +<?php do_action( 'bp_before_blogs_loop' ) ?> + +<?php if ( bp_has_blogs( bp_ajax_querystring( 'blogs' ) ) ) : ?> + + <div class="pagination"> + + <div class="pag-count" id="blog-dir-count"> + <?php bp_blogs_pagination_count() ?> + </div> + + <div class="pagination-links" id="blog-dir-pag"> + <?php bp_blogs_pagination_links() ?> + </div> + + </div> + + <ul id="blogs-list" class="item-list"> + <?php while ( bp_blogs() ) : bp_the_blog(); ?> + + <li> + <div class="item-avatar"> + <a href="<?php bp_blog_permalink() ?>"><?php bp_blog_avatar('type=thumb') ?></a> + </div> + + <div class="item"> + <div class="item-title"><a href="<?php bp_blog_permalink() ?>"><?php bp_blog_name() ?></a></div> + <div class="item-meta"><span class="activity"><?php bp_blog_last_active() ?></span></div> + + <?php do_action( 'bp_directory_blogs_item' ) ?> + </div> + + <div class="action"> + <div class="generic-button blog-button visit"> + <a href="<?php bp_blog_permalink() ?>" class="visit" title="<?php _e( 'Visit Blog', 'buddypress' ) ?>"><?php _e( 'Visit Blog', 'buddypress' ) ?></a> + </div> + + <div class="meta"> + <?php bp_blog_latest_post() ?> + </div> + + <?php do_action( 'bp_directory_blogs_actions' ) ?> + </div> + + <div class="clear"></div> + </li> + + <?php endwhile; ?> + </ul> + + <?php do_action( 'bp_after_directory_blogs_list' ) ?> + + <?php bp_blog_hidden_fields() ?> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'Sorry, there were no blogs found.', 'buddypress' ) ?></p> + </div> + +<?php endif; ?> + +<?php do_action( 'bp_after_blogs_loop' ) ?> diff --git a/wp-content/plugins/bp-template-pack/templates/blogs/create.php b/wp-content/plugins/bp-template-pack/templates/blogs/create.php new file mode 100644 index 000000000..de99179f8 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/blogs/create.php @@ -0,0 +1,36 @@ +<?php get_header() ?> + + <?php do_action( 'bp_before_create_blog_content' ) ?> + + <div id="container"> + <div id="content"> + + <?php do_action( 'template_notices' ) ?> + + <h3><?php _e( 'Create a Blog', 'buddypress' ) ?> <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_BLOGS_SLUG . '/' ?>"><?php _e( 'Blogs Directory', 'buddypress' ) ?></a></h3> + + <?php do_action( 'bp_before_create_blog_content' ) ?> + + <?php if ( bp_blog_signup_enabled() ) : ?> + + <?php bp_show_blog_signup_form() ?> + + <?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'Blog registration is currently disabled', 'buddypress' ); ?></p> + </div> + + <?php endif; ?> + + <?php do_action( 'bp_after_create_blog_content' ) ?> + + </div><!-- #content --> + </div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + + <?php do_action( 'bp_after_create_blog_content' ) ?> + +<?php get_footer() ?> + diff --git a/wp-content/plugins/bp-template-pack/templates/blogs/index.php b/wp-content/plugins/bp-template-pack/templates/blogs/index.php new file mode 100644 index 000000000..17077ee39 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/blogs/index.php @@ -0,0 +1,55 @@ +<?php get_header() ?> + + <div id="container"> + <div id="content"> + + <form action="" method="post" id="blogs-directory-form" class="dir-form"> + + <h3><?php _e( 'Blogs Directory', 'buddypress' ) ?><?php if ( is_user_logged_in() && bp_blog_signup_enabled() ) : ?> <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_BLOGS_SLUG . '/create/' ?>"><?php _e( 'Create a Blog', 'buddypress' ) ?></a><?php endif; ?></h3> + + <?php do_action( 'bp_before_directory_blogs_content' ) ?> + + <div id="blog-dir-search" class="dir-search"> + <?php bp_directory_blogs_search_form() ?> + </div><!-- #blog-dir-search --> + + <div class="item-list-tabs"> + <ul> + <li class="selected" id="blogs-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Blogs (%s)', 'buddypress' ), bp_get_total_blog_count() ) ?></a></li> + + <?php if ( is_user_logged_in() && bp_get_total_blog_count_for_user( bp_loggedin_user_id() ) ) : ?> + <li id="blogs-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_BLOGS_SLUG . '/my-blogs/' ?>"><?php printf( __( 'My Blogs (%s)', 'buddypress' ), bp_get_total_blog_count_for_user( bp_loggedin_user_id() ) ) ?></a></li> + <?php endif; ?> + + <?php do_action( 'bp_blogs_directory_blog_types' ) ?> + + <li id="blogs-order-select" class="last filter"> + + <?php _e( 'Order By:', 'buddypress' ) ?> + <select> + <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option> + <option value="newest"><?php _e( 'Newest', 'buddypress' ) ?></option> + <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option> + + <?php do_action( 'bp_blogs_directory_order_options' ) ?> + </select> + </li> + </ul> + </div><!-- .item-list-tabs --> + + <div id="blogs-dir-list" class="blogs dir-list"> + <?php locate_template( array( 'blogs/blogs-loop.php' ), true ) ?> + </div><!-- #blogs-dir-list --> + + <?php do_action( 'bp_after_directory_blogs_content' ) ?> + + <?php wp_nonce_field( 'directory_blogs', '_wpnonce-blogs-filter' ) ?> + + </form><!-- #blogs-directory-form --> + + </div><!-- #content --> + </div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer() ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/forums/forums-loop.php b/wp-content/plugins/bp-template-pack/templates/forums/forums-loop.php new file mode 100644 index 000000000..9f4b7e1d4 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/forums/forums-loop.php @@ -0,0 +1,79 @@ +<?php if ( bp_has_forum_topics( bp_ajax_querystring( 'forums' ) ) ) : ?> + + <div class="pagination"> + + <div id="post-count" class="pag-count"> + <?php if ( bp_is_group_forum() && is_user_logged_in() ) : ?> + <a href="#post-new" class="button"><?php _e( 'New Topic', 'buddypress' ) ?></a> + <?php endif; ?> + + <?php bp_forum_pagination_count() ?> + </div> + + <div class="pagination-links" id="topic-pag"> + <?php bp_forum_pagination() ?> + </div> + + </div> + + <?php do_action( 'bp_before_directory_forums_list' ) ?> + + <table class="forum"> + + <tr> + <th id="th-title"><?php _e( 'Topic Title', 'buddypress' ) ?></th> + <th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ) ?></th> + + <?php if ( !bp_is_group_forum() ) : ?> + <th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ) ?></th> + <?php endif; ?> + + <th id="th-postcount"><?php _e( 'Posts', 'buddypress' ) ?></th> + <th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ) ?></th> + </tr> + + <?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?> + + <tr class="<?php bp_the_topic_css_class() ?>"> + <td class="td-title"> + <a class="topic-title" href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>"> + <?php bp_the_topic_title() ?> + </a> + </td> + <td class="td-poster"> + <a href="<?php bp_the_topic_permalink() ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ) ?></a> + <div class="poster-name"><?php bp_the_topic_last_poster_name() ?></div> + </td> + + <?php if ( !bp_is_group_forum() ) : ?> + <td class="td-group"> + <a href="<?php bp_the_topic_object_permalink() ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ) ?></a> + <div class="object-name"><a href="<?php bp_the_topic_object_permalink() ?>" title="<?php bp_the_topic_object_name() ?>"><?php bp_the_topic_object_name() ?></a></div> + </td> + <?php endif; ?> + + <td class="td-postcount"> + <?php bp_the_topic_total_posts() ?> + </td> + <td class="td-freshness"> + <?php bp_the_topic_time_since_last_post() ?> + </td> + + <?php do_action( 'bp_directory_forums_extra_cell' ) ?> + </tr> + + <?php do_action( 'bp_directory_forums_extra_row' ) ?> + + <?php endwhile; ?> + + </table> + + <?php do_action( 'bp_after_directory_forums_list' ) ?> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'Sorry, there were no forum topics found.', 'buddypress' ) ?></p> + </div> + +<?php endif;?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/forums/index.php b/wp-content/plugins/bp-template-pack/templates/forums/index.php new file mode 100644 index 000000000..0620288f4 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/forums/index.php @@ -0,0 +1,111 @@ +<?php get_header() ?> + + <?php do_action( 'bp_before_directory_forums_content' ) ?> + + <div id="container"> + <div id="content"> + + <form action="" method="post" id="forums-search-form" class="dir-form"> + <h3><?php _e( 'Group Forums Directory', 'buddypress' ) ?><?php if ( is_user_logged_in() ) : ?> <a class="button" href="#new-topic" id="new-topic-button"><?php _e( 'New Topic', 'buddypress' ) ?></a><?php endif; ?></h3> + + <div id="forums-dir-search" class="dir-search"> + <?php bp_directory_forums_search_form() ?> + </div> + </form> + + <div id="new-topic-post"> + <?php if ( is_user_logged_in() ) : ?> + + <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?> + + <form action="" method="post" id="forum-topic-form" class="standard-form"> + + <?php do_action( 'groups_forum_new_topic_before' ) ?> + + <a name="post-new"></a> + <h5><?php _e( 'Post a New Topic:', 'buddypress' ) ?></h5> + + <label><?php _e( 'Title:', 'buddypress' ) ?></label> + <input type="text" name="topic_title" id="topic_title" value="" /> + + <label><?php _e( 'Content:', 'buddypress' ) ?></label> + <textarea name="topic_text" id="topic_text"></textarea> + + <label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label> + <input type="text" name="topic_tags" id="topic_tags" value="" /> + + <label><?php _e( 'Post In Group Forum:', 'buddypress' ) ?></label> + <select id="topic_group_id" name="topic_group_id"> + <?php while ( bp_groups() ) : bp_the_group(); ?> + <?php if ( 'public' == bp_get_group_status() ) : ?> + <option value="<?php bp_group_id() ?>"><?php bp_group_name() ?></option> + <?php endif; ?> + <?php endwhile; ?> + </select> + + <?php do_action( 'groups_forum_new_topic_after' ) ?> + + <div class="submit"> + <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ) ?>" /> + <input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ) ?>" /> + </div> + + <?php wp_nonce_field( 'bp_forums_new_topic' ) ?> + + </form> + + <?php else : ?> + + <div id="message" class="info"> + <p><?php printf( __( "You are not a member of any groups so you don't have any group forums you can post in. To start posting, first find a group that matches the topic subject you'd like to start. If this group does not exist, why not <a href='%s'>create a new group</a>? Once you have joined or created the group you can post your topic in that group's forum.", 'buddypress' ), site_url( BP_GROUPS_SLUG . '/create/' ) ) ?></p> + </div> + + <?php endif; ?> + + <?php endif; ?> + </div> + + <form action="" method="post" id="forums-directory-form" class="dir-form"> + + <div class="item-list-tabs"> + <ul> + <li class="selected" id="forums-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Topics (%s)', 'buddypress' ), bp_get_forum_topic_count() ) ?></a></li> + + <?php if ( is_user_logged_in() && bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?> + <li id="forums-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_GROUPS_SLUG . '/' ?>"><?php printf( __( 'My Topics (%s)', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) ?></a></li> + <?php endif; ?> + + <?php do_action( 'bp_forums_directory_group_types' ) ?> + + <li id="forums-order-select" class="last filter"> + + <?php _e( 'Order By:', 'buddypress' ) ?> + <select> + <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option> + <option value="popular"><?php _e( 'Most Posts', 'buddypress' ) ?></option> + <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ) ?></option> + + <?php do_action( 'bp_forums_directory_order_options' ) ?> + </select> + </li> + </ul> + </div> + + <div id="forums-dir-list" class="forums dir-list"> + <?php locate_template( array( 'forums/forums-loop.php' ), true ) ?> + </div> + + <?php do_action( 'bp_directory_forums_content' ) ?> + + <?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ) ?> + + <?php do_action( 'bp_after_directory_forums_content' ) ?> + + </form> + + </div><!-- #content --> +</div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer() ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/groups/create.php b/wp-content/plugins/bp-template-pack/templates/groups/create.php new file mode 100644 index 000000000..3c6ec353b --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/create.php @@ -0,0 +1,262 @@ +<?php get_header() ?> + +<div id="container"> + <div id="content"> + + <form action="<?php bp_group_creation_form_action() ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data"> + <h3><?php _e( 'Create a Group', 'buddypress' ) ?> <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/' ?>"><?php _e( 'Groups Directory', 'buddypress' ) ?></a></h3> + + <?php do_action( 'bp_before_create_group' ) ?> + + <div class="item-list-tabs no-ajax" id="group-create-tabs"> + <ul> + <?php bp_group_creation_tabs(); ?> + </ul> + </div> + + <?php do_action( 'template_notices' ) ?> + + <div class="item-body" id="group-create-body"> + + <?php /* Group creation step 1: Basic group details */ ?> + <?php if ( bp_is_group_creation_step( 'group-details' ) ) : ?> + + <?php do_action( 'bp_before_group_details_creation_step' ); ?> + + <label for="group-name"><?php _e('* Group Name', 'buddypress') ?> <?php _e( '(required)', 'buddypress' )?></label> + <input type="text" name="group-name" id="group-name" value="<?php bp_new_group_name() ?>" /> + + <label for="group-desc"><?php _e('* Group Description', 'buddypress') ?> <?php _e( '(required)', 'buddypress' )?></label> + <textarea name="group-desc" id="group-desc"><?php bp_new_group_description() ?></textarea> + + <?php do_action( 'bp_after_group_details_creation_step' ); /* Deprecated -> */ do_action( 'groups_custom_group_fields_editable' ); ?> + + <?php wp_nonce_field( 'groups_create_save_group-details' ) ?> + + <?php endif; ?> + + <?php /* Group creation step 2: Group settings */ ?> + <?php if ( bp_is_group_creation_step( 'group-settings' ) ) : ?> + + <?php do_action( 'bp_before_group_settings_creation_step' ); ?> + + <?php if ( function_exists('bp_wire_install') ) : ?> + <div class="checkbox"> + <label><input type="checkbox" name="group-show-wire" id="group-show-wire" value="1"<?php if ( bp_get_new_group_enable_wire() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable comment wire', 'buddypress') ?></label> + </div> + <?php endif; ?> + + <?php if ( function_exists('bp_forums_is_installed_correctly') ) : ?> + <?php if ( bp_forums_is_installed_correctly() ) : ?> + <div class="checkbox"> + <label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php if ( bp_get_new_group_enable_forum() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable discussion forum', 'buddypress') ?></label> + </div> + <?php else : ?> + <?php if ( is_site_admin() ) : ?> + <div class="checkbox"> + <label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __('<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_get_root_domain() . '/wp-admin/admin.php?page=bb-forums-setup' ) ?></label> + </div> + <?php endif; ?> + <?php endif; ?> + <?php endif; ?> + + <hr /> + + <h4><?php _e( 'Privacy Options', 'buddypress' ); ?></h4> + + <div class="radio"> + <label><input type="radio" name="group-status" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> + <strong><?php _e( 'This is a public group', 'buddypress' ) ?></strong> + <ul> + <li><?php _e( 'Any site member can join this group.', 'buddypress' ) ?></li> + <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ) ?></li> + <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ) ?></li> + </ul> + </label> + + <label><input type="radio" name="group-status" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> + <strong><?php _e( 'This is a private group', 'buddypress' ) ?></strong> + <ul> + <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ) ?></li> + <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ) ?></li> + <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ) ?></li> + </ul> + </label> + + <label><input type="radio" name="group-status" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> /> + <strong><?php _e('This is a hidden group', 'buddypress') ?></strong> + <ul> + <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ) ?></li> + <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ) ?></li> + <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ) ?></li> + </ul> + </label> + </div> + + <?php do_action( 'bp_after_group_settings_creation_step' ); ?> + + <?php wp_nonce_field( 'groups_create_save_group-settings' ) ?> + + <?php endif; ?> + + <?php /* Group creation step 3: Avatar Uploads */ ?> + <?php if ( bp_is_group_creation_step( 'group-avatar' ) ) : ?> + + <?php do_action( 'bp_before_group_avatar_creation_step' ); ?> + + <?php if ( !bp_get_avatar_admin_step() ) : ?> + + <div class="left-menu"> + <?php bp_new_group_avatar() ?> + </div><!-- .left-menu --> + + <div class="main-column"> + <p><?php _e("Upload an image to use as an avatar for this group. The image will be shown on the main group page, and in search results.", 'buddypress') ?></p> + + <p> + <input type="file" name="file" id="file" /> + <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" /> + <input type="hidden" name="action" id="action" value="bp_avatar_upload" /> + </p> + + <p><?php _e( 'To skip the avatar upload process, hit the "Next Step" button.', 'buddypress' ) ?></p> + </div><!-- .main-column --> + + <?php endif; ?> + + <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> + + <h3><?php _e( 'Crop Group Avatar', 'buddypress' ) ?></h3> + + <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" /> + + <div id="avatar-crop-pane"> + <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" /> + </div> + + <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" /> + + <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" /> + <input type="hidden" name="upload" id="upload" /> + <input type="hidden" id="x" name="x" /> + <input type="hidden" id="y" name="y" /> + <input type="hidden" id="w" name="w" /> + <input type="hidden" id="h" name="h" /> + + <?php endif; ?> + + <?php do_action( 'bp_after_group_avatar_creation_step' ); ?> + + <?php wp_nonce_field( 'groups_create_save_group-avatar' ) ?> + + <?php endif; ?> + + <?php /* Group creation step 4: Invite friends to group */ ?> + <?php if ( bp_is_group_creation_step( 'group-invites' ) ) : ?> + + <?php do_action( 'bp_before_group_invites_creation_step' ); ?> + + <?php if ( function_exists( 'bp_get_total_friend_count' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> + <div class="left-menu"> + + <div id="invite-list"> + <ul> + <?php bp_new_group_invite_friend_list() ?> + </ul> + + <?php wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' ) ?> + </div> + + </div><!-- .left-menu --> + + <div class="main-column"> + + <div id="message" class="info"> + <p><?php _e('Select people to invite from your friends list.', 'buddypress'); ?></p> + </div> + + <?php /* The ID 'friend-list' is important for AJAX support. */ ?> + <ul id="friend-list" class="item-list"> + <?php if ( bp_group_has_invites() ) : ?> + + <?php while ( bp_group_invites() ) : bp_group_the_invite(); ?> + + <li id="<?php bp_group_invite_item_id() ?>"> + <?php bp_group_invite_user_avatar() ?> + + <h4><?php bp_group_invite_user_link() ?></h4> + <span class="activity"><?php bp_group_invite_user_last_active() ?></span> + + <div class="action"> + <a class="remove" href="<?php bp_group_invite_user_remove_invite_url() ?>" id="<?php bp_group_invite_item_id() ?>"><?php _e( 'Remove Invite', 'buddypress' ) ?></a> + </div> + </li> + + <?php endwhile; ?> + + <?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites' ) ?> + <?php endif; ?> + </ul> + + </div><!-- .main-column --> + + <?php else : ?> + + <div id="message" class="info"> + <p><?php _e( 'Once you have built up friend connections you will be able to invite others to your group. You can send invites any time in the future by selecting the "Send Invites" option when viewing your new group.', 'buddypress' ); ?></p> + </div> + + <?php endif; ?> + + <?php wp_nonce_field( 'groups_create_save_group-invites' ) ?> + <?php do_action( 'bp_after_group_invites_creation_step' ); ?> + + <?php endif; ?> + + <?php do_action( 'groups_custom_create_steps' ) // Allow plugins to add custom group creation steps ?> + + <?php do_action( 'bp_before_group_creation_step_buttons' ); ?> + + <?php if ( 'crop-image' != bp_get_avatar_admin_step() ) : ?> + <div class="submit" id="previous-next"> + <?php /* Previous Button */ ?> + <?php if ( !bp_is_first_group_creation_step() ) : ?> + <input type="button" value="← <?php _e('Previous Step', 'buddypress') ?>" id="group-creation-previous" name="previous" onclick="location.href='<?php bp_group_creation_previous_link() ?>'" /> + <?php endif; ?> + + <?php /* Next Button */ ?> + <?php if ( !bp_is_last_group_creation_step() && !bp_is_first_group_creation_step() ) : ?> + <input type="submit" value="<?php _e('Next Step', 'buddypress') ?> →" id="group-creation-next" name="save" /> + <?php endif;?> + + <?php /* Create Button */ ?> + <?php if ( bp_is_first_group_creation_step() ) : ?> + <input type="submit" value="<?php _e('Create Group and Continue', 'buddypress') ?> →" id="group-creation-create" name="save" /> + <?php endif; ?> + + <?php /* Finish Button */ ?> + <?php if ( bp_is_last_group_creation_step() ) : ?> + <input type="submit" value="<?php _e('Finish', 'buddypress') ?> →" id="group-creation-finish" name="save" /> + <?php endif; ?> + </div> + <?php endif;?> + + <?php do_action( 'bp_after_group_creation_step_buttons' ); ?> + + <?php /* Don't leave out this hidden field */ ?> + <input type="hidden" name="group_id" id="group_id" value="<?php bp_new_group_id() ?>" /> + + <?php do_action( 'bp_directory_groups_content' ) ?> + + </div><!-- .item-body --> + + <?php do_action( 'bp_after_create_group' ) ?> + + </form> + + </div><!-- #content --> +</div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer() ?> diff --git a/wp-content/plugins/bp-template-pack/templates/groups/groups-loop.php b/wp-content/plugins/bp-template-pack/templates/groups/groups-loop.php new file mode 100644 index 000000000..9fb3c72c9 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/groups-loop.php @@ -0,0 +1,60 @@ +<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?> + +<?php do_action( 'bp_before_groups_loop' ) ?> + +<?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ) ) ) : ?> + + <div class="pagination"> + + <div class="pag-count" id="group-dir-count"> + <?php bp_groups_pagination_count() ?> + </div> + + <div class="pagination-links" id="group-dir-pag"> + <?php bp_groups_pagination_links() ?> + </div> + + </div> + + <ul id="groups-list" class="item-list"> + <?php while ( bp_groups() ) : bp_the_group(); ?> + + <li> + <div class="item-avatar"> + <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=thumb&width=50&height=50' ) ?></a> + </div> + + <div class="item"> + <div class="item-title"><a href="<?php bp_group_permalink() ?>"><?php bp_group_name() ?></a></div> + <div class="item-meta"><span class="activity"><?php printf( __( 'active %s ago', 'buddypress' ), bp_get_group_last_active() ) ?></span></div> + + <div class="item-desc"><?php bp_group_description_excerpt() ?></div> + + <?php do_action( 'bp_directory_groups_item' ) ?> + </div> + + <div class="action"> + <?php bp_group_join_button() ?> + + <div class="meta"> + <?php bp_group_type() ?> / <?php bp_group_member_count() ?> + </div> + + <?php do_action( 'bp_directory_groups_actions' ) ?> + </div> + + <div class="clear"></div> + </li> + + <?php endwhile; ?> + </ul> + + <?php do_action( 'bp_after_groups_loop' ) ?> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p> + </div> + +<?php endif; ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/groups/index.php b/wp-content/plugins/bp-template-pack/templates/groups/index.php new file mode 100644 index 000000000..2371358d4 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/index.php @@ -0,0 +1,57 @@ +<?php get_header() ?> + +<div id="container"> + <div id="content"> + + <form action="" method="post" id="groups-directory-form" class="dir-form"> + <h3><?php _e( 'Groups Directory', 'buddypress' ) ?><?php if ( is_user_logged_in() ) : ?> <a class="button" href="<?php echo bp_get_root_domain() . '/' . BP_GROUPS_SLUG . '/create/' ?>"><?php _e( 'Create a Group', 'buddypress' ) ?></a><?php endif; ?></h3> + + <?php do_action( 'bp_before_directory_groups_content' ) ?> + + <div id="group-dir-search" class="dir-search"> + <?php bp_directory_groups_search_form() ?> + </div><!-- #group-dir-search --> + + <div class="item-list-tabs"> + <ul> + <li class="selected" id="groups-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Groups (%s)', 'buddypress' ), bp_get_total_group_count() ) ?></a></li> + + <?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?> + <li id="groups-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_GROUPS_SLUG . '/my-groups/' ?>"><?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?></a></li> + <?php endif; ?> + + <?php do_action( 'bp_groups_directory_group_types' ) ?> + + <li id="groups-order-select" class="last filter"> + + <?php _e( 'Order By:', 'buddypress' ) ?> + <select> + <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option> + <option value="popular"><?php _e( 'Most Members', 'buddypress' ) ?></option> + <option value="newest"><?php _e( 'Newly Created', 'buddypress' ) ?></option> + <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option> + + <?php do_action( 'bp_groups_directory_order_options' ) ?> + </select> + </li> + </ul> + </div><!-- .item-list-tabs --> + + <div id="groups-dir-list" class="groups dir-list"> + <?php locate_template( array( 'groups/groups-loop.php' ), true ) ?> + </div><!-- #groups-dir-list --> + + <?php do_action( 'bp_directory_groups_content' ) ?> + + <?php wp_nonce_field( 'directory_groups', '_wpnonce-groups-filter' ) ?> + + </form><!-- #groups-directory-form --> + + <?php do_action( 'bp_after_directory_groups_content' ) ?> + + </div><!-- #content --> +</div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer() ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/activity.php b/wp-content/plugins/bp-template-pack/templates/groups/single/activity.php new file mode 100644 index 000000000..dcbe14690 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/activity.php @@ -0,0 +1,38 @@ +<div class="item-list-tabs no-ajax" id="subnav"> + <ul> + <li class="feed"><a href="<?php bp_group_activity_feed_link() ?>" title="RSS Feed"><?php _e( 'RSS', 'buddypress' ) ?></a></li> + + <?php do_action( 'bp_group_activity_syndication_options' ) ?> + + <li id="activity-filter-select" class="last"> + <select> + <option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option> + <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option> + + <?php if ( bp_is_active( 'forums' ) ) : ?> + <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option> + <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option> + <?php endif; ?> + + <option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option> + + <?php do_action( 'bp_group_activity_filter_options' ) ?> + </select> + </li> + </ul> +</div><!-- .item-list-tabs --> + +<?php do_action( 'bp_before_group_activity_post_form' ) ?> + +<?php if ( is_user_logged_in() && bp_group_is_member() ) : ?> + <?php locate_template( array( 'activity/post-form.php'), true ) ?> +<?php endif; ?> + +<?php do_action( 'bp_after_group_activity_post_form' ) ?> +<?php do_action( 'bp_before_group_activity_content' ) ?> + +<div class="activity single-group"> + <?php locate_template( array( 'activity/activity-loop.php' ), true ) ?> +</div><!-- .activity --> + +<?php do_action( 'bp_after_group_activity_content' ) ?> diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/admin.php b/wp-content/plugins/bp-template-pack/templates/groups/single/admin.php new file mode 100644 index 000000000..100e47889 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/admin.php @@ -0,0 +1,312 @@ +<div class="item-list-tabs no-ajax" id="subnav"> + <ul> + <?php bp_group_admin_tabs(); ?> + </ul> +</div><!-- .item-list-tabs --> + +<form action="<?php bp_group_admin_form_action() ?>" name="group-settings-form" id="group-settings-form" class="standard-form" method="post" enctype="multipart/form-data"> + +<?php do_action( 'bp_before_group_admin_content' ) ?> + +<?php /* Edit Group Details */ ?> +<?php if ( bp_is_group_admin_screen( 'edit-details' ) ) : ?> + + <?php do_action( 'bp_before_group_details_admin' ); ?> + + <label for="group-name">* <?php _e( 'Group Name', 'buddypress' ) ?></label> + <input type="text" name="group-name" id="group-name" value="<?php bp_group_name() ?>" /> + + <label for="group-desc">* <?php _e( 'Group Description', 'buddypress' ) ?></label> + <textarea name="group-desc" id="group-desc"><?php bp_group_description_editable() ?></textarea> + + <?php do_action( 'groups_custom_group_fields_editable' ) ?> + + <p> + <label for="group-notifiy-members"><?php _e( 'Notify group members of changes via email', 'buddypress' ); ?></label> + <input type="radio" name="group-notify-members" value="1" /> <?php _e( 'Yes', 'buddypress' ); ?> + <input type="radio" name="group-notify-members" value="0" checked="checked" /> <?php _e( 'No', 'buddypress' ); ?> + </p> + + <?php do_action( 'bp_after_group_details_admin' ); ?> + + <p><input type="submit" value="<?php _e( 'Save Changes', 'buddypress' ) ?> →" id="save" name="save" /></p> + <?php wp_nonce_field( 'groups_edit_group_details' ) ?> + +<?php endif; ?> + +<?php /* Manage Group Settings */ ?> +<?php if ( bp_is_group_admin_screen( 'group-settings' ) ) : ?> + + <?php do_action( 'bp_before_group_settings_admin' ); ?> + + <?php if ( function_exists('bp_wire_install') ) : ?> + + <div class="checkbox"> + <label><input type="checkbox" name="group-show-wire" id="group-show-wire" value="1"<?php bp_group_show_wire_setting() ?>/> <?php _e( 'Enable comment wire', 'buddypress' ) ?></label> + </div> + + <?php endif; ?> + + <?php if ( function_exists('bp_forums_is_installed_correctly') ) : ?> + + <?php if ( bp_forums_is_installed_correctly() ) : ?> + + <div class="checkbox"> + <label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php bp_group_show_forum_setting() ?> /> <?php _e( 'Enable discussion forum', 'buddypress' ) ?></label> + </div> + + <?php endif; ?> + + <?php endif; ?> + + <hr /> + + <h4><?php _e( 'Privacy Options', 'buddypress' ); ?></h4> + + <div class="radio"> + <label> + <input type="radio" name="group-status" value="public"<?php bp_group_show_status_setting('public') ?> /> + <strong><?php _e( 'This is a public group', 'buddypress' ) ?></strong> + <ul> + <li><?php _e( 'Any site member can join this group.', 'buddypress' ) ?></li> + <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ) ?></li> + <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ) ?></li> + </ul> + </label> + + <label> + <input type="radio" name="group-status" value="private"<?php bp_group_show_status_setting('private') ?> /> + <strong><?php _e( 'This is a private group', 'buddypress' ) ?></strong> + <ul> + <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ) ?></li> + <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ) ?></li> + <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ) ?></li> + </ul> + </label> + + <label> + <input type="radio" name="group-status" value="hidden"<?php bp_group_show_status_setting('hidden') ?> /> + <strong><?php _e( 'This is a hidden group', 'buddypress' ) ?></strong> + <ul> + <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ) ?></li> + <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ) ?></li> + <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ) ?></li> + </ul> + </label> + </div> + + <?php do_action( 'bp_after_group_settings_admin' ); ?> + + <p><input type="submit" value="<?php _e( 'Save Changes', 'buddypress' ) ?> →" id="save" name="save" /></p> + <?php wp_nonce_field( 'groups_edit_group_settings' ) ?> + +<?php endif; ?> + +<?php /* Group Avatar Settings */ ?> +<?php if ( bp_is_group_admin_screen( 'group-avatar' ) ) : ?> + + <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?> + + <p><?php _e("Upload an image to use as an avatar for this group. The image will be shown on the main group page, and in search results.", 'buddypress') ?></p> + + <p> + <input type="file" name="file" id="file" /> + <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" /> + <input type="hidden" name="action" id="action" value="bp_avatar_upload" /> + </p> + + <?php if ( bp_get_group_has_avatar() ) : ?> + <p><?php _e( "If you'd like to remove the existing avatar but not upload a new one, please use the delete avatar button.", 'buddypress' ) ?></p> + + <div class="generic-button" id="delete-group-avatar-button"> + <a class="edit" href="<?php bp_group_avatar_delete_link() ?>" title="<?php _e( 'Delete Avatar', 'buddypress' ) ?>"><?php _e( 'Delete Avatar', 'buddypress' ) ?></a> + </div> + <?php endif; ?> + + <?php wp_nonce_field( 'bp_avatar_upload' ) ?> + + <?php endif; ?> + + <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> + + <h3><?php _e( 'Crop Avatar', 'buddypress' ) ?></h3> + + <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" /> + + <div id="avatar-crop-pane"> + <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" /> + </div> + + <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" /> + + <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" /> + <input type="hidden" id="x" name="x" /> + <input type="hidden" id="y" name="y" /> + <input type="hidden" id="w" name="w" /> + <input type="hidden" id="h" name="h" /> + + <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?> + + <?php endif; ?> + +<?php endif; ?> + +<?php /* Manage Group Members */ ?> +<?php if ( bp_is_group_admin_screen( 'manage-members' ) ) : ?> + + <?php do_action( 'bp_before_group_manage_members_admin' ); ?> + + <div class="bp-widget"> + <h4><?php _e( 'Administrators', 'buddypress' ); ?></h4> + <?php bp_group_admin_memberlist( true ) ?> + </div> + + <?php if ( bp_group_has_moderators() ) : ?> + + <div class="bp-widget"> + <h4><?php _e( 'Moderators', 'buddypress' ) ?></h4> + <?php bp_group_mod_memberlist( true ) ?> + </div> + + <?php endif; ?> + + <div class="bp-widget"> + <h4><?php _e("Members", "buddypress"); ?></h4> + + <?php if ( bp_group_has_members( 'per_page=15&exclude_banned=false' ) ) : ?> + + <?php if ( bp_group_member_needs_pagination() ) : ?> + + <div class="pagination no-ajax"> + + <div id="member-count" class="pag-count"> + <?php bp_group_member_pagination_count() ?> + </div> + + <div id="member-admin-pagination" class="pagination-links"> + <?php bp_group_member_admin_pagination() ?> + </div> + + </div> + + <?php endif; ?> + + <ul id="members-list" class="item-list single-line"> + <?php while ( bp_group_members() ) : bp_group_the_member(); ?> + + <?php if ( bp_get_group_member_is_banned() ) : ?> + + <li class="banned-user"> + <?php bp_group_member_avatar_mini() ?> + + <h5><?php bp_group_member_link() ?> <?php _e( '(banned)', 'buddypress') ?> <span class="small"> - <a href="<?php bp_group_member_unban_link() ?>" class="confirm" title="<?php _e( 'Kick and ban this member', 'buddypress' ) ?>"><?php _e( 'Remove Ban', 'buddypress' ); ?></a> </h5> + + <?php else : ?> + + <li> + <?php bp_group_member_avatar_mini() ?> + <h5><?php bp_group_member_link() ?> <span class="small"> - <a href="<?php bp_group_member_ban_link() ?>" class="confirm" title="<?php _e( 'Kick and ban this member', 'buddypress' ); ?>"><?php _e( 'Kick & Ban', 'buddypress' ); ?></a> | <a href="<?php bp_group_member_promote_mod_link() ?>" class="confirm" title="<?php _e( 'Promote to Mod', 'buddypress' ); ?>"><?php _e( 'Promote to Mod', 'buddypress' ); ?></a> | <a href="<?php bp_group_member_promote_admin_link() ?>" class="confirm" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a></span></h5> + + <?php endif; ?> + + <?php do_action( 'bp_group_manage_members_admin_item' ); ?> + </li> + + <?php endwhile; ?> + </ul> + + <?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'This group has no members.', 'buddypress' ); ?></p> + </div> + + <?php endif; ?> + + </div> + + <?php do_action( 'bp_after_group_manage_members_admin' ); ?> + +<?php endif; ?> + +<?php /* Manage Membership Requests */ ?> +<?php if ( bp_is_group_admin_screen( 'membership-requests' ) ) : ?> + + <?php do_action( 'bp_before_group_membership_requests_admin' ); ?> + + <?php if ( bp_group_has_membership_requests() ) : ?> + + <ul id="request-list" class="item-list"> + <?php while ( bp_group_membership_requests() ) : bp_group_the_membership_request(); ?> + + <li> + <?php bp_group_request_user_avatar_thumb() ?> + <h4><?php bp_group_request_user_link() ?> <span class="comments"><?php bp_group_request_comment() ?></span></h4> + <span class="activity"><?php bp_group_request_time_since_requested() ?></span> + + <?php do_action( 'bp_group_membership_requests_admin_item' ); ?> + + <div class="action"> + + <div class="generic-button accept"> + <a href="<?php bp_group_request_accept_link() ?>"><?php _e( 'Accept', 'buddypress' ); ?></a> + </div> + + + + <div class="generic-button reject"> + <a href="<?php bp_group_request_reject_link() ?>"><?php _e( 'Reject', 'buddypress' ); ?></a> + </div> + + <?php do_action( 'bp_group_membership_requests_admin_item_action' ); ?> + + </div> + </li> + + <?php endwhile; ?> + </ul> + + <?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'There are no pending membership requests.', 'buddypress' ); ?></p> + </div> + + <?php endif; ?> + + <?php do_action( 'bp_after_group_membership_requests_admin' ); ?> + +<?php endif; ?> + +<?php do_action( 'groups_custom_edit_steps' ) // Allow plugins to add custom group edit screens ?> + +<?php /* Delete Group Option */ ?> +<?php if ( bp_is_group_admin_screen( 'delete-group' ) ) : ?> + + <?php do_action( 'bp_before_group_delete_admin' ); ?> + + <div id="message" class="info"> + <p><?php _e( 'WARNING: Deleting this group will completely remove ALL content associated with it. There is no way back, please be careful with this option.', 'buddypress' ); ?></p> + </div> + + <input type="checkbox" name="delete-group-understand" id="delete-group-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-group-button').disabled = ''; } else { document.getElementById('delete-group-button').disabled = 'disabled'; }" /> <?php _e( 'I understand the consequences of deleting this group.', 'buddypress' ); ?> + + <?php do_action( 'bp_after_group_delete_admin' ); ?> + + <div class="submit"> + <input type="submit" disabled="disabled" value="<?php _e( 'Delete Group', 'buddypress' ) ?> →" id="delete-group-button" name="delete-group-button" /> + </div> + + <input type="hidden" name="group-id" id="group-id" value="<?php bp_group_id() ?>" /> + + <?php wp_nonce_field( 'groups_delete_group' ) ?> + +<?php endif; ?> + +<?php /* This is important, don't forget it */ ?> +<input type="hidden" name="group-id" id="group-id" value="<?php bp_group_id() ?>" /> + +<?php do_action( 'bp_after_group_admin_content' ) ?> + +</form> + diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/forum.php b/wp-content/plugins/bp-template-pack/templates/groups/single/forum.php new file mode 100644 index 000000000..7a2735f48 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/forum.php @@ -0,0 +1,53 @@ +<?php do_action( 'bp_before_group_forum_content' ) ?> + +<?php if ( bp_is_group_forum_topic_edit() ) : ?> + <?php locate_template( array( 'groups/single/forum/edit.php' ), true ) ?> + +<?php elseif ( bp_is_group_forum_topic() ) : ?> + <?php locate_template( array( 'groups/single/forum/topic.php' ), true ) ?> + +<?php else : ?> + + <div class="forums single-forum"> + <?php locate_template( array( 'forums/forums-loop.php' ), true ) ?> + </div><!-- .forums --> + + <?php do_action( 'bp_after_group_forum_content' ) ?> + + <?php if ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?> + + <form action="" method="post" id="forum-topic-form" class="standard-form"> + <div id="post-new-topic"> + + <?php do_action( 'bp_before_group_forum_post_new' ) ?> + + <?php if ( !bp_group_is_member() ) : ?> + <p><?php _e( 'You will auto join this group when you start a new topic.', 'buddypress' ) ?></p> + <?php endif; ?> + + <p id="post-new"></p> + <h4><?php _e( 'Post a New Topic:', 'buddypress' ) ?></h4> + + <label><?php _e( 'Title:', 'buddypress' ) ?></label> + <input type="text" name="topic_title" id="topic_title" value="" /> + + <label><?php _e( 'Content:', 'buddypress' ) ?></label> + <textarea name="topic_text" id="topic_text"></textarea> + + <label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label> + <input type="text" name="topic_tags" id="topic_tags" value="" /> + + <?php do_action( 'bp_after_group_forum_post_new' ) ?> + + <div class="submit"> + <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ) ?>" /> + </div> + + <?php wp_nonce_field( 'bp_forums_new_topic' ) ?> + </div><!-- #post-new-topic --> + </form> + + <?php endif; ?> + +<?php endif; ?> + diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/forum/edit.php b/wp-content/plugins/bp-template-pack/templates/groups/single/forum/edit.php new file mode 100644 index 000000000..531b67deb --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/forum/edit.php @@ -0,0 +1,68 @@ +<?php if ( bp_has_forum_topic_posts() ) : ?> + + <form action="<?php bp_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form"> + + <div id="topic-meta"> + <h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3> + <a class="button" href="<?php bp_forum_permalink() ?>/">← <?php _e( 'Group Forum', 'buddypress' ) ?></a> <a class="button" href="<?php bp_forum_directory_permalink() ?>/"><?php _e( 'Group Forum Directory', 'buddypress') ?></a></span> + + <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?> + <div class="admin-links"><?php bp_the_topic_admin_links() ?></div> + <?php endif; ?> + </div> + + <?php if ( bp_group_is_member() ) : ?> + + <?php if ( bp_is_edit_topic() ) : ?> + + <div id="edit-topic"> + + <?php do_action( 'bp_group_before_edit_forum_topic' ) ?> + + <p><strong><?php _e( 'Edit Topic:', 'buddypress' ) ?></strong></p> + + <label for="topic_title"><?php _e( 'Title:', 'buddypress' ) ?></label> + <input type="text" name="topic_title" id="topic_title" value="<?php bp_the_topic_title() ?>" /> + + <label for="topic_text"><?php _e( 'Content:', 'buddypress' ) ?></label> + <textarea name="topic_text" id="topic_text"><?php bp_the_topic_text() ?></textarea> + + <?php do_action( 'bp_group_after_edit_forum_topic' ) ?> + + <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" /></p> + + <?php wp_nonce_field( 'bp_forums_edit_topic' ) ?> + + </div> + + <?php else : ?> + + <div id="edit-post"> + + <?php do_action( 'bp_group_before_edit_forum_post' ) ?> + + <p><strong><?php _e( 'Edit Post:', 'buddypress' ) ?></strong></p> + + <textarea name="post_text" id="post_text"><?php bp_the_topic_post_edit_text() ?></textarea> + + <?php do_action( 'bp_group_after_edit_forum_post' ) ?> + + <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ) ?>" /></p> + + <?php wp_nonce_field( 'bp_forums_edit_post' ) ?> + + </div> + + <?php endif; ?> + + <?php endif; ?> + + </form> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'This topic does not exist.', 'buddypress' ) ?></p> + </div> + +<?php endif;?> diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/forum/topic.php b/wp-content/plugins/bp-template-pack/templates/groups/single/forum/topic.php new file mode 100644 index 000000000..f25d22a12 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/forum/topic.php @@ -0,0 +1,111 @@ +<?php if ( bp_has_forum_topic_posts() ) : ?> + + <form action="<?php bp_forum_topic_action() ?>" method="post" id="forum-topic-form" class="standard-form"> + + <div class="pagination no-ajax"> + + <div id="post-count" class="pag-count"> + <?php bp_the_topic_pagination_count() ?> + </div> + + <div class="pagination-links" id="topic-pag"> + <?php bp_the_topic_pagination() ?> + </div> + + </div> + + <div id="topic-meta"> + <h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3> + <a class="button" href="<?php bp_forum_permalink() ?>/">← <?php _e( 'Group Forum', 'buddypress' ) ?></a> <a class="button" href="<?php bp_forum_directory_permalink() ?>/"><?php _e( 'Group Forum Directory', 'buddypress') ?></a></span> + + <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?> + <div class="admin-links"><?php bp_the_topic_admin_links() ?></div> + <?php endif; ?> + </div> + + <ul id="topic-post-list" class="item-list"> + <?php while ( bp_forum_topic_posts() ) : bp_the_forum_topic_post(); ?> + + <li id="post-<?php bp_the_topic_post_id() ?>"> + <div class="poster-meta"> + <a href="<?php bp_the_topic_post_poster_link() ?>"> + <?php bp_the_topic_post_poster_avatar( 'width=40&height=40' ) ?> + </a> + <?php echo sprintf( __( '%s said %s ago:', 'buddypress' ), bp_get_the_topic_post_poster_name(), bp_get_the_topic_post_time_since() ) ?> + </div> + + <div class="post-content"> + <?php bp_the_topic_post_content() ?> + </div> + + <div class="admin-links"> + <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_post_is_mine() ) : ?> + <?php bp_the_topic_post_admin_links() ?> + <?php endif; ?> + <a href="#post-<?php bp_the_topic_post_id() ?>" title="<?php _e( 'Permanent link to this post', 'buddypress' ) ?>">#</a> + </div> + </li> + + <?php endwhile; ?> + </ul> + + <div class="pagination no-ajax"> + + <div id="post-count" class="pag-count"> + <?php bp_the_topic_pagination_count() ?> + </div> + + <div class="pagination-links" id="topic-pag"> + <?php bp_the_topic_pagination() ?> + </div> + + </div> + + <?php if ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?> + + <?php if ( bp_get_the_topic_is_last_page() ) : ?> + + <?php if ( bp_get_the_topic_is_topic_open() ) : ?> + + <div id="post-topic-reply"> + <p id="post-reply"></p> + + <?php if ( !bp_group_is_member() ) : ?> + <p><?php _e( 'You will auto join this group when you reply to this topic.', 'buddypress' ) ?></p> + <?php endif; ?> + + <?php do_action( 'groups_forum_new_reply_before' ) ?> + + <h4><?php _e( 'Add a reply:', 'buddypress' ) ?></h4> + + <textarea name="reply_text" id="reply_text"></textarea> + + <div class="submit"> + <input type="submit" name="submit_reply" id="submit" value="<?php _e( 'Post Reply', 'buddypress' ) ?>" /> + </div> + + <?php do_action( 'groups_forum_new_reply_after' ) ?> + + <?php wp_nonce_field( 'bp_forums_new_reply' ) ?> + </div> + + <?php else : ?> + + <div id="message" class="info"> + <p><?php _e( 'This topic is closed, replies are no longer accepted.', 'buddypress' ) ?></p> + </div> + + <?php endif; ?> + + <?php endif; ?> + + <?php endif; ?> + + </form> +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'There are no posts for this topic.', 'buddypress' ) ?></p> + </div> + +<?php endif;?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/group-header.php b/wp-content/plugins/bp-template-pack/templates/groups/single/group-header.php new file mode 100644 index 000000000..68d3bf0d8 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/group-header.php @@ -0,0 +1,46 @@ +<?php do_action( 'bp_before_group_header' ) ?> + +<div id="item-actions"> + <?php if ( bp_group_is_visible() ) : ?> + + <h3><?php _e( 'Group Admins', 'buddypress' ) ?></h3> + <?php bp_group_list_admins() ?> + + <?php do_action( 'bp_after_group_menu_admins' ) ?> + + <?php if ( bp_group_has_moderators() ) : ?> + <?php do_action( 'bp_before_group_menu_mods' ) ?> + + <h3><?php _e( 'Group Mods' , 'buddypress' ) ?></h3> + <?php bp_group_list_mods() ?> + + <?php do_action( 'bp_after_group_menu_mods' ) ?> + <?php endif; ?> + + <?php endif; ?> +</div><!-- #item-actions --> + +<div id="item-header-avatar"> + <a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"> + <?php bp_group_avatar() ?> + </a> +</div><!-- #item-header-avatar --> + +<div id="item-header-content"> + <h2><a href="<?php bp_group_permalink() ?>" title="<?php bp_group_name() ?>"><?php bp_group_name() ?></a></h2> + <span class="highlight"><?php bp_group_type() ?></span> <span class="activity"><?php printf( __( 'active %s ago', 'buddypress' ), bp_get_group_last_active() ) ?></span> + + <?php do_action( 'bp_before_group_header_meta' ) ?> + + <div id="item-meta"> + <?php bp_group_description() ?> + + <?php bp_group_join_button() ?> + + <?php do_action( 'bp_group_header_meta' ) ?> + </div> +</div><!-- #item-header-content --> + +<?php do_action( 'bp_after_group_header' ) ?> + +<?php do_action( 'template_notices' ) ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/home.php b/wp-content/plugins/bp-template-pack/templates/groups/single/home.php new file mode 100644 index 000000000..9d6cfff38 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/home.php @@ -0,0 +1,75 @@ +<?php get_header() ?> + +<div id="container"> + <div id="content"> + + <?php if ( bp_has_groups() ) : while ( bp_groups() ) : bp_the_group(); ?> + + <?php do_action( 'bp_before_group_home_content' ) ?> + + <div id="item-header"> + <?php locate_template( array( 'groups/single/group-header.php' ), true ) ?> + </div> + + <div id="item-nav"> + <div class="item-list-tabs no-ajax" id="object-nav"> + <ul> + <?php bp_get_options_nav() ?> + + <?php do_action( 'bp_group_options_nav' ) ?> + </ul> + </div> + </div> + + <div id="item-body"> + <?php do_action( 'bp_before_group_body' ) ?> + + <?php if ( bp_is_group_admin_page() && bp_group_is_visible() ) : ?> + <?php locate_template( array( 'groups/single/admin.php' ), true ) ?> + + <?php elseif ( bp_is_group_members() && bp_group_is_visible() ) : ?> + <?php locate_template( array( 'groups/single/members.php' ), true ) ?> + + <?php elseif ( bp_is_group_invites() && bp_group_is_visible() ) : ?> + <?php locate_template( array( 'groups/single/send-invites.php' ), true ) ?> + + <?php elseif ( bp_is_group_forum() && bp_group_is_visible() ) : ?> + <?php locate_template( array( 'groups/single/forum.php' ), true ) ?> + + <?php elseif ( bp_is_group_membership_request() ) : ?> + <?php locate_template( array( 'groups/single/request-membership.php' ), true ) ?> + + <?php elseif ( bp_group_is_visible() && bp_is_active( 'activity' ) ) : ?> + <?php locate_template( array( 'groups/single/activity.php' ), true ) ?> + + <?php elseif ( !bp_group_is_visible() ) : ?> + <?php /* The group is not visible, show the status message */ ?> + + <?php do_action( 'bp_before_group_status_message' ) ?> + + <div id="message" class="info"> + <p><?php bp_group_status_message() ?></p> + </div> + + <?php do_action( 'bp_after_group_status_message' ) ?> + + <?php else : ?> + <?php + /* If nothing sticks, just load a group front template if one exists. */ + locate_template( array( 'groups/single/front.php' ), true ); + ?> + <?php endif; ?> + + <?php do_action( 'bp_after_group_body' ) ?> + </div> + + <?php do_action( 'bp_after_group_home_content' ) ?> + + <?php endwhile; endif; ?> + + </div><!-- #content --> +</div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer() ?> diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/members.php b/wp-content/plugins/bp-template-pack/templates/groups/single/members.php new file mode 100644 index 000000000..c1e7d6469 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/members.php @@ -0,0 +1,54 @@ +<?php if ( bp_group_has_members( 'exclude_admins_mods=0' ) ) : ?> + + <?php do_action( 'bp_before_group_members_content' ) ?> + + <div class="pagination no-ajax"> + + <div id="member-count" class="pag-count"> + <?php bp_group_member_pagination_count() ?> + </div> + + <div id="member-pagination" class="pagination-links"> + <?php bp_group_member_pagination() ?> + </div> + + </div> + + <?php do_action( 'bp_before_group_members_list' ) ?> + + <ul id="member-list" class="item-list"> + <?php while ( bp_group_members() ) : bp_group_the_member(); ?> + + <li> + <a href="<?php bp_group_member_domain() ?>"> + <?php bp_group_member_avatar_thumb() ?> + </a> + <h5><?php bp_group_member_link() ?></h5> + <span class="activity"><?php bp_group_member_joined_since() ?></span> + + <?php do_action( 'bp_group_members_list_item' ) ?> + + <?php if ( function_exists( 'friends_install' ) ) : ?> + + <div class="action"> + <?php bp_add_friend_button( bp_get_group_member_id(), bp_get_group_member_is_friend() ) ?> + + <?php do_action( 'bp_group_members_list_item_action' ) ?> + </div> + + <?php endif; ?> + </li> + + <?php endwhile; ?> + + </ul> + + <?php do_action( 'bp_after_group_members_content' ) ?> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'This group has no members.', 'buddypress' ); ?></p> + </div> + +<?php endif; ?> diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/plugins.php b/wp-content/plugins/bp-template-pack/templates/groups/single/plugins.php new file mode 100644 index 000000000..4eabe208b --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/plugins.php @@ -0,0 +1,39 @@ +<?php get_header() ?> + + <div id="container"> + <div id="content"> + + <?php if ( bp_has_groups() ) : while ( bp_groups() ) : bp_the_group(); ?> + + <?php do_action( 'bp_before_group_plugin_template' ) ?> + + <div id="item-header"> + <?php locate_template( array( 'groups/single/group-header.php' ), true ) ?> + </div> + + <div id="item-nav"> + <div class="item-list-tabs no-ajax" id="sub-nav"> + <ul> + <?php bp_get_options_nav() ?> + + <?php do_action( 'bp_group_plugin_options_nav' ) ?> + </ul> + </div> + </div> + + <div id="item-body"> + + <?php do_action( 'bp_template_content' ) ?> + + </div><!-- #item-body --> + + <?php endwhile; endif; ?> + + <?php do_action( 'bp_after_group_plugin_template' ) ?> + + </div><!-- #content --> + </div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer() ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/request-membership.php b/wp-content/plugins/bp-template-pack/templates/groups/single/request-membership.php new file mode 100644 index 000000000..5c89340cc --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/request-membership.php @@ -0,0 +1,18 @@ +<?php do_action( 'bp_before_group_request_membership_content' ) ?> + +<?php if ( !bp_group_has_requested_membership() ) : ?> + <p><?php printf( __( "You are requesting to become a member of the group '%s'.", "buddypress" ), bp_group_name( false, false ) ); ?></p> + + <form action="<?php bp_group_form_action('request-membership') ?>" method="post" name="request-membership-form" id="request-membership-form" class="standard-form"> + <label for="group-request-membership-comments"><?php _e( 'Comments (optional)', 'buddypress' ); ?></label> + <textarea name="group-request-membership-comments" id="group-request-membership-comments"></textarea> + + <?php do_action( 'bp_group_request_membership_content' ) ?> + + <p><input type="submit" name="group-request-send" id="group-request-send" value="<?php _e( 'Send Request', 'buddypress' ) ?> →" /> + + <?php wp_nonce_field( 'groups_request_membership' ) ?> + </form> +<?php endif; ?> + +<?php do_action( 'bp_after_group_request_membership_content' ) ?> diff --git a/wp-content/plugins/bp-template-pack/templates/groups/single/send-invites.php b/wp-content/plugins/bp-template-pack/templates/groups/single/send-invites.php new file mode 100644 index 000000000..f4c4d93f4 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/groups/single/send-invites.php @@ -0,0 +1,77 @@ +<?php do_action( 'bp_before_group_send_invites_content' ) ?> + +<?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> + + <form action="<?php bp_group_send_invite_form_action() ?>" method="post" id="send-invite-form" class="standard-form"> + + <div class="left-menu"> + + <div id="invite-list"> + <ul> + <?php bp_new_group_invite_friend_list() ?> + </ul> + + <?php wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' ) ?> + </div> + + </div> + + <div class="main-column"> + + <div id="message" class="info"> + <p><?php _e('Select people to invite from your friends list.', 'buddypress'); ?></p> + </div> + + <?php do_action( 'bp_before_group_send_invites_list' ) ?> + + <?php /* The ID 'friend-list' is important for AJAX support. */ ?> + <ul id="friend-list" class="item-list"> + <?php if ( bp_group_has_invites() ) : ?> + + <?php while ( bp_group_invites() ) : bp_group_the_invite(); ?> + + <li id="<?php bp_group_invite_item_id() ?>"> + <?php bp_group_invite_user_avatar() ?> + + <h4><?php bp_group_invite_user_link() ?></h4> + <span class="activity"><?php bp_group_invite_user_last_active() ?></span> + + <?php do_action( 'bp_group_send_invites_item' ) ?> + + <div class="action"> + <a class="remove" href="<?php bp_group_invite_user_remove_invite_url() ?>" id="<?php bp_group_invite_item_id() ?>"><?php _e( 'Remove Invite', 'buddypress' ) ?></a> + + <?php do_action( 'bp_group_send_invites_item_action' ) ?> + </div> + </li> + + <?php endwhile; ?> + + <?php endif; ?> + </ul> + + <?php do_action( 'bp_after_group_send_invites_list' ) ?> + + </div> + + <div class="clear"></div> + + <div class="submit"> + <input type="submit" name="submit" id="submit" value="<?php _e( 'Send Invites', 'buddypress' ) ?>" /> + </div> + + <?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites') ?> + + <!-- Don't leave out this hidden field --> + <input type="hidden" name="group_id" id="group_id" value="<?php bp_group_id() ?>" /> + </form> + +<?php else : ?> + + <div id="message" class="info"> + <p><?php _e( 'Once you have built up friend connections you will be able to invite others to your group. You can send invites any time in the future by selecting the "Send Invites" option when viewing your new group.', 'buddypress' ); ?></p> + </div> + +<?php endif; ?> + +<?php do_action( 'bp_after_group_send_invites_content' ) ?> diff --git a/wp-content/plugins/bp-template-pack/templates/members/index.php b/wp-content/plugins/bp-template-pack/templates/members/index.php new file mode 100644 index 000000000..927cc5c84 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/index.php @@ -0,0 +1,60 @@ +<?php get_header() ?> + +<div id="container"> + <div id="content"> + + <form action="" method="post" id="members-directory-form" class="dir-form"> + + <h3><?php _e( 'Members Directory', 'buddypress' ) ?></h3> + + <?php do_action( 'bp_before_directory_members_content' ) ?> + + <div id="members-dir-search" class="dir-search"> + <?php bp_directory_members_search_form() ?> + </div><!-- #members-dir-search --> + + <div class="item-list-tabs"> + <ul> + <li class="selected" id="members-all"><a href="<?php bp_root_domain() ?>"><?php printf( __( 'All Members (%s)', 'buddypress' ), bp_get_total_member_count() ) ?></a></li> + + <?php if ( is_user_logged_in() && function_exists( 'bp_get_total_friend_count' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> + <li id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . BP_FRIENDS_SLUG . '/my-friends/' ?>"><?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?></a></li> + <?php endif; ?> + + <?php do_action( 'bp_members_directory_member_types' ) ?> + + <li id="members-order-select" class="last filter"> + + <?php _e( 'Order By:', 'buddypress' ) ?> + <select> + <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option> + <option value="newest"><?php _e( 'Newest Registered', 'buddypress' ) ?></option> + + <?php if ( bp_is_active( 'xprofile' ) ) : ?> + <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option> + <?php endif; ?> + + <?php do_action( 'bp_members_directory_order_options' ) ?> + </select> + </li> + </ul> + </div><!-- .item-list-tabs --> + + <div id="members-dir-list" class="members dir-list"> + <?php locate_template( array( 'members/members-loop.php' ), true ) ?> + </div><!-- #members-dir-list --> + + <?php do_action( 'bp_directory_members_content' ) ?> + + <?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ) ?> + + <?php do_action( 'bp_after_directory_members_content' ) ?> + + </form><!-- #members-directory-form --> + + </div><!-- #content --> +</div><!-- #container --> + +<?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer() ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/members-loop.php b/wp-content/plugins/bp-template-pack/templates/members/members-loop.php new file mode 100644 index 000000000..40b052cec --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/members-loop.php @@ -0,0 +1,75 @@ +<?php /* Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter() */ ?> + +<?php do_action( 'bp_before_members_loop' ) ?> + +<?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?> + + <div class="pagination"> + + <div class="pag-count" id="member-dir-count"> + <?php bp_members_pagination_count() ?> + </div> + + <div class="pagination-links" id="member-dir-pag"> + <?php bp_members_pagination_links() ?> + </div> + + </div> + + <?php do_action( 'bp_before_directory_members_list' ) ?> + + <ul id="members-list" class="item-list"> + <?php while ( bp_members() ) : bp_the_member(); ?> + + <li> + <div class="item-avatar"> + <a href="<?php bp_member_permalink() ?>"><?php bp_member_avatar() ?></a> + </div> + + <div class="item"> + <div class="item-title"> + <a href="<?php bp_member_permalink() ?>"><?php bp_member_name() ?></a> + <?php if ( bp_get_member_latest_update() ) : ?> + <span class="update"> - <?php bp_member_latest_update( 'length=10' ) ?></span> + <?php endif; ?> + </div> + <div class="item-meta"><span class="activity"><?php bp_member_last_active() ?></span></div> + + <?php do_action( 'bp_directory_members_item' ) ?> + + <?php + /*** + * If you want to show specific profile fields here you can, + * but it'll add an extra query for each member in the loop + * (only one regadless of the number of fields you show): + * + * bp_member_profile_data( 'field=the field name' ); + */ + ?> + </div> + + <div class="action"> + <?php bp_member_add_friend_button() ?> + + <?php do_action( 'bp_directory_members_actions' ) ?> + </div> + + <div class="clear"></div> + </li> + + <?php endwhile; ?> + </ul> + + <?php do_action( 'bp_after_directory_members_list' ) ?> + + <?php bp_member_hidden_fields() ?> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( "Sorry, no members were found.", 'buddypress' ) ?></p> + </div> + +<?php endif; ?> + +<?php do_action( 'bp_after_members_loop' ) ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/activity.php b/wp-content/plugins/bp-template-pack/templates/members/single/activity.php new file mode 100644 index 000000000..df7afcfd9 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/activity.php @@ -0,0 +1,48 @@ +<div class="item-list-tabs no-ajax" id="subnav"> + <ul> + <?php bp_get_options_nav() ?> + + <li id="activity-filter-select" class="last"> + <select> + <option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option> + <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option> + + <?php if ( 'groups' != bp_current_action() ) : ?> + <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option> + <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option> + + <?php if ( bp_is_active( 'friends' ) ) : ?> + <option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ) ?></option> + <?php endif; ?> + <?php endif; ?> + + <?php if ( bp_is_active( 'forums' ) ) : ?> + <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option> + <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option> + <?php endif; ?> + + <?php if ( bp_is_active( 'groups' ) ) : ?> + <option value="created_group"><?php _e( 'Show New Groups', 'buddypress' ) ?></option> + <option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option> + <?php endif; ?> + + <?php do_action( 'bp_member_activity_filter_options' ) ?> + </select> + </li> + </ul> +</div><!-- .item-list-tabs --> + +<?php do_action( 'bp_before_member_activity_post_form' ) ?> + +<?php if ( is_user_logged_in() && bp_is_my_profile() && ( '' == bp_current_action() || 'just-me' == bp_current_action() ) ) : ?> + <?php locate_template( array( 'activity/post-form.php'), true ) ?> +<?php endif; ?> + +<?php do_action( 'bp_after_member_activity_post_form' ) ?> +<?php do_action( 'bp_before_member_activity_content' ) ?> + +<div class="activity"> + <?php locate_template( array( 'activity/activity-loop.php' ), true ) ?> +</div><!-- .activity --> + +<?php do_action( 'bp_after_member_activity_content' ) ?> diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/activity/permalink.php b/wp-content/plugins/bp-template-pack/templates/members/single/activity/permalink.php new file mode 100644 index 000000000..f55cf3385 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/activity/permalink.php @@ -0,0 +1,17 @@ +<?php get_header() ?> + +<div class="activity no-ajax"> + <?php if ( bp_has_activities( 'display_comments=threaded&include=' . bp_current_action() ) ) : ?> + + <ul id="activity-stream" class="activity-list item-list"> + <?php while ( bp_activities() ) : bp_the_activity(); ?> + + <?php locate_template( array( 'activity/entry.php' ), true ) ?> + + <?php endwhile; ?> + </ul> + + <?php endif; ?> +</div> + +<?php get_footer() ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/blogs.php b/wp-content/plugins/bp-template-pack/templates/members/single/blogs.php new file mode 100644 index 000000000..bfe3da4bd --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/blogs.php @@ -0,0 +1,24 @@ +<div class="item-list-tabs" id="subnav"> + <ul> + <?php bp_get_options_nav() ?> + + <li id="blogs-order-select" class="last filter"> + <?php _e( 'Order By:', 'buddypress' ) ?> + <select id="blogs-all"> + <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option> + <option value="newest"><?php _e( 'Newest', 'buddypress' ) ?></option> + <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option> + + <?php do_action( 'bp_member_blog_order_options' ) ?> + </select> + </li> + </ul> +</div><!-- .item-list-tabs --> + +<?php do_action( 'bp_before_member_blogs_content' ) ?> + +<div class="blogs myblogs"> + <?php locate_template( array( 'blogs/blogs-loop.php' ), true ) ?> +</div><!-- .blogs --> + +<?php do_action( 'bp_after_member_blogs_content' ) ?> diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/friends.php b/wp-content/plugins/bp-template-pack/templates/members/single/friends.php new file mode 100644 index 000000000..47ffbf6ad --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/friends.php @@ -0,0 +1,34 @@ +<div class="item-list-tabs no-ajax" id="subnav"> + <ul> + <?php if ( bp_is_my_profile() ) : ?> + <?php bp_get_options_nav() ?> + <?php endif; ?> + + <li id="members-order-select" class="last filter"> + + <?php _e( 'Order By:', 'buddypress' ) ?> + <select id="members-all"> + <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option> + <option value="newest"><?php _e( 'Newest Registered', 'buddypress' ) ?></option> + <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option> + + <?php do_action( 'bp_member_blog_order_options' ) ?> + </select> + </li> + </ul> +</div> + +<?php if ( 'requests' == bp_current_action() ) : ?> + <?php locate_template( array( 'members/single/friends/requests.php' ), true ) ?> + +<?php else : ?> + + <?php do_action( 'bp_before_member_friends_content' ) ?> + + <div class="members friends"> + <?php locate_template( array( 'members/members-loop.php' ), true ) ?> + </div> + + <?php do_action( 'bp_after_member_friends_content' ) ?> + +<?php endif; ?> diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/friends/requests.php b/wp-content/plugins/bp-template-pack/templates/members/single/friends/requests.php new file mode 100644 index 000000000..f4b88af2e --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/friends/requests.php @@ -0,0 +1,41 @@ +<?php do_action( 'bp_before_member_friend_requests_content' ) ?> + +<?php if ( bp_has_members( 'include=' . bp_get_friendship_requests() . '&per_page=0' ) ) : ?> + + <ul id="friend-list" class="item-list"> + <?php while ( bp_members() ) : bp_the_member(); ?> + + <li id="friendship-<?php bp_friend_friendship_id() ?>"> + <div class="item-avatar"> + <a href="<?php bp_member_link() ?>"><?php bp_member_avatar() ?></a> + </div> + + <div class="item"> + <div class="item-title"><a href="<?php bp_member_link() ?>"><?php bp_member_name() ?></a></div> + <div class="item-meta"><span class="activity"><?php bp_member_last_active() ?></span></div> + </div> + + <?php do_action( 'bp_friend_requests_item' ) ?> + + <div class="action"> + <a class="button accept" href="<?php bp_friend_accept_request_link() ?>"><?php _e( 'Accept', 'buddypress' ); ?></a> + <a class="button reject" href="<?php bp_friend_reject_request_link() ?>"><?php _e( 'Reject', 'buddypress' ); ?></a> + + <?php do_action( 'bp_friend_requests_item_action' ) ?> + </div> + </li> + + <?php endwhile; ?> + </ul> + + <?php do_action( 'bp_friend_requests_content' ) ?> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'You have no pending friendship requests.', 'buddypress' ); ?></p> + </div> + +<?php endif;?> + +<?php do_action( 'bp_after_member_friend_requests_content' ) ?> diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/groups.php b/wp-content/plugins/bp-template-pack/templates/members/single/groups.php new file mode 100644 index 000000000..e2799fffa --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/groups.php @@ -0,0 +1,37 @@ +<div class="item-list-tabs no-ajax" id="subnav"> + <ul> + <?php if ( bp_is_my_profile() ) : ?> + <?php bp_get_options_nav() ?> + <?php endif; ?> + + <?php if ( 'invites' != bp_current_action() ) : ?> + <li id="groups-order-select" class="last filter"> + + <?php _e( 'Order By:', 'buddypress' ) ?> + <select id="groups-all"> + <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option> + <option value="popular"><?php _e( 'Most Members', 'buddypress' ) ?></option> + <option value="newest"><?php _e( 'Newly Created', 'buddypress' ) ?></option> + <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option> + + <?php do_action( 'bp_member_group_order_options' ) ?> + </select> + </li> + <?php endif; ?> + </ul> +</div> + +<?php if ( 'invites' == bp_current_action() ) : ?> + <?php locate_template( array( 'members/single/groups/invites.php' ), true ) ?> + +<?php else : ?> + + <?php do_action( 'bp_before_member_groups_content' ) ?> + + <div class="groups mygroups"> + <?php locate_template( array( 'groups/groups-loop.php' ), true ) ?> + </div> + + <?php do_action( 'bp_after_member_groups_content' ) ?> + +<?php endif; ?> diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/groups/invites.php b/wp-content/plugins/bp-template-pack/templates/members/single/groups/invites.php new file mode 100644 index 000000000..777b153b8 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/groups/invites.php @@ -0,0 +1,39 @@ +<?php do_action( 'bp_before_group_invites_content' ) ?> + +<?php if ( bp_has_groups( 'type=invites&user_id=' . bp_loggedin_user_id() ) ) : ?> + + <ul id="group-list" class="invites item-list"> + + <?php while ( bp_groups() ) : bp_the_group(); ?> + + <li> + <?php bp_group_avatar_thumb() ?> + <h4><a href="<?php bp_group_permalink() ?>"><?php bp_group_name() ?></a><span class="small"> - <?php printf( __( '%s members', 'buddypress' ), bp_group_total_members( false ) ) ?></span></h4> + + <p class="desc"> + <?php bp_group_description_excerpt() ?> + </p> + + <?php do_action( 'bp_group_invites_item' ) ?> + + <div class="action"> + <a class="button accept" href="<?php bp_group_accept_invite_link() ?>"><?php _e( 'Accept', 'buddypress' ) ?></a> + <a class="button reject confirm" href="<?php bp_group_reject_invite_link() ?>"><?php _e( 'Reject', 'buddypress' ) ?></a> + + <?php do_action( 'bp_group_invites_item_action' ) ?> + + </div> + </li> + + <?php endwhile; ?> + </ul> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'You have no outstanding group invites.', 'buddypress' ) ?></p> + </div> + +<?php endif;?> + +<?php do_action( 'bp_after_group_invites_content' ) ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/home.php b/wp-content/plugins/bp-template-pack/templates/members/single/home.php new file mode 100644 index 000000000..75989c5bd --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/home.php @@ -0,0 +1,56 @@ +<?php get_header() ?> + +<div id="container"> + <div id="content"> + + <?php do_action( 'bp_before_member_home_content' ) ?> + + <div id="item-header"> + <?php locate_template( array( 'members/single/member-header.php' ), true ) ?> + </div><!-- #item-header --> + + <div id="item-nav"> + <div class="item-list-tabs no-ajax" id="object-nav"> + <ul> + <?php bp_get_displayed_user_nav() ?> + + <?php do_action( 'bp_members_directory_member_types' ) ?> + </ul> + </div> + </div><!-- #item-nav --> + + <div id="item-body"> + <?php do_action( 'bp_before_member_body' ) ?> + + <?php if ( bp_is_user_activity() || !bp_current_component() ) : ?> + <?php locate_template( array( 'members/single/activity.php' ), true ) ?> + + <?php elseif ( bp_is_user_blogs() ) : ?> + <?php locate_template( array( 'members/single/blogs.php' ), true ) ?> + + <?php elseif ( bp_is_user_friends() ) : ?> + <?php locate_template( array( 'members/single/friends.php' ), true ) ?> + + <?php elseif ( bp_is_user_groups() ) : ?> + <?php locate_template( array( 'members/single/groups.php' ), true ) ?> + + <?php elseif ( bp_is_user_messages() ) : ?> + <?php locate_template( array( 'members/single/messages.php' ), true ) ?> + + <?php elseif ( bp_is_user_profile() ) : ?> + <?php locate_template( array( 'members/single/profile.php' ), true ) ?> + + <?php endif; ?> + + <?php do_action( 'bp_after_member_body' ) ?> + + </div><!-- #item-body --> + + <?php do_action( 'bp_after_member_home_content' ) ?> + + </div><!-- #content --> +</div><!-- #container --> + +<?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer() ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/member-header.php b/wp-content/plugins/bp-template-pack/templates/members/single/member-header.php new file mode 100644 index 000000000..7a9c7673e --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/member-header.php @@ -0,0 +1,56 @@ +<?php do_action( 'bp_before_member_header' ) ?> + +<div id="item-header-avatar"> + <a href="<?php bp_user_link() ?>"> + <?php bp_displayed_user_avatar( 'type=full' ) ?> + </a> +</div><!-- #item-header-avatar --> + +<div id="item-header-content"> + + <h2 class="fn"><a href="<?php bp_user_link() ?>"><?php bp_displayed_user_fullname() ?></a> <span class="highlight">@<?php bp_displayed_user_username() ?> <span>?</span></span></h2> + <span class="activity"><?php bp_last_activity( bp_displayed_user_id() ) ?></span> + + <?php do_action( 'bp_before_member_header_meta' ) ?> + + <div id="item-meta"> + <?php if ( function_exists( 'bp_activity_latest_update' ) ) : ?> + <div id="latest-update"> + <?php bp_activity_latest_update( bp_displayed_user_id() ) ?> + </div> + <?php endif; ?> + + <div id="item-buttons"> + <?php if ( function_exists( 'bp_add_friend_button' ) ) : ?> + <?php bp_add_friend_button() ?> + <?php endif; ?> + + <?php if ( is_user_logged_in() && !bp_is_my_profile() && function_exists( 'bp_send_public_message_link' ) ) : ?> + <div class="generic-button" id="post-mention"> + <a href="<?php bp_send_public_message_link() ?>" title="<?php _e( 'Mention this user in a new public message, this will send the user a notification to get their attention.', 'buddypress' ) ?>"><?php _e( 'Mention this User', 'buddypress' ) ?></a> + </div> + <?php endif; ?> + + <?php if ( is_user_logged_in() && !bp_is_my_profile() && function_exists( 'bp_send_private_message_link' ) ) : ?> + <div class="generic-button" id="send-private-message"> + <a href="<?php bp_send_private_message_link() ?>" title="<?php _e( 'Send a private message to this user.', 'buddypress' ) ?>"><?php _e( 'Send Private Message', 'buddypress' ) ?></a> + </div> + <?php endif; ?> + </div><!-- #item-buttons --> + + <?php + /*** + * If you'd like to show specific profile fields here use: + * bp_profile_field_data( 'field=About Me' ); -- Pass the name of the field + */ + ?> + + <?php do_action( 'bp_profile_header_meta' ) ?> + + </div><!-- #item-meta --> + +</div><!-- #item-header-content --> + +<?php do_action( 'bp_after_member_header' ) ?> + +<?php do_action( 'template_notices' ) ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/messages.php b/wp-content/plugins/bp-template-pack/templates/members/single/messages.php new file mode 100644 index 000000000..65da9ddf5 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/messages.php @@ -0,0 +1,29 @@ +<div class="item-list-tabs no-ajax" id="subnav"> + <ul> + <?php bp_get_options_nav() ?> + </ul> +</div> + +<?php if ( 'compose' == bp_current_action() ) : ?> + <?php locate_template( array( 'members/single/messages/compose.php' ), true ) ?> + +<?php elseif ( 'view' == bp_current_action() ) : ?> + <?php locate_template( array( 'members/single/messages/single.php' ), true ) ?> + +<?php else : ?> + + <?php do_action( 'bp_before_member_messages_content' ) ?> + + <div class="messages"> + <?php if ( 'notices' == bp_current_action() ) : ?> + <?php locate_template( array( 'members/single/messages/notices-loop.php' ), true ) ?> + + <?php else : ?> + <?php locate_template( array( 'members/single/messages/messages-loop.php' ), true ) ?> + + <?php endif; ?> + </div> + + <?php do_action( 'bp_after_member_messages_content' ) ?> + +<?php endif; ?> diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/messages/compose.php b/wp-content/plugins/bp-template-pack/templates/members/single/messages/compose.php new file mode 100644 index 000000000..8b9a8e8ef --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/messages/compose.php @@ -0,0 +1,38 @@ +<form action="<?php bp_messages_form_action('compose') ?>" method="post" id="send_message_form" class="standard-form"> + + <?php do_action( 'bp_before_messages_compose_content' ) ?> + + <label for="send-to-input"><?php _e("Send To (Username or Friend's Name)", 'buddypress') ?> <span class="ajax-loader"></span></label> + <ul class="first acfb-holder"> + <li> + <?php bp_message_get_recipient_tabs() ?> + <input type="text" name="send-to-input" class="send-to-input" id="send-to-input" /> + </li> + </ul> + + <?php if ( is_site_admin() ) : ?> + <input type="checkbox" id="send-notice" name="send-notice" value="1" /> <?php _e( "This is a notice to all users.", "buddypress" ) ?> + <?php endif; ?> + + <label for="subject"><?php _e( 'Subject', 'buddypress') ?></label> + <input type="text" name="subject" id="subject" value="<?php bp_messages_subject_value() ?>" /> + + <label for="content"><?php _e( 'Message', 'buddypress') ?></label> + <textarea name="content" id="message_content" rows="15" cols="40"><?php bp_messages_content_value() ?></textarea> + + <input type="hidden" name="send_to_usernames" id="send-to-usernames" value="<?php bp_message_get_recipient_usernames(); ?>" class="<?php bp_message_get_recipient_usernames() ?>" /> + + <?php do_action( 'bp_after_messages_compose_content' ) ?> + + <div class="submit"> + <input type="submit" value="<?php _e( "Send Message", 'buddypress' ) ?> →" name="send" id="send" /> + <span class="ajax-loader"></span> + </div> + + <?php wp_nonce_field( 'messages_send_message' ) ?> +</form> + +<script type="text/javascript"> + document.getElementById("send-to-input").focus(); +</script> + diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/messages/messages-loop.php b/wp-content/plugins/bp-template-pack/templates/members/single/messages/messages-loop.php new file mode 100644 index 000000000..e87daa10c --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/messages/messages-loop.php @@ -0,0 +1,73 @@ +<?php do_action( 'bp_before_member_messages_loop' ) ?> + +<?php if ( bp_has_message_threads() ) : ?> + + <div class="pagination no-ajax" id="user-pag"> + + <div class="pag-count" id="messages-dir-count"> + <?php bp_messages_pagination_count() ?> + </div> + + <div class="pagination-links" id="messages-dir-pag"> + <?php bp_messages_pagination() ?> + </div> + + </div><!-- .pagination --> + + <?php do_action( 'bp_after_member_messages_pagination' ) ?> + <?php do_action( 'bp_before_member_messages_threads' ) ?> + + <table id="message-threads"> + <?php while ( bp_message_threads() ) : bp_message_thread(); ?> + + <tr id="m-<?php bp_message_thread_id() ?>"<?php if ( bp_message_thread_has_unread() ) : ?> class="unread"<?php else: ?> class="read"<?php endif; ?>> + <td width="1%" class="thread-count"> + <span class="unread-count"><?php bp_message_thread_unread_count() ?></span> + </td> + <td width="1%" class="thread-avatar"><?php bp_message_thread_avatar() ?></td> + + <?php if ( 'sentbox' != bp_current_action() ) : ?> + <td width="30%" class="thread-from"> + <?php _e( 'From:', 'buddypress' ); ?> <?php bp_message_thread_from() ?><br /> + <span class="activity"><?php bp_message_thread_last_post_date() ?></span> + </td> + <?php else: ?> + <td width="30%" class="thread-from"> + <?php _e( 'To:', 'buddypress' ); ?> <?php bp_message_thread_to() ?><br /> + <span class="activity"><?php bp_message_thread_last_post_date() ?></span> + </td> + <?php endif; ?> + + <td width="50%" class="thread-info"> + <p><a href="<?php bp_message_thread_view_link() ?>" title="<?php _e( "View Message", "buddypress" ); ?>"><?php bp_message_thread_subject() ?></a></p> + <p class="thread-excerpt"><?php bp_message_thread_excerpt() ?></p> + </td> + + <?php do_action( 'bp_messages_inbox_list_item' ) ?> + + <td width="13%" class="thread-options"> + <input type="checkbox" name="message_ids[]" value="<?php bp_message_thread_id() ?>" /> + <a class="button confirm" href="<?php bp_message_thread_delete_link() ?>" title="<?php _e( "Delete Message", "buddypress" ); ?>">x</a> + </td> + </tr> + + <?php endwhile; ?> + </table><!-- #message-threads --> + + <div class="messages-options-nav"> + <?php bp_messages_options() ?> + </div><!-- .messages-options-nav --> + + <?php do_action( 'bp_after_member_messages_threads' ) ?> + + <?php do_action( 'bp_after_member_messages_options' ) ?> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'Sorry, no messages were found.', 'buddypress' ); ?></p> + </div> + +<?php endif;?> + +<?php do_action( 'bp_after_member_messages_loop' ) ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/messages/notices-loop.php b/wp-content/plugins/bp-template-pack/templates/members/single/messages/notices-loop.php new file mode 100644 index 000000000..e83fdf7e9 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/messages/notices-loop.php @@ -0,0 +1,54 @@ +<?php do_action( 'bp_before_notices_loop' ) ?> + +<?php if ( bp_has_message_threads() ) : ?> + + <div class="pagination" id="user-pag"> + + <div class="pag-count" id="messages-dir-count"> + <?php bp_messages_pagination_count() ?> + </div> + + <div class="pagination-links" id="messages-dir-pag"> + <?php bp_messages_pagination() ?> + </div> + + </div><!-- .pagination --> + + <?php do_action( 'bp_after_notices_pagination' ) ?> + <?php do_action( 'bp_before_notices' ) ?> + + <table id="message-threads"> + <?php while ( bp_message_threads() ) : bp_message_thread(); ?> + <tr> + <td width="1%"> + </td> + <td width="38%"> + <strong><?php bp_message_notice_subject() ?></strong> + <?php bp_message_notice_text() ?> + </td> + <td width="21%"> + <strong><?php bp_message_is_active_notice() ?></strong> + <span class="activity"><?php _e("Sent:", "buddypress"); ?> <?php bp_message_notice_post_date() ?></span> + </td> + + <?php do_action( 'bp_notices_list_item' ) ?> + + <td width="10%"> + <a class="button" href="<?php bp_message_activate_deactivate_link() ?>" class="confirm"><?php bp_message_activate_deactivate_text() ?></a> + <a class="button" href="<?php bp_message_notice_delete_link() ?>" class="confirm" title="<?php _e( "Delete Message", "buddypress" ); ?>">x</a> + </td> + </tr> + <?php endwhile; ?> + </table><!-- #message-threads --> + + <?php do_action( 'bp_after_notices' ) ?> + +<?php else: ?> + + <div id="message" class="info"> + <p><?php _e( 'Sorry, no notices were found.', 'buddypress' ); ?></p> + </div> + +<?php endif;?> + +<?php do_action( 'bp_after_notices_loop' ) ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/messages/single.php b/wp-content/plugins/bp-template-pack/templates/members/single/messages/single.php new file mode 100644 index 000000000..0dbce0ce1 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/messages/single.php @@ -0,0 +1,98 @@ +<div id="message-thread"> + + <?php do_action( 'bp_before_message_thread_content' ) ?> + + <?php if ( bp_thread_has_messages() ) : ?> + + <h3 id="message-subject"><?php bp_the_thread_subject() ?></h3> + + <p id="message-recipients"> + <span class="highlight"> + <?php printf( __('Sent between %s and %s', 'buddypress'), bp_get_the_thread_recipients(), '<a href="' . bp_get_loggedin_user_link() . '" title="' . bp_get_loggedin_user_fullname() . '">' . bp_get_loggedin_user_fullname() . '</a>' ) ?> + </span> + </p> + + <?php do_action( 'bp_before_message_thread_list' ) ?> + + <?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?> + + <div class="message-box"> + + <div class="message-metadata"> + + <?php do_action( 'bp_before_message_meta' ) ?> + + <?php bp_the_thread_message_sender_avatar( 'type=thumb&width=30&height=30' ) ?> + <strong><a href="<?php bp_the_thread_message_sender_link() ?>" title="<?php bp_the_thread_message_sender_name() ?>"><?php bp_the_thread_message_sender_name() ?></a> <span class="activity"><?php bp_the_thread_message_time_since() ?></span></strong> + + <?php do_action( 'bp_after_message_meta' ) ?> + + </div><!-- .message-metadata --> + + <?php do_action( 'bp_before_message_content' ) ?> + + <div class="message-content"> + + <?php bp_the_thread_message_content() ?> + + </div><!-- .message-content --> + + <?php do_action( 'bp_after_message_content' ) ?> + + <div class="clear"></div> + + </div><!-- .message-box --> + + <?php endwhile; ?> + + <?php do_action( 'bp_after_message_thread_list' ) ?> + + <?php do_action( 'bp_before_message_thread_reply' ) ?> + + <form id="send-reply" action="<?php bp_messages_form_action() ?>" method="post" class="standard-form"> + + <div class="message-box"> + + <div class="message-metadata"> + + <?php do_action( 'bp_before_message_meta' ) ?> + + <div class="avatar-box"> + <?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ) ?> + + <strong><?php _e( 'Send a Reply', 'buddypress' ) ?></strong> + </div> + + <?php do_action( 'bp_after_message_meta' ) ?> + + </div><!-- .message-metadata --> + + <div class="message-content"> + + <?php do_action( 'bp_before_message_reply_box' ) ?> + + <textarea name="content" id="message_content" rows="15" cols="40"></textarea> + + <?php do_action( 'bp_after_message_reply_box' ) ?> + + <div class="submit"> + <input type="submit" name="send" value="<?php _e( 'Send Reply', 'buddypress' ) ?> →" id="send_reply_button"/> + <span class="ajax-loader"></span> + </div> + + <input type="hidden" id="thread_id" name="thread_id" value="<?php bp_the_thread_id(); ?>" /> + <?php wp_nonce_field( 'messages_send_message', 'send_message_nonce' ) ?> + + </div><!-- .message-content --> + + </div><!-- .message-box --> + + </form><!-- #send-reply --> + + <?php do_action( 'bp_after_message_thread_reply' ) ?> + + <?php endif; ?> + + <?php do_action( 'bp_after_message_thread_content' ) ?> + +</div> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/plugins.php b/wp-content/plugins/bp-template-pack/templates/members/single/plugins.php new file mode 100644 index 000000000..96c1aa41b --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/plugins.php @@ -0,0 +1,45 @@ +<?php get_header() ?> + + <div id="container"> + <div id="content"> + + <?php do_action( 'bp_before_member_plugin_template' ) ?> + + <div id="item-header"> + <?php locate_template( array( 'members/single/member-header.php' ), true ) ?> + </div> + + <div id="item-nav"> + <div class="item-list-tabs no-ajax" id="object-nav"> + <ul> + <?php bp_get_displayed_user_nav() ?> + + <?php do_action( 'bp_members_directory_member_types' ) ?> + </ul> + </div> + </div> + + <div id="item-body"> + + <div class="item-list-tabs no-ajax" id="subnav"> + <ul> + <?php bp_get_options_nav() ?> + </ul> + </div> + + <?php do_action( 'bp_template_content' ) ?> + + <?php do_action( 'bp_directory_members_content' ) ?> + + </div><!-- #item-body --> + + <?php do_action( 'bp_after_member_plugin_template' ) ?> + + </div><!-- #content --> + </div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + + <?php do_action( 'bp_after_member_plugin_template' ) ?> + +<?php get_footer() ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/profile.php b/wp-content/plugins/bp-template-pack/templates/members/single/profile.php new file mode 100644 index 000000000..397966b66 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/profile.php @@ -0,0 +1,24 @@ +<?php if ( bp_is_my_profile() ) : ?> + <div class="item-list-tabs no-ajax" id="subnav"> + <ul> + <?php bp_get_options_nav() ?> + </ul> + </div> +<?php endif; ?> + +<?php do_action( 'bp_before_profile_content' ) ?> + +<div class="profile"> + <?php if ( 'edit' == bp_current_action() ) : ?> + <?php locate_template( array( 'members/single/profile/edit.php' ), true ) ?> + + <?php elseif ( 'change-avatar' == bp_current_action() ) : ?> + <?php locate_template( array( 'members/single/profile/change-avatar.php' ), true ) ?> + + <?php else : ?> + <?php locate_template( array( 'members/single/profile/profile-loop.php' ), true ) ?> + + <?php endif; ?> +</div><!-- .profile --> + +<?php do_action( 'bp_after_profile_content' ) ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/profile/change-avatar.php b/wp-content/plugins/bp-template-pack/templates/members/single/profile/change-avatar.php new file mode 100644 index 000000000..6e6a0527b --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/profile/change-avatar.php @@ -0,0 +1,60 @@ +<h4><?php _e( 'Change Avatar', 'buddypress' ) ?></h4> + +<?php do_action( 'bp_before_profile_avatar_upload_content' ) ?> + +<?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?> + + <p><?php _e( 'Your avatar will be used on your profile and throughout the site. If there is a <a href="http://gravatar.com">Gravatar</a> associated with your account email we will use that, or you can upload an image from your computer.', 'buddypress') ?></p> + + <form action="" method="post" id="avatar-upload-form" enctype="multipart/form-data"> + + <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?> + + <p><?php _e( 'Click below to select a JPG, GIF or PNG format photo from your computer and then click \'Upload Image\' to proceed.', 'buddypress' ) ?></p> + + <p id="avatar-upload"> + <input type="file" name="file" id="file" /> + <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" /> + <input type="hidden" name="action" id="action" value="bp_avatar_upload" /> + </p> + + <?php if ( bp_get_user_has_avatar() ) : ?> + <p><?php _e( "If you'd like to delete your current avatar but not upload a new one, please use the delete avatar button.", 'buddypress' ) ?></p> + <p><a class="button edit" href="<?php bp_avatar_delete_link() ?>" title="<?php _e( 'Delete Avatar', 'buddypress' ) ?>"><?php _e( 'Delete My Avatar', 'buddypress' ) ?></a></p> + <?php endif; ?> + + <?php wp_nonce_field( 'bp_avatar_upload' ) ?> + + <?php endif; ?> + + <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> + + <h5><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h5> + + <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" /> + + <div id="avatar-crop-pane"> + <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" /> + </div> + + <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" /> + + <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" /> + <input type="hidden" id="x" name="x" /> + <input type="hidden" id="y" name="y" /> + <input type="hidden" id="w" name="w" /> + <input type="hidden" id="h" name="h" /> + + <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?> + + <?php endif; ?> + + </form> + +<?php else : ?> + + <p><?php _e( 'Your avatar will be used on your profile and throughout the site. To change your avatar, please create an account with <a href="http://gravatar.com">Gravatar</a> using the same email address as you used to register with this site.', 'buddypress' ) ?></p> + +<?php endif; ?> + +<?php do_action( 'bp_after_profile_avatar_upload_content' ) ?> diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/profile/edit.php b/wp-content/plugins/bp-template-pack/templates/members/single/profile/edit.php new file mode 100644 index 000000000..2655ffea2 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/profile/edit.php @@ -0,0 +1,117 @@ +<?php do_action( 'bp_before_profile_edit_content' ) ?> + +<?php if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> + +<form action="<?php bp_the_profile_group_edit_form_action() ?>" method="post" id="profile-edit-form" class="standard-form <?php bp_the_profile_group_slug() ?>"> + + <?php do_action( 'bp_before_profile_field_content' ) ?> + + <h4><?php printf( __( "Editing '%s' Profile Group", "buddypress" ), bp_get_the_profile_group_name() ); ?></h4> + + <ul class="button-nav"> + <?php bp_profile_group_tabs(); ?> + </ul> + + <div class="clear"></div> + + <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> + + <div<?php bp_field_css_class( 'editfield' ) ?>> + + <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?> + + <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + <input type="text" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" value="<?php bp_the_profile_field_edit_value() ?>" /> + + <?php endif; ?> + + <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?> + + <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_edit_value() ?></textarea> + + <?php endif; ?> + + <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?> + + <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>"> + <?php bp_the_profile_field_options() ?> + </select> + + <?php endif; ?> + + <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?> + + <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" multiple="multiple"> + <?php bp_the_profile_field_options() ?> + </select> + + <?php endif; ?> + + <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?> + + <div class="radio"> + <span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></span> + + <?php bp_the_profile_field_options() ?> + + <?php if ( !bp_get_the_profile_field_is_required() ) : ?> + <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name() ?>' );"><?php _e( 'Clear', 'buddypress' ) ?></a> + <?php endif; ?> + </div> + + <?php endif; ?> + + <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?> + + <div class="checkbox"> + <span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></span> + + <?php bp_the_profile_field_options() ?> + </div> + + <?php endif; ?> + + <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?> + + <div class="datebox"> + <label for="<?php bp_the_profile_field_input_name() ?>_day"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + + <select name="<?php bp_the_profile_field_input_name() ?>_day" id="<?php bp_the_profile_field_input_name() ?>_day"> + <?php bp_the_profile_field_options( 'type=day' ) ?> + </select> + + <select name="<?php bp_the_profile_field_input_name() ?>_month" id="<?php bp_the_profile_field_input_name() ?>_month"> + <?php bp_the_profile_field_options( 'type=month' ) ?> + </select> + + <select name="<?php bp_the_profile_field_input_name() ?>_year" id="<?php bp_the_profile_field_input_name() ?>_year"> + <?php bp_the_profile_field_options( 'type=year' ) ?> + </select> + </div> + + <?php endif; ?> + + <?php do_action( 'bp_custom_profile_edit_fields' ) ?> + + <p class="description"><?php bp_the_profile_field_description() ?></p> + </div> + + <?php endwhile; ?> + + <?php do_action( 'bp_after_profile_field_content' ) ?> + + <div class="submit"> + <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php _e( 'Save Changes', 'buddypress' ) ?> " /> + </div> + + <input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_group_field_ids() ?>" /> + <?php wp_nonce_field( 'bp_xprofile_edit' ) ?> + +</form> + +<?php endwhile; endif; ?> + +<?php do_action( 'bp_after_profile_edit_content' ) ?> \ No newline at end of file diff --git a/wp-content/plugins/bp-template-pack/templates/members/single/profile/profile-loop.php b/wp-content/plugins/bp-template-pack/templates/members/single/profile/profile-loop.php new file mode 100644 index 000000000..491e95059 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/members/single/profile/profile-loop.php @@ -0,0 +1,59 @@ +<?php do_action( 'bp_before_profile_loop_content' ) ?> + +<?php if ( function_exists('xprofile_get_profile') ) : ?> + + <?php if ( bp_has_profile() ) : ?> + + <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?> + + <?php if ( bp_profile_group_has_fields() ) : ?> + + <?php do_action( 'bp_before_profile_field_content' ) ?> + + <div class="bp-widget <?php bp_the_profile_group_slug() ?>"> + <?php if ( 1 != bp_get_the_profile_group_id() ) : ?> + <h4><?php bp_the_profile_group_name() ?></h4> + <?php endif; ?> + + <table class="profile-fields"> + <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> + + <?php if ( bp_field_has_data() ) : ?> + <tr> + + <td class="label"> + <?php bp_the_profile_field_name() ?> + </td> + + <td class="data"> + <?php bp_the_profile_field_value() ?> + </td> + + </tr> + <?php endif; ?> + + <?php do_action( 'bp_profile_field_item' ) ?> + + <?php endwhile; ?> + </table> + </div> + + <?php do_action( 'bp_after_profile_field_content' ) ?> + + <?php endif; ?> + + <?php endwhile; ?> + + <?php do_action( 'bp_profile_field_buttons' ) ?> + + <?php endif; ?> + +<?php else : ?> + + <?php /* Just load the standard WP profile information, if BP extended profiles are not loaded. */ ?> + <?php bp_core_get_wp_profile() ?> + +<?php endif; ?> + +<?php do_action( 'bp_after_profile_loop_content' ) ?> + diff --git a/wp-content/plugins/bp-template-pack/templates/registration/activate.php b/wp-content/plugins/bp-template-pack/templates/registration/activate.php new file mode 100644 index 000000000..cf5a0d3b9 --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/registration/activate.php @@ -0,0 +1,58 @@ +<?php /* This template is only used on multisite installations */ ?> + +<?php get_header(); ?> + + <div id="container"> + <div id="content"> + + <?php do_action( 'bp_before_activation_page' ) ?> + + <div class="page" id="activate-page"> + + <?php do_action( 'template_notices' ) ?> + + <?php if ( bp_account_was_activated() ) : ?> + + <h2 class="widgettitle"><?php _e( 'Account Activated', 'buddypress' ) ?></h2> + + <?php do_action( 'bp_before_activate_content' ) ?> + + <?php if ( isset( $_GET['e'] ) ) : ?> + <p><?php _e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ) ?></p> + <?php else : ?> + <p><?php _e( 'Your account was activated successfully! You can now log in with the username and password you provided when you signed up.', 'buddypress' ) ?></p> + <?php endif; ?> + + <?php else : ?> + + <h3><?php _e( 'Activate your Account', 'buddypress' ) ?></h3> + + <?php do_action( 'bp_before_activate_content' ) ?> + + <p><?php _e( 'Please provide a valid activation key.', 'buddypress' ) ?></p> + + <form action="" method="get" class="standard-form" id="activation-form"> + + <label for="key"><?php _e( 'Activation Key:', 'buddypress' ) ?></label> + <input type="text" name="key" id="key" value="" /> + + <p class="submit"> + <input type="submit" name="submit" value="<?php _e( 'Activate', 'buddypress' ) ?> →" /> + </p> + + </form> + + <?php endif; ?> + + <?php do_action( 'bp_after_activate_content' ) ?> + + </div><!-- .page --> + + <?php do_action( 'bp_after_activation_page' ) ?> + + </div><!-- #content --> + </div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + +<?php get_footer(); ?> diff --git a/wp-content/plugins/bp-template-pack/templates/registration/register.php b/wp-content/plugins/bp-template-pack/templates/registration/register.php new file mode 100644 index 000000000..c190f5c3e --- /dev/null +++ b/wp-content/plugins/bp-template-pack/templates/registration/register.php @@ -0,0 +1,309 @@ +<?php get_header() ?> + + <div id="container"> + <div id="content"> + + <?php do_action( 'bp_before_register_page' ) ?> + + <div class="page" id="register-page"> + + <form action="" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data"> + + <?php if ( 'request-details' == bp_get_current_signup_step() ) : ?> + + <h2><?php _e( 'Create an Account', 'buddypress' ) ?></h2> + + <?php do_action( 'template_notices' ) ?> + + <p><?php _e( 'Registering for this site is easy, just fill in the fields below and we\'ll get a new account set up for you in no time.', 'buddypress' ) ?></p> + + <?php do_action( 'bp_before_account_details_fields' ) ?> + + <div class="register-section" id="basic-details-section"> + + <?php /***** Basic Account Details ******/ ?> + + <h4><?php _e( 'Account Details', 'buddypress' ) ?></h4> + + <label for="signup_username"><?php _e( 'Username', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label> + <?php do_action( 'bp_signup_username_errors' ) ?> + <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" /> + + <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label> + <?php do_action( 'bp_signup_email_errors' ) ?> + <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" /> + + <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label> + <?php do_action( 'bp_signup_password_errors' ) ?> + <input type="password" name="signup_password" id="signup_password" value="" /> + + <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label> + <?php do_action( 'bp_signup_password_confirm_errors' ) ?> + <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" /> + + </div><!-- #basic-details-section --> + + <?php do_action( 'bp_after_account_details_fields' ) ?> + + <?php do_action( 'bp_before_blog_details_fields' ) ?> + + + <?php /***** Extra Profile Details ******/ ?> + + <?php if ( bp_is_active( 'xprofile' ) ) : ?> + <div class="register-section" id="profile-details-section"> + + <h4><?php _e( 'Profile Details', 'buddypress' ) ?></h4> + + <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?> + <?php if ( function_exists( 'bp_has_profile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> + + <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> + + <div class="editfield"> + + <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?> + + <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> + <input type="text" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" value="<?php bp_the_profile_field_edit_value() ?>" /> + + <?php endif; ?> + + <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?> + + <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> + <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_edit_value() ?></textarea> + + <?php endif; ?> + + <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?> + + <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> + <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>"> + <?php bp_the_profile_field_options() ?> + </select> + + <?php endif; ?> + + <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?> + + <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> + <select name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" multiple="multiple"> + <?php bp_the_profile_field_options() ?> + </select> + + <?php endif; ?> + + <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?> + + <div class="radio"> + <span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></span> + + <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> + <?php bp_the_profile_field_options() ?> + + <?php if ( !bp_get_the_profile_field_is_required() ) : ?> + <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name() ?>' );"><?php _e( 'Clear', 'buddypress' ) ?></a> + <?php endif; ?> + </div> + + <?php endif; ?> + + <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?> + + <div class="checkbox"> + <span class="label"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></span> + + <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> + <?php bp_the_profile_field_options() ?> + </div> + + <?php endif; ?> + + <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?> + + <div class="datebox"> + <label for="<?php bp_the_profile_field_input_name() ?>_day"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label> + <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?> + + <select name="<?php bp_the_profile_field_input_name() ?>_day" id="<?php bp_the_profile_field_input_name() ?>_day"> + <?php bp_the_profile_field_options( 'type=day' ) ?> + </select> + + <select name="<?php bp_the_profile_field_input_name() ?>_month" id="<?php bp_the_profile_field_input_name() ?>_month"> + <?php bp_the_profile_field_options( 'type=month' ) ?> + </select> + + <select name="<?php bp_the_profile_field_input_name() ?>_year" id="<?php bp_the_profile_field_input_name() ?>_year"> + <?php bp_the_profile_field_options( 'type=year' ) ?> + </select> + </div> + + <?php endif; ?> + + <?php do_action( 'bp_custom_profile_edit_fields' ) ?> + + <p class="description"><?php bp_the_profile_field_description() ?></p> + + </div> + + <?php endwhile; ?> + + <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids() ?>" /> + + <?php endwhile; endif; endif; ?> + + </div><!-- #profile-details-section --> + <?php endif; ?> + + <?php do_action( 'bp_after_signup_profile_fields' ) ?> + + <?php if ( bp_get_blog_signup_allowed() ) : ?> + + <?php do_action( 'bp_before_blog_details_fields' ) ?> + + <?php /***** Blog Creation Details ******/ ?> + + <div class="register-section" id="blog-details-section"> + + <h4><?php _e( 'Blog Details', 'buddypress' ) ?></h4> + + <p><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes, I\'d like to create a new blog', 'buddypress' ) ?></p> + + <div id="blog-details"> + + <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label> + <?php do_action( 'bp_signup_blog_url_errors' ) ?> + + <?php if ( 'yes' == VHOST ) : ?> + http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" /> .<?php echo str_replace( 'http://', '', site_url() ) ?> + <?php else : ?> + <?php echo site_url() ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" /> + <?php endif; ?> + + <label for="signup_blog_title"><?php _e( 'Blog Title', 'buddypress' ) ?> <?php _e( '(required)', 'buddypress' ) ?></label> + <?php do_action( 'bp_signup_blog_title_errors' ) ?> + <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value() ?>" /> + + <span class="label"><?php _e( 'I would like my blog to appear in search engines, and in public listings around this site', 'buddypress' ) ?>:</span> + <?php do_action( 'bp_signup_blog_privacy_errors' ) ?> + + <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public" value="public"<?php if ( 'public' == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes' ) ?></label> + <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_private" value="private"<?php if ( 'private' == bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'No' ) ?></label> + + </div> + + </div><!-- #blog-details-section --> + + <?php do_action( 'bp_after_blog_details_fields' ) ?> + + <?php endif; ?> + + <?php do_action( 'bp_before_registration_submit_buttons' ) ?> + + <div class="submit"> + <input type="submit"name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ) ?> →" /> + </div> + + <?php do_action( 'bp_after_registration_submit_buttons' ) ?> + + <?php wp_nonce_field( 'bp_new_signup' ) ?> + + <?php endif; // request-details signup step ?> + + <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?> + + <h2><?php _e( 'Sign Up Complete!', 'buddypress' ) ?></h2> + + <?php do_action( 'template_notices' ) ?> + + <?php if ( bp_registration_needs_activation() ) : ?> + <p><?php _e( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' ) ?></p> + <?php else : ?> + <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ) ?></p> + <?php endif; ?> + + <?php if ( bp_is_active( 'xprofile' ) && !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?> + + <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?> + + <h4><?php _e( 'Your Current Avatar', 'buddypress' ) ?></h4> + <p><?php _e( "We've fetched an avatar for your new account. If you'd like to change this, why not upload a new one?", 'buddypress' ) ?></p> + + <div id="signup-avatar"> + <?php bp_signup_avatar() ?> + </div> + + <p> + <input type="file" name="file" id="file" /> + <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ) ?>" /> + <input type="hidden" name="action" id="action" value="bp_avatar_upload" /> + <input type="hidden" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" /> + <input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" /> + </p> + + <?php wp_nonce_field( 'bp_avatar_upload' ) ?> + + <?php endif; ?> + + <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?> + + <h3><?php _e( 'Crop Your New Avatar', 'buddypress' ) ?></h3> + + <img src="<?php bp_avatar_to_crop() ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ) ?>" /> + + <div id="avatar-crop-pane"> + <img src="<?php bp_avatar_to_crop() ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ) ?>" /> + </div> + + <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ) ?>" /> + + <input type="hidden" name="signup_email" id="signup_email" value="<?php bp_signup_email_value() ?>" /> + <input type="hidden" name="signup_username" id="signup_username" value="<?php bp_signup_username_value() ?>" /> + <input type="hidden" name="signup_avatar_dir" id="signup_avatar_dir" value="<?php bp_signup_avatar_dir_value() ?>" /> + + <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src() ?>" /> + <input type="hidden" id="x" name="x" /> + <input type="hidden" id="y" name="y" /> + <input type="hidden" id="w" name="w" /> + <input type="hidden" id="h" name="h" /> + + <?php wp_nonce_field( 'bp_avatar_cropstore' ) ?> + + <?php endif; ?> + + <?php endif; ?> + + <?php endif; // completed-confirmation signup step ?> + + <?php do_action( 'bp_custom_signup_steps' ) ?> + + </form> + + </div> + + <?php do_action( 'bp_after_register_page' ) ?> + + </div><!-- #content --> + </div><!-- #container --> + + <?php locate_template( array( 'sidebar.php' ), true ) ?> + + <?php do_action( 'bp_after_directory_activity_content' ) ?> + + <script type="text/javascript"> + jQuery(document).ready( function() { + if ( jQuery('div#blog-details').length ) + jQuery('div#blog-details').toggle(); + + jQuery( 'input#signup_with_blog' ).click( function() { + jQuery('div#blog-details').fadeOut().toggle(); + }); + }); + </script> + +<?php get_footer() ?> \ No newline at end of file -- GitLab