Skip to:
Content

BuddyPress.org

Ticket #3741: 3741.patch

File 3741.patch, 281.8 KB (added by johnjamesjacoby, 14 years ago)

First Pass

  • bp-core/bp-core-actions.php

     
    3535add_action( 'init',                    'bp_init',                   10    );
    3636add_action( 'wp',                      'bp_ready',                  10    );
    3737add_action( 'setup_theme',             'bp_setup_theme',            10    );
    38 add_action( 'after_theme_setup',       'bp_after_theme_setup',      10    );
     38add_action( 'after_setup_theme',       'bp_after_theme_setup',      10    );
    3939add_action( 'wp_enqueue_scripts',      'bp_enqueue_scripts',        10    );
    4040add_action( 'admin_bar_menu',          'bp_setup_admin_bar',        20    ); // After WP core
    4141add_action( 'template_redirect',       'bp_template_redirect',      10    );
     
    4848 *
    4949 * Attach various loader actions to the bp_loaded action.
    5050 * The load order helps to execute code at the correct time.
    51  *                                                 v---Load order
     51 *                                                     v---Load order
    5252 */
    53 add_action( 'bp_loaded', 'bp_setup_components',    2  );
    54 add_action( 'bp_loaded', 'bp_include',             4  );
    55 add_action( 'bp_loaded', 'bp_setup_widgets',       6  );
    56 add_action( 'bp_loaded', 'bp_core_load_admin_bar', 10 );
     53add_action( 'bp_loaded', 'bp_setup_components',        2  );
     54add_action( 'bp_loaded', 'bp_include',                 4  );
     55add_action( 'bp_loaded', 'bp_setup_widgets',           6  );
     56add_action( 'bp_loaded', 'bp_core_load_admin_bar',     10 );
     57add_action( 'bp_loaded', 'bp_register_theme_packages', 16 );
    5758
    5859/**
    5960 * bp_init - Attached to 'init' above
     
    7677 * Note that we currently use template_redirect versus template include because
    7778 * BuddyPress is a bully and overrides the existing themes output in many
    7879 * places. This won't always be this way, we promise.
    79  *                                                           v---Load order
     80 *                                                v---Load order
    8081 */
    81 add_action( 'bp_template_redirect', 'bp_redirect_canonical', 2 );
    82 add_action( 'bp_template_redirect', 'bp_actions',            4 );
    83 add_action( 'bp_template_redirect', 'bp_screens',            6 );
     82add_action( 'bp_template_redirect', 'bp_actions', 4 );
     83add_action( 'bp_template_redirect', 'bp_screens', 6 );
    8484
     85/**
     86 * Add the BuddyPress functions file
     87 */
     88add_action( 'bp_after_theme_setup', 'bp_load_theme_functions', 10 );
     89
    8590// Load the admin
    8691if ( is_admin() ) {
    8792        add_action( 'bp_loaded', 'bp_admin' );
    8893}
    89 
    90 /**
    91  * Plugin Dependency
    92  *
    93  * The purpose of the following actions is to mimic the behavior of something
    94  * called 'plugin dependency' which enables a plugin to have plugins of their
    95  * own in a safe and reliable way.
    96  *
    97  * We do this in BuddyPress by mirroring existing WordPress actions in many places
    98  * allowing dependant plugins to hook into the BuddyPress specific ones, thus
    99  * guaranteeing proper code execution only whenBuddyPresss is active.
    100  *
    101  * The following functions are wrappers for their actions, allowing them to be
    102  * manually called and/or piggy-backed on top of other actions if needed.
    103  */
    104 
    105 /** Sub-actions ***************************************************************/
    106 
    107 /**
    108  * Include files on this action
    109  */
    110 function bp_include() {
    111         do_action( 'bp_include' );
    112 }
    113 
    114 /**
    115  * Include files on this action
    116  */
    117 function bp_setup_components() {
    118         do_action( 'bp_setup_components' );
    119 }
    120 
    121 /**
    122  * Setup global variables and objects
    123  */
    124 function bp_setup_globals() {
    125         do_action( 'bp_setup_globals' );
    126 }
    127 
    128 /**
    129  * Set navigation elements
    130  */
    131 function bp_setup_nav() {
    132         do_action( 'bp_setup_nav' );
    133 }
    134 
    135 /**
    136  * Set up BuddyPress implementation of the WP Toolbar
    137  */
    138 function bp_setup_admin_bar() {
    139         if ( bp_use_wp_admin_bar() )
    140                 do_action( 'bp_setup_admin_bar' );
    141 }
    142 
    143 /**
    144  * Set the page title
    145  */
    146 function bp_setup_title() {
    147         do_action( 'bp_setup_title' );
    148 }
    149 
    150 /**
    151  * Register widgets
    152  */
    153 function bp_setup_widgets() {
    154         do_action( 'bp_register_widgets' );
    155 }
    156 
    157 /**
    158  * Initlialize code
    159  */
    160 function bp_init() {
    161         do_action( 'bp_init' );
    162 }
    163 
    164 /**
    165  * Attached to plugins_loaded
    166  */
    167 function bp_loaded() {
    168         do_action( 'bp_loaded' );
    169 }
    170 
    171 /**
    172  * Attached to wp
    173  */
    174 function bp_ready() {
    175         do_action( 'bp_ready' );
    176 }
    177 
    178 /**
    179  * Attach potential template actions
    180  */
    181 function bp_actions() {
    182         do_action( 'bp_actions' );
    183 }
    184 
    185 /**
    186  * Attach potential template screens
    187  */
    188 function bp_screens() {
    189         do_action( 'bp_screens' );
    190 }
    191 
    192 /**
    193  * Initialize widgets
    194  */
    195 function bp_widgets_init() {
    196         do_action ( 'bp_widgets_init' );
    197 }
    198 
    199 /** Theme *********************************************************************/
    200 
    201 /**
    202  * Enqueue BuddyPress specific CSS and JS
    203  *
    204  * @since BuddyPress (1.6)
    205  *
    206  * @uses do_action() Calls 'bp_enqueue_scripts'
    207  */
    208 function bp_enqueue_scripts() {
    209         do_action ( 'bp_enqueue_scripts' );
    210 }
    211 
    212 /**
    213  * Piggy back action for BuddyPress sepecific theme actions before the theme has
    214  * been setup and the theme's functions.php has loaded.
    215  *
    216  * @since BuddyPress (1.6)
    217  *
    218  * @uses do_action() Calls 'bp_setup_theme'
    219  */
    220 function bp_setup_theme() {
    221         do_action ( 'bp_setup_theme' );
    222 }
    223 
    224 /**
    225  * Piggy back action for BuddyPress sepecific theme actions once the theme has
    226  * been setup and the theme's functions.php has loaded.
    227  *
    228  * @since BuddyPress (1.6)
    229  *
    230  * @uses do_action() Calls 'bp_after_theme_setup'
    231  */
    232 function bp_after_theme_setup() {
    233         do_action ( 'bp_after_theme_setup' );
    234 }
    235 
    236 /** Theme Compatibility Filter ************************************************/
    237 
    238 /**
    239  * The main filter used for theme compatibility and displaying custom BuddyPress
    240  * theme files.
    241  *
    242  * @since BuddyPress (1.6)
    243  *
    244  * @uses apply_filters()
    245  *
    246  * @param string $template
    247  * @return string Template file to use
    248  */
    249 function bp_template_include( $template = '' ) {
    250         return apply_filters( 'bp_template_include', $template );
    251 }
    252 
    253 /** Theme Permissions *********************************************************/
    254 
    255 /**
    256  * The main action used for redirecting BuddyPress theme actions that are not
    257  * permitted by the current_user
    258  *
    259  * @since BuddyPress (1.6)
    260  *
    261  * @uses do_action()
    262  */
    263 function bp_template_redirect() {
    264         do_action( 'bp_template_redirect' );
    265 }
    266 
    267 ?>
  • bp-core/bp-core-catchuri.php

     
    369369                $post                        = $wp_query->queried_object;
    370370        }
    371371
    372         // Define local variables
    373         $located_template   = false;
    374         $filtered_templates = array();
    375 
    376372        // Fetch each template and add the php suffix
    377         foreach ( (array) $templates as $template )
     373        $filtered_templates = array();
     374        foreach ( (array) $templates as $template ) {
    378375                $filtered_templates[] = $template . '.php';
     376        }
    379377
    380378        // Filter the template locations so that plugins can alter where they are located
    381379        $located_template = apply_filters( 'bp_located_template', locate_template( (array) $filtered_templates, false ), $filtered_templates );
     
    391389                load_template( apply_filters( 'bp_load_template', $located_template ) );
    392390
    393391                do_action( 'bp_core_post_load_template', $located_template );
    394         }
    395392
    396         // Kill any other output after this.
    397         die;
    398  No newline at end of file
     393                // Kill any other output after this.
     394                exit();
     395
     396        // No template found, so setup theme compatability
     397        } else {
     398                do_action( 'bp_setup_theme_compat' );
     399        }
     400 No newline at end of file
    399401}
    400402
  • bp-core/bp-core-dependency.php

     /**
     
     1<?php
     2
     3/**
     4 * Plugin Dependency
     5 *
     6 * The purpose of the following hooks is to mimic the behavior of something
     7 * called 'plugin dependency' which enables a plugin to have plugins of their
     8 * own in a safe and reliable way.
     9 *
     10 * We do this in BuddyPress by mirroring existing WordPress hookss in many places
     11 * allowing dependant plugins to hook into the BuddyPress specific ones, thus
     12 * guaranteeing proper code execution only when BuddyPress is active.
     13 *
     14 * The following functions are wrappers for hookss, allowing them to be
     15 * manually called and/or piggy-backed on top of other hooks if needed.
     16 *
     17 * @todo use anonymous functions when PHP minimun requirement allows (5.3)
     18 */
     19
     20/**
     21 * Include files on this action
     22 */
     23function bp_include() {
     24        do_action( 'bp_include' );
     25}
     26
     27/**
     28 * Include files on this action
     29 */
     30function bp_setup_components() {
     31        do_action( 'bp_setup_components' );
     32}
     33
     34/**
     35 * Setup global variables and objects
     36 */
     37function bp_setup_globals() {
     38        do_action( 'bp_setup_globals' );
     39}
     40
     41/**
     42 * Set navigation elements
     43 */
     44function bp_setup_nav() {
     45        do_action( 'bp_setup_nav' );
     46}
     47
     48/**
     49 * Set up BuddyPress implementation of the WP Toolbar
     50 */
     51function bp_setup_admin_bar() {
     52        if ( bp_use_wp_admin_bar() )
     53                do_action( 'bp_setup_admin_bar' );
     54}
     55
     56/**
     57 * Set the page title
     58 */
     59function bp_setup_title() {
     60        do_action( 'bp_setup_title' );
     61}
     62
     63/**
     64 * Register widgets
     65 */
     66function bp_setup_widgets() {
     67        do_action( 'bp_register_widgets' );
     68}
     69
     70/**
     71 * Initlialize code
     72 */
     73function bp_init() {
     74        do_action( 'bp_init' );
     75}
     76
     77/**
     78 * Attached to plugins_loaded
     79 */
     80function bp_loaded() {
     81        do_action( 'bp_loaded' );
     82}
     83
     84/**
     85 * Attached to wp
     86 */
     87function bp_ready() {
     88        do_action( 'bp_ready' );
     89}
     90
     91/**
     92 * Attach potential template actions
     93 */
     94function bp_actions() {
     95        do_action( 'bp_actions' );
     96}
     97
     98/**
     99 * Attach potential template screens
     100 */
     101function bp_screens() {
     102        do_action( 'bp_screens' );
     103}
     104
     105/**
     106 * Initialize widgets
     107 */
     108function bp_widgets_init() {
     109        do_action ( 'bp_widgets_init' );
     110}
     111
     112/** Theme Permissions *********************************************************/
     113
     114/**
     115 * The main action used for redirecting BuddyPress theme actions that are not
     116 * permitted by the current_user
     117 *
     118 * @since BuddyPress (1.6)
     119 *
     120 * @uses do_action()
     121 */
     122function bp_template_redirect() {
     123        do_action( 'bp_template_redirect' );
     124}
     125
     126/** Theme Helpers *************************************************************/
     127
     128/**
     129 * The main action used registering theme packages
     130 *
     131 * @since BuddyPress (1.7)
     132 * @uses do_action()
     133 */
     134function bp_register_theme_packages() {
     135        do_action( 'bp_register_theme_packages' );
     136}
     137
     138/**
     139 * Enqueue BuddyPress specific CSS and JS
     140 *
     141 * @since BuddyPress (1.6)
     142 *
     143 * @uses do_action() Calls 'bp_enqueue_scripts'
     144 */
     145function bp_enqueue_scripts() {
     146        do_action ( 'bp_enqueue_scripts' );
     147}
     148
     149/**
     150 * Piggy back action for BuddyPress sepecific theme actions before the theme has
     151 * been setup and the theme's functions.php has loaded.
     152 *
     153 * @since BuddyPress (1.6)
     154 *
     155 * @uses do_action() Calls 'bp_setup_theme'
     156 */
     157function bp_setup_theme() {
     158        do_action ( 'bp_setup_theme' );
     159}
     160
     161/**
     162 * Piggy back action for BuddyPress sepecific theme actions once the theme has
     163 * been setup and the theme's functions.php has loaded.
     164 *
     165 * @since BuddyPress (1.6)
     166 *
     167 * @uses do_action() Calls 'bp_after_theme_setup'
     168 */
     169function bp_after_theme_setup() {
     170        do_action ( 'bp_after_theme_setup' );
     171}
     172
     173/** Theme Compatibility Filter ************************************************/
     174
     175/**
     176 * Piggy back filter for WordPress's 'request' filter
     177 *
     178 * @since BuddyPress (1.7)
     179 * @param array $query_vars
     180 * @return array
     181 */
     182function bp_request( $query_vars = array() ) {
     183        return apply_filters( 'bp_request', $query_vars );
     184}
     185
     186/**
     187 * The main filter used for theme compatibility and displaying custom BuddyPress
     188 * theme files.
     189 *
     190 * @since BuddyPress (1.6)
     191 *
     192 * @uses apply_filters()
     193 *
     194 * @param string $template
     195 * @return string Template file to use
     196 */
     197function bp_template_include( $template = '' ) {
     198        return apply_filters( 'bp_template_include', $template );
     199}
     200
     201/**
     202 * Generate BuddyPress-specific rewrite rules
     203 *
     204 * @since BuddyPress (1.7)
     205 * @param WP_Rewrite $wp_rewrite
     206 * @uses do_action() Calls 'bp_generate_rewrite_rules' with {@link WP_Rewrite}
     207 */
     208function bp_generate_rewrite_rules( $wp_rewrite ) {
     209        do_action_ref_array( 'bp_generate_rewrite_rules', array( &$wp_rewrite ) );
     210}
     211
     212/**
     213 * Filter the allowed themes list for BuddyPress specific themes
     214 *
     215 * @since BuddyPress (1.7)
     216 * @uses apply_filters() Calls 'bp_allowed_themes' with the allowed themes list
     217 */
     218function bp_allowed_themes( $themes ) {
     219        return apply_filters( 'bp_allowed_themes', $themes );
     220}
     221
  • bp-core/bp-core-filters.php

     
    11<?php
    22
     3/**
     4 * BuddyPress Filters
     5 *
     6 * @package BuddyPress
     7 * @subpackage Core
     8 *
     9 * This file contains the filters that are used through-out BuddyPress. They are
     10 * consolidated here to make searching for them easier, and to help developers
     11 * understand at a glance the order in which things occur.
     12 *
     13 * There are a few common places that additional filters can currently be found
     14 *
     15 *  - BuddyPress: In {@link BuddyPress::setup_actions()} in bbpress.php
     16 *  - Component: In {@link BBP_Component::setup_actions()} in
     17 *                bbp-includes/bbp-classes.php
     18 *  - Admin: More in {@link BBP_Admin::setup_actions()} in
     19 *            bbp-admin/bbp-admin.php
     20 *
     21 * @see bbp-core-actions.php
     22 */
     23
    324// Exit if accessed directly
    425if ( !defined( 'ABSPATH' ) ) exit;
    526
     27/**
     28 * Attach BuddyPress to WordPress
     29 *
     30 * BuddyPress uses its own internal actions to help aid in third-party plugin
     31 * development, and to limit the amount of potential future code changes when
     32 * updates to WordPress core occur.
     33 *
     34 * These actions exist to create the concept of 'plugin dependencies'. They
     35 * provide a safe way for plugins to execute code *only* when BuddyPress is
     36 * installed and activated, without needing to do complicated guesswork.
     37 *
     38 * For more information on how this works, see the 'Plugin Dependency' section
     39 * near the bottom of this file.
     40 *
     41 *           v--WordPress Actions       v--BuddyPress Sub-actions
     42 */
     43add_filter( 'request',                 'bp_request',            10    );
     44add_filter( 'template_include',        'bp_template_include',   10    );
     45add_filter( 'comments_open',           'bp_comments_open',      10, 2 );
     46
    647// Add some filters to feedback messages
    748add_filter( 'bp_core_render_message_content', 'wptexturize'       );
    849add_filter( 'bp_core_render_message_content', 'convert_smilies'   );
     
    1152add_filter( 'bp_core_render_message_content', 'shortcode_unautop' );
    1253
    1354/**
     55 * Template Compatibility
     56 *
     57 * If you want to completely bypass this and manage your own custom BuddyPress
     58 * template hierarchy, start here by removing this filter, then look at how
     59 * bp_template_include() works and do something similar. :)
     60 */
     61add_filter( 'bp_template_include', 'bp_template_include_theme_supports', 2, 1 );
     62add_filter( 'bp_template_include', 'bp_template_include_theme_compat',   4, 2 );
     63
     64// Run all template parts through additional template locations
     65add_filter( 'bp_get_template_part', 'bp_add_template_locations' );
     66
     67/**
    1468 * bp_core_exclude_pages()
    1569 *
    1670 * Excludes specific pages from showing on page listings, for example the "Activation" page.
  • bp-core/bp-core-options.php

     
    6161                // Allow comments on blog and forum activity items
    6262                'bp-disable-blogforum-comments'   => true,
    6363
     64                // The ID for the current theme packag.
     65                '_bbp_theme_package_id'           => 'default',
     66
    6467                /** Groups ************************************************************/
    6568
    6669                // @todo Move this into the groups component
     
    521524        return (bool) apply_filters( 'bp_is_akismet_active', (bool) bp_get_option( '_bp_enable_akismet', $default ) );
    522525}
    523526
    524 ?>
     527/**
     528 * Get the current theme package ID
     529 *
     530 * @since BuddyPress (1.7)
     531 *
     532 * @param $default string Optional. Default value 'default'
     533 * @uses get_option() To get the subtheme option
     534 * @return string ID of the subtheme
     535 */
     536function bp_get_theme_package_id( $default = 'default' ) {
     537        return apply_filters( 'bp_get_theme_package_id', get_option( '_bp_theme_package_id', $default ) );
     538}
  • bp-core/bp-core-template-loader.php

     
     1<?php
     2
     3/**
     4 * BuddyPress Template Functions
     5 *
     6 * This file contains functions necessary to mirror the WordPress core template
     7 * loading process. Many of those functions are not filterable, and even then
     8 * would not be robust enough to predict where BuddyPress templates might exist.
     9 *
     10 * @package BuddyPress
     11 * @subpackage TemplateFunctions
     12 */
     13
     14// Exit if accessed directly
     15if ( !defined( 'ABSPATH' ) ) exit;
     16
     17/**
     18 * Adds BuddyPress theme support to any active WordPress theme
     19 *
     20 * @since BuddyPress (1.7)
     21 *
     22 * @param string $slug
     23 * @param string $name Optional. Default null
     24 * @uses bp_locate_template()
     25 * @uses load_template()
     26 * @uses get_template_part()
     27 */
     28function bp_get_template_part( $slug, $name = null ) {
     29
     30        // Execute code for this part
     31        do_action( 'get_template_part_' . $slug, $slug, $name );
     32
     33        // Setup possible parts
     34        $templates = array();
     35        if ( isset( $name ) )
     36                $templates[] = $slug . '-' . $name . '.php';
     37        $templates[] = $slug . '.php';
     38
     39        // Allow template parst to be filtered
     40        $templates = apply_filters( 'bp_get_template_part', $templates, $slug, $name );
     41
     42        // Return the part that is found
     43        return bp_locate_template( $templates, true, false );
     44}
     45
     46/**
     47 * Retrieve the name of the highest priority template file that exists.
     48 *
     49 * Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
     50 * inherit from a parent theme can just overload one file. If the template is
     51 * not found in either of those, it looks in the theme-compat folder last.
     52 *
     53 * @since BuddyPress (1.7)
     54 *
     55 * @param string|array $template_names Template file(s) to search for, in order.
     56 * @param bool $load If true the template file will be loaded if it is found.
     57 * @param bool $require_once Whether to require_once or require. Default true.
     58 *                            Has no effect if $load is false.
     59 * @return string The template filename if one is located.
     60 */
     61function bp_locate_template( $template_names, $load = false, $require_once = true ) {
     62
     63        // No file found yet
     64        $located = false;
     65
     66        // Try to find a template file
     67        foreach ( (array) $template_names as $template_name ) {
     68
     69                // Continue if template is empty
     70                if ( empty( $template_name ) )
     71                        continue;
     72
     73                // Trim off any slashes from the template name
     74                $template_name = ltrim( $template_name, '/' );
     75
     76                // Check child theme first
     77                if ( file_exists( trailingslashit( STYLESHEETPATH ) . $template_name ) ) {
     78                        $located = trailingslashit( STYLESHEETPATH ) . $template_name;
     79                        break;
     80
     81                // Check parent theme next
     82                } elseif ( file_exists( trailingslashit( TEMPLATEPATH ) . $template_name ) ) {
     83                        $located = trailingslashit( TEMPLATEPATH ) . $template_name;
     84                        break;
     85
     86                // Check theme compatibility last
     87                } elseif ( file_exists( trailingslashit( bp_get_theme_compat_dir() ) . $template_name ) ) {
     88                        $located = trailingslashit( bp_get_theme_compat_dir() ) . $template_name;
     89                        break;
     90                }
     91        }
     92
     93        if ( ( true == $load ) && !empty( $located ) )
     94                load_template( $located, $require_once );
     95
     96        return $located;
     97}
     98
     99/**
     100 * Get a template part in an output buffer, and return it
     101 *
     102 * @since BuddyPress (1.7)
     103 *
     104 * @param string $slug
     105 * @param string $name
     106 * @return string
     107 */
     108function bp_buffer_template_part( $slug, $name = null, $echo = true ) {
     109        ob_start();
     110
     111        // Remove 'bbp_replace_the_content' filter to prevent infinite loops
     112        remove_filter( 'the_content', 'bbp_replace_the_content' );
     113
     114        bp_get_template_part( $slug, $name );
     115
     116        // Remove 'bbp_replace_the_content' filter to prevent infinite loops
     117        add_filter( 'the_content', 'bbp_replace_the_content' );
     118
     119        // Get the output buffer contents
     120        $output = ob_get_contents();
     121
     122        // Flush the output buffer
     123        ob_end_clean();
     124
     125        // Echo or return the output buffer contents
     126        if ( true === $echo ) {
     127                echo $output;
     128        } else {
     129                return $output;
     130        }
     131}
     132
     133/**
     134 * Retrieve path to a template
     135 *
     136 * Used to quickly retrieve the path of a template without including the file
     137 * extension. It will also check the parent theme and theme-compat theme with
     138 * the use of {@link bp_locate_template()}. Allows for more generic template
     139 * locations without the use of the other get_*_template() functions.
     140 *
     141 * @since BuddyPress (1.7)
     142 *
     143 * @param string $type Filename without extension.
     144 * @param array $templates An optional list of template candidates
     145 * @uses bp_set_theme_compat_templates()
     146 * @uses bp_locate_template()
     147 * @uses bp_set_theme_compat_template()
     148 * @return string Full path to file.
     149 */
     150function bp_get_query_template( $type, $templates = array() ) {
     151        $type = preg_replace( '|[^a-z0-9-]+|', '', $type );
     152
     153        if ( empty( $templates ) )
     154                $templates = array( "{$type}.php" );
     155
     156        // Filter possible templates, try to match one, and set any BuddyPress theme
     157        // compat properties so they can be cross-checked later.
     158        $templates = apply_filters( "bp_get_{$type}_template", $templates );
     159        $templates = bp_set_theme_compat_templates( $templates );
     160        $template  = bp_locate_template( $templates );
     161        $template  = bp_set_theme_compat_template( $template );
     162
     163        return apply_filters( "bp_{$type}_template", $template );
     164}
     165
     166/**
     167 * Get the possible subdirectories to check for templates in
     168 *
     169 * @since BuddyPress (1.7)
     170 * @param array $templates Templates we are looking for
     171 * @return array Possible subfolders to look in
     172 */
     173function bp_get_template_locations( $templates = array() ) {
     174        $locations = array(
     175                'buddypress',
     176                'community',
     177                ''
     178        );
     179        return apply_filters( 'bp_get_template_locations', $locations, $templates );
     180}
     181
     182/**
     183 * Add template locations to template files being searched for
     184 *
     185 * @since BuddyPress (1.7)
     186 *
     187 * @param array $templates
     188 * @return array()
     189 */
     190function bp_add_template_locations( $templates = array() ) {
     191        $retval = array();
     192
     193        // Get alternate locations
     194        $locations = bp_get_template_locations( $templates );
     195
     196        // Loop through locations and templates and combine
     197        foreach ( $locations as $location )
     198                foreach ( $templates as $template )
     199                        $retval[] = trailingslashit( $location ) . $template;
     200
     201        return apply_filters( 'bp_add_template_locations', $retval, $templates );
     202}
     203
     204/**
     205 * Add checks for BuddyPress conditions to parse_query action
     206 *
     207 * @since BuddyPress (1.7)
     208 *
     209 * @param WP_Query $posts_query
     210 */
     211function bp_parse_query( $posts_query ) {
     212
     213        // Bail if $posts_query is not the main loop
     214        if ( ! $posts_query->is_main_query() )
     215                return;
     216
     217        // Bail if filters are suppressed on this query
     218        if ( true == $posts_query->get( 'suppress_filters' ) )
     219                return;
     220
     221        // Bail if in admin
     222        if ( is_admin() )
     223                return;
     224
     225        // Allow BuddyPress components to parse the main query
     226        do_action_ref_array( 'bp_parse_query', array( &$posts_query ) );
     227}
     228
     229/**
     230 * Possibly intercept the template being loaded
     231 *
     232 * Listens to the 'template_include' filter and waits for any BuddyPress specific
     233 * template condition to be met. If one is met and the template file exists,
     234 * it will be used; otherwise
     235 *
     236 * Note that the _edit() checks are ahead of their counterparts, to prevent them
     237 * from being stomped on accident.
     238 *
     239 * @since BuddyPress (1.7)
     240 *
     241 * @param string $template
     242 *
     243 * @return string The path to the template file that is being used
     244 */
     245function bp_template_include_theme_supports( $template = '' ) {
     246
     247        // Look for root BuddyPress template files in parent/child themes
     248        $new_template = apply_filters( 'bp_get_root_template', false, $template );
     249
     250        // BuddyPress template file exists
     251        if ( !empty( $new_template ) ) {
     252
     253                // Override the WordPress template with a BuddyPress one
     254                $template = $new_template;
     255
     256                // @see: bp_template_include_theme_compat()
     257                buddypress()->theme_compat->found_template = true;
     258        }
     259
     260        return apply_filters( 'bp_template_include_theme_supports', $template );
     261}
     262
     263/**
     264 * Attempt to load a custom BuddyPress functions file, similar to each themes
     265 * functions.php file.
     266 *
     267 * @since BuddyPress (1.7)
     268 *
     269 * @global string $pagenow
     270 * @uses bp_locate_template()
     271 */
     272function bp_load_theme_functions() {
     273        global $pagenow;
     274
     275        if ( ! defined( 'WP_INSTALLING' ) || ( !empty( $pagenow ) && ( 'wp-activate.php' !== $pagenow ) ) ) {
     276                bp_locate_template( 'buddypress-functions.php', true );
     277        }
     278}
     279
     280/**
     281 * Get the templates to use as the endpoint for BuddyPress template parts
     282 *
     283 * @since BuddyPress (1.7)
     284 *
     285 * @uses apply_filters()
     286 * @return array Of possible root level wrapper template files
     287 */
     288function bp_get_theme_compat_templates() {
     289        $templates = array(
     290                'plugin-buddypress.php',
     291                'buddypress.php',
     292                'community.php',
     293                'generic.php',
     294                'page.php',
     295                'single.php',
     296                'index.php'
     297        );
     298        return bp_get_query_template( 'buddypress', $templates );
     299}
  • bp-core/bp-core-template.php

     
    10551055        return false;
    10561056}
    10571057
     1058/**
     1059 * Is this a BuddyPress component?
     1060 *
     1061 * You can tell if a page is displaying BP content by whether the
     1062 * current_component has been defined
     1063 *
     1064 * @since BuddyPress (1.7)
     1065 *
     1066 * @package BuddyPress
     1067 * @return bool True if it's a BuddyPress page, false otherwise
     1068 */
     1069function is_buddypress() {
     1070
     1071        $retval = false;
     1072
     1073        // Generally, we can just check to see that there's no current component.
     1074        // The one exception is single user home tabs, where $bp->current_component
     1075        // is unset. Thus the addition of the bp_is_user() check.
     1076        if ( bp_current_component() || bp_is_user() )
     1077                $retval = true;
     1078
     1079        return apply_filters( 'is_buddypress', $retval );
     1080}
     1081
     1082 No newline at end of file
    10581083/** Components ****************************************************************/
    10591084
    10601085function bp_is_active( $component ) {
  • bp-core/bp-core-theme-compatability.php

     
     1<?php
     2
     3/**
     4 * BuddyPress Core Theme Compatibility
     5 *
     6 * @package BuddyPress
     7 * @subpackage ThemeCompatibility
     8 */
     9
     10// Exit if accessed directly
     11if ( !defined( 'ABSPATH' ) ) exit;
     12
     13/** Theme Compat **************************************************************/
     14
     15/**
     16 * What follows is an attempt at intercepting the natural page load process
     17 * to replace the_content() with the appropriate BuddyPress content.
     18 *
     19 * To do this, BuddyPress does several direct manipulations of global variables
     20 * and forces them to do what they are not supposed to be doing.
     21 *
     22 * Don't try anything you're about to witness here, at home. Ever.
     23 */
     24
     25/** Base Class ****************************************************************/
     26
     27/**
     28 * Theme Compatibility base class
     29 *
     30 * This is only intended to be extended, and is included here as a basic guide
     31 * for future Theme Packs to use. @link BBP_Twenty_Ten is a good example of
     32 * extending this class, as is @link bp_setup_theme_compat()
     33 *
     34 * @since BuddyPress (1.7)
     35 */
     36class BP_Theme_Compat {
     37
     38        /**
     39         * Should be like:
     40         *
     41         * array(
     42         *     'id'      => ID of the theme (should be unique)
     43         *     'name'    => Name of the theme (should match style.css)
     44         *     'version' => Theme version for cache busting scripts and styling
     45         *     'dir'     => Path to theme
     46         *     'url'     => URL to theme
     47         * );
     48         * @var array
     49         */
     50        private $_data = array();
     51
     52        /**
     53         * Pass the $properties to the object on creation.
     54         *
     55         * @since BuddyPress (1.7)
     56         * @param array $properties
     57         */
     58    public function __construct( Array $properties = array() ) {
     59                $this->_data = $properties;
     60        }
     61
     62        /**
     63         * Set a theme's property.
     64         *
     65         * @since BuddyPress (1.7)
     66         * @param string $property
     67         * @param mixed $value
     68         * @return mixed
     69         */
     70        public function __set( $property, $value ) {
     71                return $this->_data[$property] = $value;
     72        }
     73
     74        /**
     75         * Get a theme's property.
     76         *
     77         * @since BuddyPress (1.7)
     78         * @param string $property
     79         * @param mixed $value
     80         * @return mixed
     81         */
     82        public function __get( $property ) {
     83                return array_key_exists( $property, $this->_data ) ? $this->_data[$property] : '';
     84        }
     85}
     86
     87/** Functions *****************************************************************/
     88
     89/**
     90 * Setup the default theme compat theme
     91 *
     92 * @since BuddyPress (1.7)
     93 * @param BBP_Theme_Compat $theme
     94 */
     95function bp_setup_theme_compat( $theme = '' ) {
     96        $bp = buddypress();
     97
     98        // Make sure theme package is available, set to default if not
     99        if ( ! isset( $bp->theme_compat->packages[$theme] ) || ! is_a( $bp->theme_compat->packages[$theme], 'BP_Theme_Compat' ) ) {
     100                $theme = 'default';
     101        }
     102
     103        // Set the active theme compat theme
     104        $bp->theme_compat->theme = $bp->theme_compat->packages[$theme];
     105}
     106
     107/**
     108 * Gets the name of the BuddyPress compatable theme used, in the event the
     109 * currently active WordPress theme does not explicitly support BuddyPress.
     110 * This can be filtered or set manually. Tricky theme authors can override the
     111 * default and include their own BuddyPress compatability layers for their themes.
     112 *
     113 * @since BuddyPress (1.7)
     114 * @uses apply_filters()
     115 * @return string
     116 */
     117function bp_get_theme_compat_id() {
     118        return apply_filters( 'bp_get_theme_compat_id', buddypress()->theme_compat->theme->id );
     119}
     120
     121/**
     122 * Gets the name of the BuddyPress compatable theme used, in the event the
     123 * currently active WordPress theme does not explicitly support BuddyPress.
     124 * This can be filtered or set manually. Tricky theme authors can override the
     125 * default and include their own BuddyPress compatability layers for their themes.
     126 *
     127 * @since BuddyPress (1.7)
     128 * @uses apply_filters()
     129 * @return string
     130 */
     131function bp_get_theme_compat_name() {
     132        return apply_filters( 'bp_get_theme_compat_name', buddypress()->theme_compat->theme->name );
     133}
     134
     135/**
     136 * Gets the version of the BuddyPress compatable theme used, in the event the
     137 * currently active WordPress theme does not explicitly support BuddyPress.
     138 * This can be filtered or set manually. Tricky theme authors can override the
     139 * default and include their own BuddyPress compatability layers for their themes.
     140 *
     141 * @since BuddyPress (1.7)
     142 * @uses apply_filters()
     143 * @return string
     144 */
     145function bp_get_theme_compat_version() {
     146        return apply_filters( 'bp_get_theme_compat_version', buddypress()->theme_compat->theme->version );
     147}
     148
     149/**
     150 * Gets the BuddyPress compatable theme used in the event the currently active
     151 * WordPress theme does not explicitly support BuddyPress. This can be filtered,
     152 * or set manually. Tricky theme authors can override the default and include
     153 * their own BuddyPress compatability layers for their themes.
     154 *
     155 * @since BuddyPress (1.7)
     156 * @uses apply_filters()
     157 * @return string
     158 */
     159function bp_get_theme_compat_dir() {
     160        return apply_filters( 'bp_get_theme_compat_dir', buddypress()->theme_compat->theme->dir );
     161}
     162
     163/**
     164 * Gets the BuddyPress compatable theme used in the event the currently active
     165 * WordPress theme does not explicitly support BuddyPress. This can be filtered,
     166 * or set manually. Tricky theme authors can override the default and include
     167 * their own BuddyPress compatability layers for their themes.
     168 *
     169 * @since BuddyPress (1.7)
     170 * @uses apply_filters()
     171 * @return string
     172 */
     173function bp_get_theme_compat_url() {
     174        return apply_filters( 'bp_get_theme_compat_url', buddypress()->theme_compat->theme->url );
     175}
     176
     177/**
     178 * Gets true/false if page is currently inside theme compatibility
     179 *
     180 * @since BuddyPress (1.7)
     181 * @return bool
     182 */
     183function bp_is_theme_compat_active() {
     184        $bp = buddypress();
     185
     186        if ( empty( $bp->theme_compat->active ) )
     187                return false;
     188
     189        return $bp->theme_compat->active;
     190}
     191
     192/**
     193 * Sets true/false if page is currently inside theme compatibility
     194 *
     195 * @since BuddyPress (1.7)
     196 * @param bool $set
     197 * @return bool
     198 */
     199function bp_set_theme_compat_active( $set = true ) {
     200        buddypress()->theme_compat->active = $set;
     201
     202        return (bool) buddypress()->theme_compat->active;
     203}
     204
     205/**
     206 * Set the theme compat templates global
     207 *
     208 * Stash possible template files for the current query. Useful if plugins want
     209 * to override them, or see what files are being scanned for inclusion.
     210 *
     211 * @since BuddyPress (1.7)
     212 */
     213function bp_set_theme_compat_templates( $templates = array() ) {
     214        buddypress()->theme_compat->templates = $templates;
     215
     216        return buddypress()->theme_compat->templates;
     217}
     218
     219/**
     220 * Set the theme compat template global
     221 *
     222 * Stash the template file for the current query. Useful if plugins want
     223 * to override it, or see what file is being included.
     224 *
     225 * @since BuddyPress (1.7)
     226 */
     227function bp_set_theme_compat_template( $template = '' ) {
     228        buddypress()->theme_compat->template = $template;
     229
     230        return buddypress()->theme_compat->template;
     231}
     232
     233/**
     234 * Set the theme compat original_template global
     235 *
     236 * Stash the original template file for the current query. Useful for checking
     237 * if BuddyPress was able to find a more appropriate template.
     238 *
     239 * @since BuddyPress (1.7)
     240 */
     241function bp_set_theme_compat_original_template( $template = '' ) {
     242        buddypress()->theme_compat->original_template = $template;
     243
     244        return buddypress()->theme_compat->original_template;
     245}
     246
     247/**
     248 * Set the theme compat original_template global
     249 *
     250 * Stash the original template file for the current query. Useful for checking
     251 * if BuddyPress was able to find a more appropriate template.
     252 *
     253 * @since BuddyPress (1.7)
     254 */
     255function bp_is_theme_compat_original_template( $template = '' ) {
     256        $bp = buddypress();
     257
     258        if ( empty( $bp->theme_compat->original_template ) )
     259                return false;
     260
     261        return (bool) ( $bp->theme_compat->original_template == $template );
     262}
     263
     264/**
     265 * Register a new BuddyPress theme package to the active theme packages array
     266 *
     267 * @since BuddyPress (1.7)
     268 * @param array $theme
     269 */
     270function bp_register_theme_package( $theme = array(), $override = true ) {
     271
     272        // Create new BBP_Theme_Compat object from the $theme array
     273        if ( is_array( $theme ) )
     274                $theme = new BP_Theme_Compat( $theme );
     275
     276        // Bail if $theme isn't a proper object
     277        if ( ! is_a( $theme, 'BP_Theme_Compat' ) )
     278                return;
     279
     280        // Load up BuddyPress
     281        $bp = buddypress();
     282
     283        // Only override if the flag is set and not previously registered
     284        if ( empty( $bp->theme_compat->packages[$theme->id] ) || ( true === $override ) ) {
     285                $bp->theme_compat->packages[$theme->id] = $theme;
     286        }
     287}
     288/**
     289 * This fun little function fills up some WordPress globals with dummy data to
     290 * stop your average page template from complaining about it missing.
     291 *
     292 * @since BuddyPress (1.7)
     293 * @global WP_Query $wp_query
     294 * @global object $post
     295 * @param array $args
     296 */
     297function bp_theme_compat_reset_post( $args = array() ) {
     298        global $wp_query, $post;
     299
     300        // Default arguments
     301        $defaults = array(
     302                'ID'                    => -9999,
     303                'post_status'           => 'publish',
     304                'post_author'           => 0,
     305                'post_parent'           => 0,
     306                'post_type'             => 'page',
     307                'post_date'             => 0,
     308                'post_date_gmt'         => 0,
     309                'post_modified'         => 0,
     310                'post_modified_gmt'     => 0,
     311                'post_content'          => '',
     312                'post_title'            => '',
     313                'post_category'         => 0,
     314                'post_excerpt'          => '',
     315                'post_content_filtered' => '',
     316                'post_mime_type'        => '',
     317                'post_password'         => '',
     318                'post_name'             => '',
     319                'guid'                  => '',
     320                'menu_order'            => 0,
     321                'pinged'                => '',
     322                'to_ping'               => '',
     323                'ping_status'           => '',
     324                'comment_status'        => 'closed',
     325                'comment_count'         => 0,
     326
     327                'is_404'          => false,
     328                'is_page'         => false,
     329                'is_single'       => false,
     330                'is_archive'      => false,
     331                'is_tax'          => false,
     332        );
     333
     334        // Switch defaults if post is set
     335        if ( isset( $wp_query->post ) ) {                 
     336                $defaults = array(
     337                        'ID'                    => $wp_query->post->ID,
     338                        'post_status'           => $wp_query->post->post_status,
     339                        'post_author'           => $wp_query->post->post_author,
     340                        'post_parent'           => $wp_query->post->post_parent,
     341                        'post_type'             => $wp_query->post->post_type,
     342                        'post_date'             => $wp_query->post->post_date,
     343                        'post_date_gmt'         => $wp_query->post->post_date_gmt,
     344                        'post_modified'         => $wp_query->post->post_modified,
     345                        'post_modified_gmt'     => $wp_query->post->post_modified_gmt,
     346                        'post_content'          => $wp_query->post->post_content,
     347                        'post_title'            => $wp_query->post->post_title,
     348                        'post_category'         => $wp_query->post->post_category,
     349                        'post_excerpt'          => $wp_query->post->post_excerpt,
     350                        'post_content_filtered' => $wp_query->post->post_content_filtered,
     351                        'post_mime_type'        => $wp_query->post->post_mime_type,
     352                        'post_password'         => $wp_query->post->post_password,
     353                        'post_name'             => $wp_query->post->post_name,
     354                        'guid'                  => $wp_query->post->guid,
     355                        'menu_order'            => $wp_query->post->menu_order,
     356                        'pinged'                => $wp_query->post->pinged,
     357                        'to_ping'               => $wp_query->post->to_ping,
     358                        'ping_status'           => $wp_query->post->ping_status,
     359                        'comment_status'        => $wp_query->post->comment_status,
     360                        'comment_count'         => $wp_query->post->comment_count,
     361
     362                        'is_404'          => false,
     363                        'is_page'         => false,
     364                        'is_single'       => false,
     365                        'is_archive'      => false,
     366                        'is_tax'          => false,
     367                );
     368        }
     369        $dummy = wp_parse_args( $args, $defaults ); //, 'theme_compat_reset_post' );
     370
     371        // Clear out the post related globals
     372        unset( $wp_query->posts );
     373        unset( $wp_query->post  );
     374        unset( $post            );
     375
     376        // Setup the dummy post object
     377        $wp_query->post                        = new stdClass;
     378        $wp_query->post->ID                    = $dummy['ID'];
     379        $wp_query->post->post_status           = $dummy['post_status'];
     380        $wp_query->post->post_author           = $dummy['post_author'];
     381        $wp_query->post->post_parent           = $dummy['post_parent'];
     382        $wp_query->post->post_type             = $dummy['post_type'];
     383        $wp_query->post->post_date             = $dummy['post_date'];
     384        $wp_query->post->post_date_gmt         = $dummy['post_date_gmt'];
     385        $wp_query->post->post_modified         = $dummy['post_modified'];
     386        $wp_query->post->post_modified_gmt     = $dummy['post_modified_gmt'];
     387        $wp_query->post->post_content          = $dummy['post_content'];
     388        $wp_query->post->post_title            = $dummy['post_title'];
     389        $wp_query->post->post_category         = $dummy['post_category'];
     390        $wp_query->post->post_excerpt          = $dummy['post_content_filtered'];
     391        $wp_query->post->post_content_filtered = $dummy['post_content_filtered'];
     392        $wp_query->post->post_mime_type        = $dummy['post_mime_type'];
     393        $wp_query->post->post_password         = $dummy['post_password'];
     394        $wp_query->post->post_name             = $dummy['post_name'];
     395        $wp_query->post->guid                  = $dummy['guid'];
     396        $wp_query->post->menu_order            = $dummy['menu_order'];
     397        $wp_query->post->pinged                = $dummy['pinged'];
     398        $wp_query->post->to_ping               = $dummy['to_ping'];
     399        $wp_query->post->ping_status           = $dummy['ping_status'];
     400        $wp_query->post->comment_status        = $dummy['comment_status'];
     401        $wp_query->post->comment_count         = $dummy['comment_count'];
     402
     403        // Set the $post global
     404        $post = $wp_query->post;
     405
     406        // Setup the dummy post loop
     407        $wp_query->posts[0] = $wp_query->post;
     408
     409        // Prevent comments form from appearing
     410        $wp_query->post_count = 1;
     411        $wp_query->is_404     = $dummy['is_404'];
     412        $wp_query->is_page    = $dummy['is_page'];
     413        $wp_query->is_single  = $dummy['is_single'];
     414        $wp_query->is_archive = $dummy['is_archive'];
     415        $wp_query->is_tax     = $dummy['is_tax'];
     416
     417        // If we are resetting a post, we are in theme compat
     418        bp_set_theme_compat_active();
     419}
     420
     421/**
     422 * Reset main query vars and filter 'the_content' to output a BuddyPress
     423 * template part as needed.
     424 *
     425 * @since BuddyPress (1.7)
     426 *
     427 * @param string $template
     428 * @uses bp_is_single_user() To check if page is single user
     429 * @uses bp_get_single_user_template() To get user template
     430 * @uses bp_is_single_user_edit() To check if page is single user edit
     431 * @uses bp_get_single_user_edit_template() To get user edit template
     432 * @uses bp_is_single_view() To check if page is single view
     433 * @uses bp_get_single_view_template() To get view template
     434 * @uses bp_is_forum_edit() To check if page is forum edit
     435 * @uses bp_get_forum_edit_template() To get forum edit template
     436 * @uses bp_is_topic_merge() To check if page is topic merge
     437 * @uses bp_get_topic_merge_template() To get topic merge template
     438 * @uses bp_is_topic_split() To check if page is topic split
     439 * @uses bp_get_topic_split_template() To get topic split template
     440 * @uses bp_is_topic_edit() To check if page is topic edit
     441 * @uses bp_get_topic_edit_template() To get topic edit template
     442 * @uses bp_is_reply_edit() To check if page is reply edit
     443 * @uses bp_get_reply_edit_template() To get reply edit template
     444 * @uses bp_set_theme_compat_template() To set the global theme compat template
     445 */
     446function bp_template_include_theme_compat( $template = '' ) {
     447
     448        // Bail if the template already matches a BuddyPress template
     449        if ( !empty( buddypress()->theme_compat->found_template ) )
     450                return $template;
     451
     452        /**
     453         * Use this action to execute code that will communicate to BuddyPress's
     454         * theme compatibility layer whether or not we're replacing the_content()
     455         * with some other template part.
     456         */
     457        do_action( 'bp_template_include_reset_dummy_post_data' );
     458
     459        /**
     460         * If we are relying on BuddyPress's built in theme compatibility to load
     461         * the proper content, we need to intercept the_content, replace the
     462         * output, and display ours instead.
     463         *
     464         * To do this, we first remove all filters from 'the_content' and hook
     465         * our own function into it, which runs a series of checks to determine
     466         * the context, and then uses the built in shortcodes to output the
     467         * correct results from inside an output buffer.
     468         *
     469         * Uses bp_get_theme_compat_templates() to provide fall-backs that
     470         * should be coded without superfluous mark-up and logic (prev/next
     471         * navigation, comments, date/time, etc...)
     472         */
     473        if ( bp_is_theme_compat_active() ) {
     474
     475                // Remove all filters from the_content
     476                bp_remove_all_filters( 'the_content' );
     477
     478                // Add a filter on the_content late, which we will later remove
     479                add_filter( 'the_content', 'bp_replace_the_content' );
     480
     481                // Find the appropriate template file
     482                $template = bp_get_theme_compat_templates();
     483        }
     484
     485        return apply_filters( 'bp_template_include_theme_compat', $template );
     486}
     487
     488/**
     489 * Replaces the_content() if the post_type being displayed is one that would
     490 * normally be handled by BuddyPress, but proper single page templates do not
     491 * exist in the currently active theme.
     492 *
     493 * @since BuddyPress (1.7)
     494 * @param string $content
     495 * @return type
     496 */
     497function bp_replace_the_content( $content = '' ) {
     498
     499        $new_content = apply_filters( 'bp_replace_the_content', $content );
     500
     501        // Juggle the content around and try to prevent unsightly comments
     502        if ( !empty( $new_content ) && ( $new_content != $content ) ) {
     503
     504                // Set the content to be the new content
     505                $content = apply_filters( 'bp_replace_the_content', $new_content, $content );
     506
     507                // Clean up after ourselves
     508                unset( $new_content );
     509
     510                // Reset the $post global
     511                wp_reset_postdata();
     512        }
     513
     514        // Return possibly hi-jacked content
     515        return $content;
     516}
     517
     518/** Filters *******************************************************************/
     519
     520/**
     521 * Removes all filters from a WordPress filter, and stashes them in the $bp
     522 * global in the event they need to be restored later.
     523 *
     524 * @since BuddyPress (1.7)
     525 * @global WP_filter $wp_filter
     526 * @global array $merged_filters
     527 * @param string $tag
     528 * @param int $priority
     529 * @return bool
     530 */
     531function bp_remove_all_filters( $tag, $priority = false ) {
     532        global $wp_filter, $merged_filters;
     533
     534        $bp = buddypress();
     535
     536        // Filters exist
     537        if ( isset( $wp_filter[$tag] ) ) {
     538
     539                // Filters exist in this priority
     540                if ( !empty( $priority ) && isset( $wp_filter[$tag][$priority] ) ) {
     541
     542                        // Store filters in a backup
     543                        $bp->filters->wp_filter[$tag][$priority] = $wp_filter[$tag][$priority];
     544
     545                        // Unset the filters
     546                        unset( $wp_filter[$tag][$priority] );
     547
     548                // Priority is empty
     549                } else {
     550
     551                        // Store filters in a backup
     552                        $bp->filters->wp_filter[$tag] = $wp_filter[$tag];
     553
     554                        // Unset the filters
     555                        unset( $wp_filter[$tag] );
     556                }
     557        }
     558
     559        // Check merged filters
     560        if ( isset( $merged_filters[$tag] ) ) {
     561
     562                // Store filters in a backup
     563                $bp->filters->merged_filters[$tag] = $merged_filters[$tag];
     564
     565                // Unset the filters
     566                unset( $merged_filters[$tag] );
     567        }
     568
     569        return true;
     570}
     571
     572/**
     573 * Restores filters from the $bp global that were removed using
     574 * bp_remove_all_filters()
     575 *
     576 * @since BuddyPress (1.7)
     577 * @global WP_filter $wp_filter
     578 * @global array $merged_filters
     579 * @param string $tag
     580 * @param int $priority
     581 * @return bool
     582 */
     583function bp_restore_all_filters( $tag, $priority = false ) {
     584        global $wp_filter, $merged_filters;
     585
     586        $bp = buddypress();
     587
     588        // Filters exist
     589        if ( isset( $bp->filters->wp_filter[$tag] ) ) {
     590
     591                // Filters exist in this priority
     592                if ( !empty( $priority ) && isset( $bp->filters->wp_filter[$tag][$priority] ) ) {
     593
     594                        // Store filters in a backup
     595                        $wp_filter[$tag][$priority] = $bp->filters->wp_filter[$tag][$priority];
     596
     597                        // Unset the filters
     598                        unset( $bp->filters->wp_filter[$tag][$priority] );
     599
     600                // Priority is empty
     601                } else {
     602
     603                        // Store filters in a backup
     604                        $wp_filter[$tag] = $bp->filters->wp_filter[$tag];
     605
     606                        // Unset the filters
     607                        unset( $bp->filters->wp_filter[$tag] );
     608                }
     609        }
     610
     611        // Check merged filters
     612        if ( isset( $bp->filters->merged_filters[$tag] ) ) {
     613
     614                // Store filters in a backup
     615                $merged_filters[$tag] = $bp->filters->merged_filters[$tag];
     616
     617                // Unset the filters
     618                unset( $bp->filters->merged_filters[$tag] );
     619        }
     620
     621        return true;
     622}
     623
     624/**
     625 * Force comments_status to 'closed' for BuddyPress post types
     626 *
     627 * @since BuddyPress (1.7)
     628 * @param bool $open True if open, false if closed
     629 * @param int $post_id ID of the post to check
     630 * @return bool True if open, false if closed
     631 */
     632function bp_comments_open( $open, $post_id = 0 ) {
     633
     634        $retval = is_buddypress() ? false : $open;
     635
     636        // Allow override of the override
     637        return apply_filters( 'bp_force_comment_status', $retval, $open, $post_id );
     638}
  • bp-groups/bp-groups-filters.php

     
    1010// Exit if accessed directly
    1111if ( !defined( 'ABSPATH' ) ) exit;
    1212
     13// Filter bbPress template locations
     14
     15add_filter( 'bp_groups_get_directory_template', 'bp_add_template_locations' );
     16add_filter( 'bp_get_single_group_template',    'bp_add_template_locations' );
     17
    1318/* Apply WordPress defined filters */
    1419add_filter( 'bp_get_group_description',         'wptexturize' );
    1520add_filter( 'bp_get_group_description_excerpt', 'wptexturize' );
  • bp-groups/bp-groups-screens.php

     
    2020
    2121                do_action( 'groups_directory_groups_setup' );
    2222
    23                 bp_core_load_template( apply_filters( 'groups_template_directory_groups', 'groups/index' ) );
     23                bp_locate_template( apply_filters( 'groups_template_directory_groups', 'groups/index' ), true );
    2424        }
    2525}
    2626add_action( 'bp_screens', 'groups_directory_groups_setup', 2 );
     
    3838
    3939        do_action( 'groups_screen_my_groups' );
    4040
    41         bp_core_load_template( apply_filters( 'groups_template_my_groups', 'members/single/home' ) );
     41        bp_locate_template( apply_filters( 'groups_template_my_groups', 'members/single/home' ), true );
    4242}
    4343
    4444function groups_screen_group_invites() {
     
    8484
    8585        do_action( 'groups_screen_group_invites', $group_id );
    8686
    87         bp_core_load_template( apply_filters( 'groups_template_group_invites', 'members/single/home' ) );
     87        bp_locate_template( apply_filters( 'groups_template_group_invites', 'members/single/home' ), true );
    8888}
    8989
    9090function groups_screen_group_home() {
     
    100100
    101101                do_action( 'groups_screen_group_home' );
    102102
    103                 bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );
     103                bp_locate_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ), true );
    104104        }
    105105}
    106106
     
    148148                                        groups_join_group( $bp->groups->current_group->id, bp_loggedin_user_id() );
    149149
    150150                                $topic_page = isset( $_GET['topic_page'] ) ? $_GET['topic_page'] : false;
    151                                
     151
    152152                                // Don't allow reply flooding
    153153                                if ( bp_forums_reply_exists( $_POST['reply_text'], $topic_id, bp_loggedin_user_id() ) ) {
    154154                                        bp_core_add_message( __( 'It looks like you\'ve already said that!', 'buddypress' ), 'error' );
    155                                 } else {       
     155                                } else {
    156156                                        if ( !$post_id = groups_new_group_forum_post( $_POST['reply_text'], $topic_id, $topic_page ) )
    157157                                                bp_core_add_message( __( 'There was an error when replying to that topic', 'buddypress'), 'error' );
    158158                                        else
     
    160160                                }
    161161
    162162                                $query_vars = isset( $_SERVER['QUERY_STRING'] ) ? '?' . $_SERVER['QUERY_STRING'] : '';
    163                                
     163
    164164                                $redirect = bp_get_group_permalink( groups_get_current_group() ) . 'forum/topic/' . $topic_slug . '/' . $query_vars;
    165165
    166166                                if ( !empty( $post_id ) ) {
     
    273273                                        bp_core_redirect( bp_get_group_permalink( groups_get_current_group() ) . 'forum/topic/' . $topic_slug . '/' );
    274274                                }
    275275
    276                                 bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/home' ) );
     276                                bp_locate_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/home' ), true );
    277277                        }
    278278
    279279                        // Delete a post
     
    326326                                        bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic_slug . '/' . $query_vars . '#post-' . $post_id );
    327327                                }
    328328
    329                                 bp_core_load_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/home' ) );
     329                                bp_locate_template( apply_filters( 'groups_template_group_forum_topic_edit', 'groups/single/home' ), true );
    330330                        }
    331331
    332332                        // Standard topic display
     
    334334                                if ( !empty( $user_is_banned ) )
    335335                                        bp_core_add_message( __( "You have been banned from this group.", 'buddypress' ) );
    336336
    337                                 bp_core_load_template( apply_filters( 'groups_template_group_forum_topic', 'groups/single/home' ) );
     337                                bp_locate_template( apply_filters( 'groups_template_group_forum_topic', 'groups/single/home' ), true );
    338338                        }
    339339
    340340                // Forum topic does not exist
     
    382382
    383383                        do_action( 'groups_screen_group_forum', $topic_id, $forum_id );
    384384
    385                         bp_core_load_template( apply_filters( 'groups_template_group_forum', 'groups/single/home' ) );
     385                        bp_locate_template( apply_filters( 'groups_template_group_forum', 'groups/single/home' ), true );
    386386                }
    387387        }
    388388}
     
    395395                groups_update_groupmeta( $bp->groups->current_group->id, 'total_member_count', groups_get_total_member_count( $bp->groups->current_group->id ) );
    396396
    397397                do_action( 'groups_screen_group_members', $bp->groups->current_group->id );
    398                 bp_core_load_template( apply_filters( 'groups_template_group_members', 'groups/single/home' ) );
     398                bp_locate_template( apply_filters( 'groups_template_group_members', 'groups/single/home' ) );
    399399        }
    400400}
    401401
     
    422422
    423423                } elseif ( !bp_action_variable( 0 ) ) {
    424424                        // Show send invite page
    425                         bp_core_load_template( apply_filters( 'groups_template_group_invite', 'groups/single/home' ) );
     425                        bp_locate_template( apply_filters( 'groups_template_group_invite', 'groups/single/home' ), true );
    426426
    427427                } else {
    428428                        bp_do_404();
     
    453453
    454454                do_action( 'groups_screen_group_request_membership', $bp->groups->current_group->id );
    455455
    456                 bp_core_load_template( apply_filters( 'groups_template_group_request_membership', 'groups/single/home' ) );
     456                bp_locate_template( apply_filters( 'groups_template_group_request_membership', 'groups/single/home' ), true );
    457457        }
    458458}
    459459
     
    465465
    466466        $bp->is_single_item = true;
    467467
    468         bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );
     468        bp_locate_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ), true );
    469469}
    470470add_action( 'bp_screens', 'groups_screen_group_activity_permalink' );
    471471
     
    505505
    506506                        do_action( 'groups_screen_group_admin_edit_details', $bp->groups->current_group->id );
    507507
    508                         bp_core_load_template( apply_filters( 'groups_template_group_admin', 'groups/single/home' ) );
     508                        bp_locate_template( apply_filters( 'groups_template_group_admin', 'groups/single/home' ), true );
    509509                }
    510510        }
    511511}
     
    548548
    549549                do_action( 'groups_screen_group_admin_settings', $bp->groups->current_group->id );
    550550
    551                 bp_core_load_template( apply_filters( 'groups_template_group_admin_settings', 'groups/single/home' ) );
     551                bp_locate_template( apply_filters( 'groups_template_group_admin_settings', 'groups/single/home' ), true );
    552552        }
    553553}
    554554add_action( 'bp_screens', 'groups_screen_group_admin_settings' );
     
    607607
    608608                do_action( 'groups_screen_group_admin_avatar', $bp->groups->current_group->id );
    609609
    610                 bp_core_load_template( apply_filters( 'groups_template_group_admin_avatar', 'groups/single/home' ) );
     610                bp_locate_template( apply_filters( 'groups_template_group_admin_avatar', 'groups/single/home' ), true );
    611611        }
    612612}
    613613add_action( 'bp_screens', 'groups_screen_group_admin_avatar' );
     
    727727
    728728                do_action( 'groups_screen_group_admin_manage_members', $bp->groups->current_group->id );
    729729
    730                 bp_core_load_template( apply_filters( 'groups_template_group_admin_manage_members', 'groups/single/home' ) );
     730                bp_locate_template( apply_filters( 'groups_template_group_admin_manage_members', 'groups/single/home' ), true );
    731731        }
    732732}
    733733add_action( 'bp_screens', 'groups_screen_group_admin_manage_members' );
     
    776776                }
    777777
    778778                do_action( 'groups_screen_group_admin_requests', $bp->groups->current_group->id );
    779                 bp_core_load_template( apply_filters( 'groups_template_group_admin_requests', 'groups/single/home' ) );
     779                bp_locate_template( apply_filters( 'groups_template_group_admin_requests', 'groups/single/home' ), true );
    780780        }
    781781}
    782782add_action( 'bp_screens', 'groups_screen_group_admin_requests' );
     
    812812
    813813                do_action( 'groups_screen_group_admin_delete_group', $bp->groups->current_group->id );
    814814
    815                 bp_core_load_template( apply_filters( 'groups_template_group_admin_delete_group', 'groups/single/home' ) );
     815                bp_locate_template( apply_filters( 'groups_template_group_admin_delete_group', 'groups/single/home' ), true );
    816816        }
    817817}
    818818add_action( 'bp_screens', 'groups_screen_group_admin_delete_group' );
     
    882882}
    883883add_action( 'bp_notification_settings', 'groups_screen_notification_settings' );
    884884
    885 ?>
     885/** Theme Compatability *******************************************************/
     886
     887/**
     888 * The main theme compat class for BuddyPress Groups
     889 *
     890 * This class sets up the necessary theme compatability actions to safely output
     891 * group template parts to the_title and the_content areas of a theme.
     892 *
     893 * @since BuddyPress (1.7)
     894 */
     895class BP_Groups_Theme_Compat {
     896
     897        /**
     898         * Setup the groups component theme compatibility
     899         *
     900         * @since BuddyPress (1.7)
     901         */
     902        public function __construct() {
     903                add_action( 'bp_screens', array( $this, 'is_group' ) );
     904        }
     905
     906        /**
     907         * Are we looking at something that needs group theme compatability?
     908         *
     909         * @since BuddyPress (1.7)
     910         */
     911        public function is_group() {
     912
     913                // Bail if not looking at a group
     914                if ( ! bp_is_groups_component() )
     915                        return;
     916
     917                // Group Directory
     918                if ( ! bp_current_action() && ! bp_current_item() ) {
     919                        bp_update_is_directory( true, 'groups' );
     920
     921                        do_action( 'groups_directory_groups_setup' );
     922
     923                        add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
     924                        add_filter( 'bp_replace_the_content',                    array( $this, 'directory_content'    ) );
     925
     926                // Creating a group
     927                } elseif ( bp_is_current_action( 'create' ) ) {
     928                        add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'create_dummy_post' ) );
     929                        add_filter( 'bp_replace_the_content',                    array( $this, 'create_content'    ) );
     930
     931                // Group admin
     932                } elseif ( bp_is_single_item() ) {
     933                        add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'single_dummy_post' ) );
     934                        add_filter( 'bp_replace_the_content',                    array( $this, 'single_content'    ) );
     935
     936                }
     937        }
     938
     939        /** Directory *************************************************************/
     940
     941        /**
     942         * Update the global $post with directory data
     943         *
     944         * @since BuddyPress (1.7)
     945         */
     946        public function directory_dummy_post() {
     947
     948                // Title based on ability to create groups
     949                if ( is_user_logged_in() && bp_user_can_create_groups() ) {
     950                        $title = __( 'Groups', 'buddypress' ) . '&nbsp;<a class="button" href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create' ) . '">' . __( 'Create a Group', 'buddypress' ) . '</a>';
     951                } else {
     952                        $title = __( 'Groups', 'buddypress' );
     953                }
     954
     955                bp_theme_compat_reset_post( array(
     956                        'ID'             => 0,
     957                        'post_title'     => $title,
     958                        'post_author'    => 0,
     959                        'post_date'      => 0,
     960                        'post_content'   => '',
     961                        'post_type'      => 'bp_group',
     962                        'post_status'    => 'publish',
     963                        'is_archive'     => true,
     964                        'comment_status' => 'closed'
     965                ) );
     966        }
     967
     968        /**
     969         * Filter the_content with the groups index template part
     970         *
     971         * @since BuddyPress (1.7)
     972         */
     973        public function directory_content() {
     974                bp_buffer_template_part( 'groups/index' );
     975        }
     976
     977        /** Create ****************************************************************/
     978
     979        /**
     980         * Update the global $post with create screen data
     981         *
     982         * @since BuddyPress (1.7)
     983         */
     984        public function create_dummy_post() {
     985
     986                // Title based on ability to create groups
     987                if ( is_user_logged_in() && bp_user_can_create_groups() ) {
     988                        $title = '<a class="button" href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ) . '">' . __( 'Groups', 'buddypress' ) . '</a>&nbsp;' . __( 'Create a Group', 'buddypress' );
     989                } else {
     990                        $title = __( 'Groups', 'buddypress' );
     991                }
     992
     993                bp_theme_compat_reset_post( array(
     994                        'ID'             => 0,
     995                        'post_title'     => $title,
     996                        'post_author'    => 0,
     997                        'post_date'      => 0,
     998                        'post_content'   => '',
     999                        'post_type'      => 'bp_group',
     1000                        'post_status'    => 'publish',
     1001                        'is_archive'     => true,
     1002                        'comment_status' => 'closed'
     1003                ) );
     1004        }
     1005
     1006        /**
     1007         * Filter the_content with the create screen template part
     1008         *
     1009         * @since BuddyPress (1.7)
     1010         */
     1011        public function create_content() {
     1012                bp_buffer_template_part( 'groups/create' );
     1013        }
     1014
     1015        /** Single ****************************************************************/
     1016
     1017        /**
     1018         * Update the global $post with single group data
     1019         *
     1020         * @since BuddyPress (1.7)
     1021         */
     1022        public function single_dummy_post() {
     1023                bp_theme_compat_reset_post( array(
     1024                        'ID'             => 0,
     1025                        'post_title'     => bp_get_current_group_name(),
     1026                        'post_author'    => 0,
     1027                        'post_date'      => 0,
     1028                        'post_content'   => '',
     1029                        'post_type'      => 'bp_group',
     1030                        'post_status'    => 'publish',
     1031                        'is_archive'     => true,
     1032                        'comment_status' => 'closed'
     1033                ) );
     1034        }
     1035
     1036        /**
     1037         * Filter the_content with the single group template part
     1038         *
     1039         * @since BuddyPress (1.7)
     1040         */
     1041        public function single_content() {
     1042                bp_buffer_template_part( 'groups/single/home' );
     1043        }
     1044}
     1045new BP_Groups_Theme_Compat();
  • bp-loader.php

     
    3434 */
    3535class BuddyPress {
    3636
    37         /**
    38          * Note to Plugin and Theme authors:
    39          *
    40          * Do not directly reference the variables below in your code. Their names
    41          * and locations in the BuddyPress class are subject to change at any time.
    42          *
    43          * Most of them have reference functions located in bp-core-functions.php.
    44          * The ones that don't can be accessed via their respective WordPress API's.
    45          *
    46          * Components are encouraged to store their data in the $bp global rather
    47          * than new globals to keep all BuddyPress data in one place.
    48          */
     37        /** Magic *****************************************************************/
    4938
    50         /** Version ***************************************************************/
    51 
    5239        /**
    53          * @var string BuddyPress version
    54          */
    55         public $version = '1.7';
    56 
    57         /**
    58          * @var int Database version of current BuddyPress files
    59          */
    60         public $db_version = 6066;
    61 
    62         /**
    63          * @var int Database version raw from database connection
    64          */
    65         public $db_version_raw = 0;
    66 
    67         /**
    68          * @var string State of BuddyPress installation
    69          */
    70         public $maintenance_mode = '';
    71 
    72         /**
    73          * @var bool Include deprecated BuddyPress files or not
    74          */
    75         public $load_deprecated = true;
    76 
    77         /** Root ******************************************************************/
    78 
    79         /**
    80          * @var int The root blog ID
    81          */
    82         public $root_blog_id = 1;
    83 
    84         /** Paths *****************************************************************/
    85 
    86         /**
    87          * The absolute path and filename of this file.
     40         * BuddyPress uses many variables, most of which can be filtered to customize
     41         * the way that it works. To prevent unauthorized access, these variables
     42         * are stored in a private array that is magically updated using PHP 5.2+
     43         * methods. This is to prevent third party plugins from tampering with
     44         * essential information indirectly, which would cause issues later.
    8845         *
    89          * @since BuddyPress (1.6)
    90          * @var string
     46         * @see BuddyPress::setup_globals()
     47         * @var array
    9148         */
    92         public $file;
     49        private $data;
    9350
    94         /**
    95          * @var string Basename of the BuddyPress plugin directory
    96          */
    97         public $basename = '';
     51        /** Not Magic *************************************************************/
    9852
    9953        /**
    100          * @var string Absolute path to the BuddyPress plugin directory
     54         * @var array Primary BuddyPress navigation
    10155         */
    102         public $plugin_dir = '';
     56        public $bp_nav = array();
    10357
    10458        /**
    105          * @var string Absolute path to the BuddyPress themes directory
     59         * @var array Secondary BuddyPress navigation to $bp_nav
    10660         */
    107         public $themes_dir = '';
     61        public $bp_options_nav = array();
    10862
    10963        /**
    110          * @var string Absolute path to the BuddyPress language directory
     64         * @var array The unfiltered URI broken down into chunks
     65         * @see bp_core_set_uri_globals()
    11166         */
    112         public $lang_dir = '';
     67        public $unfiltered_uri = array();
    11368
    114         /** URLs ******************************************************************/
    115 
    11669        /**
    117          * @var string URL to the BuddyPress plugin directory
     70         * @var array The canonical URI stack
     71         * @see bp_redirect_canonical()
     72         * @see bp_core_new_nav_item()
    11873         */
    119         public $plugin_url = '';
     74        public $canonical_stack = array();
    12075
    12176        /**
    122          * @var string URL to the BuddyPress themes directory
     77         * @var array Additional navigation elements (supplemental)
    12378         */
    124         public $themes_url = '';
     79        public $action_variables = array();
    12580
    126         /** Users *****************************************************************/
    127 
    12881        /**
    129          * @var object Current user
     82         * @var array Required components (core, members)
    13083         */
    131         public $current_user = null;
     84        public $required_components = array();
    13285
    13386        /**
    134          * @var object Displayed user
     87         * @var array Additional active components
    13588         */
    136         public $displayed_user = null;
     89        public $loaded_components = array();
    13790
    138         /** Navigation ************************************************************/
     91        /** Option Overload *******************************************************/
    13992
    14093        /**
    141          * @var array Primary BuddyPress navigation
     94         * @var array Optional Overloads default options retrieved from get_option()
    14295         */
    143         public $bp_nav = array();
     96        public $options = array();
    14497
    145         /**
    146          * @var array Secondary BuddyPress navigation to $bp_nav
    147          */
    148         public $bp_options_nav = array();
     98        /** Singleton *************************************************************/
    14999
    150         /** Toolbar ***************************************************************/
    151 
    152100        /**
    153          * @var string The primary toolbar ID
     101         * @var BuddyPress The one true BuddyPress
    154102         */
    155         public $my_account_menu_id = '';
     103        private static $instance;
    156104
    157         /** URI's *****************************************************************/
    158 
    159105        /**
    160          * @var array The unfiltered URI broken down into chunks
    161          * @see bp_core_set_uri_globals()
     106         * Main BuddyPress Instance
     107         *
     108         * BuddyPress is great
     109         * Please load it only one time
     110         * For this, we thank you
     111         *
     112         * Insures that only one instance of BuddyPress exists in memory at any one
     113         * time. Also prevents needing to define globals all over the place.
     114         *
     115         * @since BuddyPress (1.7)
     116         *
     117         * @staticvar array $instance
     118         * @uses BuddyPress::constants() Setup the constants (mostly deprecated)
     119         * @uses BuddyPress::setup_globals() Setup the globals needed
     120         * @uses BuddyPress::includes() Include the required files
     121         * @uses BuddyPress::setup_actions() Setup the hooks and actions
     122         * @see buddypress()
     123         *
     124         * @return The one true BuddyPress
    162125         */
    163         public $unfiltered_uri = array();
     126        public static function instance() {
     127                if ( ! isset( self::$instance ) ) {
     128                        self::$instance = new BuddyPress;
     129                        self::$instance->constants();
     130                        self::$instance->setup_globals();
     131                        self::$instance->includes();
     132                        self::$instance->setup_actions();
     133                }
     134                return self::$instance;
     135        }
    164136
    165         /**
    166          * @var int The current offset of the URI
    167          * @see bp_core_set_uri_globals()
    168          */
    169         public $unfiltered_uri_offset = 0;
     137        /** Magic Methods *********************************************************/
    170138
    171139        /**
    172          * @var bool Are status headers already sent?
     140         * A dummy constructor to prevent BuddyPress from being loaded more than once.
     141         *
     142         * @since BuddyPress (1.7)
     143         * @see BuddyPress::instance()
     144         * @see buddypress()
    173145         */
    174         public $no_status_set = false;
     146        private function __construct() { /* Do nothing here */ }
    175147
    176148        /**
    177          * @var array The canonical URI stack
    178          * @see bp_redirect_canonical()
    179          * @see bp_core_new_nav_item()
     149         * A dummy magic method to prevent BuddyPress from being cloned
     150         *
     151         * @since BuddyPress (1.7)
    180152         */
    181         public $canonical_stack = array();
     153        public function __clone() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'buddypress' ), '1.7' ); }
    182154
    183         /** Components ************************************************************/
    184 
    185155        /**
    186          * @var string Name of the current BuddyPress component (primary)
     156         * A dummy magic method to prevent BuddyPress from being unserialized
     157         *
     158         * @since BuddyPress (1.7)
    187159         */
    188         public $current_component = '';
     160        public function __wakeup() { _doing_it_wrong( __FUNCTION__, __( 'Cheatin&#8217; huh?', 'buddypress' ), '1.7' ); }
    189161
    190162        /**
    191          * @var string Name of the current BuddyPress item (secondary)
     163         * Magic method for checking the existence of a certain custom field
     164         *
     165         * @since BuddyPress (1.7)
    192166         */
    193         public $current_item = '';
     167        public function __isset( $key ) { return isset( $this->data[$key] ); }
    194168
    195169        /**
    196          * @var string Name of the current BuddyPress action (tertiary)
     170         * Magic method for getting BuddyPress varibles
     171         *
     172         * @since BuddyPress (1.7)
    197173         */
    198         public $current_action = '';
     174        public function __get( $key ) { return isset( $this->data[$key] ) ? $this->data[$key] : null; }
    199175
    200176        /**
    201          * @var array Additional navigation elements (supplemental)
     177         * Magic method for setting BuddyPress varibles
     178         *
     179         * @since BuddyPress (1.7)
    202180         */
    203         public $action_variables = array();
     181        public function __set( $key, $value ) { $this->data[$key] = $value; }
    204182
    205         /**
    206          * @var bool Displaying custom 2nd level navigation menu (I.E a group)
    207          */
    208         public $is_single_item = false;
     183        /** Private Methods *******************************************************/
    209184
    210         /** Option Overload *******************************************************/
    211 
    212185        /**
    213          * @var array Optional Overloads default options retrieved from get_option()
    214          */
    215         public $options = array();
    216 
    217         /** Functions *************************************************************/
    218 
    219         /**
    220          * The main BuddyPress loader
    221          *
    222          * @since BuddyPress (1.6)
    223          *
    224          * @uses BuddyPress::constants() Setup legacy constants
    225          * @uses BuddyPress::setup_globals() Setup globals needed
    226          * @uses BuddyPress::includes() Includ required files
    227          * @uses BuddyPress::setup_actions() Setup hooks and actions
    228          */
    229         public function __construct() {
    230                 $this->constants();
    231                 $this->setup_globals();
    232                 $this->includes();
    233                 $this->setup_actions();
    234         }
    235 
    236         /**
    237186         * Legacy BuddyPress constants
    238187         *
    239188         * Try to avoid using these. Their values have been moved into variables
     
    315264         */
    316265        private function setup_globals() {
    317266
     267                /** Versions **********************************************************/
     268
     269                $this->version        = '1.7';
     270                $this->db_version     = 6066;
     271                $this->db_version_raw = 0;
     272
     273                /** Loading ***********************************************************/
     274
     275                $this->maintenance_mode = '';
     276                $this->load_deprecated  = true;
     277
     278                /** Toolbar ***********************************************************/
     279
     280                /**
     281                 * @var string The primary toolbar ID
     282                 */
     283                $this->my_account_menu_id = '';
     284
     285                /** URI's *************************************************************/
     286
     287                /**
     288                 * @var int The current offset of the URI
     289                 * @see bp_core_set_uri_globals()
     290                 */
     291                $this->unfiltered_uri_offset = 0;
     292
     293                /**
     294                 * @var bool Are status headers already sent?
     295                 */
     296                $this->no_status_set = false;
     297
     298                /** Components ********************************************************/
     299
     300                /**
     301                 * @var string Name of the current BuddyPress component (primary)
     302                 */
     303                $this->current_component = '';
     304
     305                /**
     306                 * @var string Name of the current BuddyPress item (secondary)
     307                 */
     308                $this->current_item = '';
     309
     310                /**
     311                 * @var string Name of the current BuddyPress action (tertiary)
     312                 */
     313                $this->current_action = '';
     314
     315                /**
     316                 * @var bool Displaying custom 2nd level navigation menu (I.E a group)
     317                 */
     318                $this->is_single_item = false;
     319       
    318320                /** Root **************************************************************/
    319321
    320322                // BuddyPress Root blog ID
     
    335337                // Languages
    336338                $this->lang_dir   = $this->plugin_dir . 'bp-languages';
    337339
     340                /** Theme Compat ******************************************************/
     341
     342                $this->theme_compat   = new stdClass(); // Base theme compatibility class
     343                $this->filters        = new stdClass(); // Used when adding/removing filters
     344
    338345                /** Users *************************************************************/
    339346
    340347                $this->current_user       = new stdClass();
     
    367374                        $versions['1.2']        = get_site_option(                      'bp-core-db-version' );
    368375                        $versions['1.5-multi']  = get_site_option(                           'bp-db-version' );
    369376                        $versions['1.6-multi']  = get_site_option(                          '_bp_db_version' );
    370                         $versions['1.5-single'] = get_blog_option( $this->root_blog_id,     'bp-db-version' );
     377                        $versions['1.5-single'] = get_blog_option( $this->root_blog_id,      'bp-db-version' );
    371378
    372379                        // Remove empty array items
    373380                        $versions             = array_filter( $versions );
     
    411418                // Not in maintenance mode
    412419                if ( empty( $this->maintenance_mode ) ) {
    413420
     421                        // Theme compatability
     422                        require( $this->plugin_dir . 'bp-core/bp-core-template-loader.php'     );
     423                        require( $this->plugin_dir . 'bp-core/bp-core-theme-compatability.php' );
     424
    414425                        // Require all of the BuddyPress core libraries
     426                        require( $this->plugin_dir . 'bp-core/bp-core-dependency.php' );
    415427                        require( $this->plugin_dir . 'bp-core/bp-core-actions.php'    );
    416428                        require( $this->plugin_dir . 'bp-core/bp-core-caps.php'       );
    417429                        require( $this->plugin_dir . 'bp-core/bp-core-cache.php'      );
     
    461473
    462474                // Array of BuddyPress core actions
    463475                $actions = array(
     476                        'setup_theme',              // Setup the default theme compat
    464477                        'setup_current_user',       // Setup currently logged in user
    465478                        'register_post_types',      // Register post types
    466479                        'register_post_statuses',   // Register post statuses
    467480                        'register_taxonomies',      // Register taxonomies
    468481                        'register_views',           // Register the views
    469482                        'register_theme_directory', // Register the theme directory
     483                        'register_theme_packages',  // Register bundled theme packages (bp-themes)
    470484                        'load_textdomain',          // Load textdomain
    471485                        'add_rewrite_tags',         // Add rewrite tags
    472486                        'generate_rewrite_rules'    // Generate rewrite rules
     
    479493                // Setup the BuddyPress theme directory
    480494                register_theme_directory( $this->themes_dir );
    481495        }
     496       
     497        /** Public Methods ********************************************************/
     498
     499        /**
     500         * Register bundled theme packages
     501         *
     502         * Note that since we currently have complete control over bp-themes and
     503         * the bp-theme-compat folders, it's fine to hardcode these here. If at a
     504         * later date we need to automate this, an API will need to be built.
     505         *
     506         * @since BuddyPress (1.7)
     507         */
     508        public function register_theme_packages() {
     509                bp_register_theme_package( array(
     510                        'id'      => 'default',
     511                        'name'    => __( 'BuddyPress Default', 'buddypress' ),
     512                        'version' => bp_get_version(),
     513                        'dir'     => trailingslashit( $this->themes_dir . '/bp-theme-compat' ),
     514                        'url'     => trailingslashit( $this->themes_url . '/bp-theme-compat' )
     515                ) );
     516        }
     517       
     518        /**
     519         * Setup the default BuddyPress theme compatability location.
     520         *
     521         * @since BuddyPress (1.7)
     522         */
     523        public function setup_theme() {
     524
     525                // Bail if something already has this under control
     526                if ( ! empty( $this->theme_compat->theme ) )
     527                        return;
     528
     529                // Setup the theme package to use for compatibility
     530                bp_setup_theme_compat( bp_get_theme_package_id() );
     531        }
    482532}
    483533
    484 // "And now for something completely different"
    485 $GLOBALS['bp'] = new BuddyPress;
     534/**
     535 * The main function responsible for returning the one true BuddyPress Instance
     536 * to functions everywhere.
     537 *
     538 * Use this function like you would a global variable, except without needing
     539 * to declare the global.
     540 *
     541 * Example: <?php $bp = buddypress(); ?>
     542 *
     543 * @return The one true BuddyPress Instance
     544 */
     545function buddypress() {
     546        return buddypress::instance();
     547}
    486548
    487 endif;
     549/**
     550 * Hook BuddyPress early onto the 'plugins_loaded' action.
     551 *
     552 * This gives all other plugins the chance to load before BuddyPress, to get
     553 * their actions, filters, and overrides setup without BuddyPress being in the
     554 * way.
     555 */
     556if ( defined( 'BUDDYPRESS_LATE_LOAD' ) ) {
     557        add_action( 'plugins_loaded', 'buddypress', (int) BUDDYPRESS_LATE_LOAD );
    488558
    489 ?>
     559// "And now here's something we hope you'll really like!"
     560} else {
     561        $GLOBALS['bp'] = &buddypress();
     562}
     563
     564endif;
  • bp-members/bp-members-screens.php

     
    260260}
    261261add_action( 'bp_screens', 'bp_core_screen_activation' );
    262262
    263 ?>
     263/** Theme Compatability *******************************************************/
     264
     265/**
     266 * The main theme compat class for BuddyPress Groups
     267 *
     268 * This class sets up the necessary theme compatability actions to safely output
     269 * group template parts to the_title and the_content areas of a theme.
     270 *
     271 * @since BuddyPress (1.7)
     272 */
     273class BP_Members_Theme_Compat {
     274
     275        /**
     276         * Setup the groups component theme compatibility
     277         *
     278         * @since BuddyPress (1.7)
     279         */
     280        public function __construct() {
     281                add_action( 'bp_screens', array( $this, 'is_members' ) );
     282        }
     283
     284        /**
     285         * Are we looking at something that needs group theme compatability?
     286         *
     287         * @since BuddyPress (1.7)
     288         */
     289        public function is_members() {
     290
     291                // Bail if not looking at a group
     292                if ( ! bp_is_members_component() )
     293                        return;
     294
     295                // Group Directory
     296                if ( ! bp_current_action() && ! bp_current_item() ) {
     297                        bp_update_is_directory( true, 'members' );
     298
     299                        do_action( 'members_directory_groups_setup' );
     300
     301                        add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) );
     302                        add_filter( 'bp_replace_the_content',                    array( $this, 'directory_content'    ) );
     303                }
     304        }
     305
     306        /** Directory *************************************************************/
     307
     308        /**
     309         * Update the global $post with directory data
     310         *
     311         * @since BuddyPress (1.7)
     312         */
     313        public function directory_dummy_post() {
     314                bp_theme_compat_reset_post( array(
     315                        'ID'             => 0,
     316                        'post_title'     => __( 'Members', 'buddypress' ),
     317                        'post_author'    => 0,
     318                        'post_date'      => 0,
     319                        'post_content'   => '',
     320                        'post_type'      => 'bp_members',
     321                        'post_status'    => 'publish',
     322                        'is_archive'     => true,
     323                        'comment_status' => 'closed'
     324                ) );
     325        }
     326
     327        /**
     328         * Filter the_content with the groups index template part
     329         *
     330         * @since BuddyPress (1.7)
     331         */
     332        public function directory_content() {
     333                bp_buffer_template_part( 'members/index' );
     334        }
     335}
     336new BP_Members_Theme_Compat();
  • bp-themes/bp-theme-compat/buddypress-functions.php

     
     1<?php
     2
     3/**
     4 * Functions of BuddyPress's Default theme
     5 *
     6 * @package BuddyPress
     7 * @subpackage BP_Theme_Compat
     8 * @since BuddyPress (1.7)
     9 */
     10
     11// Exit if accessed directly
     12if ( !defined( 'ABSPATH' ) ) exit;
     13
     14/** Theme Setup ***************************************************************/
     15
     16if ( !class_exists( 'BP_Default' ) ) :
     17
     18/**
     19 * Loads BuddyPress Default Theme functionality
     20 *
     21 * This is not a real theme by WordPress standards, and is instead used as the
     22 * fallback for any WordPress theme that does not have BuddyPress templates in it.
     23 *
     24 * To make your custom theme BuddyPress compatible and customize the templates, you
     25 * can copy these files into your theme without needing to merge anything
     26 * together; BuddyPress should safely handle the rest.
     27 *
     28 * See @link BBP_Theme_Compat() for more.
     29 *
     30 * @since BuddyPress (1.7)
     31 *
     32 * @package BuddyPress
     33 * @subpackage BBP_Theme_Compat
     34 */
     35class BP_Default extends BP_Theme_Compat {
     36
     37        /** Functions *************************************************************/
     38
     39        /**
     40         * The main BuddyPress (Default) Loader
     41         *
     42         * @since BuddyPress (1.7)
     43         *
     44         * @uses BP_Default::setup_globals()
     45         * @uses BP_Default::setup_actions()
     46         */
     47        public function __construct() {
     48                $this->setup_globals();
     49                $this->setup_actions();
     50        }
     51
     52        /**
     53         * Component global variables
     54         *
     55         * Note that this function is currently commented out in the constructor.
     56         * It will only be used if you copy this file into your current theme and
     57         * uncomment the line above.
     58         *
     59         * You'll want to customize the values in here, so they match whatever your
     60         * needs are.
     61         *
     62         * @since BuddyPress (1.7)
     63         * @access private
     64         */
     65        private function setup_globals() {
     66                $bbp           = buddypress();
     67                $this->id      = 'default';
     68                $this->name    = __( 'BuddyPress Default', 'bbpress' );
     69                $this->version = bp_get_version();
     70                $this->dir     = trailingslashit( $bbp->themes_dir . '/bp-theme-compat' );
     71                $this->url     = trailingslashit( $bbp->themes_url . '/bp-theme-compat' );
     72        }
     73
     74        /**
     75         * Setup the theme hooks
     76         *
     77         * @since BuddyPress (1.7)
     78         * @access private
     79         *
     80         * @uses add_filter() To add various filters
     81         * @uses add_action() To add various actions
     82         */
     83        private function setup_actions() {
     84
     85                /** Scripts ***********************************************************/
     86
     87                add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_styles'   ) ); // Enqueue theme CSS
     88                add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_scripts'  ) ); // Enqueue theme JS
     89                add_filter( 'bp_enqueue_scripts', array( $this, 'localize_scripts' ) ); // Enqueue theme script localization
     90                add_action( 'bp_head',            array( $this, 'head_scripts'     ) ); // Output some extra JS in the <head>
     91
     92                /** Override **********************************************************/
     93
     94                do_action_ref_array( 'bp_theme_compat_actions', array( &$this ) );
     95        }
     96
     97        /**
     98         * Load the theme CSS
     99         *
     100         * @since BuddyPress (1.7)
     101         *
     102         * @uses wp_enqueue_style() To enqueue the styles
     103         */
     104        public function enqueue_styles() {
     105
     106                // LTR or RTL
     107                $file = is_rtl() ? 'css/buddypress-rtl.css' : 'css/buddypress.css';
     108
     109                // Check child theme
     110                if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $file ) ) {
     111                        $location = trailingslashit( get_stylesheet_directory_uri() );
     112                        $handle   = 'bp-child-bbpress';
     113
     114                // Check parent theme
     115                } elseif ( file_exists( trailingslashit( get_template_directory() ) . $file ) ) {
     116                        $location = trailingslashit( get_template_directory_uri() );
     117                        $handle   = 'bp-parent-bbpress';
     118
     119                // BuddyPress Theme Compatibility
     120                } else {
     121                        $location = trailingslashit( $this->url );
     122                        $handle   = 'bp-default-bbpress';
     123                }
     124
     125                // Enqueue the BuddyPress styling
     126                wp_enqueue_style( $handle, $location . $file, array(), $this->version, 'screen' );
     127        }
     128
     129        /**
     130         * Enqueue the required Javascript files
     131         *
     132         * @since BuddyPress (1.7)
     133         */
     134        public function enqueue_scripts() {
     135
     136        }
     137
     138        /**
     139         * Put some scripts in the header, like AJAX url for wp-lists
     140         *
     141         * @since BuddyPress (1.7)
     142         */
     143        public function head_scripts() {
     144        ?>
     145
     146                <script type="text/javascript" charset="utf-8">
     147                        /* <![CDATA[ */
     148                        var ajaxurl = '<?php echo admin_url( 'admin-ajax.php' ); ?>';
     149                        /* ]]> */
     150                </script>
     151
     152        <?php
     153        }
     154
     155        /**
     156         * Load localizations for topic script
     157         *
     158         * These localizations require information that may not be loaded even by init.
     159         *
     160         * @since BuddyPress (1.7)
     161         */
     162        public function localize_scripts() {
     163
     164        }
     165}
     166new BP_Default();
     167endif;
  • bp-themes/bp-theme-compat/buddypress/activity/activity-loop.php

     
     1<?php do_action( 'bp_before_activity_loop' ); ?>
     2
     3<?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) ) ) : ?>
     4
     5        <?php /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */ ?>
     6        <noscript>
     7                <div class="pagination">
     8                        <div class="pag-count"><?php bp_activity_pagination_count(); ?></div>
     9                        <div class="pagination-links"><?php bp_activity_pagination_links(); ?></div>
     10                </div>
     11        </noscript>
     12
     13        <?php if ( empty( $_POST['page'] ) ) : ?>
     14
     15                <ul id="activity-stream" class="activity-list item-list">
     16
     17        <?php endif; ?>
     18
     19        <?php while ( bp_activities() ) : bp_the_activity(); ?>
     20
     21                <?php bp_get_template_part( 'activity/entry' ); ?>
     22
     23        <?php endwhile; ?>
     24
     25        <?php if ( bp_activity_has_more_items() ) : ?>
     26
     27                <li class="load-more">
     28                        <a href="#more"><?php _e( 'Load More', 'buddypress' ); ?></a>
     29                </li>
     30
     31        <?php endif; ?>
     32
     33        <?php if ( empty( $_POST['page'] ) ) : ?>
     34
     35                </ul>
     36
     37        <?php endif; ?>
     38
     39<?php else : ?>
     40
     41        <div id="message" class="info">
     42                <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ); ?></p>
     43        </div>
     44
     45<?php endif; ?>
     46
     47<?php do_action( 'bp_after_activity_loop' ); ?>
     48
     49<form action="" name="activity-loop-form" id="activity-loop-form" method="post">
     50
     51        <?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ); ?>
     52
     53</form>
     54 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/activity/comment.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Activity Stream Comment
     5 *
     6 * This template is used by bp_activity_comments() functions to show
     7 * each activity.
     8 *
     9 * @package BuddyPress
     10 * @subpackage bp-default
     11 */
     12
     13?>
     14
     15<?php do_action( 'bp_before_activity_comment' ); ?>
     16
     17<li id="acomment-<?php bp_activity_comment_id(); ?>">
     18        <div class="acomment-avatar">
     19                <a href="<?php bp_activity_comment_user_link(); ?>">
     20                        <?php bp_activity_avatar( 'type=thumb&user_id=' . bp_get_activity_comment_user_id() ); ?>
     21                </a>
     22        </div>
     23
     24        <div class="acomment-meta">
     25                <?php
     26                /* translators: 1: user profile link, 2: user name, 3: activity permalink, 4: activity timestamp */
     27                printf( __( '<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress' ), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded() );
     28                ?>
     29        </div>
     30
     31        <div class="acomment-content"><?php bp_activity_comment_content(); ?></div>
     32
     33        <div class="acomment-options">
     34
     35                <?php if ( is_user_logged_in() && bp_activity_can_comment_reply( bp_activity_current_comment() ) ) : ?>
     36
     37                        <a href="#acomment-<?php bp_activity_comment_id(); ?>" class="acomment-reply bp-primary-action" id="acomment-reply-<?php bp_activity_id(); ?>-from-<?php bp_activity_comment_id(); ?>"><?php _e( 'Reply', 'buddypress' ); ?></a>
     38
     39                <?php endif; ?>
     40
     41                <?php if ( bp_activity_user_can_delete() ) : ?>
     42
     43                        <a href="<?php bp_activity_comment_delete_link(); ?>" class="delete acomment-delete confirm bp-secondary-action" rel="nofollow"><?php _e( 'Delete', 'buddypress' ); ?></a>
     44
     45                <?php endif; ?>
     46
     47                <?php do_action( 'bp_activity_comment_options' ); ?>
     48
     49        </div>
     50
     51        <?php bp_activity_recurse_comments( bp_activity_current_comment() ); ?>
     52</li>
     53
     54<?php do_action( 'bp_after_activity_comment' ); ?>
  • bp-themes/bp-theme-compat/buddypress/activity/entry.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Activity Stream (Single Item)
     5 *
     6 * This template is used by activity-loop.php and AJAX functions to show
     7 * each activity.
     8 *
     9 * @package BuddyPress
     10 * @subpackage bp-default
     11 */
     12
     13?>
     14
     15<?php do_action( 'bp_before_activity_entry' ); ?>
     16
     17<li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">
     18        <div class="activity-avatar">
     19                <a href="<?php bp_activity_user_link(); ?>">
     20
     21                        <?php bp_activity_avatar(); ?>
     22
     23                </a>
     24        </div>
     25
     26        <div class="activity-content">
     27
     28                <div class="activity-header">
     29
     30                        <?php bp_activity_action(); ?>
     31
     32                </div>
     33
     34                <?php if ( 'activity_comment' == bp_get_activity_type() ) : ?>
     35
     36                        <div class="activity-inreplyto">
     37                                <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>
     38                        </div>
     39
     40                <?php endif; ?>
     41
     42                <?php if ( bp_activity_has_content() ) : ?>
     43
     44                        <div class="activity-inner">
     45
     46                                <?php bp_activity_content_body(); ?>
     47
     48                        </div>
     49
     50                <?php endif; ?>
     51
     52                <?php do_action( 'bp_activity_entry_content' ); ?>
     53
     54                <?php if ( is_user_logged_in() ) : ?>
     55
     56                        <div class="activity-meta">
     57
     58                                <?php if ( bp_activity_can_comment() ) : ?>
     59
     60                                        <a href="<?php bp_get_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'Comment <span>%s</span>', 'buddypress' ), bp_activity_get_comment_count() ); ?></a>
     61
     62                                <?php endif; ?>
     63
     64                                <?php if ( bp_activity_can_favorite() ) : ?>
     65
     66                                        <?php if ( !bp_get_activity_is_favorite() ) : ?>
     67
     68                                                <a href="<?php bp_activity_favorite_link(); ?>" class="button fav bp-secondary-action" title="<?php esc_attr_e( 'Mark as Favorite', 'buddypress' ); ?>"><?php _e( 'Favorite', 'buddypress' ); ?></a>
     69
     70                                        <?php else : ?>
     71
     72                                                <a href="<?php bp_activity_unfavorite_link(); ?>" class="button unfav bp-secondary-action" title="<?php esc_attr_e( 'Remove Favorite', 'buddypress' ); ?>"><?php _e( 'Remove Favorite', 'buddypress' ); ?></a>
     73
     74                                        <?php endif; ?>
     75
     76                                <?php endif; ?>
     77
     78                                <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?>
     79
     80                                <?php do_action( 'bp_activity_entry_meta' ); ?>
     81
     82                        </div>
     83
     84                <?php endif; ?>
     85
     86        </div>
     87
     88        <?php do_action( 'bp_before_activity_entry_comments' ); ?>
     89
     90        <?php if ( ( is_user_logged_in() && bp_activity_can_comment() ) || bp_activity_get_comment_count() ) : ?>
     91
     92                <div class="activity-comments">
     93
     94                        <?php bp_activity_comments(); ?>
     95
     96                        <?php if ( is_user_logged_in() ) : ?>
     97
     98                                <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(); ?>>
     99                                        <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div>
     100                                        <div class="ac-reply-content">
     101                                                <div class="ac-textarea">
     102                                                        <textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input" name="ac_input_<?php bp_activity_id(); ?>"></textarea>
     103                                                </div>
     104                                                <input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ); ?>" /> &nbsp; <?php _e( 'or press esc to cancel.', 'buddypress' ); ?>
     105                                                <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" />
     106                                        </div>
     107
     108                                        <?php do_action( 'bp_activity_entry_comments' ); ?>
     109
     110                                        <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?>
     111
     112                                </form>
     113
     114                        <?php endif; ?>
     115
     116                </div>
     117
     118        <?php endif; ?>
     119
     120        <?php do_action( 'bp_after_activity_entry_comments' ); ?>
     121
     122</li>
     123
     124<?php do_action( 'bp_after_activity_entry' ); ?>
  • bp-themes/bp-theme-compat/buddypress/activity/index.php

     
     1<?php do_action( 'bp_before_directory_activity' ); ?>
     2
     3<?php do_action( 'bp_before_directory_activity_content' ); ?>
     4
     5<?php if ( is_user_logged_in() ) : ?>
     6
     7        <?php bp_get_template_part( 'activity/post-form' ); ?>
     8
     9<?php endif; ?>
     10
     11<?php do_action( 'template_notices' ); ?>
     12
     13<div class="item-list-tabs activity-type-tabs" role="navigation">
     14        <ul>
     15                <?php do_action( 'bp_before_activity_type_tab_all' ); ?>
     16
     17                <li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>" title="<?php _e( 'The public activity for everyone on this site.', 'buddypress' ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
     18
     19                <?php if ( is_user_logged_in() ) : ?>
     20
     21                        <?php do_action( 'bp_before_activity_type_tab_friends' ); ?>
     22
     23                        <?php if ( bp_is_active( 'friends' ) ) : ?>
     24
     25                                <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
     26
     27                                        <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>" title="<?php _e( 'The activity of my friends only.', 'buddypress' ); ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
     28
     29                                <?php endif; ?>
     30
     31                        <?php endif; ?>
     32
     33                        <?php do_action( 'bp_before_activity_type_tab_groups' ); ?>
     34
     35                        <?php if ( bp_is_active( 'groups' ) ) : ?>
     36
     37                                <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
     38
     39                                        <li id="activity-groups"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/'; ?>" title="<?php _e( 'The activity of groups I am a member of.', 'buddypress' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
     40
     41                                <?php endif; ?>
     42
     43                        <?php endif; ?>
     44
     45                        <?php do_action( 'bp_before_activity_type_tab_favorites' ); ?>
     46
     47                        <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
     48
     49                                <li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_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>
     50
     51                        <?php endif; ?>
     52
     53                        <?php do_action( 'bp_before_activity_type_tab_mentions' ); ?>
     54
     55                        <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>" title="<?php _e( 'Activity that I have been mentioned in.', 'buddypress' ); ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><?php printf( __( '<span>%s new</span>', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></strong><?php endif; ?></a></li>
     56
     57                <?php endif; ?>
     58
     59                <?php do_action( 'bp_activity_type_tabs' ); ?>
     60        </ul>
     61</div><!-- .item-list-tabs -->
     62
     63<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     64        <ul>
     65                <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" title="<?php _e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
     66
     67                <?php do_action( 'bp_activity_syndication_options' ); ?>
     68
     69                <li id="activity-filter-select" class="last">
     70                        <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
     71                        <select id="activity-filter-by">
     72                                <option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
     73                                <option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option>
     74
     75                                <?php if ( bp_is_active( 'blogs' ) ) : ?>
     76
     77                                        <option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option>
     78                                        <option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ); ?></option>
     79
     80                                <?php endif; ?>
     81
     82                                <?php if ( bp_is_active( 'forums' ) ) : ?>
     83
     84                                        <option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
     85                                        <option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
     86
     87                                <?php endif; ?>
     88
     89                                <?php if ( bp_is_active( 'groups' ) ) : ?>
     90
     91                                        <option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
     92                                        <option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
     93
     94                                <?php endif; ?>
     95
     96                                <?php if ( bp_is_active( 'friends' ) ) : ?>
     97
     98                                        <option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
     99
     100                                <?php endif; ?>
     101
     102                                <option value="new_member"><?php _e( 'New Members', 'buddypress' ); ?></option>
     103
     104                                <?php do_action( 'bp_activity_filter_options' ); ?>
     105
     106                        </select>
     107                </li>
     108        </ul>
     109</div><!-- .item-list-tabs -->
     110
     111<?php do_action( 'bp_before_directory_activity_list' ); ?>
     112
     113<div class="activity" role="main">
     114
     115        <?php bp_get_template_part( 'activity/activity-loop' ); ?>
     116
     117</div><!-- .activity -->
     118
     119<?php do_action( 'bp_after_directory_activity_list' ); ?>
     120
     121<?php do_action( 'bp_directory_activity_content' ); ?>
     122
     123<?php do_action( 'bp_after_directory_activity_content' ); ?>
     124
     125<?php do_action( 'bp_after_directory_activity' ); ?>
  • bp-themes/bp-theme-compat/buddypress/activity/post-form.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Activity Post Form
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<form action="<?php bp_activity_post_form_action(); ?>" method="post" id="whats-new-form" name="whats-new-form" role="complementary">
     13
     14        <?php do_action( 'bp_before_activity_post_form' ); ?>
     15
     16        <div id="whats-new-avatar">
     17                <a href="<?php echo bp_loggedin_user_domain(); ?>">
     18                        <?php bp_loggedin_user_avatar( 'width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height() ); ?>
     19                </a>
     20        </div>
     21
     22        <h5><?php if ( bp_is_group() )
     23                        printf( __( "What's new in %s, %s?", 'buddypress' ), bp_get_group_name(), bp_get_user_firstname() );
     24                else
     25                        printf( __( "What's new, %s?", 'buddypress' ), bp_get_user_firstname() );
     26        ?></h5>
     27
     28        <div id="whats-new-content">
     29                <div id="whats-new-textarea">
     30                        <textarea name="whats-new" id="whats-new" cols="50" rows="10"><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_attr( $_GET['r'] ); ?> <?php endif; ?></textarea>
     31                </div>
     32
     33                <div id="whats-new-options">
     34                        <div id="whats-new-submit">
     35                                <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e( 'Post Update', 'buddypress' ); ?>" />
     36                        </div>
     37
     38                        <?php if ( bp_is_active( 'groups' ) && !bp_is_my_profile() && !bp_is_group() ) : ?>
     39
     40                                <div id="whats-new-post-in-box">
     41
     42                                        <?php _e( 'Post in', 'buddypress' ); ?>:
     43
     44                                        <select id="whats-new-post-in" name="whats-new-post-in">
     45                                                <option selected="selected" value="0"><?php _e( 'My Profile', 'buddypress' ); ?></option>
     46
     47                                                <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100&populate_extras=0' ) ) :
     48                                                        while ( bp_groups() ) : bp_the_group(); ?>
     49
     50                                                                <option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option>
     51
     52                                                        <?php endwhile;
     53                                                endif; ?>
     54
     55                                        </select>
     56                                </div>
     57                                <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" />
     58
     59                        <?php elseif ( bp_is_group_home() ) : ?>
     60
     61                                <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" />
     62                                <input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id(); ?>" />
     63
     64                        <?php endif; ?>
     65
     66                        <?php do_action( 'bp_activity_post_form_options' ); ?>
     67
     68                </div><!-- #whats-new-options -->
     69        </div><!-- #whats-new-content -->
     70
     71        <?php wp_nonce_field( 'post_update', '_wpnonce_post_update' ); ?>
     72        <?php do_action( 'bp_after_activity_post_form' ); ?>
     73
     74</form><!-- #whats-new-form -->
  • bp-themes/bp-theme-compat/buddypress/blogs/blogs-loop.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Blogs Loop
     5 *
     6 * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
     7 *
     8 * @package BuddyPress
     9 * @subpackage bp-default
     10 */
     11
     12?>
     13
     14<?php do_action( 'bp_before_blogs_loop' ); ?>
     15
     16<?php if ( bp_has_blogs( bp_ajax_querystring( 'blogs' ) ) ) : ?>
     17
     18        <div id="pag-top" class="pagination">
     19
     20                <div class="pag-count" id="blog-dir-count-top">
     21                        <?php bp_blogs_pagination_count(); ?>
     22                </div>
     23
     24                <div class="pagination-links" id="blog-dir-pag-top">
     25                        <?php bp_blogs_pagination_links(); ?>
     26                </div>
     27
     28        </div>
     29
     30        <?php do_action( 'bp_before_directory_blogs_list' ); ?>
     31
     32        <ul id="blogs-list" class="item-list" role="main">
     33
     34        <?php while ( bp_blogs() ) : bp_the_blog(); ?>
     35
     36                <li>
     37                        <div class="item-avatar">
     38                                <a href="<?php bp_blog_permalink(); ?>"><?php bp_blog_avatar( 'type=thumb' ); ?></a>
     39                        </div>
     40
     41                        <div class="item">
     42                                <div class="item-title"><a href="<?php bp_blog_permalink(); ?>"><?php bp_blog_name(); ?></a></div>
     43                                <div class="item-meta"><span class="activity"><?php bp_blog_last_active(); ?></span></div>
     44
     45                                <?php do_action( 'bp_directory_blogs_item' ); ?>
     46                        </div>
     47
     48                        <div class="action">
     49
     50                                <?php do_action( 'bp_directory_blogs_actions' ); ?>
     51
     52                                <div class="meta">
     53
     54                                        <?php bp_blog_latest_post(); ?>
     55
     56                                </div>
     57
     58                        </div>
     59
     60                        <div class="clear"></div>
     61                </li>
     62
     63        <?php endwhile; ?>
     64
     65        </ul>
     66
     67        <?php do_action( 'bp_after_directory_blogs_list' ); ?>
     68
     69        <?php bp_blog_hidden_fields(); ?>
     70
     71        <div id="pag-bottom" class="pagination">
     72
     73                <div class="pag-count" id="blog-dir-count-bottom">
     74
     75                        <?php bp_blogs_pagination_count(); ?>
     76
     77                </div>
     78
     79                <div class="pagination-links" id="blog-dir-pag-bottom">
     80
     81                        <?php bp_blogs_pagination_links(); ?>
     82
     83                </div>
     84
     85        </div>
     86
     87<?php else: ?>
     88
     89        <div id="message" class="info">
     90                <p><?php _e( 'Sorry, there were no sites found.', 'buddypress' ); ?></p>
     91        </div>
     92
     93<?php endif; ?>
     94
     95<?php do_action( 'bp_after_blogs_loop' ); ?>
  • bp-themes/bp-theme-compat/buddypress/blogs/create.php

     
     1<?php do_action( 'bp_before_create_blog_content_template' ); ?>
     2
     3<?php do_action( 'template_notices' ); ?>
     4
     5<?php do_action( 'bp_before_create_blog_content' ); ?>
     6
     7<?php if ( bp_blog_signup_enabled() ) : ?>
     8
     9        <?php bp_show_blog_signup_form(); ?>
     10
     11<?php else: ?>
     12
     13        <div id="message" class="info">
     14                <p><?php _e( 'Site registration is currently disabled', 'buddypress' ); ?></p>
     15        </div>
     16
     17<?php endif; ?>
     18
     19<?php do_action( 'bp_after_create_blog_content' ); ?>
     20
     21<?php do_action( 'bp_after_create_blog_content_template' ); ?>
     22 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/blogs/index.php

     
     1<?php do_action( 'bp_before_directory_blogs' ); ?>
     2
     3<form action="" method="post" id="blogs-directory-form" class="dir-form">
     4
     5        <?php do_action( 'bp_before_directory_blogs_content' ); ?>
     6
     7        <div id="blog-dir-search" class="dir-search" role="search">
     8
     9                <?php bp_directory_blogs_search_form(); ?>
     10
     11        </div><!-- #blog-dir-search -->
     12
     13        <div class="item-list-tabs" role="navigation">
     14                <ul>
     15                        <li class="selected" id="blogs-all"><a href="<?php bp_root_domain(); ?>/<?php bp_blogs_root_slug(); ?>"><?php printf( __( 'All Sites <span>%s</span>', 'buddypress' ), bp_get_total_blog_count() ); ?></a></li>
     16
     17                        <?php if ( is_user_logged_in() && bp_get_total_blog_count_for_user( bp_loggedin_user_id() ) ) : ?>
     18
     19                                <li id="blogs-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_blogs_slug(); ?>"><?php printf( __( 'My Sites <span>%s</span>', 'buddypress' ), bp_get_total_blog_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
     20
     21                        <?php endif; ?>
     22
     23                        <?php do_action( 'bp_blogs_directory_blog_types' ); ?>
     24
     25                </ul>
     26        </div><!-- .item-list-tabs -->
     27
     28        <div class="item-list-tabs" id="subnav" role="navigation">
     29                <ul>
     30
     31                        <?php do_action( 'bp_blogs_directory_blog_sub_types' ); ?>
     32
     33                        <li id="blogs-order-select" class="last filter">
     34
     35                                <label for="blogs-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     36                                <select id="blogs-order-by">
     37                                        <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     38                                        <option value="newest"><?php _e( 'Newest', 'buddypress' ); ?></option>
     39                                        <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
     40
     41                                        <?php do_action( 'bp_blogs_directory_order_options' ); ?>
     42
     43                                </select>
     44                        </li>
     45                </ul>
     46        </div>
     47
     48        <div id="blogs-dir-list" class="blogs dir-list">
     49
     50                <?php bp_get_template_part( 'blogs/blogs-loop' ); ?>
     51
     52        </div><!-- #blogs-dir-list -->
     53
     54        <?php do_action( 'bp_directory_blogs_content' ); ?>
     55
     56        <?php wp_nonce_field( 'directory_blogs', '_wpnonce-blogs-filter' ); ?>
     57
     58        <?php do_action( 'bp_after_directory_blogs_content' ); ?>
     59
     60</form><!-- #blogs-directory-form -->
     61
     62<?php do_action( 'bp_after_directory_blogs' ); ?>
     63 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/forums/forums-loop.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Forums Loop
     5 *
     6 * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
     7 *
     8 * @package BuddyPress
     9 * @subpackage bp-default
     10 */
     11
     12?>
     13
     14<?php do_action( 'bp_before_forums_loop' ); ?>
     15
     16<?php if ( bp_has_forum_topics( bp_ajax_querystring( 'forums' ) ) ) : ?>
     17
     18        <div id="pag-top" class="pagination">
     19
     20                <div class="pag-count" id="topic-count-top">
     21
     22                        <?php bp_forum_pagination_count(); ?>
     23
     24                </div>
     25
     26                <div class="pagination-links" id="topic-pag-top">
     27
     28                        <?php bp_forum_pagination(); ?>
     29
     30                </div>
     31
     32        </div>
     33
     34        <?php do_action( 'bp_before_directory_forums_list' ); ?>
     35
     36        <table class="forum">
     37                <thead>
     38                        <tr>
     39                                <th id="th-title"><?php _e( 'Topic', 'buddypress' ); ?></th>
     40                                <th id="th-postcount"><?php _e( 'Posts', 'buddypress' ); ?></th>
     41                                <th id="th-freshness"><?php _e( 'Freshness', 'buddypress' ); ?></th>
     42
     43                                <?php do_action( 'bp_directory_forums_extra_cell_head' ); ?>
     44
     45                        </tr>
     46                </thead>
     47
     48                <tbody>
     49
     50                        <?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?>
     51
     52                        <tr class="<?php bp_the_topic_css_class(); ?>">
     53                                <td class="td-title">
     54                                        <a class="topic-title" href="<?php bp_the_topic_permalink(); ?>" title="<?php bp_the_topic_title(); ?> - <?php _e( 'Permalink', 'buddypress' ); ?>">
     55
     56                                                <?php bp_the_topic_title(); ?>
     57
     58                                        </a>
     59
     60                                        <p class="topic-meta">
     61                                                <span class="topic-by"><?php /* translators: "started by [poster] in [forum]" */ printf( __( 'Started by %1$s', 'buddypress' ), bp_get_the_topic_poster_avatar( 'height=20&width=20') . bp_get_the_topic_poster_name() ); ?></span>
     62
     63                                                <?php if ( !bp_is_group_forum() ) : ?>
     64
     65                                                        <span class="topic-in">
     66
     67                                                                <?php
     68                                                                        $topic_in = '<a href="' . bp_get_the_topic_object_permalink() . '">' . bp_get_the_topic_object_avatar( 'type=thumb&width=20&height=20' ) . '</a>' .
     69                                                                                                        '<a href="' . bp_get_the_topic_object_permalink() . '" title="' . bp_get_the_topic_object_name() . '">' . bp_get_the_topic_object_name() .'</a>';
     70
     71                                                                        /* translators: "started by [poster] in [forum]" */
     72                                                                        printf( __( 'in %1$s', 'buddypress' ), $topic_in );
     73                                                                ?>
     74
     75                                                        </span>
     76
     77                                                <?php endif; ?>
     78
     79                                        </p>
     80                                </td>
     81                                <td class="td-postcount">
     82                                        <?php bp_the_topic_total_posts(); ?>
     83                                </td>
     84                                <td class="td-freshness">
     85                                        <span class="time-since"><?php bp_the_topic_time_since_last_post(); ?></span>
     86                                        <p class="topic-meta">
     87                                                <span class="freshness-author">
     88                                                        <a href="<?php bp_the_topic_permalink(); ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ); ?></a>
     89                                                        <?php bp_the_topic_last_poster_name(); ?>
     90                                                </span>
     91                                        </p>
     92                                </td>
     93
     94                                <?php do_action( 'bp_directory_forums_extra_cell' ); ?>
     95
     96                        </tr>
     97
     98                        <?php do_action( 'bp_directory_forums_extra_row' ); ?>
     99
     100                        <?php endwhile; ?>
     101
     102                </tbody>
     103        </table>
     104
     105        <?php do_action( 'bp_after_directory_forums_list' ); ?>
     106
     107        <div id="pag-bottom" class="pagination">
     108
     109                <div class="pag-count" id="topic-count-bottom">
     110                        <?php bp_forum_pagination_count(); ?>
     111                </div>
     112
     113                <div class="pagination-links" id="topic-pag-bottom">
     114                        <?php bp_forum_pagination(); ?>
     115                </div>
     116
     117        </div>
     118
     119<?php else: ?>
     120
     121        <div id="message" class="info">
     122                <p><?php _e( 'Sorry, there were no forum topics found.', 'buddypress' ); ?></p>
     123        </div>
     124
     125<?php endif; ?>
     126
     127<?php do_action( 'bp_after_forums_loop' ); ?>
  • bp-themes/bp-theme-compat/buddypress/forums/index.php

     
     1<?php do_action( 'bp_before_directory_forums' ); ?>
     2
     3<form action="" method="post" id="forums-search-form" class="dir-form">
     4
     5        <?php do_action( 'bp_before_directory_forums_content' ); ?>
     6
     7        <div id="forums-dir-search" class="dir-search" role="search">
     8
     9                <?php bp_directory_forums_search_form(); ?>
     10
     11        </div>
     12</form>
     13
     14<?php do_action( 'bp_before_topics' ); ?>
     15
     16<form action="" method="post" id="forums-directory-form" class="dir-form">
     17
     18        <div class="item-list-tabs" role="navigation">
     19                <ul>
     20                        <li class="selected" id="forums-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_forums_root_slug() ); ?>"><?php printf( __( 'All Topics <span>%s</span>', 'buddypress' ), bp_get_forum_topic_count() ); ?></a></li>
     21
     22                        <?php if ( is_user_logged_in() && bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ) : ?>
     23
     24                                <li id="forums-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_forums_slug() . '/topics' ); ?>"><?php printf( __( 'My Topics <span>%s</span>', 'buddypress' ), bp_get_forum_topic_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
     25
     26                        <?php endif; ?>
     27
     28                        <?php do_action( 'bp_forums_directory_group_types' ); ?>
     29
     30                </ul>
     31        </div>
     32
     33        <div class="item-list-tabs" id="subnav" role="navigation">
     34                <ul>
     35
     36                        <?php do_action( 'bp_forums_directory_group_sub_types' ); ?>
     37
     38                        <li id="forums-order-select" class="last filter">
     39
     40                                <label for="forums-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     41                                <select id="forums-order-by">
     42                                        <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     43                                        <option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option>
     44                                        <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option>
     45
     46                                        <?php do_action( 'bp_forums_directory_order_options' ); ?>
     47
     48                                </select>
     49                        </li>
     50                </ul>
     51        </div>
     52
     53        <div id="forums-dir-list" class="forums dir-list" role="main">
     54
     55                <?php bp_get_template_part( 'forums/forums-loop' ); ?>
     56
     57        </div>
     58
     59        <?php do_action( 'bp_directory_forums_content' ); ?>
     60
     61        <?php wp_nonce_field( 'directory_forums', '_wpnonce-forums-filter' ); ?>
     62
     63</form>
     64
     65<?php do_action( 'bp_after_directory_forums' ); ?>
     66
     67<?php do_action( 'bp_before_new_topic_form' ); ?>
     68
     69<div id="new-topic-post">
     70
     71        <?php if ( is_user_logged_in() ) : ?>
     72
     73                <?php if ( bp_is_active( 'groups' ) && bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100' ) ) : ?>
     74
     75                        <form action="" method="post" id="forum-topic-form" class="standard-form">
     76
     77                                <?php do_action( 'groups_forum_new_topic_before' ); ?>
     78
     79                                <a name="post-new"></a>
     80                                <h5><?php _e( 'Create New Topic:', 'buddypress' ); ?></h5>
     81
     82                                <?php do_action( 'template_notices' ); ?>
     83
     84                                <label><?php _e( 'Title:', 'buddypress' ); ?></label>
     85                                <input type="text" name="topic_title" id="topic_title" value="" maxlength="100" />
     86
     87                                <label><?php _e( 'Content:', 'buddypress' ); ?></label>
     88                                <textarea name="topic_text" id="topic_text"></textarea>
     89
     90                                <label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label>
     91                                <input type="text" name="topic_tags" id="topic_tags" value="" />
     92
     93                                <label><?php _e( 'Post In Group Forum:', 'buddypress' ); ?></label>
     94                                <select id="topic_group_id" name="topic_group_id">
     95
     96                                        <option value=""><?php /* translators: no option picked in select box */ _e( '----', 'buddypress' ); ?></option>
     97
     98                                        <?php while ( bp_groups() ) : bp_the_group(); ?>
     99
     100                                                <?php if ( bp_group_is_forum_enabled() && ( bp_current_user_can( 'bp_moderate' ) || 'public' == bp_get_group_status() || bp_group_is_member() ) ) : ?>
     101
     102                                                        <option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option>
     103
     104                                                <?php endif; ?>
     105
     106                                        <?php endwhile; ?>
     107
     108                                </select><!-- #topic_group_id -->
     109
     110                                <?php do_action( 'groups_forum_new_topic_after' ); ?>
     111
     112                                <div class="submit">
     113                                        <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ); ?>" />
     114                                        <input type="button" name="submit_topic_cancel" id="submit_topic_cancel" value="<?php _e( 'Cancel', 'buddypress' ); ?>" />
     115                                </div>
     116
     117                                <?php wp_nonce_field( 'bp_forums_new_topic' ); ?>
     118
     119                        </form><!-- #forum-topic-form -->
     120
     121                <?php elseif ( bp_is_active( 'groups' ) ) : ?>
     122
     123                        <div id="message" class="info">
     124
     125                                <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_get_groups_root_slug() . '/create/' ) ); ?></p>
     126
     127                        </div>
     128
     129                <?php endif; ?>
     130
     131        <?php endif; ?>
     132</div><!-- #new-topic-post -->
     133
     134<?php do_action( 'bp_after_new_topic_form' ); ?>
     135
     136<?php do_action( 'bp_after_directory_forums_content' ); ?>
     137 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/groups/create.php

     
     1<?php do_action( 'bp_before_create_group_page' ); ?>
     2
     3<div id="buddypress">
     4
     5        <?php do_action( 'bp_before_create_group_content_template' ); ?>
     6
     7        <form action="<?php bp_group_creation_form_action(); ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data">
     8
     9                <?php do_action( 'bp_before_create_group' ); ?>
     10
     11                <div class="item-list-tabs no-ajax" id="group-create-tabs" role="navigation">
     12                        <ul>
     13
     14                                <?php bp_group_creation_tabs(); ?>
     15
     16                        </ul>
     17                </div>
     18
     19                <?php do_action( 'template_notices' ); ?>
     20
     21                <div class="item-body" id="group-create-body">
     22
     23                        <?php /* Group creation step 1: Basic group details */ ?>
     24                        <?php if ( bp_is_group_creation_step( 'group-details' ) ) : ?>
     25
     26                                <?php do_action( 'bp_before_group_details_creation_step' ); ?>
     27
     28                                <div>
     29                                        <label for="group-name"><?php _e( 'Group Name (required)', 'buddypress' ); ?></label>
     30                                        <input type="text" name="group-name" id="group-name" aria-required="true" value="<?php bp_new_group_name(); ?>" />
     31                                </div>
     32
     33                                <div>
     34                                        <label for="group-desc"><?php _e( 'Group Description (required)', 'buddypress' ); ?></label>
     35                                        <textarea name="group-desc" id="group-desc" aria-required="true"><?php bp_new_group_description(); ?></textarea>
     36                                </div>
     37
     38                                <?php
     39                                do_action( 'bp_after_group_details_creation_step' );
     40                                do_action( 'groups_custom_group_fields_editable' ); // @Deprecated
     41
     42                                wp_nonce_field( 'groups_create_save_group-details' ); ?>
     43
     44                        <?php endif; ?>
     45
     46                        <?php /* Group creation step 2: Group settings */ ?>
     47                        <?php if ( bp_is_group_creation_step( 'group-settings' ) ) : ?>
     48
     49                                <?php do_action( 'bp_before_group_settings_creation_step' ); ?>
     50
     51                                <h4><?php _e( 'Privacy Options', 'buddypress' ); ?></h4>
     52
     53                                <div class="radio">
     54                                        <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 } ?> />
     55                                                <strong><?php _e( 'This is a public group', 'buddypress' ); ?></strong>
     56                                                <ul>
     57                                                        <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
     58                                                        <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     59                                                        <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
     60                                                </ul>
     61                                        </label>
     62
     63                                        <label><input type="radio" name="group-status" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
     64                                                <strong><?php _e( 'This is a private group', 'buddypress' ); ?></strong>
     65                                                <ul>
     66                                                        <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
     67                                                        <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     68                                                        <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
     69                                                </ul>
     70                                        </label>
     71
     72                                        <label><input type="radio" name="group-status" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> />
     73                                                <strong><?php _e('This is a hidden group', 'buddypress' ); ?></strong>
     74                                                <ul>
     75                                                        <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
     76                                                        <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
     77                                                        <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
     78                                                </ul>
     79                                        </label>
     80                                </div>
     81
     82                                <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
     83
     84                                <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
     85
     86                                <div class="radio">
     87                                        <label>
     88                                                <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
     89                                                <strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
     90                                        </label>
     91
     92                                        <label>
     93                                                <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
     94                                                <strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
     95                                        </label>
     96
     97                                        <label>
     98                                                <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
     99                                                <strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
     100                                        </label>
     101                                </div>
     102
     103                                <?php if ( bp_is_active( 'forums' ) ) : ?>
     104
     105                                        <h4><?php _e( 'Group Forums', 'buddypress' ); ?></h4>
     106
     107                                        <?php if ( bp_forums_is_installed_correctly() ) : ?>
     108
     109                                                <p><?php _e( 'Should this group have a forum?', 'buddypress' ); ?></p>
     110
     111                                                <div class="checkbox">
     112                                                        <label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php checked( bp_get_new_group_enable_forum(), true, true ); ?> /> <?php _e( 'Enable discussion forum', 'buddypress' ); ?></label>
     113                                                </div>
     114                                        <?php elseif ( is_super_admin() ) : ?>
     115
     116                                                <p><?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_core_do_network_admin() ? network_admin_url( 'settings.php?page=bb-forums-setup' ) :  admin_url( 'admin.php?page=bb-forums-setup' ) ); ?></p>
     117
     118                                        <?php endif; ?>
     119
     120                                <?php endif; ?>
     121
     122                                <?php do_action( 'bp_after_group_settings_creation_step' ); ?>
     123
     124                                <?php wp_nonce_field( 'groups_create_save_group-settings' ); ?>
     125
     126                        <?php endif; ?>
     127
     128                        <?php /* Group creation step 3: Avatar Uploads */ ?>
     129                        <?php if ( bp_is_group_creation_step( 'group-avatar' ) ) : ?>
     130
     131                                <?php do_action( 'bp_before_group_avatar_creation_step' ); ?>
     132
     133                                <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
     134
     135                                        <div class="left-menu">
     136
     137                                                <?php bp_new_group_avatar(); ?>
     138
     139                                        </div><!-- .left-menu -->
     140
     141                                        <div class="main-column">
     142                                                <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>
     143
     144                                                <p>
     145                                                        <input type="file" name="file" id="file" />
     146                                                        <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ); ?>" />
     147                                                        <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
     148                                                </p>
     149
     150                                                <p><?php _e( 'To skip the avatar upload process, hit the "Next Step" button.', 'buddypress' ); ?></p>
     151                                        </div><!-- .main-column -->
     152
     153                                <?php endif; ?>
     154
     155                                <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
     156
     157                                        <h4><?php _e( 'Crop Group Avatar', 'buddypress' ); ?></h4>
     158
     159                                        <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ); ?>" />
     160
     161                                        <div id="avatar-crop-pane">
     162                                                <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ); ?>" />
     163                                        </div>
     164
     165                                        <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ); ?>" />
     166
     167                                        <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" />
     168                                        <input type="hidden" name="upload" id="upload" />
     169                                        <input type="hidden" id="x" name="x" />
     170                                        <input type="hidden" id="y" name="y" />
     171                                        <input type="hidden" id="w" name="w" />
     172                                        <input type="hidden" id="h" name="h" />
     173
     174                                <?php endif; ?>
     175
     176                                <?php do_action( 'bp_after_group_avatar_creation_step' ); ?>
     177
     178                                <?php wp_nonce_field( 'groups_create_save_group-avatar' ); ?>
     179
     180                        <?php endif; ?>
     181
     182                        <?php /* Group creation step 4: Invite friends to group */ ?>
     183                        <?php if ( bp_is_group_creation_step( 'group-invites' ) ) : ?>
     184
     185                                <?php do_action( 'bp_before_group_invites_creation_step' ); ?>
     186
     187                                <?php if ( bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
     188
     189                                        <div class="left-menu">
     190
     191                                                <div id="invite-list">
     192                                                        <ul>
     193                                                                <?php bp_new_group_invite_friend_list(); ?>
     194                                                        </ul>
     195
     196                                                        <?php wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' ); ?>
     197                                                </div>
     198
     199                                        </div><!-- .left-menu -->
     200
     201                                        <div class="main-column">
     202
     203                                                <div id="message" class="info">
     204                                                        <p><?php _e('Select people to invite from your friends list.', 'buddypress' ); ?></p>
     205                                                </div>
     206
     207                                                <?php /* The ID 'friend-list' is important for AJAX support. */ ?>
     208                                                <ul id="friend-list" class="item-list" role="main">
     209
     210                                                <?php if ( bp_group_has_invites() ) : ?>
     211
     212                                                        <?php while ( bp_group_invites() ) : bp_group_the_invite(); ?>
     213
     214                                                                <li id="<?php bp_group_invite_item_id(); ?>">
     215
     216                                                                        <?php bp_group_invite_user_avatar(); ?>
     217
     218                                                                        <h4><?php bp_group_invite_user_link(); ?></h4>
     219                                                                        <span class="activity"><?php bp_group_invite_user_last_active(); ?></span>
     220
     221                                                                        <div class="action">
     222                                                                                <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>
     223                                                                        </div>
     224                                                                </li>
     225
     226                                                        <?php endwhile; ?>
     227
     228                                                        <?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites' ); ?>
     229
     230                                                <?php endif; ?>
     231
     232                                                </ul>
     233
     234                                        </div><!-- .main-column -->
     235
     236                                <?php else : ?>
     237
     238                                        <div id="message" class="info">
     239                                                <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>
     240                                        </div>
     241
     242                                <?php endif; ?>
     243
     244                                <?php wp_nonce_field( 'groups_create_save_group-invites' ); ?>
     245
     246                                <?php do_action( 'bp_after_group_invites_creation_step' ); ?>
     247
     248                        <?php endif; ?>
     249
     250                        <?php do_action( 'groups_custom_create_steps' ); // Allow plugins to add custom group creation steps ?>
     251
     252                        <?php do_action( 'bp_before_group_creation_step_buttons' ); ?>
     253
     254                        <?php if ( 'crop-image' != bp_get_avatar_admin_step() ) : ?>
     255
     256                                <div class="submit" id="previous-next">
     257
     258                                        <?php /* Previous Button */ ?>
     259                                        <?php if ( !bp_is_first_group_creation_step() ) : ?>
     260
     261                                                <input type="button" value="<?php _e( 'Back to Previous Step', 'buddypress' ); ?>" id="group-creation-previous" name="previous" onclick="location.href='<?php bp_group_creation_previous_link(); ?>'" />
     262
     263                                        <?php endif; ?>
     264
     265                                        <?php /* Next Button */ ?>
     266                                        <?php if ( !bp_is_last_group_creation_step() && !bp_is_first_group_creation_step() ) : ?>
     267
     268                                                <input type="submit" value="<?php _e( 'Next Step', 'buddypress' ); ?>" id="group-creation-next" name="save" />
     269
     270                                        <?php endif;?>
     271
     272                                        <?php /* Create Button */ ?>
     273                                        <?php if ( bp_is_first_group_creation_step() ) : ?>
     274
     275                                                <input type="submit" value="<?php _e( 'Create Group and Continue', 'buddypress' ); ?>" id="group-creation-create" name="save" />
     276
     277                                        <?php endif; ?>
     278
     279                                        <?php /* Finish Button */ ?>
     280                                        <?php if ( bp_is_last_group_creation_step() ) : ?>
     281
     282                                                <input type="submit" value="<?php _e( 'Finish', 'buddypress' ); ?>" id="group-creation-finish" name="save" />
     283
     284                                        <?php endif; ?>
     285                                </div>
     286
     287                        <?php endif;?>
     288
     289                        <?php do_action( 'bp_after_group_creation_step_buttons' ); ?>
     290
     291                        <?php /* Don't leave out this hidden field */ ?>
     292                        <input type="hidden" name="group_id" id="group_id" value="<?php bp_new_group_id(); ?>" />
     293
     294                        <?php do_action( 'bp_directory_groups_content' ); ?>
     295
     296                </div><!-- .item-body -->
     297
     298                <?php do_action( 'bp_after_create_group' ); ?>
     299
     300        </form>
     301
     302        <?php do_action( 'bp_after_create_group_content_template' ); ?>
     303
     304</div>
     305
     306<?php do_action( 'bp_after_create_group_page' ); ?>
     307 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/groups/groups-loop.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Groups Loop
     5 *
     6 * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
     7 *
     8 * @package BuddyPress
     9 * @subpackage bp-default
     10 */
     11
     12?>
     13
     14<?php do_action( 'bp_before_groups_loop' ); ?>
     15
     16<?php if ( bp_has_groups( bp_ajax_querystring( 'groups' ) ) ) : ?>
     17
     18        <div id="pag-top" class="pagination">
     19
     20                <div class="pag-count" id="group-dir-count-top">
     21
     22                        <?php bp_groups_pagination_count(); ?>
     23
     24                </div>
     25
     26                <div class="pagination-links" id="group-dir-pag-top">
     27
     28                        <?php bp_groups_pagination_links(); ?>
     29
     30                </div>
     31
     32        </div>
     33
     34        <?php do_action( 'bp_before_directory_groups_list' ); ?>
     35
     36        <ul id="groups-list" class="item-list" role="main">
     37
     38        <?php while ( bp_groups() ) : bp_the_group(); ?>
     39
     40                <li>
     41                        <div class="item-avatar">
     42                                <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( 'type=thumb&width=50&height=50' ); ?></a>
     43                        </div>
     44
     45                        <div class="item">
     46                                <div class="item-title"><a href="<?php bp_group_permalink(); ?>"><?php bp_group_name(); ?></a></div>
     47                                <div class="item-meta"><span class="activity"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span></div>
     48
     49                                <div class="item-desc"><?php bp_group_description_excerpt(); ?></div>
     50
     51                                <?php do_action( 'bp_directory_groups_item' ); ?>
     52
     53                        </div>
     54
     55                        <div class="action">
     56
     57                                <?php do_action( 'bp_directory_groups_actions' ); ?>
     58
     59                                <div class="meta">
     60
     61                                        <?php bp_group_type(); ?> / <?php bp_group_member_count(); ?>
     62
     63                                </div>
     64
     65                        </div>
     66
     67                        <div class="clear"></div>
     68                </li>
     69
     70        <?php endwhile; ?>
     71
     72        </ul>
     73
     74        <?php do_action( 'bp_after_directory_groups_list' ); ?>
     75
     76        <div id="pag-bottom" class="pagination">
     77
     78                <div class="pag-count" id="group-dir-count-bottom">
     79
     80                        <?php bp_groups_pagination_count(); ?>
     81
     82                </div>
     83
     84                <div class="pagination-links" id="group-dir-pag-bottom">
     85
     86                        <?php bp_groups_pagination_links(); ?>
     87
     88                </div>
     89
     90        </div>
     91
     92<?php else: ?>
     93
     94        <div id="message" class="info">
     95                <p><?php _e( 'There were no groups found.', 'buddypress' ); ?></p>
     96        </div>
     97
     98<?php endif; ?>
     99
     100<?php do_action( 'bp_after_groups_loop' ); ?>
  • bp-themes/bp-theme-compat/buddypress/groups/index.php

     
     1<?php do_action( 'bp_before_directory_groups_page' ); ?>
     2
     3<div id="buddypress">
     4
     5        <?php do_action( 'bp_before_directory_groups' ); ?>
     6
     7        <form action="" method="post" id="groups-directory-form" class="dir-form">
     8
     9                <?php do_action( 'bp_before_directory_groups_content' ); ?>
     10
     11                <div id="group-dir-search" class="dir-search" role="search">
     12
     13                        <?php bp_directory_groups_search_form(); ?>
     14
     15                </div><!-- #group-dir-search -->
     16
     17                <?php do_action( 'template_notices' ); ?>
     18
     19                <div class="item-list-tabs" role="navigation">
     20                        <ul>
     21                                <li class="selected" id="groups-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() ); ?>"><?php printf( __( 'All Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count() ); ?></a></li>
     22
     23                                <?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
     24
     25                                        <li id="groups-personal"><a href="<?php echo trailingslashit( bp_loggedin_user_domain() . bp_get_groups_slug() . '/my-groups' ); ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
     26
     27                                <?php endif; ?>
     28
     29                                <?php do_action( 'bp_groups_directory_group_filter' ); ?>
     30
     31                        </ul>
     32                </div><!-- .item-list-tabs -->
     33
     34                <div class="item-list-tabs" id="subnav" role="navigation">
     35                        <ul>
     36
     37                                <?php do_action( 'bp_groups_directory_group_types' ); ?>
     38
     39                                <li id="groups-order-select" class="last filter">
     40
     41                                        <label for="groups-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     42                                        <select id="groups-order-by">
     43                                                <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     44                                                <option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option>
     45                                                <option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option>
     46                                                <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
     47
     48                                                <?php do_action( 'bp_groups_directory_order_options' ); ?>
     49
     50                                        </select>
     51                                </li>
     52                        </ul>
     53                </div>
     54
     55                <div id="groups-dir-list" class="groups dir-list">
     56
     57                        <?php bp_get_template_part( 'groups/groups-loop' ); ?>
     58
     59                </div><!-- #groups-dir-list -->
     60
     61                <?php do_action( 'bp_directory_groups_content' ); ?>
     62
     63                <?php wp_nonce_field( 'directory_groups', '_wpnonce-groups-filter' ); ?>
     64
     65                <?php do_action( 'bp_after_directory_groups_content' ); ?>
     66
     67        </form><!-- #groups-directory-form -->
     68
     69        <?php do_action( 'bp_after_directory_groups' ); ?>
     70
     71</div><!-- #buddypress -->
     72
     73<?php do_action( 'bp_after_directory_groups_page' ); ?>
     74 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/groups/single/activity.php

     
     1<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     2        <ul>
     3                <li class="feed"><a href="<?php bp_group_activity_feed_link(); ?>" title="<?php _e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
     4
     5                <?php do_action( 'bp_group_activity_syndication_options' ); ?>
     6
     7                <li id="activity-filter-select" class="last">
     8                        <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
     9                        <select id="activity-filter-by">
     10                                <option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
     11                                <option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option>
     12
     13                                <?php if ( bp_is_active( 'forums' ) ) : ?>
     14                                        <option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
     15                                        <option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
     16                                <?php endif; ?>
     17
     18                                <option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
     19
     20                                <?php do_action( 'bp_group_activity_filter_options' ); ?>
     21                        </select>
     22                </li>
     23        </ul>
     24</div><!-- .item-list-tabs -->
     25
     26<?php do_action( 'bp_before_group_activity_post_form' ); ?>
     27
     28<?php if ( is_user_logged_in() && bp_group_is_member() ) : ?>
     29
     30        <?php bp_get_template_part( 'activity/post-form' ); ?>
     31
     32<?php endif; ?>
     33
     34<?php do_action( 'bp_after_group_activity_post_form' ); ?>
     35<?php do_action( 'bp_before_group_activity_content' ); ?>
     36
     37<div class="activity single-group" role="main">
     38
     39        <?php bp_get_template_part( 'activity/activity-loop' ); ?>
     40
     41</div><!-- .activity.single-group -->
     42
     43<?php do_action( 'bp_after_group_activity_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/groups/single/admin.php

     
     1<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     2        <ul>
     3                <?php bp_group_admin_tabs(); ?>
     4        </ul>
     5</div><!-- .item-list-tabs -->
     6
     7<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" role="main">
     8
     9<?php do_action( 'bp_before_group_admin_content' ); ?>
     10
     11<?php /* Edit Group Details */ ?>
     12<?php if ( bp_is_group_admin_screen( 'edit-details' ) ) : ?>
     13
     14        <?php do_action( 'bp_before_group_details_admin' ); ?>
     15
     16        <label for="group-name"><?php _e( 'Group Name (required)', 'buddypress' ); ?></label>
     17        <input type="text" name="group-name" id="group-name" value="<?php bp_group_name(); ?>" aria-required="true" />
     18
     19        <label for="group-desc"><?php _e( 'Group Description (required)', 'buddypress' ); ?></label>
     20        <textarea name="group-desc" id="group-desc" aria-required="true"><?php bp_group_description_editable(); ?></textarea>
     21
     22        <?php do_action( 'groups_custom_group_fields_editable' ); ?>
     23
     24        <p>
     25                <label for="group-notifiy-members"><?php _e( 'Notify group members of changes via email', 'buddypress' ); ?></label>
     26                <input type="radio" name="group-notify-members" value="1" /> <?php _e( 'Yes', 'buddypress' ); ?>&nbsp;
     27                <input type="radio" name="group-notify-members" value="0" checked="checked" /> <?php _e( 'No', 'buddypress' ); ?>&nbsp;
     28        </p>
     29
     30        <?php do_action( 'bp_after_group_details_admin' ); ?>
     31
     32        <p><input type="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="save" name="save" /></p>
     33        <?php wp_nonce_field( 'groups_edit_group_details' ); ?>
     34
     35<?php endif; ?>
     36
     37<?php /* Manage Group Settings */ ?>
     38<?php if ( bp_is_group_admin_screen( 'group-settings' ) ) : ?>
     39
     40        <?php do_action( 'bp_before_group_settings_admin' ); ?>
     41
     42        <?php if ( bp_is_active( 'forums' ) ) : ?>
     43
     44                <?php if ( bp_forums_is_installed_correctly() ) : ?>
     45
     46                        <div class="checkbox">
     47                                <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>
     48                        </div>
     49
     50                        <hr />
     51
     52                <?php endif; ?>
     53
     54        <?php endif; ?>
     55
     56        <h4><?php _e( 'Privacy Options', 'buddypress' ); ?></h4>
     57
     58        <div class="radio">
     59                <label>
     60                        <input type="radio" name="group-status" value="public"<?php bp_group_show_status_setting( 'public' ); ?> />
     61                        <strong><?php _e( 'This is a public group', 'buddypress' ); ?></strong>
     62                        <ul>
     63                                <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
     64                                <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     65                                <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
     66                        </ul>
     67                </label>
     68
     69                <label>
     70                        <input type="radio" name="group-status" value="private"<?php bp_group_show_status_setting( 'private' ); ?> />
     71                        <strong><?php _e( 'This is a private group', 'buddypress' ); ?></strong>
     72                        <ul>
     73                                <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
     74                                <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
     75                                <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
     76                        </ul>
     77                </label>
     78
     79                <label>
     80                        <input type="radio" name="group-status" value="hidden"<?php bp_group_show_status_setting( 'hidden' ); ?> />
     81                        <strong><?php _e( 'This is a hidden group', 'buddypress' ); ?></strong>
     82                        <ul>
     83                                <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
     84                                <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
     85                                <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
     86                        </ul>
     87                </label>
     88        </div>
     89
     90        <hr />
     91         
     92        <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
     93
     94        <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
     95
     96        <div class="radio">
     97                <label>
     98                        <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> />
     99                        <strong><?php _e( 'All group members', 'buddypress' ); ?></strong>
     100                </label>
     101
     102                <label>
     103                        <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> />
     104                        <strong><?php _e( 'Group admins and mods only', 'buddypress' ); ?></strong>
     105                </label>
     106               
     107                <label>
     108                        <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> />
     109                        <strong><?php _e( 'Group admins only', 'buddypress' ); ?></strong>
     110                </label>
     111        </div>
     112
     113        <hr />
     114
     115        <?php do_action( 'bp_after_group_settings_admin' ); ?>
     116
     117        <p><input type="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="save" name="save" /></p>
     118        <?php wp_nonce_field( 'groups_edit_group_settings' ); ?>
     119
     120<?php endif; ?>
     121
     122<?php /* Group Avatar Settings */ ?>
     123<?php if ( bp_is_group_admin_screen( 'group-avatar' ) ) : ?>
     124
     125        <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
     126
     127                        <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>
     128
     129                        <p>
     130                                <input type="file" name="file" id="file" />
     131                                <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ); ?>" />
     132                                <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
     133                        </p>
     134
     135                        <?php if ( bp_get_group_has_avatar() ) : ?>
     136
     137                                <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>
     138
     139                                <?php bp_button( array( 'id' => 'delete_group_avatar', 'component' => 'groups', 'wrapper_id' => 'delete-group-avatar-button', 'link_class' => 'edit', 'link_href' => bp_get_group_avatar_delete_link(), 'link_title' => __( 'Delete Avatar', 'buddypress' ), 'link_text' => __( 'Delete Avatar', 'buddypress' ) ) ); ?>
     140
     141                        <?php endif; ?>
     142
     143                        <?php wp_nonce_field( 'bp_avatar_upload' ); ?>
     144
     145        <?php endif; ?>
     146
     147        <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
     148
     149                <h4><?php _e( 'Crop Avatar', 'buddypress' ); ?></h4>
     150
     151                <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ); ?>" />
     152
     153                <div id="avatar-crop-pane">
     154                        <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ); ?>" />
     155                </div>
     156
     157                <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ); ?>" />
     158
     159                <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" />
     160                <input type="hidden" id="x" name="x" />
     161                <input type="hidden" id="y" name="y" />
     162                <input type="hidden" id="w" name="w" />
     163                <input type="hidden" id="h" name="h" />
     164
     165                <?php wp_nonce_field( 'bp_avatar_cropstore' ); ?>
     166
     167        <?php endif; ?>
     168
     169<?php endif; ?>
     170
     171<?php /* Manage Group Members */ ?>
     172<?php if ( bp_is_group_admin_screen( 'manage-members' ) ) : ?>
     173
     174        <?php do_action( 'bp_before_group_manage_members_admin' ); ?>
     175       
     176        <div class="bp-widget">
     177                <h4><?php _e( 'Administrators', 'buddypress' ); ?></h4>
     178
     179                <?php if ( bp_has_members( '&include='. bp_group_admin_ids() ) ) : ?>
     180               
     181                <ul id="admins-list" class="item-list single-line">
     182                       
     183                        <?php while ( bp_members() ) : bp_the_member(); ?>
     184                        <li>
     185                                <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
     186                                <h5>
     187                                        <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
     188                                        <?php if ( count( bp_group_admin_ids( false, 'array' ) ) > 1 ) : ?>
     189                                        <span class="small">
     190                                                <a class="button confirm admin-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
     191                                        </span>                 
     192                                        <?php endif; ?>
     193                                </h5>           
     194                        </li>
     195                        <?php endwhile; ?>
     196               
     197                </ul>
     198               
     199                <?php endif; ?>
     200
     201        </div>
     202       
     203        <?php if ( bp_group_has_moderators() ) : ?>
     204                <div class="bp-widget">
     205                        <h4><?php _e( 'Moderators', 'buddypress' ); ?></h4>             
     206                       
     207                        <?php if ( bp_has_members( '&include=' . bp_group_mod_ids() ) ) : ?>
     208                                <ul id="mods-list" class="item-list single-line">
     209                               
     210                                        <?php while ( bp_members() ) : bp_the_member(); ?>                                     
     211                                        <li>
     212                                                <?php echo bp_core_fetch_avatar( array( 'item_id' => bp_get_member_user_id(), 'type' => 'thumb', 'width' => 30, 'height' => 30, 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_member_name() ) ) ); ?>
     213                                                <h5>
     214                                                        <a href="<?php bp_member_permalink(); ?>"> <?php bp_member_name(); ?></a>
     215                                                        <span class="small">
     216                                                                <a href="<?php bp_group_member_promote_admin_link( array( 'user_id' => bp_get_member_user_id() ) ); ?>" class="button confirm mod-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
     217                                                                <a class="button confirm mod-demote-to-member" href="<?php bp_group_member_demote_link( bp_get_member_user_id() ); ?>"><?php _e( 'Demote to Member', 'buddypress' ); ?></a>
     218                                                        </span>         
     219                                                </h5>           
     220                                        </li>   
     221                                        <?php endwhile; ?>                     
     222                               
     223                                </ul>
     224                       
     225                        <?php endif; ?>
     226                </div>
     227        <?php endif ?>
     228
     229
     230        <div class="bp-widget">
     231                <h4><?php _e("Members", "buddypress"); ?></h4>
     232
     233                <?php if ( bp_group_has_members( 'per_page=15&exclude_banned=false' ) ) : ?>
     234
     235                        <?php if ( bp_group_member_needs_pagination() ) : ?>
     236
     237                                <div class="pagination no-ajax">
     238
     239                                        <div id="member-count" class="pag-count">
     240                                                <?php bp_group_member_pagination_count(); ?>
     241                                        </div>
     242
     243                                        <div id="member-admin-pagination" class="pagination-links">
     244                                                <?php bp_group_member_admin_pagination(); ?>
     245                                        </div>
     246
     247                                </div>
     248
     249                        <?php endif; ?>
     250
     251                        <ul id="members-list" class="item-list single-line">
     252                                <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
     253
     254                                        <li class="<?php bp_group_member_css_class(); ?>">
     255                                                <?php bp_group_member_avatar_mini(); ?>
     256
     257                                                <h5>
     258                                                        <?php bp_group_member_link(); ?>
     259
     260                                                        <?php if ( bp_get_group_member_is_banned() ) _e( '(banned)', 'buddypress' ); ?>
     261
     262                                                        <span class="small">
     263
     264                                                        <?php if ( bp_get_group_member_is_banned() ) : ?>
     265
     266                                                                <a href="<?php bp_group_member_unban_link(); ?>" class="button confirm member-unban" title="<?php _e( 'Unban this member', 'buddypress' ); ?>"><?php _e( 'Remove Ban', 'buddypress' ); ?></a>
     267
     268                                                        <?php else : ?>
     269
     270                                                                <a href="<?php bp_group_member_ban_link(); ?>" class="button confirm member-ban" title="<?php _e( 'Kick and ban this member', 'buddypress' ); ?>"><?php _e( 'Kick &amp; Ban', 'buddypress' ); ?></a>
     271                                                                <a href="<?php bp_group_member_promote_mod_link(); ?>" class="button confirm member-promote-to-mod" title="<?php _e( 'Promote to Mod', 'buddypress' ); ?>"><?php _e( 'Promote to Mod', 'buddypress' ); ?></a>
     272                                                                <a href="<?php bp_group_member_promote_admin_link(); ?>" class="button confirm member-promote-to-admin" title="<?php _e( 'Promote to Admin', 'buddypress' ); ?>"><?php _e( 'Promote to Admin', 'buddypress' ); ?></a>
     273
     274                                                        <?php endif; ?>
     275
     276                                                                <a href="<?php bp_group_member_remove_link(); ?>" class="button confirm" title="<?php _e( 'Remove this member', 'buddypress' ); ?>"><?php _e( 'Remove from group', 'buddypress' ); ?></a>
     277
     278                                                                <?php do_action( 'bp_group_manage_members_admin_item' ); ?>
     279
     280                                                        </span>
     281                                                </h5>
     282                                        </li>
     283
     284                                <?php endwhile; ?>
     285                        </ul>
     286
     287                <?php else: ?>
     288
     289                        <div id="message" class="info">
     290                                <p><?php _e( 'This group has no members.', 'buddypress' ); ?></p>
     291                        </div>
     292
     293                <?php endif; ?>
     294
     295        </div>
     296
     297        <?php do_action( 'bp_after_group_manage_members_admin' ); ?>
     298
     299<?php endif; ?>
     300
     301<?php /* Manage Membership Requests */ ?>
     302<?php if ( bp_is_group_admin_screen( 'membership-requests' ) ) : ?>
     303
     304        <?php do_action( 'bp_before_group_membership_requests_admin' ); ?>
     305
     306        <?php if ( bp_group_has_membership_requests() ) : ?>
     307
     308                <ul id="request-list" class="item-list">
     309                        <?php while ( bp_group_membership_requests() ) : bp_group_the_membership_request(); ?>
     310
     311                                <li>
     312                                        <?php bp_group_request_user_avatar_thumb(); ?>
     313                                        <h4><?php bp_group_request_user_link(); ?> <span class="comments"><?php bp_group_request_comment(); ?></span></h4>
     314                                        <span class="activity"><?php bp_group_request_time_since_requested(); ?></span>
     315
     316                                        <?php do_action( 'bp_group_membership_requests_admin_item' ); ?>
     317
     318                                        <div class="action">
     319
     320                                                <?php bp_button( array( 'id' => 'group_membership_accept', 'component' => 'groups', 'wrapper_class' => 'accept', 'link_href' => bp_get_group_request_accept_link(), 'link_title' => __( 'Accept', 'buddypress' ), 'link_text' => __( 'Accept', 'buddypress' ) ) ); ?>
     321
     322                                                <?php bp_button( array( 'id' => 'group_membership_reject', 'component' => 'groups', 'wrapper_class' => 'reject', 'link_href' => bp_get_group_request_reject_link(), 'link_title' => __( 'Reject', 'buddypress' ), 'link_text' => __( 'Reject', 'buddypress' ) ) ); ?>
     323
     324                                                <?php do_action( 'bp_group_membership_requests_admin_item_action' ); ?>
     325
     326                                        </div>
     327                                </li>
     328
     329                        <?php endwhile; ?>
     330                </ul>
     331
     332        <?php else: ?>
     333
     334                <div id="message" class="info">
     335                        <p><?php _e( 'There are no pending membership requests.', 'buddypress' ); ?></p>
     336                </div>
     337
     338        <?php endif; ?>
     339
     340        <?php do_action( 'bp_after_group_membership_requests_admin' ); ?>
     341
     342<?php endif; ?>
     343
     344<?php do_action( 'groups_custom_edit_steps' ) // Allow plugins to add custom group edit screens ?>
     345
     346<?php /* Delete Group Option */ ?>
     347<?php if ( bp_is_group_admin_screen( 'delete-group' ) ) : ?>
     348
     349        <?php do_action( 'bp_before_group_delete_admin' ); ?>
     350
     351        <div id="message" class="info">
     352                <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>
     353        </div>
     354
     355        <label><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' ); ?></label>
     356
     357        <?php do_action( 'bp_after_group_delete_admin' ); ?>
     358
     359        <div class="submit">
     360                <input type="submit" disabled="disabled" value="<?php _e( 'Delete Group', 'buddypress' ); ?>" id="delete-group-button" name="delete-group-button" />
     361        </div>
     362
     363        <?php wp_nonce_field( 'groups_delete_group' ); ?>
     364
     365<?php endif; ?>
     366
     367<?php /* This is important, don't forget it */ ?>
     368        <input type="hidden" name="group-id" id="group-id" value="<?php bp_group_id(); ?>" />
     369
     370<?php do_action( 'bp_after_group_admin_content' ); ?>
     371
     372</form><!-- #group-settings-form -->
     373
  • bp-themes/bp-theme-compat/buddypress/groups/single/forum.php

     
     1<?php
     2
     3do_action( 'bp_before_group_forum_content' );
     4
     5if ( bp_is_group_forum_topic_edit() ) :
     6        bp_get_template_part( 'groups/single/forum/edit' );
     7
     8elseif ( bp_is_group_forum_topic() ) :
     9        bp_get_template_part( 'groups/single/forum/topic' );
     10
     11else : ?>
     12
     13        <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     14                <ul>
     15
     16                        <?php if ( is_user_logged_in() ) : ?>
     17
     18                                <li>
     19                                        <a href="#post-new" class="show-hide-new"><?php _e( 'New Topic', 'buddypress' ); ?></a>
     20                                </li>
     21
     22                        <?php endif; ?>
     23
     24                        <?php if ( bp_forums_has_directory() ) : ?>
     25
     26                                <li>
     27                                        <a href="<?php bp_forums_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress' ); ?></a>
     28                                </li>
     29
     30                        <?php endif; ?>
     31
     32                        <?php do_action( 'bp_forums_directory_group_sub_types' ); ?>
     33
     34                        <li id="forums-order-select" class="last filter">
     35
     36                                <label for="forums-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     37                                <select id="forums-order-by">
     38                                        <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     39                                        <option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option>
     40                                        <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option>
     41
     42                                        <?php do_action( 'bp_forums_directory_order_options' ); ?>
     43
     44                                </select>
     45                        </li>
     46                </ul>
     47        </div>
     48
     49        <div class="forums single-forum" role="main">
     50
     51                <?php bp_get_template_part( 'forums/forums-loop' ) ?>
     52
     53        </div><!-- .forums.single-forum -->
     54
     55<?php endif; ?>
     56
     57<?php do_action( 'bp_after_group_forum_content' ); ?>
     58
     59<?php if ( !bp_is_group_forum_topic_edit() && !bp_is_group_forum_topic() ) : ?>
     60
     61        <?php if ( !bp_group_is_user_banned() && ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) ) : ?>
     62
     63                <form action="" method="post" id="forum-topic-form" class="standard-form">
     64                        <div id="new-topic-post">
     65
     66                                <?php do_action( 'bp_before_group_forum_post_new' ); ?>
     67
     68                                <?php if ( bp_groups_auto_join() && !bp_group_is_member() ) : ?>
     69                                        <p><?php _e( 'You will auto join this group when you start a new topic.', 'buddypress' ); ?></p>
     70                                <?php endif; ?>
     71
     72                                <p id="post-new"></p>
     73                                <h4><?php _e( 'Post a New Topic:', 'buddypress' ); ?></h4>
     74
     75                                <label><?php _e( 'Title:', 'buddypress' ); ?></label>
     76                                <input type="text" name="topic_title" id="topic_title" value="" maxlength="100" />
     77
     78                                <label><?php _e( 'Content:', 'buddypress' ); ?></label>
     79                                <textarea name="topic_text" id="topic_text"></textarea>
     80
     81                                <label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label>
     82                                <input type="text" name="topic_tags" id="topic_tags" value="" />
     83
     84                                <?php do_action( 'bp_after_group_forum_post_new' ); ?>
     85
     86                                <div class="submit">
     87                                        <input type="submit" name="submit_topic" id="submit" value="<?php _e( 'Post Topic', 'buddypress' ); ?>" />
     88                                </div>
     89
     90                                <?php wp_nonce_field( 'bp_forums_new_topic' ); ?>
     91                        </div><!-- #new-topic-post -->
     92                </form><!-- #forum-topic-form -->
     93
     94        <?php endif; ?>
     95
     96<?php endif; ?>
     97
  • bp-themes/bp-theme-compat/buddypress/groups/single/forum/edit.php

     
     1<?php do_action( 'bp_before_group_forum_edit_form' ); ?>
     2
     3<?php if ( bp_has_forum_topic_posts() ) : ?>
     4
     5        <form action="<?php bp_forum_topic_action(); ?>" method="post" id="forum-topic-form" class="standard-form">
     6
     7                <div class="item-list-tabs" id="subnav" role="navigation">
     8                        <ul>
     9                                <li>
     10                                        <a href="#post-topic-reply"><?php _e( 'Reply', 'buddypress' ); ?></a>
     11                                </li>
     12
     13                                <?php if ( bp_forums_has_directory() ) : ?>
     14
     15                                        <li>
     16                                                <a href="<?php bp_forums_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress' ); ?></a>
     17                                        </li>
     18
     19                                <?php endif; ?>
     20
     21                        </ul>
     22                </div>
     23
     24                <div id="topic-meta">
     25                        <h3><?php _e( 'Edit:', 'buddypress' ); ?> <?php bp_the_topic_title(); ?> (<?php bp_the_topic_total_post_count(); ?>)</h3>
     26
     27                        <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?>
     28
     29                                <div class="last admin-links">
     30
     31                                        <?php bp_the_topic_admin_links(); ?>
     32
     33                                </div>
     34
     35                        <?php endif; ?>
     36
     37                        <?php do_action( 'bp_group_forum_topic_meta' ); ?>
     38
     39                </div>
     40
     41                <?php if ( bp_is_edit_topic() ) : ?>
     42
     43                        <div id="edit-topic">
     44
     45                                <?php do_action( 'bp_group_before_edit_forum_topic' ); ?>
     46
     47                                <label for="topic_title"><?php _e( 'Title:', 'buddypress' ); ?></label>
     48                                <input type="text" name="topic_title" id="topic_title" value="<?php bp_the_topic_title(); ?>" maxlength="100" />
     49
     50                                <label for="topic_text"><?php _e( 'Content:', 'buddypress' ); ?></label>
     51                                <textarea name="topic_text" id="topic_text"><?php bp_the_topic_text(); ?></textarea>
     52
     53                                <label><?php _e( 'Tags (comma separated):', 'buddypress' ); ?></label>
     54                                <input type="text" name="topic_tags" id="topic_tags" value="<?php bp_forum_topic_tag_list(); ?>" />
     55
     56                                <?php do_action( 'bp_group_after_edit_forum_topic' ); ?>
     57
     58                                <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" /></p>
     59
     60                                <?php wp_nonce_field( 'bp_forums_edit_topic' ); ?>
     61
     62                        </div>
     63
     64                <?php else : ?>
     65
     66                        <div id="edit-post">
     67
     68                                <?php do_action( 'bp_group_before_edit_forum_post' ); ?>
     69
     70                                <textarea name="post_text" id="post_text"><?php bp_the_topic_post_edit_text(); ?></textarea>
     71
     72                                <?php do_action( 'bp_group_after_edit_forum_post' ); ?>
     73
     74                                <p class="submit"><input type="submit" name="save_changes" id="save_changes" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" /></p>
     75
     76                                <?php wp_nonce_field( 'bp_forums_edit_post' ); ?>
     77
     78                        </div>
     79
     80                <?php endif; ?>
     81
     82        </form><!-- #forum-topic-form -->
     83
     84<?php else: ?>
     85
     86        <div id="message" class="info">
     87                <p><?php _e( 'This topic does not exist.', 'buddypress' ); ?></p>
     88        </div>
     89
     90<?php endif;?>
     91
     92<?php do_action( 'bp_after_group_forum_edit_form' ); ?>
  • bp-themes/bp-theme-compat/buddypress/groups/single/forum/topic.php

     
     1<?php do_action( 'bp_before_group_forum_topic' ); ?>
     2
     3<form action="<?php bp_forum_topic_action(); ?>" method="post" id="forum-topic-form" class="standard-form">
     4        <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     5                <ul>
     6                        <?php if ( is_user_logged_in() ) : ?>
     7       
     8                                <li>
     9                                        <a href="<?php bp_forum_topic_new_reply_link(); ?>" class="new-reply-link"><?php _e( 'New Reply', 'buddypress' ); ?></a>
     10                                </li>
     11       
     12                        <?php endif; ?>
     13       
     14                        <?php if ( bp_forums_has_directory() ) : ?>
     15       
     16                                <li>
     17                                        <a href="<?php bp_forums_directory_permalink(); ?>"><?php _e( 'Forum Directory', 'buddypress' ); ?></a>
     18                                </li>
     19       
     20                        <?php endif; ?>
     21       
     22                </ul>
     23        </div>
     24       
     25        <div id="topic-meta">
     26                <h3><?php bp_the_topic_title(); ?> (<?php bp_the_topic_total_post_count(); ?>)</h3>
     27       
     28                <?php if ( bp_forum_topic_has_tags() ) : ?>
     29       
     30                        <div class="topic-tags">
     31       
     32                                <?php _e( 'Topic tags:', 'buddypress' ); ?> <?php bp_forum_topic_tag_list(); ?>
     33       
     34                        </div>
     35       
     36                <?php endif; ?>
     37       
     38                <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?>
     39       
     40                        <div class="last admin-links">
     41       
     42                                <?php bp_the_topic_admin_links(); ?>
     43       
     44                        </div>
     45       
     46                <?php endif; ?>
     47       
     48                <?php do_action( 'bp_group_forum_topic_meta' ); ?>
     49       
     50        </div>
     51
     52
     53        <?php if ( bp_has_forum_topic_posts() ) : ?>
     54
     55                <div class="pagination no-ajax">
     56
     57                        <div id="post-count-top" class="pag-count">
     58
     59                                <?php bp_the_topic_pagination_count(); ?>
     60
     61                        </div>
     62
     63                        <div class="pagination-links" id="topic-pag-top">
     64
     65                                <?php bp_the_topic_pagination(); ?>
     66
     67                        </div>
     68
     69                </div>
     70
     71                <?php do_action( 'bp_before_group_forum_topic_posts' ); ?>
     72
     73                <ul id="topic-post-list" class="item-list" role="main">
     74                        <?php while ( bp_forum_topic_posts() ) : bp_the_forum_topic_post(); ?>
     75
     76                                <li id="post-<?php bp_the_topic_post_id(); ?>" class="<?php bp_the_topic_post_css_class(); ?>">
     77                                        <div class="poster-meta">
     78                                                <a href="<?php bp_the_topic_post_poster_link(); ?>">
     79                                                        <?php bp_the_topic_post_poster_avatar( 'width=40&height=40' ); ?>
     80                                                </a>
     81                                                <?php echo sprintf( __( '%1$s said %2$s:', 'buddypress' ), bp_get_the_topic_post_poster_name(), bp_get_the_topic_post_time_since() ); ?>
     82                                        </div>
     83
     84                                        <div class="post-content">
     85                                                <?php bp_the_topic_post_content(); ?>
     86                                        </div>
     87
     88                                        <div class="admin-links">
     89                                                <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_post_is_mine() ) : ?>
     90                                                        <?php bp_the_topic_post_admin_links(); ?>
     91                                                <?php endif; ?>
     92
     93                                                <?php do_action( 'bp_group_forum_post_meta' ); ?>
     94
     95                                                <a href="#post-<?php bp_the_topic_post_id(); ?>" title="<?php _e( 'Permanent link to this post', 'buddypress' ); ?>">#</a>
     96                                        </div>
     97                                </li>
     98
     99                        <?php endwhile; ?>
     100                </ul><!-- #topic-post-list -->
     101
     102                <?php do_action( 'bp_after_group_forum_topic_posts' ); ?>
     103
     104                <div class="pagination no-ajax">
     105
     106                        <div id="post-count-bottom" class="pag-count">
     107                                <?php bp_the_topic_pagination_count(); ?>
     108                        </div>
     109
     110                        <div class="pagination-links" id="topic-pag-bottom">
     111                                <?php bp_the_topic_pagination(); ?>
     112                        </div>
     113
     114                </div>
     115
     116        <?php else: ?>
     117       
     118                <div id="message" class="info">
     119                        <p><?php _e( 'There are no posts for this topic.', 'buddypress' ); ?></p>
     120                </div>
     121       
     122        <?php endif;?>
     123
     124        <?php if ( ( is_user_logged_in() && 'public' == bp_get_group_status() ) || bp_group_is_member() ) : ?>
     125
     126                <?php if ( bp_get_the_topic_is_last_page() ) : ?>
     127
     128                        <?php if ( bp_get_the_topic_is_topic_open() && !bp_group_is_user_banned() ) : ?>
     129
     130                                <div id="post-topic-reply">
     131                                        <p id="post-reply"></p>
     132
     133                                        <?php if ( bp_groups_auto_join() && !bp_group_is_member() ) : ?>
     134                                                <p><?php _e( 'You will auto join this group when you reply to this topic.', 'buddypress' ); ?></p>
     135                                        <?php endif; ?>
     136
     137                                        <?php do_action( 'groups_forum_new_reply_before' ); ?>
     138
     139                                        <h4><?php _e( 'Add a reply:', 'buddypress' ); ?></h4>
     140
     141                                        <textarea name="reply_text" id="reply_text"></textarea>
     142
     143                                        <div class="submit">
     144                                                <input type="submit" name="submit_reply" id="submit" value="<?php _e( 'Post Reply', 'buddypress' ); ?>" />
     145                                        </div>
     146
     147                                        <?php do_action( 'groups_forum_new_reply_after' ); ?>
     148
     149                                        <?php wp_nonce_field( 'bp_forums_new_reply' ); ?>
     150                                </div>
     151
     152                        <?php elseif ( !bp_group_is_user_banned() ) : ?>
     153
     154                                <div id="message" class="info">
     155                                        <p><?php _e( 'This topic is closed, replies are no longer accepted.', 'buddypress' ); ?></p>
     156                                </div>
     157
     158                        <?php endif; ?>
     159
     160                <?php endif; ?>
     161
     162        <?php endif; ?>
     163
     164</form><!-- #forum-topic-form -->
     165
     166<?php do_action( 'bp_after_group_forum_topic' ); ?>
  • bp-themes/bp-theme-compat/buddypress/groups/single/group-header.php

     
     1<?php
     2
     3do_action( 'bp_before_group_header' );
     4
     5?>
     6
     7<div id="item-actions">
     8
     9        <?php if ( bp_group_is_visible() ) : ?>
     10
     11                <h3><?php _e( 'Group Admins', 'buddypress' ); ?></h3>
     12
     13                <?php bp_group_list_admins();
     14
     15                do_action( 'bp_after_group_menu_admins' );
     16
     17                if ( bp_group_has_moderators() ) :
     18                        do_action( 'bp_before_group_menu_mods' ); ?>
     19
     20                        <h3><?php _e( 'Group Mods' , 'buddypress' ); ?></h3>
     21
     22                        <?php bp_group_list_mods();
     23
     24                        do_action( 'bp_after_group_menu_mods' );
     25
     26                endif;
     27
     28        endif; ?>
     29
     30</div><!-- #item-actions -->
     31
     32<div id="item-header-avatar">
     33        <a href="<?php bp_group_permalink(); ?>" title="<?php bp_group_name(); ?>">
     34
     35                <?php bp_group_avatar(); ?>
     36
     37        </a>
     38</div><!-- #item-header-avatar -->
     39
     40<div id="item-header-content">
     41        <h2><a href="<?php bp_group_permalink(); ?>" title="<?php bp_group_name(); ?>"><?php bp_group_name(); ?></a></h2>
     42        <span class="highlight"><?php bp_group_type(); ?></span> <span class="activity"><?php printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() ); ?></span>
     43
     44        <?php do_action( 'bp_before_group_header_meta' ); ?>
     45
     46        <div id="item-meta">
     47
     48                <?php bp_group_description(); ?>
     49
     50                <div id="item-buttons">
     51
     52                        <?php do_action( 'bp_group_header_actions' ); ?>
     53
     54                </div><!-- #item-buttons -->
     55
     56                <?php do_action( 'bp_group_header_meta' ); ?>
     57
     58        </div>
     59</div><!-- #item-header-content -->
     60
     61<?php
     62do_action( 'bp_after_group_header' );
     63do_action( 'template_notices' );
     64?>
     65 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/groups/single/home.php

     
     1<div id="buddypress">
     2
     3        <?php if ( bp_has_groups() ) : while ( bp_groups() ) : bp_the_group(); ?>
     4
     5        <?php do_action( 'bp_before_group_home_content' ); ?>
     6
     7        <div id="item-header" role="complementary">
     8
     9                <?php bp_get_template_part( 'groups/single/group-header' ); ?>
     10
     11        </div><!-- #item-header -->
     12
     13        <div id="item-nav">
     14                <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
     15                        <ul>
     16
     17                                <?php bp_get_options_nav(); ?>
     18
     19                                <?php do_action( 'bp_group_options_nav' ); ?>
     20
     21                        </ul>
     22                </div>
     23        </div><!-- #item-nav -->
     24
     25        <div id="item-body">
     26
     27                <?php do_action( 'bp_before_group_body' );
     28
     29                if ( bp_is_group_admin_page() && bp_group_is_visible() ) :
     30                        bp_get_template_part( 'groups/single/admin' );
     31
     32                elseif ( bp_is_group_members() && bp_group_is_visible() ) :
     33                        bp_get_template_part( 'groups/single/members' );
     34
     35                elseif ( bp_is_group_invites() && bp_group_is_visible() ) :
     36                        bp_get_template_part( 'groups/single/send-invites' );
     37
     38                elseif ( bp_is_group_forum() && bp_group_is_visible() && bp_is_active( 'forums' ) && bp_forums_is_installed_correctly() ) :
     39                        bp_get_template_part( 'groups/single/forum' );
     40
     41                elseif ( bp_is_group_membership_request() ) :
     42                        bp_get_template_part( 'groups/single/request-membership' );
     43
     44                elseif ( bp_group_is_visible() && bp_is_active( 'activity' ) ) :
     45                        bp_get_template_part( 'groups/single/activity' );
     46
     47                elseif ( bp_group_is_visible() ) :
     48                        bp_get_template_part( 'groups/single/members' );
     49
     50                // The group is not visible, show the status message
     51                elseif ( !bp_group_is_visible() ) :
     52
     53                        do_action( 'bp_before_group_status_message' ); ?>
     54
     55                        <div id="message" class="info">
     56                                <p><?php bp_group_status_message(); ?></p>
     57                        </div>
     58
     59                        <?php do_action( 'bp_after_group_status_message' );
     60
     61                // If nothing sticks, just load a group front template if one exists.
     62                else :
     63                        bp_get_template_part( 'groups/single/front' );
     64
     65                endif;
     66
     67                do_action( 'bp_after_group_body' ); ?>
     68
     69        </div><!-- #item-body -->
     70
     71        <?php do_action( 'bp_after_group_home_content' ); ?>
     72
     73        <?php endwhile; endif; ?>
     74
     75</div><!-- #buddypress -->
  • bp-themes/bp-theme-compat/buddypress/groups/single/members.php

     
     1<?php if ( bp_group_has_members( 'exclude_admins_mods=0' ) ) : ?>
     2
     3        <?php do_action( 'bp_before_group_members_content' ); ?>
     4
     5        <div class="item-list-tabs" id="subnav" role="navigation">
     6                <ul>
     7
     8                        <?php do_action( 'bp_members_directory_member_sub_types' ); ?>
     9
     10                </ul>
     11        </div>
     12
     13        <div id="pag-top" class="pagination no-ajax">
     14
     15                <div class="pag-count" id="member-count-top">
     16
     17                        <?php bp_members_pagination_count(); ?>
     18
     19                </div>
     20
     21                <div class="pagination-links" id="member-pag-top">
     22
     23                        <?php bp_members_pagination_links(); ?>
     24
     25                </div>
     26
     27        </div>
     28
     29        <?php do_action( 'bp_before_group_members_list' ); ?>
     30
     31        <ul id="member-list" class="item-list" role="main">
     32
     33                <?php while ( bp_group_members() ) : bp_group_the_member(); ?>
     34
     35                        <li>
     36                                <a href="<?php bp_group_member_domain(); ?>">
     37
     38                                        <?php bp_group_member_avatar_thumb(); ?>
     39
     40                                </a>
     41
     42                                <h5><?php bp_group_member_link(); ?></h5>
     43                                <span class="activity"><?php bp_group_member_joined_since(); ?></span>
     44
     45                                <?php do_action( 'bp_group_members_list_item' ); ?>
     46
     47                                <?php if ( bp_is_active( 'friends' ) ) : ?>
     48
     49                                        <div class="action">
     50
     51                                                <?php bp_add_friend_button( bp_get_group_member_id(), bp_get_group_member_is_friend() ); ?>
     52
     53                                                <?php do_action( 'bp_group_members_list_item_action' ); ?>
     54
     55                                        </div>
     56
     57                                <?php endif; ?>
     58                        </li>
     59
     60                <?php endwhile; ?>
     61
     62        </ul>
     63
     64        <?php do_action( 'bp_after_group_members_list' ); ?>
     65
     66        <div id="pag-bottom" class="pagination no-ajax">
     67
     68                <div class="pag-count" id="member-count-bottom">
     69
     70                        <?php bp_members_pagination_count(); ?>
     71
     72                </div>
     73
     74                <div class="pagination-links" id="member-pag-bottom">
     75
     76                        <?php bp_members_pagination_links(); ?>
     77
     78                </div>
     79
     80        </div>
     81
     82        <?php do_action( 'bp_after_group_members_content' ); ?>
     83
     84<?php else: ?>
     85
     86        <div id="message" class="info">
     87                <p><?php _e( 'This group has no members.', 'buddypress' ); ?></p>
     88        </div>
     89
     90<?php endif; ?>
  • bp-themes/bp-theme-compat/buddypress/groups/single/plugins.php

     
     1<div id="buddypress">
     2
     3        <?php if ( bp_has_groups() ) : while ( bp_groups() ) : bp_the_group(); ?>
     4
     5                <?php do_action( 'bp_before_group_plugin_template' ); ?>
     6
     7                <div id="item-header">
     8
     9                        <?php bp_get_template_part( 'groups/single/group-header' ); ?>
     10
     11                </div><!-- #item-header -->
     12
     13                <div id="item-nav">
     14                        <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
     15                                <ul>
     16                                        <?php bp_get_options_nav(); ?>
     17
     18                                        <?php do_action( 'bp_group_plugin_options_nav' ); ?>
     19                                </ul>
     20                        </div>
     21                </div><!-- #item-nav -->
     22
     23                <div id="item-body">
     24
     25                        <?php do_action( 'bp_before_group_body' ); ?>
     26
     27                        <?php do_action( 'bp_template_content' ); ?>
     28
     29                        <?php do_action( 'bp_after_group_body' ); ?>
     30                </div><!-- #item-body -->
     31
     32                <?php do_action( 'bp_after_group_plugin_template' ); ?>
     33
     34        <?php endwhile; endif; ?>
     35
     36</div><!-- #buddypress -->
  • bp-themes/bp-theme-compat/buddypress/groups/single/request-membership.php

     
     1<?php do_action( 'bp_before_group_request_membership_content' ); ?>
     2
     3<?php if ( !bp_group_has_requested_membership() ) : ?>
     4        <p><?php printf( __( "You are requesting to become a member of the group '%s'.", "buddypress" ), bp_get_group_name( false ) ); ?></p>
     5
     6        <form action="<?php bp_group_form_action('request-membership' ); ?>" method="post" name="request-membership-form" id="request-membership-form" class="standard-form">
     7                <label for="group-request-membership-comments"><?php _e( 'Comments (optional)', 'buddypress' ); ?></label>
     8                <textarea name="group-request-membership-comments" id="group-request-membership-comments"></textarea>
     9
     10                <?php do_action( 'bp_group_request_membership_content' ); ?>
     11
     12                <p><input type="submit" name="group-request-send" id="group-request-send" value="<?php _e( 'Send Request', 'buddypress' ); ?>" />
     13
     14                <?php wp_nonce_field( 'groups_request_membership' ); ?>
     15        </form><!-- #request-membership-form -->
     16<?php endif; ?>
     17
     18<?php do_action( 'bp_after_group_request_membership_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/groups/single/send-invites.php

     
     1<?php do_action( 'bp_before_group_send_invites_content' ); ?>
     2
     3<?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
     4
     5        <form action="<?php bp_group_send_invite_form_action(); ?>" method="post" id="send-invite-form" class="standard-form" role="main">
     6
     7                <div class="left-menu">
     8
     9                        <div id="invite-list">
     10                                <ul>
     11                                        <?php bp_new_group_invite_friend_list(); ?>
     12                                </ul>
     13
     14                                <?php wp_nonce_field( 'groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user' ); ?>
     15                        </div>
     16
     17                </div><!-- .left-menu -->
     18
     19                <div class="main-column">
     20
     21                        <div id="message" class="info">
     22                                <p><?php _e('Select people to invite from your friends list.', 'buddypress' ); ?></p>
     23                        </div>
     24
     25                        <?php do_action( 'bp_before_group_send_invites_list' ); ?>
     26
     27                        <?php /* The ID 'friend-list' is important for AJAX support. */ ?>
     28                        <ul id="friend-list" class="item-list">
     29                        <?php if ( bp_group_has_invites() ) : ?>
     30
     31                                <?php while ( bp_group_invites() ) : bp_group_the_invite(); ?>
     32
     33                                        <li id="<?php bp_group_invite_item_id(); ?>">
     34                                                <?php bp_group_invite_user_avatar(); ?>
     35
     36                                                <h4><?php bp_group_invite_user_link(); ?></h4>
     37                                                <span class="activity"><?php bp_group_invite_user_last_active(); ?></span>
     38
     39                                                <?php do_action( 'bp_group_send_invites_item' ); ?>
     40
     41                                                <div class="action">
     42                                                        <a class="button remove" href="<?php bp_group_invite_user_remove_invite_url(); ?>" id="<?php bp_group_invite_item_id(); ?>"><?php _e( 'Remove Invite', 'buddypress' ); ?></a>
     43
     44                                                        <?php do_action( 'bp_group_send_invites_item_action' ); ?>
     45                                                </div>
     46                                        </li>
     47
     48                                <?php endwhile; ?>
     49
     50                        <?php endif; ?>
     51                        </ul><!-- #friend-list -->
     52
     53                        <?php do_action( 'bp_after_group_send_invites_list' ); ?>
     54
     55                </div><!-- .main-column -->
     56
     57                <div class="clear"></div>
     58
     59                <div class="submit">
     60                        <input type="submit" name="submit" id="submit" value="<?php _e( 'Send Invites', 'buddypress' ); ?>" />
     61                </div>
     62
     63                <?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites' ); ?>
     64
     65                <?php /* This is important, don't forget it */ ?>
     66                <input type="hidden" name="group_id" id="group_id" value="<?php bp_group_id(); ?>" />
     67
     68        </form><!-- #send-invite-form -->
     69
     70<?php else : ?>
     71
     72        <div id="message" class="info" role="main">
     73                <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>
     74        </div>
     75
     76<?php endif; ?>
     77
     78<?php do_action( 'bp_after_group_send_invites_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/index.php

     
     1<?php do_action( 'bp_before_directory_members_page' ); ?>
     2
     3<div id="buddypress">
     4
     5        <?php do_action( 'bp_before_directory_members' ); ?>
     6
     7        <form action="" method="post" id="members-directory-form" class="dir-form">
     8
     9                <?php do_action( 'bp_before_directory_members_content' ); ?>
     10
     11                <div id="members-dir-search" class="dir-search" role="search">
     12
     13                        <?php bp_directory_members_search_form(); ?>
     14
     15                </div><!-- #members-dir-search -->
     16
     17                <div class="item-list-tabs" role="navigation">
     18                        <ul>
     19                                <li class="selected" id="members-all"><a href="<?php echo trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ); ?>"><?php printf( __( 'All Members <span>%s</span>', 'buddypress' ), bp_get_total_member_count() ); ?></a></li>
     20
     21                                <?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
     22
     23                                        <li id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/' ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
     24
     25                                <?php endif; ?>
     26
     27                                <?php do_action( 'bp_members_directory_member_types' ); ?>
     28
     29                        </ul>
     30                </div><!-- .item-list-tabs -->
     31
     32                <div class="item-list-tabs" id="subnav" role="navigation">
     33                        <ul>
     34
     35                                <?php do_action( 'bp_members_directory_member_sub_types' ); ?>
     36
     37                                <li id="members-order-select" class="last filter">
     38
     39                                        <label for="members-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     40                                        <select id="members-order-by">
     41                                                <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     42                                                <option value="newest"><?php _e( 'Newest Registered', 'buddypress' ); ?></option>
     43
     44                                                <?php if ( bp_is_active( 'xprofile' ) ) : ?>
     45
     46                                                        <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
     47
     48                                                <?php endif; ?>
     49
     50                                                <?php do_action( 'bp_members_directory_order_options' ); ?>
     51
     52                                        </select>
     53                                </li>
     54                        </ul>
     55                </div>
     56
     57                <div id="members-dir-list" class="members dir-list">
     58
     59                        <?php bp_get_template_part( 'members/members-loop' ); ?>
     60
     61                </div><!-- #members-dir-list -->
     62
     63                <?php do_action( 'bp_directory_members_content' ); ?>
     64
     65                <?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>
     66
     67                <?php do_action( 'bp_after_directory_members_content' ); ?>
     68
     69        </form><!-- #members-directory-form -->
     70
     71        <?php do_action( 'bp_after_directory_members' ); ?>
     72
     73</div><!-- #buddypress -->
     74
     75<?php do_action( 'bp_after_directory_members_page' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/members-loop.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Members Loop
     5 *
     6 * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
     7 *
     8 * @package BuddyPress
     9 * @subpackage bp-default
     10 */
     11
     12?>
     13
     14<?php do_action( 'bp_before_members_loop' ); ?>
     15
     16<?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>
     17
     18        <div id="pag-top" class="pagination">
     19
     20                <div class="pag-count" id="member-dir-count-top">
     21
     22                        <?php bp_members_pagination_count(); ?>
     23
     24                </div>
     25
     26                <div class="pagination-links" id="member-dir-pag-top">
     27
     28                        <?php bp_members_pagination_links(); ?>
     29
     30                </div>
     31
     32        </div>
     33
     34        <?php do_action( 'bp_before_directory_members_list' ); ?>
     35
     36        <ul id="members-list" class="item-list" role="main">
     37
     38        <?php while ( bp_members() ) : bp_the_member(); ?>
     39
     40                <li>
     41                        <div class="item-avatar">
     42                                <a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a>
     43                        </div>
     44
     45                        <div class="item">
     46                                <div class="item-title">
     47                                        <a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>
     48
     49                                        <?php if ( bp_get_member_latest_update() ) : ?>
     50
     51                                                <span class="update"> <?php bp_member_latest_update(); ?></span>
     52
     53                                        <?php endif; ?>
     54
     55                                </div>
     56
     57                                <div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>
     58
     59                                <?php do_action( 'bp_directory_members_item' ); ?>
     60
     61                                <?php
     62                                 /***
     63                                  * If you want to show specific profile fields here you can,
     64                                  * but it'll add an extra query for each member in the loop
     65                                  * (only one regardless of the number of fields you show):
     66                                  *
     67                                  * bp_member_profile_data( 'field=the field name' );
     68                                  */
     69                                ?>
     70                        </div>
     71
     72                        <div class="action">
     73
     74                                <?php do_action( 'bp_directory_members_actions' ); ?>
     75
     76                        </div>
     77
     78                        <div class="clear"></div>
     79                </li>
     80
     81        <?php endwhile; ?>
     82
     83        </ul>
     84
     85        <?php do_action( 'bp_after_directory_members_list' ); ?>
     86
     87        <?php bp_member_hidden_fields(); ?>
     88
     89        <div id="pag-bottom" class="pagination">
     90
     91                <div class="pag-count" id="member-dir-count-bottom">
     92
     93                        <?php bp_members_pagination_count(); ?>
     94
     95                </div>
     96
     97                <div class="pagination-links" id="member-dir-pag-bottom">
     98
     99                        <?php bp_members_pagination_links(); ?>
     100
     101                </div>
     102
     103        </div>
     104
     105<?php else: ?>
     106
     107        <div id="message" class="info">
     108                <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
     109        </div>
     110
     111<?php endif; ?>
     112
     113<?php do_action( 'bp_after_members_loop' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/activity.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Users Activity
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     13        <ul>
     14
     15                <?php bp_get_options_nav(); ?>
     16
     17                <li id="activity-filter-select" class="last">
     18                        <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
     19                        <select id="activity-filter-by">
     20                                <option value="-1"><?php _e( 'Everything', 'buddypress' ); ?></option>
     21                                <option value="activity_update"><?php _e( 'Updates', 'buddypress' ); ?></option>
     22
     23                                <?php
     24                                if ( !bp_is_current_action( 'groups' ) ) :
     25                                        if ( bp_is_active( 'blogs' ) ) : ?>
     26
     27                                                <option value="new_blog_post"><?php _e( 'Posts', 'buddypress' ); ?></option>
     28                                                <option value="new_blog_comment"><?php _e( 'Comments', 'buddypress' ); ?></option>
     29
     30                                        <?php
     31                                        endif;
     32
     33                                        if ( bp_is_active( 'friends' ) ) : ?>
     34
     35                                                <option value="friendship_accepted,friendship_created"><?php _e( 'Friendships', 'buddypress' ); ?></option>
     36
     37                                        <?php endif;
     38
     39                                endif;
     40
     41                                if ( bp_is_active( 'forums' ) ) : ?>
     42
     43                                        <option value="new_forum_topic"><?php _e( 'Forum Topics', 'buddypress' ); ?></option>
     44                                        <option value="new_forum_post"><?php _e( 'Forum Replies', 'buddypress' ); ?></option>
     45
     46                                <?php endif;
     47
     48                                if ( bp_is_active( 'groups' ) ) : ?>
     49
     50                                        <option value="created_group"><?php _e( 'New Groups', 'buddypress' ); ?></option>
     51                                        <option value="joined_group"><?php _e( 'Group Memberships', 'buddypress' ); ?></option>
     52
     53                                <?php endif;
     54
     55                                do_action( 'bp_member_activity_filter_options' ); ?>
     56
     57                        </select>
     58                </li>
     59        </ul>
     60</div><!-- .item-list-tabs -->
     61
     62<?php do_action( 'bp_before_member_activity_post_form' ); ?>
     63
     64<?php
     65if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_current_action() || bp_is_current_action( 'just-me' ) ) )
     66        bp_get_template_part( 'activity/post-form' );
     67
     68do_action( 'bp_after_member_activity_post_form' );
     69do_action( 'bp_before_member_activity_content' ); ?>
     70
     71<div class="activity" role="main">
     72
     73        <?php bp_get_template_part( 'activity/activity-loop' ) ?>
     74
     75</div><!-- .activity -->
     76
     77<?php do_action( 'bp_after_member_activity_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/activity/permalink.php

     
     1<div id="buddypress">
     2        <?php do_action( 'template_notices' ); ?>
     3
     4        <div class="activity no-ajax" role="main">
     5                <?php if ( bp_has_activities( 'display_comments=threaded&show_hidden=true&include=' . bp_current_action() ) ) : ?>
     6
     7                        <ul id="activity-stream" class="activity-list item-list">
     8                        <?php while ( bp_activities() ) : bp_the_activity(); ?>
     9
     10                                <?php bp_get_template_part( 'activity/entry' ); ?>
     11
     12                        <?php endwhile; ?>
     13                        </ul>
     14
     15                <?php endif; ?>
     16        </div>
     17</div>
     18 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/members/single/blogs.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Users Blogs
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<div class="item-list-tabs" id="subnav" role="navigation">
     13        <ul>
     14
     15                <?php bp_get_options_nav(); ?>
     16
     17                <li id="blogs-order-select" class="last filter">
     18
     19                        <label for="blogs-all"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     20                        <select id="blogs-all">
     21                                <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     22                                <option value="newest"><?php _e( 'Newest', 'buddypress' ); ?></option>
     23                                <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
     24
     25                                <?php do_action( 'bp_member_blog_order_options' ); ?>
     26
     27                        </select>
     28                </li>
     29        </ul>
     30</div><!-- .item-list-tabs -->
     31
     32<?php do_action( 'bp_before_member_blogs_content' ); ?>
     33
     34<div class="blogs myblogs" role="main">
     35
     36        <?php bp_get_template_part( 'blogs/blogs-loop' ) ?>
     37
     38</div><!-- .blogs.myblogs -->
     39
     40<?php do_action( 'bp_after_member_blogs_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/forums.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Users Forums
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     13        <ul>
     14                <?php bp_get_options_nav(); ?>
     15
     16                <li id="forums-order-select" class="last filter">
     17
     18                        <label for="forums-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     19                        <select id="forums-order-by">
     20                                <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     21                                <option value="popular"><?php _e( 'Most Posts', 'buddypress' ); ?></option>
     22                                <option value="unreplied"><?php _e( 'Unreplied', 'buddypress' ); ?></option>
     23
     24                                <?php do_action( 'bp_forums_directory_order_options' ); ?>
     25
     26                        </select>
     27                </li>
     28        </ul>
     29</div><!-- .item-list-tabs -->
     30
     31<?php
     32
     33if ( bp_is_current_action( 'favorites' ) ) :
     34        bp_get_template_part( 'members/single/forums/topics' );
     35
     36else :
     37        do_action( 'bp_before_member_forums_content' ); ?>
     38
     39        <div class="forums myforums">
     40
     41                <?php bp_get_template_part( 'forums/forums-loop' ) ?>
     42
     43        </div>
     44
     45        <?php do_action( 'bp_after_member_forums_content' ); ?>
     46
     47<?php endif; ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/forums/topics.php

     
     1<?php
     2/*
     3 * To change this template, choose Tools | Templates
     4 * and open the template in the editor.
     5 */
     6
     7?>
  • bp-themes/bp-theme-compat/buddypress/members/single/friends.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Users Friends
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     13        <ul>
     14                <?php if ( bp_is_my_profile() ) bp_get_options_nav(); ?>
     15
     16                <?php if ( !bp_is_current_action( 'requests' ) ) : ?>
     17
     18                        <li id="members-order-select" class="last filter">
     19
     20                                <label for="members-friends"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     21                                <select id="members-friends">
     22                                        <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     23                                        <option value="newest"><?php _e( 'Newest Registered', 'buddypress' ); ?></option>
     24                                        <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
     25
     26                                        <?php do_action( 'bp_member_blog_order_options' ); ?>
     27
     28                                </select>
     29                        </li>
     30
     31                <?php endif; ?>
     32
     33        </ul>
     34</div>
     35
     36<?php
     37
     38if ( bp_is_current_action( 'requests' ) ) :
     39         bp_get_template_part( 'members/single/friends/requests' );
     40
     41else :
     42        do_action( 'bp_before_member_friends_content' ); ?>
     43
     44        <div class="members friends">
     45
     46                <?php bp_get_template_part( 'members/members-loop' ) ?>
     47
     48        </div><!-- .members.friends -->
     49
     50        <?php do_action( 'bp_after_member_friends_content' ); ?>
     51
     52<?php endif; ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/friends/requests.php

     
     1<?php do_action( 'bp_before_member_friend_requests_content' ); ?>
     2
     3<?php if ( bp_has_members( 'type=alphabetical&include=' . bp_get_friendship_requests() ) ) : ?>
     4
     5        <div id="pag-top" class="pagination no-ajax">
     6
     7                <div class="pag-count" id="member-dir-count-top">
     8
     9                        <?php bp_members_pagination_count(); ?>
     10
     11                </div>
     12
     13                <div class="pagination-links" id="member-dir-pag-top">
     14
     15                        <?php bp_members_pagination_links(); ?>
     16
     17                </div>
     18
     19        </div>
     20
     21        <ul id="friend-list" class="item-list" role="main">
     22                <?php while ( bp_members() ) : bp_the_member(); ?>
     23
     24                        <li id="friendship-<?php bp_friend_friendship_id(); ?>">
     25                                <div class="item-avatar">
     26                                        <a href="<?php bp_member_link(); ?>"><?php bp_member_avatar(); ?></a>
     27                                </div>
     28
     29                                <div class="item">
     30                                        <div class="item-title"><a href="<?php bp_member_link(); ?>"><?php bp_member_name(); ?></a></div>
     31                                        <div class="item-meta"><span class="activity"><?php bp_member_last_active(); ?></span></div>
     32                                </div>
     33
     34                                <?php do_action( 'bp_friend_requests_item' ); ?>
     35
     36                                <div class="action">
     37                                        <a class="button accept" href="<?php bp_friend_accept_request_link(); ?>"><?php _e( 'Accept', 'buddypress' ); ?></a> &nbsp;
     38                                        <a class="button reject" href="<?php bp_friend_reject_request_link(); ?>"><?php _e( 'Reject', 'buddypress' ); ?></a>
     39
     40                                        <?php do_action( 'bp_friend_requests_item_action' ); ?>
     41                                </div>
     42                        </li>
     43
     44                <?php endwhile; ?>
     45        </ul>
     46
     47        <?php do_action( 'bp_friend_requests_content' ); ?>
     48
     49        <div id="pag-bottom" class="pagination no-ajax">
     50
     51                <div class="pag-count" id="member-dir-count-bottom">
     52
     53                        <?php bp_members_pagination_count(); ?>
     54
     55                </div>
     56
     57                <div class="pagination-links" id="member-dir-pag-bottom">
     58
     59                        <?php bp_members_pagination_links(); ?>
     60
     61                </div>
     62
     63        </div>
     64
     65<?php else: ?>
     66
     67        <div id="message" class="info">
     68                <p><?php _e( 'You have no pending friendship requests.', 'buddypress' ); ?></p>
     69        </div>
     70
     71<?php endif;?>
     72
     73<?php do_action( 'bp_after_member_friend_requests_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/groups.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Users Groups
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     13        <ul>
     14                <?php if ( bp_is_my_profile() ) bp_get_options_nav(); ?>
     15
     16                <?php if ( !bp_is_current_action( 'invites' ) ) : ?>
     17
     18                        <li id="groups-order-select" class="last filter">
     19
     20                                <label for="groups-sort-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     21                                <select id="groups-sort-by">
     22                                        <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
     23                                        <option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option>
     24                                        <option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option>
     25                                        <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
     26
     27                                        <?php do_action( 'bp_member_group_order_options' ); ?>
     28
     29                                </select>
     30                        </li>
     31
     32                <?php endif; ?>
     33
     34        </ul>
     35</div><!-- .item-list-tabs -->
     36
     37<?php
     38
     39if ( bp_is_current_action( 'invites' ) ) :
     40        bp_get_template_part( 'members/single/groups/invites' );
     41
     42else :
     43        do_action( 'bp_before_member_groups_content' ); ?>
     44
     45        <div class="groups mygroups">
     46
     47                <?php bp_get_template_part( 'groups/groups-loop' ); ?>
     48
     49        </div>
     50
     51        <?php do_action( 'bp_after_member_groups_content' ); ?>
     52
     53<?php endif; ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/groups/invites.php

     
     1<?php do_action( 'bp_before_group_invites_content' ); ?>
     2
     3<?php if ( bp_has_groups( 'type=invites&user_id=' . bp_loggedin_user_id() ) ) : ?>
     4
     5        <ul id="group-list" class="invites item-list" role="main">
     6
     7                <?php while ( bp_groups() ) : bp_the_group(); ?>
     8
     9                        <li>
     10                                <div class="item-avatar">
     11                                        <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( 'type=thumb&width=50&height=50' ); ?></a>
     12                                </div>
     13
     14                                <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>
     15
     16                                <p class="desc">
     17                                        <?php bp_group_description_excerpt(); ?>
     18                                </p>
     19
     20                                <?php do_action( 'bp_group_invites_item' ); ?>
     21
     22                                <div class="action">
     23                                        <a class="button accept" href="<?php bp_group_accept_invite_link(); ?>"><?php _e( 'Accept', 'buddypress' ); ?></a> &nbsp;
     24                                        <a class="button reject confirm" href="<?php bp_group_reject_invite_link(); ?>"><?php _e( 'Reject', 'buddypress' ); ?></a>
     25
     26                                        <?php do_action( 'bp_group_invites_item_action' ); ?>
     27
     28                                </div>
     29                        </li>
     30
     31                <?php endwhile; ?>
     32        </ul>
     33
     34<?php else: ?>
     35
     36        <div id="message" class="info" role="main">
     37                <p><?php _e( 'You have no outstanding group invites.', 'buddypress' ); ?></p>
     38        </div>
     39
     40<?php endif;?>
     41
     42<?php do_action( 'bp_after_group_invites_content' ); ?>
     43 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/members/single/home.php

     
     1<div id="buddypress">
     2
     3        <?php do_action( 'bp_before_member_home_content' ); ?>
     4
     5        <div id="item-header" role="complementary">
     6
     7                <?php bp_get_template_part( 'members/single/member-header' ) ?>
     8
     9        </div><!-- #item-header -->
     10
     11        <div id="item-nav">
     12                <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
     13                        <ul>
     14
     15                                <?php bp_get_displayed_user_nav(); ?>
     16
     17                                <?php do_action( 'bp_member_options_nav' ); ?>
     18
     19                        </ul>
     20                </div>
     21        </div><!-- #item-nav -->
     22
     23        <div id="item-body">
     24
     25                <?php do_action( 'bp_before_member_body' );
     26
     27                if ( bp_is_user_activity() || !bp_current_component() ) :
     28                        bp_get_template_part( 'members/single/activity' );
     29
     30                elseif ( bp_is_user_blogs() ) :
     31                        bp_get_template_part( 'members/single/blogs'    );
     32
     33                elseif ( bp_is_user_friends() ) :
     34                        bp_get_template_part( 'members/single/friends'  );
     35
     36                elseif ( bp_is_user_groups() ) :
     37                        bp_get_template_part( 'members/single/groups'   );
     38
     39                elseif ( bp_is_user_messages() ) :
     40                        bp_get_template_part( 'members/single/messages' );
     41
     42                elseif ( bp_is_user_profile() ) :
     43                        bp_get_template_part( 'members/single/profile'  );
     44
     45                elseif ( bp_is_user_forums() ) :
     46                        bp_get_template_part( 'members/single/forums'   );
     47
     48                elseif ( bp_is_user_settings() ) :
     49                        bp_get_template_part( 'members/single/settings' );
     50
     51                // If nothing sticks, load a generic template
     52                else :
     53                        bp_get_template_part( 'members/single/plugins'  );
     54
     55                endif;
     56
     57                do_action( 'bp_after_member_body' ); ?>
     58
     59        </div><!-- #item-body -->
     60
     61        <?php do_action( 'bp_after_member_home_content' ); ?>
     62
     63</div><!-- #buddypress -->
  • bp-themes/bp-theme-compat/buddypress/members/single/member-header.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Users Header
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<?php do_action( 'bp_before_member_header' ); ?>
     13
     14<div id="item-header-avatar">
     15        <a href="<?php bp_displayed_user_link(); ?>">
     16
     17                <?php bp_displayed_user_avatar( 'type=full' ); ?>
     18
     19        </a>
     20</div><!-- #item-header-avatar -->
     21
     22<div id="item-header-content">
     23
     24        <h2>
     25                <a href="<?php bp_displayed_user_link(); ?>"><?php bp_displayed_user_fullname(); ?></a>
     26        </h2>
     27
     28        <span class="user-nicename">@<?php bp_displayed_user_username(); ?></span>
     29        <span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>
     30
     31        <?php do_action( 'bp_before_member_header_meta' ); ?>
     32
     33        <div id="item-meta">
     34
     35                <?php if ( bp_is_active( 'activity' ) ) : ?>
     36
     37                        <div id="latest-update">
     38
     39                                <?php bp_activity_latest_update( bp_displayed_user_id() ); ?>
     40
     41                        </div>
     42
     43                <?php endif; ?>
     44
     45                <div id="item-buttons">
     46
     47                        <?php do_action( 'bp_member_header_actions' ); ?>
     48
     49                </div><!-- #item-buttons -->
     50
     51                <?php
     52                /***
     53                 * If you'd like to show specific profile fields here use:
     54                 * bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field
     55                 */
     56                 do_action( 'bp_profile_header_meta' );
     57
     58                 ?>
     59
     60        </div><!-- #item-meta -->
     61
     62</div><!-- #item-header-content -->
     63
     64<?php do_action( 'bp_after_member_header' ); ?>
     65
     66<?php do_action( 'template_notices' ); ?>
     67 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/members/single/messages.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Users Messages
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     13        <ul>
     14
     15                <?php bp_get_options_nav(); ?>
     16
     17        </ul>
     18       
     19        <?php if ( bp_is_messages_inbox() || bp_is_messages_sentbox() ) : ?>
     20
     21                <div class="message-search"><?php bp_message_search_form(); ?></div>
     22
     23        <?php endif; ?>
     24
     25</div><!-- .item-list-tabs -->
     26
     27<?php
     28
     29        if ( bp_is_current_action( 'compose' ) ) :
     30                bp_get_template_part( 'members/single/messages/compose' );
     31
     32        elseif ( bp_is_current_action( 'view' ) ) :
     33                bp_get_template_part( 'members/single/messages/single' );
     34
     35        else :
     36                do_action( 'bp_before_member_messages_content' ); ?>
     37
     38        <div class="messages" role="main">
     39
     40                <?php
     41                        if ( bp_is_current_action( 'notices' ) )
     42                                bp_get_template_part( 'members/single/messages/notices-loop' );
     43                        else
     44                                bp_get_template_part( 'members/single/messages/messages-loop' );
     45                ?>
     46
     47        </div><!-- .messages -->
     48
     49        <?php do_action( 'bp_after_member_messages_content' ); ?>
     50
     51<?php endif; ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/messages/compose.php

     
     1<form action="<?php bp_messages_form_action('compose' ); ?>" method="post" id="send_message_form" class="standard-form" role="main">
     2
     3        <?php do_action( 'bp_before_messages_compose_content' ); ?>
     4
     5        <label for="send-to-input"><?php _e("Send To (Username or Friend's Name)", 'buddypress' ); ?></label>
     6        <ul class="first acfb-holder">
     7                <li>
     8                        <?php bp_message_get_recipient_tabs(); ?>
     9                        <input type="text" name="send-to-input" class="send-to-input" id="send-to-input" />
     10                </li>
     11        </ul>
     12
     13        <?php if ( bp_current_user_can( 'bp_moderate' ) ) : ?>
     14                <input type="checkbox" id="send-notice" name="send-notice" value="1" /> <?php _e( "This is a notice to all users.", "buddypress" ); ?>
     15        <?php endif; ?>
     16
     17        <label for="subject"><?php _e( 'Subject', 'buddypress' ); ?></label>
     18        <input type="text" name="subject" id="subject" value="<?php bp_messages_subject_value(); ?>" />
     19
     20        <label for="content"><?php _e( 'Message', 'buddypress' ); ?></label>
     21        <textarea name="content" id="message_content" rows="15" cols="40"><?php bp_messages_content_value(); ?></textarea>
     22
     23        <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(); ?>" />
     24
     25        <?php do_action( 'bp_after_messages_compose_content' ); ?>
     26
     27        <div class="submit">
     28                <input type="submit" value="<?php _e( "Send Message", 'buddypress' ); ?>" name="send" id="send" />
     29        </div>
     30
     31        <?php wp_nonce_field( 'messages_send_message' ); ?>
     32</form>
     33
     34<script type="text/javascript">
     35        document.getElementById("send-to-input").focus();
     36</script>
     37
  • bp-themes/bp-theme-compat/buddypress/members/single/messages/messages-loop.php

     
     1<?php do_action( 'bp_before_member_messages_loop' ); ?>
     2
     3<?php if ( bp_has_message_threads( bp_ajax_querystring( 'messages' ) ) ) : ?>
     4
     5        <div class="pagination no-ajax" id="user-pag">
     6
     7                <div class="pag-count" id="messages-dir-count">
     8                        <?php bp_messages_pagination_count(); ?>
     9                </div>
     10
     11                <div class="pagination-links" id="messages-dir-pag">
     12                        <?php bp_messages_pagination(); ?>
     13                </div>
     14
     15        </div><!-- .pagination -->
     16
     17        <?php do_action( 'bp_after_member_messages_pagination' ); ?>
     18
     19        <?php do_action( 'bp_before_member_messages_threads'   ); ?>
     20
     21        <table id="message-threads" class="messages-notices">
     22                <?php while ( bp_message_threads() ) : bp_message_thread(); ?>
     23
     24                        <tr id="m-<?php bp_message_thread_id(); ?>" class="<?php bp_message_css_class(); ?><?php if ( bp_message_thread_has_unread() ) : ?> unread"<?php else: ?> read"<?php endif; ?>>
     25                                <td width="1%" class="thread-count">
     26                                        <span class="unread-count"><?php bp_message_thread_unread_count(); ?></span>
     27                                </td>
     28                                <td width="1%" class="thread-avatar"><?php bp_message_thread_avatar(); ?></td>
     29
     30                                <?php if ( 'sentbox' != bp_current_action() ) : ?>
     31                                        <td width="30%" class="thread-from">
     32                                                <?php _e( 'From:', 'buddypress' ); ?> <?php bp_message_thread_from(); ?><br />
     33                                                <span class="activity"><?php bp_message_thread_last_post_date(); ?></span>
     34                                        </td>
     35                                <?php else: ?>
     36                                        <td width="30%" class="thread-from">
     37                                                <?php _e( 'To:', 'buddypress' ); ?> <?php bp_message_thread_to(); ?><br />
     38                                                <span class="activity"><?php bp_message_thread_last_post_date(); ?></span>
     39                                        </td>
     40                                <?php endif; ?>
     41
     42                                <td width="50%" class="thread-info">
     43                                        <p><a href="<?php bp_message_thread_view_link(); ?>" title="<?php _e( "View Message", "buddypress" ); ?>"><?php bp_message_thread_subject(); ?></a></p>
     44                                        <p class="thread-excerpt"><?php bp_message_thread_excerpt(); ?></p>
     45                                </td>
     46
     47                                <?php do_action( 'bp_messages_inbox_list_item' ); ?>
     48
     49                                <td width="13%" class="thread-options">
     50                                        <input type="checkbox" name="message_ids[]" value="<?php bp_message_thread_id(); ?>" />
     51                                        <a class="button confirm" href="<?php bp_message_thread_delete_link(); ?>" title="<?php _e( "Delete Message", "buddypress" ); ?>"><?php _e( 'Delete', 'buddypress' ); ?></a> &nbsp;
     52                                </td>
     53                        </tr>
     54
     55                <?php endwhile; ?>
     56        </table><!-- #message-threads -->
     57
     58        <div class="messages-options-nav">
     59                <?php bp_messages_options(); ?>
     60        </div><!-- .messages-options-nav -->
     61
     62        <?php do_action( 'bp_after_member_messages_threads' ); ?>
     63
     64        <?php do_action( 'bp_after_member_messages_options' ); ?>
     65
     66<?php else: ?>
     67
     68        <div id="message" class="info">
     69                <p><?php _e( 'Sorry, no messages were found.', 'buddypress' ); ?></p>
     70        </div>
     71
     72<?php endif;?>
     73
     74<?php do_action( 'bp_after_member_messages_loop' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/messages/notices-loop.php

     
     1<?php do_action( 'bp_before_notices_loop' ); ?>
     2
     3<?php if ( bp_has_message_threads() ) : ?>
     4
     5        <div class="pagination no-ajax" id="user-pag">
     6
     7                <div class="pag-count" id="messages-dir-count">
     8                        <?php bp_messages_pagination_count(); ?>
     9                </div>
     10
     11                <div class="pagination-links" id="messages-dir-pag">
     12                        <?php bp_messages_pagination(); ?>
     13                </div>
     14
     15        </div><!-- .pagination -->
     16
     17        <?php do_action( 'bp_after_notices_pagination' ); ?>
     18        <?php do_action( 'bp_before_notices' ); ?>
     19
     20        <table id="message-threads" class="messages-notices">
     21                <?php while ( bp_message_threads() ) : bp_message_thread(); ?>
     22                        <tr id="notice-<?php bp_message_notice_id(); ?>" class="<?php bp_message_css_class(); ?>">
     23                                <td width="1%"></td>
     24                                <td width="38%">
     25                                        <strong><?php bp_message_notice_subject(); ?></strong>
     26                                        <?php bp_message_notice_text(); ?>
     27                                </td>
     28                                <td width="21%">
     29
     30                                        <?php if ( bp_messages_is_active_notice() ) : ?>
     31
     32                                                <strong><?php bp_messages_is_active_notice(); ?></strong>
     33
     34                                        <?php endif; ?>
     35
     36                                        <span class="activity"><?php _e( 'Sent:', 'buddypress' ); ?> <?php bp_message_notice_post_date(); ?></span>
     37                                </td>
     38
     39                                <?php do_action( 'bp_notices_list_item' ); ?>
     40
     41                                <td width="10%">
     42                                        <a class="button" href="<?php bp_message_activate_deactivate_link(); ?>" class="confirm"><?php bp_message_activate_deactivate_text(); ?></a>
     43                                        <a class="button" href="<?php bp_message_notice_delete_link(); ?>" class="confirm" title="<?php _e( "Delete Message", "buddypress" ); ?>">x</a>
     44                                </td>
     45                        </tr>
     46                <?php endwhile; ?>
     47        </table><!-- #message-threads -->
     48
     49        <?php do_action( 'bp_after_notices' ); ?>
     50
     51<?php else: ?>
     52
     53        <div id="message" class="info">
     54                <p><?php _e( 'Sorry, no notices were found.', 'buddypress' ); ?></p>
     55        </div>
     56
     57<?php endif;?>
     58
     59<?php do_action( 'bp_after_notices_loop' ); ?>
     60 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/members/single/messages/single.php

     
     1<div id="message-thread" role="main">
     2
     3        <?php do_action( 'bp_before_message_thread_content' ); ?>
     4
     5        <?php if ( bp_thread_has_messages() ) : ?>
     6
     7                <h3 id="message-subject"><?php bp_the_thread_subject(); ?></h3>
     8
     9                <p id="message-recipients">
     10                        <span class="highlight">
     11
     12                                <?php if ( !bp_get_the_thread_recipients() ) : ?>
     13
     14                                        <?php _e( 'You are alone in this conversation.', 'buddypress' ); ?>
     15
     16                                <?php else : ?>
     17
     18                                        <?php printf( __( 'Conversation between %s and you.', 'buddypress' ), bp_get_the_thread_recipients() ); ?>
     19
     20                                <?php endif; ?>
     21
     22                        </span>
     23
     24                        <a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>" title="<?php _e( "Delete Message", "buddypress" ); ?>"><?php _e( 'Delete', 'buddypress' ); ?></a> &nbsp;
     25                </p>
     26
     27                <?php do_action( 'bp_before_message_thread_list' ); ?>
     28
     29                <?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?>
     30
     31                        <div class="message-box <?php bp_the_thread_message_alt_class(); ?>">
     32
     33                                <div class="message-metadata">
     34
     35                                        <?php do_action( 'bp_before_message_meta' ); ?>
     36
     37                                        <?php bp_the_thread_message_sender_avatar( 'type=thumb&width=30&height=30' ); ?>
     38                                        <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>
     39
     40                                        <?php do_action( 'bp_after_message_meta' ); ?>
     41
     42                                </div><!-- .message-metadata -->
     43
     44                                <?php do_action( 'bp_before_message_content' ); ?>
     45
     46                                <div class="message-content">
     47
     48                                        <?php bp_the_thread_message_content(); ?>
     49
     50                                </div><!-- .message-content -->
     51
     52                                <?php do_action( 'bp_after_message_content' ); ?>
     53
     54                                <div class="clear"></div>
     55
     56                        </div><!-- .message-box -->
     57
     58                <?php endwhile; ?>
     59
     60                <?php do_action( 'bp_after_message_thread_list' ); ?>
     61
     62                <?php do_action( 'bp_before_message_thread_reply' ); ?>
     63
     64                <form id="send-reply" action="<?php bp_messages_form_action(); ?>" method="post" class="standard-form">
     65
     66                        <div class="message-box">
     67
     68                                <div class="message-metadata">
     69
     70                                        <?php do_action( 'bp_before_message_meta' ); ?>
     71
     72                                        <div class="avatar-box">
     73                                                <?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?>
     74
     75                                                <strong><?php _e( 'Send a Reply', 'buddypress' ); ?></strong>
     76                                        </div>
     77
     78                                        <?php do_action( 'bp_after_message_meta' ); ?>
     79
     80                                </div><!-- .message-metadata -->
     81
     82                                <div class="message-content">
     83
     84                                        <?php do_action( 'bp_before_message_reply_box' ); ?>
     85
     86                                        <textarea name="content" id="message_content" rows="15" cols="40"></textarea>
     87
     88                                        <?php do_action( 'bp_after_message_reply_box' ); ?>
     89
     90                                        <div class="submit">
     91                                                <input type="submit" name="send" value="<?php _e( 'Send Reply', 'buddypress' ); ?>" id="send_reply_button"/>
     92                                        </div>
     93
     94                                        <input type="hidden" id="thread_id" name="thread_id" value="<?php bp_the_thread_id(); ?>" />
     95                                        <input type="hidden" id="messages_order" name="messages_order" value="<?php bp_thread_messages_order(); ?>" />
     96                                        <?php wp_nonce_field( 'messages_send_message', 'send_message_nonce' ); ?>
     97
     98                                </div><!-- .message-content -->
     99
     100                        </div><!-- .message-box -->
     101
     102                </form><!-- #send-reply -->
     103
     104                <?php do_action( 'bp_after_message_thread_reply' ); ?>
     105
     106        <?php endif; ?>
     107
     108        <?php do_action( 'bp_after_message_thread_content' ); ?>
     109
     110</div>
     111 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/members/single/plugins.php

     
     1<div id="buddypress">
     2
     3        <?php do_action( 'bp_before_member_plugin_template' ); ?>
     4
     5        <div id="item-header">
     6
     7                <?php bp_get_template_part( 'members/single/member-header' ) ?>
     8
     9        </div><!-- #item-header -->
     10
     11        <div id="item-nav">
     12                <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
     13                        <ul>
     14
     15                                <?php bp_get_displayed_user_nav(); ?>
     16
     17                                <?php do_action( 'bp_member_options_nav' ); ?>
     18
     19                        </ul>
     20                </div>
     21        </div><!-- #item-nav -->
     22
     23        <div id="item-body" role="main">
     24
     25                <?php do_action( 'bp_before_member_body' ); ?>
     26
     27                <div class="item-list-tabs no-ajax" id="subnav">
     28                        <ul>
     29
     30                                <?php bp_get_options_nav(); ?>
     31
     32                                <?php do_action( 'bp_member_plugin_options_nav' ); ?>
     33
     34                        </ul>
     35                </div><!-- .item-list-tabs -->
     36
     37                <h3><?php do_action( 'bp_template_title' ); ?></h3>
     38
     39                <?php do_action( 'bp_template_content' ); ?>
     40
     41                <?php do_action( 'bp_after_member_body' ); ?>
     42
     43        </div><!-- #item-body -->
     44
     45        <?php do_action( 'bp_after_member_plugin_template' ); ?>
     46
     47</div><!-- #buddypress -->
  • bp-themes/bp-theme-compat/buddypress/members/single/profile.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Users Profile
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<?php if ( bp_is_my_profile() ) : ?>
     13
     14        <div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     15                <ul>
     16
     17                        <?php bp_get_options_nav(); ?>
     18
     19                </ul>
     20        </div><!-- .item-list-tabs -->
     21
     22<?php endif; ?>
     23
     24<?php do_action( 'bp_before_profile_content' ); ?>
     25
     26<div class="profile" role="main">
     27
     28        <?php
     29                // Profile Edit
     30                if ( bp_is_current_action( 'edit' ) )
     31                        bp_get_template_part( 'members/single/profile/edit' );
     32
     33                // Change Avatar
     34                elseif ( bp_is_current_action( 'change-avatar' ) )
     35                        bp_get_template_part( 'members/single/profile/change-avatar' );
     36
     37                // Display XProfile
     38                elseif ( bp_is_active( 'xprofile' ) )
     39                        bp_get_template_part( 'members/single/profile/profile-loop' );
     40
     41                // Display WordPress profile (fallback)
     42                else
     43                        bp_get_template_part( 'members/single/profile/profile-wp' )
     44        ?>
     45
     46</div><!-- .profile -->
     47
     48<?php do_action( 'bp_after_profile_content' ); ?>
     49 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/members/single/profile/change-avatar.php

     
     1<h4><?php _e( 'Change Avatar', 'buddypress' ); ?></h4>
     2
     3<?php do_action( 'bp_before_profile_avatar_upload_content' ); ?>
     4
     5<?php if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) ) : ?>
     6
     7        <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>
     8
     9        <form action="" method="post" id="avatar-upload-form" class="standard-form" enctype="multipart/form-data">
     10
     11                <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
     12
     13                        <?php wp_nonce_field( 'bp_avatar_upload' ); ?>
     14                        <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>
     15
     16                        <p id="avatar-upload">
     17                                <input type="file" name="file" id="file" />
     18                                <input type="submit" name="upload" id="upload" value="<?php _e( 'Upload Image', 'buddypress' ); ?>" />
     19                                <input type="hidden" name="action" id="action" value="bp_avatar_upload" />
     20                        </p>
     21
     22                        <?php if ( bp_get_user_has_avatar() ) : ?>
     23                                <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>
     24                                <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>
     25                        <?php endif; ?>
     26
     27                <?php endif; ?>
     28
     29                <?php if ( 'crop-image' == bp_get_avatar_admin_step() ) : ?>
     30
     31                        <h5><?php _e( 'Crop Your New Avatar', 'buddypress' ); ?></h5>
     32
     33                        <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-to-crop" class="avatar" alt="<?php _e( 'Avatar to crop', 'buddypress' ); ?>" />
     34
     35                        <div id="avatar-crop-pane">
     36                                <img src="<?php bp_avatar_to_crop(); ?>" id="avatar-crop-preview" class="avatar" alt="<?php _e( 'Avatar preview', 'buddypress' ); ?>" />
     37                        </div>
     38
     39                        <input type="submit" name="avatar-crop-submit" id="avatar-crop-submit" value="<?php _e( 'Crop Image', 'buddypress' ); ?>" />
     40
     41                        <input type="hidden" name="image_src" id="image_src" value="<?php bp_avatar_to_crop_src(); ?>" />
     42                        <input type="hidden" id="x" name="x" />
     43                        <input type="hidden" id="y" name="y" />
     44                        <input type="hidden" id="w" name="w" />
     45                        <input type="hidden" id="h" name="h" />
     46
     47                        <?php wp_nonce_field( 'bp_avatar_cropstore' ); ?>
     48
     49                <?php endif; ?>
     50
     51        </form>
     52
     53<?php else : ?>
     54
     55        <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>
     56
     57<?php endif; ?>
     58
     59<?php do_action( 'bp_after_profile_avatar_upload_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/profile/edit.php

     
     1<?php do_action( 'bp_before_profile_edit_content' );
     2
     3if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() ) ) :
     4        while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
     5
     6<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(); ?>">
     7
     8        <?php do_action( 'bp_before_profile_field_content' ); ?>
     9
     10                <h4><?php printf( __( "Editing '%s' Profile Group", "buddypress" ), bp_get_the_profile_group_name() ); ?></h4>
     11
     12                <ul class="button-nav">
     13
     14                        <?php bp_profile_group_tabs(); ?>
     15
     16                </ul>
     17
     18                <div class="clear"></div>
     19
     20                <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
     21
     22                        <div<?php bp_field_css_class( 'editfield' ); ?>>
     23
     24                                <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
     25
     26                                        <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>
     27                                        <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 if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>/>
     28
     29                                <?php endif; ?>
     30
     31                                <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
     32
     33                                        <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>
     34                                        <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>><?php bp_the_profile_field_edit_value(); ?></textarea>
     35
     36                                <?php endif; ?>
     37
     38                                <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
     39
     40                                        <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>
     41                                        <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
     42                                                <?php bp_the_profile_field_options(); ?>
     43                                        </select>
     44
     45                                <?php endif; ?>
     46
     47                                <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
     48
     49                                        <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>
     50                                        <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
     51
     52                                                <?php bp_the_profile_field_options(); ?>
     53
     54                                        </select>
     55
     56                                        <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
     57
     58                                                <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a>
     59
     60                                        <?php endif; ?>
     61
     62                                <?php endif; ?>
     63
     64                                <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?>
     65
     66                                        <div class="radio">
     67                                                <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>
     68
     69                                                <?php bp_the_profile_field_options(); ?>
     70
     71                                                <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
     72
     73                                                        <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a>
     74
     75                                                <?php endif; ?>
     76                                        </div>
     77
     78                                <?php endif; ?>
     79
     80                                <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?>
     81
     82                                        <div class="checkbox">
     83                                                <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>
     84
     85                                                <?php bp_the_profile_field_options(); ?>
     86                                        </div>
     87
     88                                <?php endif; ?>
     89
     90                                <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?>
     91
     92                                        <div class="datebox">
     93                                                <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>
     94
     95                                                <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
     96
     97                                                        <?php bp_the_profile_field_options( 'type=day' ); ?>
     98
     99                                                </select>
     100
     101                                                <select name="<?php bp_the_profile_field_input_name(); ?>_month" id="<?php bp_the_profile_field_input_name(); ?>_month" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
     102
     103                                                        <?php bp_the_profile_field_options( 'type=month' ); ?>
     104
     105                                                </select>
     106
     107                                                <select name="<?php bp_the_profile_field_input_name(); ?>_year" id="<?php bp_the_profile_field_input_name(); ?>_year" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
     108
     109                                                        <?php bp_the_profile_field_options( 'type=year' ); ?>
     110
     111                                                </select>
     112                                        </div>
     113
     114                                <?php endif; ?>
     115
     116                                <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
     117                                        <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
     118                                                <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _e( 'Change', 'buddypress' ); ?></a>
     119                                        </p>
     120
     121                                        <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
     122                                                <fieldset>
     123                                                        <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
     124
     125                                                        <?php bp_profile_visibility_radio_buttons() ?>
     126
     127                                                </fieldset>
     128                                                <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
     129                                        </div>
     130                                <?php else : ?>
     131                                        <div class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
     132                                                <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
     133                                        </div>
     134                                <?php endif ?>
     135
     136                                <?php do_action( 'bp_custom_profile_edit_fields' ); ?>
     137
     138                                <p class="description"><?php bp_the_profile_field_description(); ?></p>
     139                        </div>
     140
     141                <?php endwhile; ?>
     142
     143        <?php do_action( 'bp_after_profile_field_content' ); ?>
     144
     145        <div class="submit">
     146                <input type="submit" name="profile-group-edit-submit" id="profile-group-edit-submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?> " />
     147        </div>
     148
     149        <input type="hidden" name="field_ids" id="field_ids" value="<?php bp_the_profile_group_field_ids(); ?>" />
     150
     151        <?php wp_nonce_field( 'bp_xprofile_edit' ); ?>
     152
     153</form>
     154
     155<?php endwhile; endif; ?>
     156
     157<?php do_action( 'bp_after_profile_edit_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/profile/profile-loop.php

     
     1<?php do_action( 'bp_before_profile_loop_content' ); ?>
     2
     3<?php if ( bp_has_profile() ) : ?>
     4
     5        <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
     6
     7                <?php if ( bp_profile_group_has_fields() ) : ?>
     8
     9                        <?php do_action( 'bp_before_profile_field_content' ); ?>
     10
     11                        <div class="bp-widget <?php bp_the_profile_group_slug(); ?>">
     12
     13                                <h4><?php bp_the_profile_group_name(); ?></h4>
     14
     15                                <table class="profile-fields">
     16
     17                                        <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
     18
     19                                                <?php if ( bp_field_has_data() ) : ?>
     20
     21                                                        <tr<?php bp_field_css_class(); ?>>
     22
     23                                                                <td class="label"><?php bp_the_profile_field_name(); ?></td>
     24
     25                                                                <td class="data"><?php bp_the_profile_field_value(); ?></td>
     26
     27                                                        </tr>
     28
     29                                                <?php endif; ?>
     30
     31                                                <?php do_action( 'bp_profile_field_item' ); ?>
     32
     33                                        <?php endwhile; ?>
     34
     35                                </table>
     36                        </div>
     37
     38                        <?php do_action( 'bp_after_profile_field_content' ); ?>
     39
     40                <?php endif; ?>
     41
     42        <?php endwhile; ?>
     43
     44        <?php do_action( 'bp_profile_field_buttons' ); ?>
     45
     46<?php endif; ?>
     47
     48<?php do_action( 'bp_after_profile_loop_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/profile/profile-wp.php

     
     1<?php do_action( 'bp_before_profile_loop_content' ); ?>
     2
     3<?php $ud = get_userdata( bp_displayed_user_id() ); ?>
     4
     5<?php do_action( 'bp_before_profile_field_content' ); ?>
     6
     7        <div class="bp-widget wp-profile">
     8                <h4><?php bp_is_my_profile() ? _e( 'My Profile', 'buddypress' ) : printf( __( "%s's Profile", 'buddypress' ), bp_get_displayed_user_fullname() ); ?></h4>
     9
     10                <table class="wp-profile-fields">
     11
     12                        <?php if ( $ud->display_name ) : ?>
     13
     14                                <tr id="wp_displayname">
     15                                        <td class="label"><?php _e( 'Name', 'buddypress' ); ?></td>
     16                                        <td class="data"><?php echo $ud->display_name; ?></td>
     17                                </tr>
     18
     19                        <?php endif; ?>
     20
     21                        <?php if ( $ud->user_description ) : ?>
     22
     23                                <tr id="wp_desc">
     24                                        <td class="label"><?php _e( 'About Me', 'buddypress' ); ?></td>
     25                                        <td class="data"><?php echo $ud->user_description; ?></td>
     26                                </tr>
     27
     28                        <?php endif; ?>
     29
     30                        <?php if ( $ud->user_url ) : ?>
     31
     32                                <tr id="wp_website">
     33                                        <td class="label"><?php _e( 'Website', 'buddypress' ); ?></td>
     34                                        <td class="data"><?php echo make_clickable( $ud->user_url ); ?></td>
     35                                </tr>
     36
     37                        <?php endif; ?>
     38
     39                        <?php if ( $ud->jabber ) : ?>
     40
     41                                <tr id="wp_jabber">
     42                                        <td class="label"><?php _e( 'Jabber', 'buddypress' ); ?></td>
     43                                        <td class="data"><?php echo $ud->jabber; ?></td>
     44                                </tr>
     45
     46                        <?php endif; ?>
     47
     48                        <?php if ( $ud->aim ) : ?>
     49
     50                                <tr id="wp_aim">
     51                                        <td class="label"><?php _e( 'AOL Messenger', 'buddypress' ); ?></td>
     52                                        <td class="data"><?php echo $ud->aim; ?></td>
     53                                </tr>
     54
     55                        <?php endif; ?>
     56
     57                        <?php if ( $ud->yim ) : ?>
     58
     59                                <tr id="wp_yim">
     60                                        <td class="label"><?php _e( 'Yahoo Messenger', 'buddypress' ); ?></td>
     61                                        <td class="data"><?php echo $ud->yim; ?></td>
     62                                </tr>
     63
     64                        <?php endif; ?>
     65
     66                </table>
     67        </div>
     68
     69<?php do_action( 'bp_after_profile_field_content' ); ?>
     70
     71<?php do_action( 'bp_profile_field_buttons' ); ?>
     72
     73<?php do_action( 'bp_after_profile_loop_content' ); ?>
  • bp-themes/bp-theme-compat/buddypress/members/single/settings.php

     
     1<?php
     2
     3/**
     4 * BuddyPress - Users Settings
     5 *
     6 * @package BuddyPress
     7 * @subpackage bp-default
     8 */
     9
     10?>
     11
     12<div class="item-list-tabs no-ajax" id="subnav" role="navigation">
     13        <ul>
     14                <?php if ( bp_is_my_profile() ) : ?>
     15               
     16                        <?php bp_get_options_nav(); ?>
     17               
     18                <?php endif; ?>
     19        </ul>
     20</div>
     21
     22<?php
     23
     24if ( bp_is_current_action( 'notifications' ) ) :
     25         bp_get_template_part( 'members/single/settings/notifications' );
     26
     27elseif ( bp_is_current_action( 'delete-account' ) ) :
     28         bp_get_template_part( 'members/single/settings/delete-account' );
     29
     30elseif ( bp_is_current_action( 'general' ) ) :
     31        bp_get_template_part( 'members/single/settings/general' );
     32
     33else :
     34        bp_get_template_part( 'members/single/plugins' );
     35
     36endif;
     37
     38?>
  • bp-themes/bp-theme-compat/buddypress/members/single/settings/capabilities.php

     
     1<div id="buddypress">
     2
     3        <?php do_action( 'bp_before_member_settings_template' ); ?>
     4
     5        <div id="item-header">
     6
     7                <?php bp_get_template_part( 'members/single/member-header' ) ?>
     8
     9        </div><!-- #item-header -->
     10
     11        <div id="item-nav">
     12                <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
     13                        <ul>
     14
     15                                <?php bp_get_displayed_user_nav(); ?>
     16
     17                                <?php do_action( 'bp_member_options_nav' ); ?>
     18
     19                        </ul>
     20                </div>
     21        </div><!-- #item-nav -->
     22
     23        <div id="item-body" role="main">
     24
     25                <?php do_action( 'bp_before_member_body' ); ?>
     26
     27                <div class="item-list-tabs no-ajax" id="subnav">
     28                        <ul>
     29
     30                                <?php bp_get_options_nav(); ?>
     31
     32                                <?php do_action( 'bp_member_plugin_options_nav' ); ?>
     33
     34                        </ul>
     35                </div><!-- .item-list-tabs -->
     36
     37                <h3><?php _e( 'Capabilities', 'buddypress' ); ?></h3>
     38
     39                <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/capabilities/'; ?>" name="account-capabilities-form" id="account-capabilities-form" class="standard-form" method="post">
     40
     41                        <?php do_action( 'bp_members_capabilities_account_before_submit' ); ?>
     42
     43                        <label>
     44                                <input type="checkbox" name="user-spammer" id="user-spammer" value="1" <?php checked( bp_is_user_spammer( bp_displayed_user_id() ) ); ?> />
     45                                 <?php _e( 'This user is a spammer.', 'buddypress' ); ?>
     46                        </label>
     47
     48                        <div class="submit">
     49                                <input type="submit" value="<?php _e( 'Save', 'buddypress' ); ?>" id="capabilities-submit" name="capabilities-submit" />
     50                        </div>
     51
     52                        <?php do_action( 'bp_members_capabilities_account_after_submit' ); ?>
     53
     54                        <?php wp_nonce_field( 'capabilities' ); ?>
     55
     56                </form>
     57
     58                <?php do_action( 'bp_after_member_body' ); ?>
     59
     60        </div><!-- #item-body -->
     61
     62        <?php do_action( 'bp_after_member_settings_template' ); ?>
     63
     64</div><!-- #buddypress -->
  • bp-themes/bp-theme-compat/buddypress/members/single/settings/delete-account.php

     
     1<div id="buddypress">
     2
     3        <?php do_action( 'bp_before_member_settings_template' ); ?>
     4
     5        <div id="item-header">
     6
     7                <?php bp_get_template_part( 'members/single/member-header' ) ?>
     8
     9        </div><!-- #item-header -->
     10
     11        <div id="item-nav">
     12                <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
     13                        <ul>
     14
     15                                <?php bp_get_displayed_user_nav(); ?>
     16
     17                                <?php do_action( 'bp_member_options_nav' ); ?>
     18
     19                        </ul>
     20                </div>
     21        </div><!-- #item-nav -->
     22
     23        <div id="item-body" role="main">
     24
     25                <?php do_action( 'bp_before_member_body' ); ?>
     26
     27                <div class="item-list-tabs no-ajax" id="subnav">
     28                        <ul>
     29
     30                                <?php bp_get_options_nav(); ?>
     31
     32                                <?php do_action( 'bp_member_plugin_options_nav' ); ?>
     33
     34                        </ul>
     35                </div><!-- .item-list-tabs -->
     36
     37                <h3><?php _e( 'Delete Account', 'buddypress' ); ?></h3>
     38
     39                <div id="message" class="info">
     40
     41                        <?php if ( bp_is_my_profile() ) : ?>
     42
     43                                <p><?php _e( 'Deleting your account will delete all of the content you have created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
     44
     45                        <?php else : ?>
     46
     47                                <p><?php _e( 'Deleting this account will delete all of the content it has created. It will be completely irrecoverable.', 'buddypress' ); ?></p>
     48
     49                        <?php endif; ?>
     50
     51                </div>
     52
     53                <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/delete-account'; ?>" name="account-delete-form" id="account-delete-form" class="standard-form" method="post">
     54
     55                        <?php do_action( 'bp_members_delete_account_before_submit' ); ?>
     56
     57                        <label>
     58                                <input type="checkbox" name="delete-account-understand" id="delete-account-understand" value="1" onclick="if(this.checked) { document.getElementById('delete-account-button').disabled = ''; } else { document.getElementById('delete-account-button').disabled = 'disabled'; }" />
     59                                 <?php _e( 'I understand the consequences.', 'buddypress' ); ?>
     60                        </label>
     61
     62                        <div class="submit">
     63                                <input type="submit" disabled="disabled" value="<?php _e( 'Delete Account', 'buddypress' ); ?>" id="delete-account-button" name="delete-account-button" />
     64                        </div>
     65
     66                        <?php do_action( 'bp_members_delete_account_after_submit' ); ?>
     67
     68                        <?php wp_nonce_field( 'delete-account' ); ?>
     69
     70                </form>
     71
     72                <?php do_action( 'bp_after_member_body' ); ?>
     73
     74        </div><!-- #item-body -->
     75
     76        <?php do_action( 'bp_after_member_settings_template' ); ?>
     77
     78</div><!-- #buddypress -->
     79 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/members/single/settings/general.php

     
     1<div id="buddypress">
     2
     3        <?php do_action( 'bp_before_member_settings_template' ); ?>
     4
     5        <div id="item-header">
     6
     7                <?php bp_get_template_part( 'members/single/member-header' ) ?>
     8
     9        </div><!-- #item-header -->
     10
     11        <div id="item-nav">
     12                <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
     13                        <ul>
     14
     15                                <?php bp_get_displayed_user_nav(); ?>
     16
     17                                <?php do_action( 'bp_member_options_nav' ); ?>
     18
     19                        </ul>
     20                </div>
     21        </div><!-- #item-nav -->
     22
     23        <div id="item-body" role="main">
     24
     25                <?php do_action( 'bp_before_member_body' ); ?>
     26
     27                <div class="item-list-tabs no-ajax" id="subnav">
     28                        <ul>
     29
     30                                <?php bp_get_options_nav(); ?>
     31
     32                                <?php do_action( 'bp_member_plugin_options_nav' ); ?>
     33
     34                        </ul>
     35                </div><!-- .item-list-tabs -->
     36
     37                <h3><?php _e( 'General Settings', 'buddypress' ); ?></h3>
     38
     39                <?php do_action( 'bp_template_content' ); ?>
     40
     41                <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/general'; ?>" method="post" class="standard-form" id="settings-form">
     42
     43                        <?php if ( !is_super_admin() ) : ?>
     44
     45                                <label for="pwd"><?php _e( 'Current Password <span>(required to update email or change current password)</span>', 'buddypress' ); ?></label>
     46                                <input type="password" name="pwd" id="pwd" size="16" value="" class="settings-input small" /> &nbsp;<a href="<?php echo site_url( add_query_arg( array( 'action' => 'lostpassword' ), 'wp-login.php' ), 'login' ); ?>" title="<?php _e( 'Password Lost and Found', 'buddypress' ); ?>"><?php _e( 'Lost your password?', 'buddypress' ); ?></a>
     47
     48                        <?php endif; ?>
     49
     50                        <label for="email"><?php _e( 'Account Email', 'buddypress' ); ?></label>
     51                        <input type="text" name="email" id="email" value="<?php echo bp_get_displayed_user_email(); ?>" class="settings-input" />
     52
     53                        <label for="pass1"><?php _e( 'Change Password <span>(leave blank for no change)</span>', 'buddypress' ); ?></label>
     54                        <input type="password" name="pass1" id="pass1" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'New Password', 'buddypress' ); ?><br />
     55                        <input type="password" name="pass2" id="pass2" size="16" value="" class="settings-input small" /> &nbsp;<?php _e( 'Repeat New Password', 'buddypress' ); ?>
     56
     57                        <?php do_action( 'bp_core_general_settings_before_submit' ); ?>
     58
     59                        <div class="submit">
     60                                <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
     61                        </div>
     62
     63                        <?php do_action( 'bp_core_general_settings_after_submit' ); ?>
     64
     65                        <?php wp_nonce_field( 'bp_settings_general' ); ?>
     66
     67                </form>
     68
     69                <?php do_action( 'bp_after_member_body' ); ?>
     70
     71        </div><!-- #item-body -->
     72
     73        <?php do_action( 'bp_after_member_settings_template' ); ?>
     74
     75</div><!-- #buddypress -->
     76 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/members/single/settings/notifications.php

     
     1<div id="buddypress">
     2
     3        <?php do_action( 'bp_before_member_settings_template' ); ?>
     4
     5        <div id="item-header">
     6
     7                <?php bp_get_template_part( 'members/single/member-header' ) ?>
     8
     9        </div><!-- #item-header -->
     10
     11        <div id="item-nav">
     12                <div class="item-list-tabs no-ajax" id="object-nav" role="navigation">
     13                        <ul>
     14
     15                                <?php bp_get_displayed_user_nav(); ?>
     16
     17                                <?php do_action( 'bp_member_options_nav' ); ?>
     18
     19                        </ul>
     20                </div>
     21        </div><!-- #item-nav -->
     22
     23        <div id="item-body" role="main">
     24
     25                <?php do_action( 'bp_before_member_body' ); ?>
     26
     27                <div class="item-list-tabs no-ajax" id="subnav">
     28                        <ul>
     29
     30                                <?php bp_get_options_nav(); ?>
     31
     32                                <?php do_action( 'bp_member_plugin_options_nav' ); ?>
     33
     34                        </ul>
     35                </div><!-- .item-list-tabs -->
     36
     37                <h3><?php _e( 'Email Notification', 'buddypress' ); ?></h3>
     38
     39                <?php do_action( 'bp_template_content' ); ?>
     40
     41                <form action="<?php echo bp_displayed_user_domain() . bp_get_settings_slug() . '/notifications'; ?>" method="post" class="standard-form" id="settings-form">
     42                        <p><?php _e( 'Send a notification by email when:', 'buddypress' ); ?></p>
     43
     44                        <?php do_action( 'bp_notification_settings' ); ?>
     45
     46                        <?php do_action( 'bp_members_notification_settings_before_submit' ); ?>
     47
     48                        <div class="submit">
     49                                <input type="submit" name="submit" value="<?php _e( 'Save Changes', 'buddypress' ); ?>" id="submit" class="auto" />
     50                        </div>
     51
     52                        <?php do_action( 'bp_members_notification_settings_after_submit' ); ?>
     53
     54                        <?php wp_nonce_field('bp_settings_notifications' ); ?>
     55
     56                </form>
     57
     58                <?php do_action( 'bp_after_member_body' ); ?>
     59
     60        </div><!-- #item-body -->
     61
     62        <?php do_action( 'bp_after_member_settings_template' ); ?>
     63
     64</div><!-- #buddypress -->
     65 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/registration/activate.php

     
     1<div id="buddypress">
     2
     3        <?php do_action( 'bp_before_activation_page' ); ?>
     4
     5        <div class="page" id="activate-page">
     6
     7                <?php if ( bp_account_was_activated() ) : ?>
     8
     9                        <h2 class="widgettitle"><?php _e( 'Account Activated', 'buddypress' ); ?></h2>
     10
     11                        <?php do_action( 'bp_before_activate_content' ); ?>
     12
     13                        <?php if ( isset( $_GET['e'] ) ) : ?>
     14                                <p><?php _e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ); ?></p>
     15                        <?php else : ?>
     16                                <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>
     17                        <?php endif; ?>
     18
     19                <?php else : ?>
     20
     21                        <h3><?php _e( 'Activate your Account', 'buddypress' ); ?></h3>
     22
     23                        <?php do_action( 'bp_before_activate_content' ); ?>
     24
     25                        <p><?php _e( 'Please provide a valid activation key.', 'buddypress' ); ?></p>
     26
     27                        <form action="" method="get" class="standard-form" id="activation-form">
     28
     29                                <label for="key"><?php _e( 'Activation Key:', 'buddypress' ); ?></label>
     30                                <input type="text" name="key" id="key" value="" />
     31
     32                                <p class="submit">
     33                                        <input type="submit" name="submit" value="<?php _e( 'Activate', 'buddypress' ); ?>" />
     34                                </p>
     35
     36                        </form>
     37
     38                <?php endif; ?>
     39
     40                <?php do_action( 'bp_after_activate_content' ); ?>
     41
     42        </div><!-- .page -->
     43
     44        <?php do_action( 'bp_after_activation_page' ); ?>
     45
     46</div><!-- #buddypress -->
     47 No newline at end of file
  • bp-themes/bp-theme-compat/buddypress/registration/register.php

     
     1<div id="buddypress">
     2
     3        <?php do_action( 'bp_before_register_page' ); ?>
     4
     5        <div class="page" id="register-page">
     6
     7                <form action="" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data">
     8
     9                <?php if ( 'registration-disabled' == bp_get_current_signup_step() ) : ?>
     10                        <?php do_action( 'template_notices' ); ?>
     11                        <?php do_action( 'bp_before_registration_disabled' ); ?>
     12
     13                                <p><?php _e( 'User registration is currently not allowed.', 'buddypress' ); ?></p>
     14
     15                        <?php do_action( 'bp_after_registration_disabled' ); ?>
     16                <?php endif; // registration-disabled signup setp ?>
     17
     18                <?php if ( 'request-details' == bp_get_current_signup_step() ) : ?>
     19
     20                        <h2><?php _e( 'Create an Account', 'buddypress' ); ?></h2>
     21
     22                        <?php do_action( 'template_notices' ); ?>
     23
     24                        <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>
     25
     26                        <?php do_action( 'bp_before_account_details_fields' ); ?>
     27
     28                        <div class="register-section" id="basic-details-section">
     29
     30                                <?php /***** Basic Account Details ******/ ?>
     31
     32                                <h4><?php _e( 'Account Details', 'buddypress' ); ?></h4>
     33
     34                                <label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     35                                <?php do_action( 'bp_signup_username_errors' ); ?>
     36                                <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" />
     37
     38                                <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     39                                <?php do_action( 'bp_signup_email_errors' ); ?>
     40                                <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" />
     41
     42                                <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     43                                <?php do_action( 'bp_signup_password_errors' ); ?>
     44                                <input type="password" name="signup_password" id="signup_password" value="" />
     45
     46                                <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     47                                <?php do_action( 'bp_signup_password_confirm_errors' ); ?>
     48                                <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" />
     49
     50                        </div><!-- #basic-details-section -->
     51
     52                        <?php do_action( 'bp_after_account_details_fields' ); ?>
     53
     54                        <?php /***** Extra Profile Details ******/ ?>
     55
     56                        <?php if ( bp_is_active( 'xprofile' ) ) : ?>
     57
     58                                <?php do_action( 'bp_before_signup_profile_fields' ); ?>
     59
     60                                <div class="register-section" id="profile-details-section">
     61
     62                                        <h4><?php _e( 'Profile Details', 'buddypress' ); ?></h4>
     63
     64                                        <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
     65                                        <?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( 'profile_group_id=1' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
     66
     67                                        <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
     68
     69                                                <div class="editfield">
     70
     71                                                        <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>
     72
     73                                                                <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>
     74                                                                <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
     75                                                                <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(); ?>" />
     76
     77                                                        <?php endif; ?>
     78
     79                                                        <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?>
     80
     81                                                                <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>
     82                                                                <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
     83                                                                <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>
     84
     85                                                        <?php endif; ?>
     86
     87                                                        <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?>
     88
     89                                                                <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>
     90                                                                <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
     91                                                                <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>">
     92                                                                        <?php bp_the_profile_field_options(); ?>
     93                                                                </select>
     94
     95                                                        <?php endif; ?>
     96
     97                                                        <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?>
     98
     99                                                                <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>
     100                                                                <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
     101                                                                <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple">
     102                                                                        <?php bp_the_profile_field_options(); ?>
     103                                                                </select>
     104
     105                                                        <?php endif; ?>
     106
     107                                                        <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?>
     108
     109                                                                <div class="radio">
     110                                                                        <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>
     111
     112                                                                        <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
     113                                                                        <?php bp_the_profile_field_options(); ?>
     114
     115                                                                        <?php if ( !bp_get_the_profile_field_is_required() ) : ?>
     116                                                                                <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a>
     117                                                                        <?php endif; ?>
     118                                                                </div>
     119
     120                                                        <?php endif; ?>
     121
     122                                                        <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?>
     123
     124                                                                <div class="checkbox">
     125                                                                        <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>
     126
     127                                                                        <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
     128                                                                        <?php bp_the_profile_field_options(); ?>
     129                                                                </div>
     130
     131                                                        <?php endif; ?>
     132
     133                                                        <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?>
     134
     135                                                                <div class="datebox">
     136                                                                        <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>
     137                                                                        <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ); ?>
     138
     139                                                                        <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day">
     140                                                                                <?php bp_the_profile_field_options( 'type=day' ); ?>
     141                                                                        </select>
     142
     143                                                                        <select name="<?php bp_the_profile_field_input_name(); ?>_month" id="<?php bp_the_profile_field_input_name(); ?>_month">
     144                                                                                <?php bp_the_profile_field_options( 'type=month' ); ?>
     145                                                                        </select>
     146
     147                                                                        <select name="<?php bp_the_profile_field_input_name(); ?>_year" id="<?php bp_the_profile_field_input_name(); ?>_year">
     148                                                                                <?php bp_the_profile_field_options( 'type=year' ); ?>
     149                                                                        </select>
     150                                                                </div>
     151
     152                                                        <?php endif; ?>
     153
     154                                                        <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
     155                                                                <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
     156                                                                        <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link">Change</a>
     157                                                                </p>
     158
     159                                                                <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
     160                                                                        <fieldset>
     161                                                                                <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
     162
     163                                                                                <?php bp_profile_visibility_radio_buttons() ?>
     164
     165                                                                        </fieldset>
     166                                                                        <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
     167
     168                                                                </div>
     169                                                        <?php else : ?>
     170                                                                <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
     171                                                                        <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
     172                                                                </p>                   
     173                                                        <?php endif ?>
     174
     175
     176                                                        <?php do_action( 'bp_custom_profile_edit_fields' ); ?>
     177
     178                                                        <p class="description"><?php bp_the_profile_field_description(); ?></p>
     179
     180                                                </div>
     181
     182                                        <?php endwhile; ?>
     183
     184                                        <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids(); ?>" />
     185
     186                                        <?php endwhile; endif; endif; ?>
     187
     188                                </div><!-- #profile-details-section -->
     189
     190                                <?php do_action( 'bp_after_signup_profile_fields' ); ?>
     191
     192                        <?php endif; ?>
     193
     194                        <?php if ( bp_get_blog_signup_allowed() ) : ?>
     195
     196                                <?php do_action( 'bp_before_blog_details_fields' ); ?>
     197
     198                                <?php /***** Blog Creation Details ******/ ?>
     199
     200                                <div class="register-section" id="blog-details-section">
     201
     202                                        <h4><?php _e( 'Blog Details', 'buddypress' ); ?></h4>
     203
     204                                        <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 site', 'buddypress' ); ?></p>
     205
     206                                        <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
     207
     208                                                <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     209                                                <?php do_action( 'bp_signup_blog_url_errors' ); ?>
     210
     211                                                <?php if ( is_subdomain_install() ) : ?>
     212                                                        http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?>
     213                                                <?php else : ?>
     214                                                        <?php echo site_url(); ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
     215                                                <?php endif; ?>
     216
     217                                                <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     218                                                <?php do_action( 'bp_signup_blog_title_errors' ); ?>
     219                                                <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value(); ?>" />
     220
     221                                                <span class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ); ?>:</span>
     222                                                <?php do_action( 'bp_signup_blog_privacy_errors' ); ?>
     223
     224                                                <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', 'buddypress' ); ?></label>
     225                                                <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', 'buddypress' ); ?></label>
     226
     227                                        </div>
     228
     229                                </div><!-- #blog-details-section -->
     230
     231                                <?php do_action( 'bp_after_blog_details_fields' ); ?>
     232
     233                        <?php endif; ?>
     234
     235                        <?php do_action( 'bp_before_registration_submit_buttons' ); ?>
     236
     237                        <div class="submit">
     238                                <input type="submit" name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ); ?>" />
     239                        </div>
     240
     241                        <?php do_action( 'bp_after_registration_submit_buttons' ); ?>
     242
     243                        <?php wp_nonce_field( 'bp_new_signup' ); ?>
     244
     245                <?php endif; // request-details signup step ?>
     246
     247                <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?>
     248
     249                        <h2><?php _e( 'Sign Up Complete!', 'buddypress' ); ?></h2>
     250
     251                        <?php do_action( 'template_notices' ); ?>
     252                        <?php do_action( 'bp_before_registration_confirmed' ); ?>
     253
     254                        <?php if ( bp_registration_needs_activation() ) : ?>
     255                                <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>
     256                        <?php else : ?>
     257                                <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p>
     258                        <?php endif; ?>
     259
     260                        <?php do_action( 'bp_after_registration_confirmed' ); ?>
     261
     262                <?php endif; // completed-confirmation signup step ?>
     263
     264                <?php do_action( 'bp_custom_signup_steps' ); ?>
     265
     266                </form>
     267
     268        </div>
     269
     270        <?php do_action( 'bp_after_register_page' ); ?>
     271
     272</div><!-- #buddypress -->
  • bp-themes/bp-theme-compat/css/buddypress.css

     
     1/*--------------------------------------------------------------
     2Hello, this is the BuddyPress Default theme stylesheet.
     3
     4----------------------------------------------------------------
     5>>> TABLE OF CONTENTS:
     6----------------------------------------------------------------
     74.0 - Navigation
     8        4.1 - Pagination
     95.0 - WordPress
     10        5.1 - Alignments
     11        5.2 - Comments
     12        5.3 - Gallery
     13        5.4 - Images
     14        5.5 - Posts
     156.0 - BuddyPress
     16        6.1 - Activity
     17                6.1.1 - Activity Listing
     18                6.1.2 - Activity Comments
     19        6.2 - Toolbar
     20        6.3 - Directories - Members, Groups, Blogs, Forums
     21        6.4 - Error / Success Messages
     22        6.5 - Forms
     23        6.6 - Ajax Loading
     24        6.7 - Topics and Tables - Forums and General
     25        6.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
     26        6.9 - Private Messaging Threads
     27        6.10 - Extended Profiles
     28--------------------------------------------------------------*/
     29
     30/*--------------------------------------------------------------
     314.1 - Pagination
     32--------------------------------------------------------------*/
     33#buddypress div.pagination {
     34        background: #f4f4f4;
     35        border: none;
     36        color: #888;
     37        font-size: 11px;
     38        margin: -20px 0 20px 0;
     39        position: relative;
     40        display: block;
     41        float: left;
     42        width: 100%;
     43        padding: 10px 0;
     44}
     45#buddypress div.pagination .pag-count {
     46        float: left;
     47        margin-left: 10px;
     48}
     49#buddypress div.pagination .pagination-links {
     50        float: right;
     51        margin-right: 10px;
     52}
     53#buddypress div.pagination .pagination-links span,
     54#buddypress div.pagination .pagination-links a {
     55        font-size: 12px;
     56        padding: 0 5px;
     57}
     58#buddypress div.pagination .pagination-links a:hover {
     59        font-weight: bold;
     60}
     61#buddypress noscript div.pagination {
     62        margin-bottom: 15px;
     63}
     64#buddypress div#pag-bottom {
     65        margin-top: -1px;
     66}
     67#buddypress #nav-above {
     68        display: none;
     69}
     70#buddypress .paged #nav-above {
     71        display: block;
     72}
     73
     74/*--------------------------------------------------------------
     755.4 - Images
     76--------------------------------------------------------------*/
     77#buddypress img.wp-smiley {
     78        border: none !important;
     79        clear: none !important;
     80        float: none !important;
     81        margin: 0 !important;
     82        padding: 0 !important;
     83}
     84
     85/*--------------------------------------------------------------
     866.0 - BuddyPress
     87--------------------------------------------------------------*/
     88/*--------------------------------------------------------------
     896.1 - Activity
     90--------------------------------------------------------------*/
     91#buddypress #activity-stream {
     92        margin-top: -5px;
     93}
     94#buddypress #item-body form#whats-new-form {
     95        border-bottom: 1px solid #ddd;
     96        margin: 20px 0 10px;
     97        padding-bottom: 20px;
     98}
     99#buddypress .home-page form#whats-new-form {
     100        border-bottom: none;
     101        padding-bottom: 0;
     102}
     103#buddypress form#whats-new-form h5 {
     104        font-weight: normal;
     105        font-size: 12px;
     106        color: #888;
     107        margin: 0;
     108        margin-left: 76px;
     109        padding: 0 0 3px 0;
     110}
     111#buddypress form#whats-new-form #whats-new-avatar {
     112        float: left;
     113}
     114#buddypress form#whats-new-form #whats-new-content {
     115        margin-left: 54px;
     116        padding-left: 22px;
     117}
     118#buddypress form#whats-new-form textarea {
     119        background: #fff;
     120        border: 1px inset #ccc;
     121        -moz-border-radius: 3px;
     122        -webkit-border-radius: 3px;
     123        border-radius: 3px;
     124        color: #555;
     125        font-family: inherit;
     126        font-size: 14px;
     127        height: 20px;
     128        padding: 6px;
     129        width: 98%;
     130}
     131body.no-js #buddypress form#whats-new-form textarea {
     132        height: 50px;
     133}
     134#buddypress form#whats-new-form #whats-new-options select {
     135        max-width: 200px;
     136        margin-top: 12px;
     137}
     138#buddypress form#whats-new-form #whats-new-submit {
     139        float: right;
     140        margin-top: 12px;
     141}
     142#buddypress #whats-new-options {
     143        overflow: auto;
     144        height: 0;
     145}
     146body.no-js #buddypress #whats-new-options {
     147        height: auto;
     148}
     149#buddypress #whats-new:focus {
     150        border-color: rgba(31, 179, 221, 0.9) !important;
     151        outline-color: rgba(31, 179, 221, 0.9);
     152        box-shadow: 0 0 7px         rgba(31, 179, 221, 0.7);
     153        -moz-box-shadow: 0 0 7px    rgba(31, 179, 221, 0.7);
     154        -webkit-box-shadow: 0 0 7px rgba(31, 179, 221, 0.7);
     155}
     156
     157/*--------------------------------------------------------------
     1586.1.1 - Activity Listing
     159--------------------------------------------------------------*/
     160#buddypress ul.activity-list li {
     161        overflow: hidden;
     162        padding: 15px 0 0;
     163}
     164#buddypress .activity-list .activity-avatar {
     165        float: left;
     166}
     167#buddypress ul.activity-list > li:first-child {
     168        padding-top: 5px;
     169}
     170#buddypress ul.item-list.activity-list li.has-comments {
     171        padding-bottom: 15px;
     172}
     173body.activity-permalink #buddypress ul.activity-list li.has-comments {
     174        padding-bottom: 0;
     175}
     176#buddypress .activity-list li.mini {
     177        font-size: 11px;
     178        min-height: 35px;
     179        padding: 15px 0 0 0;
     180        position: relative;
     181}
     182#buddypress .activity-list li.mini .activity-avatar img.avatar,
     183#buddypress .activity-list li.mini .activity-avatar img.FB_profile_pic {
     184        height: 20px;
     185        margin-left: 30px;
     186        width: 20px;
     187}
     188#buddypress .activity-permalink .activity-list li.mini .activity-avatar img.avatar,
     189#buddypress .activity-permalink .activity-list li.mini .activity-avatar img.FB_profile_pic {
     190        height: auto;
     191        margin-left: 0;
     192        width: auto;
     193}
     194body.activity-permalink #buddypress .activity-list > li:first-child {
     195        padding-top: 0;
     196}
     197#buddypress .activity-list li .activity-content {
     198        position: relative;
     199}
     200#buddypress .activity-list li.mini .activity-content p {
     201        margin: 0;
     202}
     203#buddypress .activity-list li.mini .activity-comments {
     204        clear: both;
     205        font-size: 12px;
     206}
     207body.activity-permalink #buddypress li.mini .activity-meta {
     208        margin-top: 4px;
     209}
     210#buddypress .activity-list li .activity-inreplyto {
     211        color: #888;
     212        font-size: 11px;
     213        margin-left: 5px;
     214        margin-top: 5px;
     215        padding-left: 25px;
     216}
     217#buddypress .activity-list li .activity-inreplyto > p {
     218        margin: 0;
     219        display: inline;
     220}
     221#buddypress .activity-list li .activity-inreplyto blockquote,
     222#buddypress .activity-list li .activity-inreplyto div.activity-inner {
     223        background: none;
     224        border: none;
     225        display: inline;
     226        margin: 0;
     227        overflow: hidden;
     228        padding: 0;
     229}
     230#buddypress .activity-list .activity-content {
     231        margin-left: 70px;
     232        margin-bottom: 15px;
     233}
     234body.activity-permalink #buddypress .activity-list li .activity-content {
     235        background: #fff;
     236        border-bottom: 1px solid #ddd;
     237        border-right: 1px solid #ddd;
     238        border-radius: 4px;
     239        font-size: 16px;
     240        line-height: 150%;
     241        min-height: 35px;
     242        margin-left: 185px;
     243        margin-right: 0;
     244        padding: 15px;
     245}
     246body.activity-permalink #buddypress .activity-list li .activity-header > p {
     247        height: 35px;
     248        margin-bottom: 0;
     249        margin-left: -35px;
     250        padding: 5px 0 0 35px;
     251}
     252#buddypress .activity-list .activity-content .activity-header,
     253#buddypress .activity-list .activity-content .comment-header {
     254        color: #888;
     255        font-size: 11px;
     256        line-height: 220%;
     257}
     258#buddypress .activity-header {
     259        margin-right: 20px;
     260}
     261#buddypress .activity-header a,
     262#buddypress .comment-meta a,
     263#buddypress .acomment-meta a {
     264        text-decoration: none;
     265}
     266#buddypress .activity-list .activity-content .activity-header img.avatar {
     267        float: none !important;
     268        margin: 0 5px -8px 0 !important;
     269}
     270#buddypress a.bp-secondary-action,
     271#buddypress span.highlight {
     272        font-size: 11px;
     273        padding: 0;
     274        margin-right: 5px;
     275        text-decoration: none;
     276}
     277#buddypress .activity-list .activity-content .activity-inner,
     278#buddypress .activity-list .activity-content blockquote {
     279        margin: 10px 10px 5px 0;
     280        overflow: hidden;
     281}
     282#buddypress .activity-list li.new_forum_post .activity-content .activity-inner,
     283#buddypress .activity-list li.new_forum_topic .activity-content .activity-inner {
     284        border-left: 2px solid #EAEAEA;
     285        margin-left: 5px;
     286        padding-left: 10px;
     287}
     288body.activity-permalink #buddypress .activity-content .activity-inner,
     289body.activity-permalink #buddypress .activity-content blockquote {
     290        margin-left: 0;
     291        margin-top: 5px;
     292}
     293#buddypress .activity-inner > p {
     294        word-wrap: break-word;
     295}
     296#buddypress .activity-inner > .activity-inner {
     297        margin: 0 !important;
     298}
     299#buddypress .activity-inner > blockquote {
     300        margin: 0 !important;
     301}
     302#buddypress .activity-list .activity-content img.thumbnail {
     303        border: 2px solid #eee;
     304        float: left;
     305        margin: 0 10px 5px 0;
     306}
     307#buddypress .activity-read-more {
     308        margin-left: 1em;
     309        white-space: nowrap;
     310}
     311#buddypress .activity-list li.load-more {
     312        background: #f0f0f0 !important;
     313        border-right: 1px solid #ddd;
     314        border-bottom: 1px solid #ddd;
     315        -moz-border-radius: 4px;
     316        -webkit-border-radius: 4px;
     317        border-radius: 4px;
     318        font-size: 1.2em;
     319        margin: 15px 0 !important;
     320        padding: 10px 15px !important;
     321        text-align: center;
     322}
     323#buddypress .activity-list li.load-more a {
     324        color: #4D4D4D;
     325}
     326
     327
     328/*--------------------------------------------------------------
     3296.1.2 - Activity Comments
     330--------------------------------------------------------------*/
     331#buddypress div.activity-meta {
     332        margin: 18px 0;
     333}
     334body.activity-permalink #buddypress div.activity-meta {
     335        margin-bottom: 6px;
     336}
     337#buddypress div.activity-meta a {
     338        font: normal 11px/20px Arial, Tahoma, Verdana, sans-serif;
     339        padding: 4px 8px;
     340}
     341#buddypress a.activity-time-since {
     342        color: #aaa;
     343        text-decoration: none;
     344}
     345#buddypress a.activity-time-since:hover {
     346        color: #888;
     347        text-decoration: underline;
     348}
     349#buddypress a.bp-primary-action,
     350#buddypress #reply-title small a {
     351        font-size: 11px;
     352        margin-right: 5px;
     353        text-decoration: none;
     354}
     355#buddypress a.bp-primary-action span,
     356#buddypress #reply-title small a span {
     357        background: #999;
     358        border-radius: 3px;
     359        color: #fff;
     360        font-size: 90%;
     361        margin-left: 2px;
     362        padding: 0 5px;
     363}
     364#buddypress a.bp-primary-action:hover span,
     365#buddypress #reply-title small a:hover span {
     366        background: #555;
     367        color: #fff;
     368}
     369#buddypress div.activity-comments {
     370        margin: 0 0 0 70px;
     371        overflow: hidden; /* IE fix */
     372        position: relative;
     373        width: auto;
     374        clear: both;
     375}
     376body.activity-permalink #buddypress div.activity-comments {
     377        background: none;
     378        margin-left: 185px;
     379        width: auto;
     380}
     381#buddypress div.activity-comments > ul {
     382        background: #f5f5f5;
     383        border-radius: 4px;
     384        padding: 0 0 0 10px;
     385}
     386#buddypress div.activity-comments ul,
     387#buddypress div.activity-comments ul li {
     388        border: none;
     389        list-style: none;
     390}
     391#buddypress div.activity-comments ul {
     392        clear: both;
     393}
     394#buddypress div.activity-comments ul li {
     395        border-top: 2px solid #fff;
     396        padding: 10px 0 0;
     397}
     398body.activity-permalink #buddypress .activity-list li.mini .activity-comments {
     399        clear: none;
     400        margin-top: 0;
     401}
     402body.activity-permalink #buddypress div.activity-comments ul li {
     403        border-width: 1px;
     404        padding: 10px 0 0 0;
     405}
     406#buddypress div.activity-comments > ul > li:first-child {
     407        border-top: none;
     408}
     409#buddypress div.activity-comments ul li:last-child {
     410        margin-bottom: 0;
     411}
     412#buddypress div.activity-comments ul li > ul {
     413        margin-left: 30px;
     414        margin-top: 0;
     415        padding-left: 10px;
     416}
     417body.activity-permalink #buddypress div.activity-comments ul li > ul {
     418        margin-top: 10px;
     419}
     420body.activity-permalink #buddypress div.activity-comments > ul {
     421        padding: 0 10px 0 15px;
     422}
     423#buddypress div.activity-comments div.acomment-avatar img {
     424        border-width: 2px !important;
     425        float: left;
     426        height: 25px;
     427        margin-right: 10px;
     428        width: 25px;
     429}
     430#buddypress div.activity-comments div.acomment-content {
     431        font-size: 11px;
     432        margin: 5px 0 0 40px;
     433}
     434#buddypress div.acomment-content .time-since,
     435#buddypress div.acomment-content .activity-delete-link,
     436#buddypress div.acomment-content .comment-header {
     437        display: none;
     438}
     439body.activity-permalink #buddypress div.activity-comments div.acomment-content {
     440        font-size: 14px;
     441}
     442#buddypress div.activity-comments div.acomment-meta {
     443        color: #888;
     444        font-size: 11px;
     445}
     446#buddypress div.activity-comments form.ac-form {
     447        background: #fafafa;
     448        border: 1px solid #ddd;
     449        border-radius: 4px;
     450        display: none;
     451        margin: 0 0 15px 33px;
     452        padding: 8px;
     453}
     454#buddypress div.activity-comments li form.ac-form {
     455        margin-right: 15px;
     456        clear: both;
     457}
     458#buddypress div.activity-comments form.root {
     459        margin-left: 0;
     460}
     461#buddypress div.activity-comments div#message {
     462        margin-top: 15px;
     463        margin-bottom: 0;
     464}
     465#buddypress div.activity-comments form .ac-textarea {
     466        background: #fff;
     467        border: 1px inset #ccc;
     468        border-radius: 3px;
     469        margin-bottom: 10px;
     470        padding: 8px;
     471}
     472#buddypress div.activity-comments form textarea {
     473        border: none;
     474        color: #555;
     475        font-family: inherit;
     476        font-size: 11px;
     477        height: 60px;
     478        padding: 0;
     479        width: 100%;
     480}
     481#buddypress div.activity-comments form input {
     482        margin-top: 5px;
     483}
     484#buddypress div.activity-comments form div.ac-reply-avatar {
     485        float: left;
     486}
     487#buddypress div.ac-reply-avatar img {
     488        border: 2px solid #fff !important;
     489}
     490#buddypress div.activity-comments form div.ac-reply-content {
     491        color: #888;
     492        font-size: 11px;
     493        margin-left: 50px;
     494        padding-left: 15px;
     495}
     496#buddypress .acomment-options {
     497        float: left;
     498        margin: 5px 0 5px 40px;
     499}
     500#buddypress .acomment-options a {
     501        color: #999;
     502}
     503#buddypress .acomment-options a:hover {
     504        color: inherit;
     505}
     506
     507/*--------------------------------------------------------------
     5086.3 - Directories - Members, Groups, Blogs, Forums
     509--------------------------------------------------------------*/
     510#buddypress div.dir-search {
     511        float: right;
     512        margin: -39px 0 0 0;
     513}
     514#buddypress div.dir-search input[type=text] {
     515        font-size: 12px;
     516        padding: 1px 3px;
     517}
     518
     519/*--------------------------------------------------------------
     5206.4 - Errors / Success Messages
     521--------------------------------------------------------------*/
     522#buddypress div#message {
     523        margin: 0 0 15px;
     524}
     525#buddypress #message.info {
     526        margin-bottom: 0;
     527}
     528#buddypress div#message.updated {
     529        clear: both;
     530}
     531#buddypress div#message p {
     532        font-size: 12px;
     533        display: block;
     534        padding: 10px 15px;
     535}
     536#buddypress div#message.error p {
     537        background-color: #db1717;
     538        border-color: #a71a1a;
     539        clear: left;
     540        color: #fff;
     541}
     542#buddypress div#message.updated p {
     543        background-color: #8ff57a;
     544        border-color: #80cf70;
     545        color: #1a6a00;
     546}
     547#buddypress .standard-form#signup_form div div.error {
     548        background: #e41717;
     549        -moz-border-radius: 3px;
     550        -webkit-border-radius: 3px;
     551        border-radius: 3px;
     552        color: #fff;
     553        margin: 0 0 10px 0;
     554        padding: 6px;
     555        width: 90%;
     556}
     557#buddypress div.accept,
     558#buddypress div.reject {
     559        float: left;
     560        margin-left: 10px;
     561}
     562#buddypress ul.button-nav li {
     563        float: left;
     564        margin: 0 10px 10px 0;
     565}
     566#buddypress ul.button-nav li.current a {
     567        font-weight: bold;
     568}
     569
     570
     571/*--------------------------------------------------------------
     5726.5 - Forms
     573--------------------------------------------------------------*/
     574#buddypress .standard-form textarea,
     575#buddypress .standard-form input[type=text],
     576#buddypress .standard-form select,
     577#buddypress .standard-form input[type=password],
     578#buddypress .dir-search input[type=text] {
     579        border: 1px inset #ccc;
     580        border-radius: 3px;
     581        color: #888;
     582        font: inherit;
     583        font-size: 14px;
     584        padding: 6px;
     585}
     586#buddypress .standard-form select {
     587        padding: 3px;
     588}
     589#buddypress .standard-form input[type=password] {
     590        margin-bottom: 5px;
     591}
     592#buddypress .standard-form label,
     593#buddypress .standard-form span.label {
     594        display: block;
     595        font-weight: bold;
     596        margin: 15px 0 5px 0;
     597}
     598#buddypress .standard-form div.checkbox label,
     599#buddypress .standard-form div.radio label {
     600        color: #888;
     601        font-size: 14px;
     602        font-weight: normal;
     603        margin: 5px 0 0 0;
     604}
     605#buddypress .standard-form#sidebar-login-form label {
     606        margin-top: 5px;
     607}
     608#buddypress .standard-form input[type=text] {
     609        width: 75%;
     610}
     611#buddypress .standard-form#sidebar-login-form input[type=text],
     612#buddypress .standard-form#sidebar-login-form input[type=password] {
     613        padding: 4px;
     614        width: 95%;
     615}
     616#buddypress .standard-form #basic-details-section input[type=password],
     617#buddypress .standard-form #blog-details-section input#signup_blog_url {
     618        width: 35%;
     619}
     620#buddypress .standard-form#signup_form input[type=text],
     621#buddypress .standard-form#signup_form textarea,
     622#buddypress .form-allowed-tags,
     623#buddypress #commentform input[type=text],
     624#buddypress #commentform textarea {
     625        width: 90%;
     626}
     627#buddypress .standard-form#signup_form div.submit {
     628        float: right;
     629}
     630#buddypress div#signup-avatar img {
     631        margin: 0 15px 10px 0;
     632}
     633#buddypress .standard-form textarea {
     634        width: 75%;
     635        height: 120px;
     636}
     637#buddypress .standard-form textarea#message_content {
     638        height: 200px;
     639}
     640#buddypress .standard-form#send-reply textarea {
     641        width: 97.5%;
     642}
     643#buddypress .standard-form p.description {
     644        color: #888;
     645        font-size: 11px;
     646        margin: 5px 0;
     647}
     648#buddypress .standard-form div.submit {
     649        clear: both;
     650        padding: 15px 0 0 0;
     651}
     652#buddypress .standard-form p.submit {
     653        margin-bottom: 0;
     654        padding: 15px 0 0 0;
     655}
     656#buddypress .standard-form div.submit input {
     657        margin-right: 15px;
     658}
     659#buddypress .standard-form div.radio ul {
     660        margin: 10px 0 15px 38px;
     661        list-style: disc;
     662}
     663#buddypress .standard-form div.radio ul li {
     664        margin-bottom: 5px;
     665}
     666#buddypress .standard-form a.clear-value {
     667        display: block;
     668        margin-top: 5px;
     669        outline: none;
     670}
     671#buddypress .standard-form #basic-details-section,
     672#buddypress .standard-form #blog-details-section,
     673#buddypress .standard-form #profile-details-section {
     674        float: left;
     675        width: 48%;
     676}
     677#buddypress .standard-form #profile-details-section {
     678        float: right;
     679}
     680#buddypress .standard-form #blog-details-section {
     681        clear: left;
     682}
     683#buddypress .standard-form input:focus,
     684#buddypress .standard-form textarea:focus,
     685#buddypress .standard-form select:focus {
     686        background: #fafafa;
     687        color: #555;
     688}
     689#buddypress form#send-invite-form {
     690        margin-top: 20px;
     691}
     692#buddypress div#invite-list {
     693        background: #f5f5f5;
     694        border: 1px solid #e4e4e4;
     695        border-radius: 3px;
     696        height: 400px;
     697        margin: 0 0 10px;
     698        overflow: auto;
     699        padding: 5px;
     700        width: 160px;
     701}
     702#buddypress button,
     703#buddypress a.button,
     704#buddypress input[type=submit],
     705#buddypress input[type=button],
     706#buddypress input[type=reset],
     707#buddypress ul.button-nav li a,
     708#buddypress div.generic-button a,
     709#buddypress .comment-reply-link {
     710        background: #fff; /* Old browsers */
     711        background: -moz-linear-gradient(top, #ffffff 0%, #ededed 100%); /* FF3.6+ */
     712        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
     713        background: -webkit-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Chrome10+,Safari5.1+ */
     714        background: -o-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Opera11.10+ */
     715        background: -ms-linear-gradient(top, #ffffff 0%,#ededed 100%); /* IE10+ */
     716        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
     717        background: linear-gradient(top, #ffffff 0%,#ededed 100%); /* W3C */
     718        border: 1px solid #ccc;
     719        -moz-border-radius: 3px;
     720        -webkit-border-radius: 3px;
     721        border-radius: 3px;
     722        color: #777;
     723        cursor: pointer;
     724        font: normal 12px/20px Arial, Tahoma, Verdana, sans-serif;
     725        outline: none;
     726        padding: 4px 10px;
     727        text-align: center;
     728        text-decoration: none;
     729        line-height: 14px;
     730}
     731#buddypress button:hover,
     732#buddypress a.button:hover,
     733#buddypress a.button:focus,
     734#buddypress input[type=submit]:hover,
     735#buddypress input[type=button]:hover,
     736#buddypress input[type=reset]:hover,
     737#buddypress ul.button-nav li a:hover,
     738#buddypress ul.button-nav li.current a,
     739#buddypress div.generic-button a:hover,
     740#buddypress .comment-reply-link:hover {
     741        background: #ededed;
     742        background: -moz-linear-gradient(top, #ffffff 0%, #e0e0e0 100%); /* FF3.6+ */
     743        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e0e0e0)); /* Chrome,Safari4+ */
     744        background: -webkit-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* Chrome10+,Safari5.1+ */
     745        background: -o-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* Opera11.10+ */
     746        background: -ms-linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* IE10+ */
     747        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e0e0e0',GradientType=0 ); /* IE6-9 */
     748        background: linear-gradient(top, #ffffff 0%,#e0e0e0 100%); /* W3C */
     749        border: 1px solid #bbb;
     750        color: #555;
     751        outline: none;
     752        text-decoration: none;
     753}
     754
     755/*--------------------------------------------------------------
     7566.6 - Ajax Loading
     757--------------------------------------------------------------*/
     758#buddypress a.loading,
     759#buddypress input.loading {
     760    padding-right: 25px;
     761}
     762#buddypress a.loading:hover,
     763#buddypress input.loading:hover {
     764    padding-right: 25px;
     765    color: #777;
     766}
     767#buddypress input[type="submit"].pending,
     768#buddypress input[type="button"].pending,
     769#buddypress input[type="reset"].pending,
     770#buddypress input[type="submit"].disabled,
     771#buddypress input[type="button"].disabled,
     772#buddypress input[type="reset"].disabled,
     773#buddypress button.pending,
     774#buddypress button.disabled,
     775#buddypress div.pending a,
     776#buddypress a.disabled {
     777    border-color: #eee;
     778    color: #bbb;
     779    cursor: default;
     780}
     781#buddypress input[type="submit"]:hover.pending,
     782#buddypress input[type="button"]:hover.pending,
     783#buddypress input[type="reset"]:hover.pending,
     784#buddypress input[type="submit"]:hover.disabled,
     785#buddypress input[type="button"]:hover.disabled,
     786#buddypress input[type="reset"]:hover.disabled,
     787#buddypress button.pending:hover,
     788#buddypress button.disabled:hover,
     789#buddypress div.pending a:hover,
     790#buddypress a.disabled:hover {
     791        background: -moz-linear-gradient(top, #ffffff 0%, #ededed 100%); /* FF3.6+ */
     792        background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ededed)); /* Chrome,Safari4+ */
     793        background: -webkit-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Chrome10+,Safari5.1+ */
     794        background: -o-linear-gradient(top, #ffffff 0%,#ededed 100%); /* Opera11.10+ */
     795        background: -ms-linear-gradient(top, #ffffff 0%,#ededed 100%); /* IE10+ */
     796        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#ededed',GradientType=0 ); /* IE6-9 */
     797        background: linear-gradient(top, #ffffff 0%,#ededed 100%); /* W3C */
     798    border-color: #eee;
     799    color: #bbb;
     800}
     801
     802/*--------------------------------------------------------------
     8036.7 - Forums, Tables and Topics
     804--------------------------------------------------------------*/
     805#buddypress ul#topic-post-list {
     806        margin: 0px -19px 15px;
     807        width: auto;
     808}
     809#buddypress ul#topic-post-list li {
     810        padding: 15px;
     811        position: relative;
     812}
     813#buddypress ul#topic-post-list li.alt {
     814        background: #f5f5f5;
     815}
     816#buddypress ul#topic-post-list li div.poster-meta {
     817        color: #888;
     818        margin-bottom: 10px;
     819}
     820#buddypress ul#topic-post-list li div.post-content {
     821        margin-left: 54px;
     822}
     823#buddypress div.topic-tags {
     824        font-size: 11px;
     825}
     826#buddypress div.admin-links {
     827        color: #888;
     828        font-size: 11px;
     829        position: absolute;
     830        top: 15px;
     831        right: 25px;
     832}
     833#buddypress div#topic-meta {
     834        margin: -10px -19px;
     835        padding: 5px 19px 30px;
     836        position: relative;
     837}
     838#buddypress div#topic-meta div.admin-links {
     839        right: 19px;
     840        top: -36px;
     841}
     842#buddypress div#topic-meta h3 {
     843        font-size: 20px;
     844        margin: 5px 0;
     845}
     846#buddypress div#new-topic-post {
     847        display: none;
     848        margin: 20px 0 0 0;
     849        padding: 1px 0 0 0;
     850}
     851#buddypress table {
     852        width: 100%;
     853}
     854#buddypress table thead tr {
     855        background: #eaeaea;
     856}
     857#buddypress table#message-threads {
     858        margin: 0 -19px;
     859        width: auto;
     860}
     861#buddypress table.profile-fields {
     862        margin-bottom: 20px;
     863}
     864#buddypress table.profile-fields:last-child {
     865        margin-bottom: 0;
     866}
     867#buddypress table.profile-fields p {
     868        margin: 0;
     869}
     870#buddypress table.profile-fields p:last-child {
     871        margin-top: 0;
     872}
     873#buddypress table tr td,
     874#buddypress table tr th {
     875        padding: 8px;
     876        vertical-align: middle;
     877}
     878#buddypress table tr td.label {
     879        border-right: 1px solid #eaeaea;
     880        font-weight: bold;
     881        width: 25%;
     882}
     883#buddypress table tr td.thread-info p {
     884        margin: 0;
     885}
     886#buddypress table tr td.thread-info p.thread-excerpt {
     887        color: #888;
     888        font-size: 11px;
     889        margin-top: 3px;
     890}
     891#buddypress table.forum td {
     892        text-align: center;
     893}
     894#buddypress table tr.alt td {
     895        background: #f5f5f5;
     896}
     897#buddypress table.notification-settings {
     898        margin-bottom: 20px;
     899        text-align: left;
     900}
     901#buddypress #groups-notification-settings {
     902        margin-bottom: 0;
     903}
     904#buddypress table.notification-settings th.icon,
     905#buddypress table.notification-settings td:first-child {
     906        display: none;
     907}
     908#buddypress table.notification-settings th.title {
     909        width: 80%;
     910}
     911#buddypress table.notification-settings .yes,
     912#buddypress table.notification-settings .no {
     913        text-align: center;
     914        width: 40px;
     915}
     916#buddypress table.forum {
     917        margin: 0 -19px;
     918        width: auto;
     919}
     920#buddypress table.forum tr.sticky td {
     921        font-size: 1.2em;
     922        background: #fff9db;
     923        border-top: 1px solid #ffe8c4;
     924        border-bottom: 1px solid #ffe8c4;
     925}
     926#buddypress table.forum tr.closed td.td-title {
     927        padding-left: 35px;
     928}
     929#buddypress table.forum td p.topic-text {
     930        color: #888;
     931        font-size: 13px;
     932}
     933#buddypress table.forum tr > td:first-child,
     934#buddypress table.forum tr > th:first-child {
     935        padding-left: 15px;
     936}
     937#buddypress table.forum tr > td:last-child,
     938#buddypress table.forum tr > th:last-child {
     939        padding-right: 15px;
     940}
     941#buddypress table.forum tr th#th-title,
     942#buddypress table.forum tr th#th-poster,
     943#buddypress table.forum tr th#th-group,
     944#buddypress table.forum td.td-poster,
     945#buddypress table.forum td.td-group,
     946#buddypress table.forum td.td-title {
     947        text-align: left;
     948}
     949#buddypress table.forum tr td.td-title a.topic-title {
     950        font-size: 1.2em;
     951}
     952#buddypress table.forum td.td-freshness {
     953        white-space: nowrap;
     954}
     955#buddypress table.forum td.td-freshness span.time-since {
     956        font-size: 0.9em;
     957        color: #888;
     958}
     959#buddypress table.forum td img.avatar {
     960        float: none;
     961        margin: 0 5px -8px 0;
     962}
     963#buddypress table.forum td.td-poster,
     964#buddypress table.forum td.td-group {
     965        min-width: 140px;
     966}
     967#buddypress table.forum th#th-title {
     968        width: 80%;
     969}
     970#buddypress table.forum th#th-freshness {
     971        width: 25%;
     972}
     973#buddypress table.forum th#th-postcount {
     974        width: 15%;
     975}
     976#buddypress table.forum p.topic-meta {
     977        font-size: 0.9em;
     978        margin: 5px 0 0 0;
     979}
     980
     981/*-------------------------------------------------------------------------
     9826.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums, Profiles
     983-------------------------------------------------------------------------*/
     984#buddypress .item-body {
     985        margin: 20px 0;
     986}
     987#buddypress span.activity {
     988        display: inline-block;
     989        font-size: 11px;
     990        opacity: 0.8;
     991        padding: 1px 8px;
     992}
     993#buddypress span.user-nicename {
     994        color: #777;
     995        display: inline-block;
     996        font-size: 16px;
     997        font-weight: bold;
     998}
     999#buddypress span.activity,
     1000#buddypress div#message p {
     1001        border: 1px solid #e1ca82;
     1002        -moz-border-radius: 3px;
     1003        -webkit-border-radius: 3px;
     1004        border-radius: 3px;
     1005        font-weight: normal;
     1006        margin-top: 3px;
     1007        text-decoration: none;
     1008        background: #ffeaa6;
     1009        background-image: -webkit-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
     1010        background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255, 255, 255, .5)), color-stop(100%,rgba(255, 255, 255, 0))); /* Chrome,Safari4+ */
     1011        background-image: -moz-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
     1012        background-image: -ms-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
     1013        background-image: -o-linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
     1014        background-image: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0));
     1015}
     1016#buddypress div#item-header {
     1017        overflow: hidden;
     1018}
     1019#buddypress div#item-header div#item-header-content {
     1020        float: left;
     1021        margin-left: 0;
     1022}
     1023#buddypress div#item-header h2 {
     1024        font-size: 28px;
     1025        line-height: 120%;
     1026        margin: 0 0 15px 0;
     1027}
     1028#buddypress div#item-header h2 a {
     1029        color: #777;
     1030        text-decoration: none;
     1031}
     1032#buddypress div#item-header img.avatar {
     1033        float: left;
     1034        margin: 0 15px 19px 0;
     1035}
     1036#buddypress div#item-header h2 {
     1037        margin-bottom: 5px;
     1038}
     1039#buddypress div#item-header span.activity,
     1040#buddypress div#item-header h2 span.highlight {
     1041        font-size: 11px;
     1042        font-weight: normal;
     1043        line-height: 170%;
     1044        margin-bottom: 7px;
     1045        vertical-align: middle;
     1046}
     1047#buddypress div#item-header h2 span.highlight {
     1048        font-size: 16px;
     1049}
     1050#buddypress div#item-header h2 span.highlight span {
     1051        background: #a1dcfa;
     1052        -moz-border-radius: 3px;
     1053        -webkit-border-radius: 3px;
     1054        border-radius: 3px;
     1055        color: #fff;
     1056        cursor: pointer;
     1057        font-weight: bold;
     1058        font-size: 11px;
     1059        margin-bottom: 2px;
     1060        padding: 1px 4px;
     1061        position: relative;
     1062        right: -2px;
     1063        top: -2px;
     1064        vertical-align: middle;
     1065}
     1066#buddypress div#item-header div#item-meta {
     1067        font-size: 14px;
     1068        color: #aaa;
     1069        overflow: hidden;
     1070        margin: 15px 0 5px 0;
     1071        padding-bottom: 10px;
     1072}
     1073#buddypress div#item-header div#item-actions {
     1074        float: right;
     1075        margin: 0 0 15px 15px;
     1076        text-align: right;
     1077        width: 20%;
     1078}
     1079#buddypress div#item-header div#item-actions h3 {
     1080        font-size: 12px;
     1081        margin: 0 0 5px 0;
     1082}
     1083#buddypress div#item-header ul {
     1084        margin-bottom: 15px;
     1085        overflow: hidden;
     1086}
     1087#buddypress div#item-header ul h5,
     1088#buddypress div#item-header ul span,
     1089#buddypress div#item-header ul hr {
     1090        display: none;
     1091}
     1092#buddypress div#item-header ul li {
     1093        float: right;
     1094}
     1095#buddypress div#item-header ul img.avatar,
     1096#buddypress div#item-header ul.avatars img.avatar {
     1097        height: 30px;
     1098        margin: 2px;
     1099        width: 30px;
     1100}
     1101#buddypress div#item-header div.generic-button,
     1102#buddypress div#item-header a.button {
     1103        float: left;
     1104        margin: 10px 10px 0 0;
     1105}
     1106#buddypress div#item-header div#message.info {
     1107        line-height: 80%;
     1108}
     1109#buddypress ul.item-list {
     1110        width: 100%;
     1111        list-style: none;
     1112}
     1113#buddypress ul.item-list li {
     1114        border-bottom: 1px solid #eaeaea;
     1115        padding: 15px 0;
     1116        position: relative;
     1117        list-style: none;
     1118}
     1119#buddypress ul.item-list.activity-list li {
     1120        padding-bottom: 0;
     1121}
     1122#buddypress ul.single-line li {
     1123        border: none;
     1124}
     1125#buddypress ul.item-list li img.avatar {
     1126        float: left;
     1127        margin: 0 10px 0 0;
     1128}
     1129#buddypress ul.item-list li div.item-title,
     1130#buddypress ul.item-list li h4 {
     1131        font-weight: normal;
     1132        font-size: 14px;
     1133        margin: 0;
     1134        width: 75%;
     1135}
     1136#buddypress ul.item-list li div.item-title span {
     1137        color: #999;
     1138        font-size: 12px;
     1139}
     1140#buddypress ul.item-list li div.item-desc {
     1141        color: #888;
     1142        font-size: 11px;
     1143        margin: 10px 0 0 64px;
     1144        width: 50%;
     1145}
     1146#buddypress ul.item-list li div.action {
     1147        position: absolute;
     1148        top: 15px;
     1149        right: 0;
     1150        text-align: right;
     1151}
     1152#buddypress ul.item-list li div.meta {
     1153        color: #888;
     1154        font-size: 11px;
     1155        margin-top: 10px;
     1156}
     1157#buddypress ul.item-list li h5 span.small {
     1158        float: right;
     1159        font-size: 11px;
     1160        font-weight: normal;
     1161}
     1162#buddypress div.item-list-tabs {
     1163        background: #e6e6e6;
     1164        clear: left;
     1165        overflow: hidden;
     1166}
     1167#buddypress div.item-list-tabs ul li a {
     1168        text-decoration: none;
     1169        height: 20px;
     1170}
     1171#buddypress div.item-list-tabs ul {
     1172        width: 100%;
     1173}
     1174#buddypress div.item-list-tabs ul li {
     1175        float: left;
     1176        margin: 5px 0 0 5px;
     1177        list-style: none;
     1178}
     1179#buddypress div.item-list-tabs#subnav ul li {
     1180        margin-top: 0;
     1181}
     1182#buddypress div.item-list-tabs ul li.last {
     1183        float: right;
     1184        margin: 7px 10px 0 0;
     1185}
     1186#buddypress div.item-list-tabs#subnav ul li.last {
     1187        margin-top: 4px;
     1188}
     1189#buddypress div.item-list-tabs ul li.last select {
     1190        max-width: 175px;
     1191}
     1192#buddypress div.item-list-tabs ul li a,
     1193#buddypress div.item-list-tabs ul li span {
     1194        display: block;
     1195        padding: 5px 10px 10px;
     1196        text-decoration: none;
     1197}
     1198#buddypress div.item-list-tabs ul li a span {
     1199        background: #1fb3dd;
     1200        border-radius: 3px;
     1201        color: #fff;
     1202        display: inline;
     1203        font-size: 90%;
     1204        margin-left: 2px;
     1205        padding: 1px 6px;
     1206}
     1207#buddypress div.item-list-tabs ul li.selected a,
     1208#buddypress div.item-list-tabs ul li.current a {
     1209        background-color: #fff;
     1210        border-top-left-radius: 3px;
     1211        border-top-right-radius: 3px;
     1212        color: #555;
     1213        font-weight: bold;
     1214}
     1215#buddypress div.item-list-tabs ul li.selected a span,
     1216#buddypress div.item-list-tabs ul li.current a span,
     1217#buddypress div.item-list-tabs ul li a:hover span {
     1218        background-color: #999;
     1219}
     1220#buddypress div.item-list-tabs ul li.selected a span,
     1221#buddypress div.item-list-tabs ul li.current a span {
     1222        background-color: #555;
     1223}
     1224#buddypress div#item-nav ul li.loading a {
     1225        background-position: 88% 50%;
     1226}
     1227#buddypress div.item-list-tabs#object-nav {
     1228        margin-top: 0;
     1229}
     1230#buddypress div.item-list-tabs#subnav {
     1231        background: #fff;
     1232        border-bottom: 1px solid #eaeaea;
     1233        margin: 0 0 20px;
     1234        overflow: hidden;
     1235}
     1236#buddypress #admins-list li,
     1237#buddypress #mods-list li,
     1238#buddypress #members-list li {
     1239        overflow: auto;
     1240}
     1241
     1242
     1243/*--------------------------------------------------------------
     12446.9 - Private Messaging Threads
     1245--------------------------------------------------------------*/
     1246#buddypress table#message-threads tr.unread td {
     1247        background: #fff9db;
     1248        border-top: 1px solid #ffe8c4;
     1249        border-bottom: 1px solid #ffe8c4;
     1250        font-weight: bold;
     1251}
     1252#buddypress li span.unread-count,
     1253#buddypress tr.unread span.unread-count {
     1254        background: #dd0000;
     1255        border-radius: 3px;
     1256        color: #fff;
     1257        font-weight: bold;
     1258        padding: 2px 8px;
     1259}
     1260#buddypress div.item-list-tabs ul li a span.unread-count {
     1261        padding: 1px 6px;
     1262        color: #fff;
     1263}
     1264#buddypress div.messages-options-nav {
     1265        background: #eee;
     1266        font-size: 11px;
     1267        margin: 0 -19px;
     1268        padding: 5px 15px;
     1269        text-align: right;
     1270}
     1271#buddypress div#message-thread div.message-box {
     1272        margin: 0 -19px;
     1273        padding: 15px;
     1274}
     1275#buddypress div#message-thread div.alt {
     1276        background: #f4f4f4;
     1277}
     1278#buddypress div#message-thread p#message-recipients {
     1279        margin: 10px 0 20px 0;
     1280}
     1281#buddypress div#message-thread img.avatar {
     1282        float: left;
     1283        margin: 0 10px 0 0;
     1284        vertical-align: middle;
     1285}
     1286#buddypress div#message-thread strong {
     1287        font-size: 16px;
     1288        margin: 0;
     1289}
     1290#buddypress div#message-thread strong a {
     1291        text-decoration: none;
     1292}
     1293#buddypress div#message-thread strong span.activity {
     1294        margin: 4px 0 0 10px;
     1295}
     1296#buddypress div#message-thread div.message-metadata {
     1297        overflow: hidden;
     1298}
     1299#buddypress div#message-thread div.message-content {
     1300        margin-left: 45px;
     1301}
     1302#buddypress div#message-thread div.message-options {
     1303        text-align: right;
     1304}
     1305
     1306#buddypress div.message-search {
     1307        float: right;
     1308        margin: 0 20px;
     1309}
     1310
     1311/*--------------------------------------------------------------
     13126.9 - Extended Profiles
     1313--------------------------------------------------------------*/
     1314
     1315#buddypress div.profile h4 {
     1316        margin-bottom: auto;
     1317        margin-top: 15px;
     1318}
     1319#buddypress #profile-edit-form ul.button-nav {
     1320        margin-top: 15px;
     1321}
     1322body.no-js #buddypress .field-visibility-settings-toggle,
     1323body.no-js #buddypress .field-visibility-settings-close {
     1324        display: none;
     1325}
     1326#buddypress .field-visibility-settings {
     1327        display: none;
     1328        margin-top: 10px;
     1329}
     1330        body.no-js #buddypress .field-visibility-settings {
     1331                display: block;
     1332        }
     1333#buddypress .current-visibility-level {
     1334        font-weight: bold;
     1335        font-style: normal;
     1336}
     1337#buddypress .field-visibility-settings,
     1338#buddypress .field-visibility-settings-toggle,
     1339#buddypress .field-visibility-settings-notoggle {
     1340        color: #888;
     1341}
     1342#buddypress .field-visibility-settings-toggle a,
     1343#buddypress .field-visibility-settings a {
     1344        font-size: .9em;
     1345}
     1346body.register #buddypress div.page ul {
     1347        list-style: none;
     1348}
     1349#buddypress .standard-form .field-visibility-settings label {
     1350        margin: 0;
     1351        font-weight: normal;
     1352}
     1353#buddypress .field-visibility-settings legend,
     1354#buddypress .field-visibility-settings-toggle {
     1355        font-style: italic;
     1356}
     1357 No newline at end of file
  • bp-xprofile/bp-xprofile-screens.php

     
    189189        bp_core_load_template( apply_filters( 'xprofile_template_change_avatar', 'members/single/home' ) );
    190190}
    191191
    192 ?>
     192/** Theme Compatability *******************************************************/
     193
     194/**
     195 * The main theme compat class for BuddyPress Profiles
     196 *
     197 * This class sets up the necessary theme compatability actions to safely output
     198 * group template parts to the_title and the_content areas of a theme.
     199 *
     200 * @since BuddyPress (1.7)
     201 */
     202class BP_XProfile_Theme_Compat {
     203
     204        /**
     205         * Setup the xprofile component theme compatibility
     206         *
     207         * @since BuddyPress (1.7)
     208         *
     209         * @todo is 'bp_screens' correct here?
     210         */
     211        public function __construct() {
     212                add_action( 'bp_screens', array( $this, 'is_xprofile' ) );
     213        }
     214
     215        /**
     216         * Are we looking at something that needs group theme compatability?
     217         *
     218         * @since BuddyPress (1.7)
     219         */
     220        public function is_xprofile() {
     221
     222                // Bail if not looking at a profile
     223                if ( ! bp_displayed_user_id() )
     224                        return;
     225
     226                // Creating a group
     227                add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'dummy_post'    ) );
     228                add_filter( 'bp_replace_the_content',                    array( $this, 'dummy_content' ) );
     229        }
     230
     231        /** Directory *************************************************************/
     232
     233        /**
     234         * Update the global $post with directory data
     235         *
     236         * @since BuddyPress (1.7)
     237         */
     238        public function dummy_post() {
     239                bp_theme_compat_reset_post( array(
     240                        'ID'             => 0,
     241                        'post_title'     => bp_get_displayed_user_fullname(),
     242                        'post_author'    => 0,
     243                        'post_date'      => 0,
     244                        'post_content'   => '',
     245                        'post_type'      => 'bp_xprofile',
     246                        'post_status'    => 'publish',
     247                        'is_archive'     => true,
     248                        'comment_status' => 'closed'
     249                ) );
     250        }
     251
     252        /**
     253         * Filter the_content with the groups index template part
     254         *
     255         * @since BuddyPress (1.7)
     256         */
     257        public function dummy_content() {
     258                bp_buffer_template_part( 'members/single/home' );
     259        }
     260}
     261new BP_XProfile_Theme_Compat();