/bp-themes/bp-default/sidebar.php

  1. <?php do_action( 'bp_before_sidebar' ); ?> 
  2.  
  3. <div id="sidebar" role="complementary"> 
  4. <div class="padder"> 
  5.  
  6. <?php do_action( 'bp_inside_before_sidebar' ); ?> 
  7.  
  8. <?php if ( is_user_logged_in() ) : ?> 
  9.  
  10. <?php do_action( 'bp_before_sidebar_me' ); ?> 
  11.  
  12. <div id="sidebar-me"> 
  13. <a href="<?php echo bp_loggedin_user_domain(); ?>"> 
  14. <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ); ?> 
  15. </a> 
  16.  
  17. <h4><?php echo bp_core_get_userlink( bp_loggedin_user_id() ); ?></h4> 
  18. <a class="button logout" href="<?php echo wp_logout_url( wp_guess_url() ); ?>"><?php _e( 'Log Out', 'buddypress' ); ?></a> 
  19.  
  20. <?php do_action( 'bp_sidebar_me' ); ?> 
  21. </div> 
  22.  
  23. <?php do_action( 'bp_after_sidebar_me' ); ?> 
  24.  
  25. <?php if ( bp_is_active( 'messages' ) ) : ?> 
  26. <?php bp_message_get_notices(); /** Site wide notices to all users */ ?> 
  27. <?php endif; ?> 
  28.  
  29. <?php else : ?> 
  30.  
  31. <?php do_action( 'bp_before_sidebar_login_form' ); ?> 
  32.  
  33. <?php if ( bp_get_signup_allowed() ) : ?> 
  34.  
  35. <p id="login-text"> 
  36.  
  37. <?php printf( __( 'Please <a href="%s" title="Create an account">create an account</a> to get started.', 'buddypress' ), bp_get_signup_page() ); ?> 
  38.  
  39. </p> 
  40.  
  41. <?php endif; ?> 
  42.  
  43. <form name="login-form" id="sidebar-login-form" class="standard-form" action="<?php echo site_url( 'wp-login.php', 'login_post' ); ?>" method="post"> 
  44. <label><?php _e( 'Username', 'buddypress' ); ?><br /> 
  45. <input type="text" name="log" id="sidebar-user-login" class="input" value="<?php if ( isset( $user_login) ) echo esc_attr(stripslashes($user_login)); ?>" tabindex="97" /></label> 
  46.  
  47. <label><?php _e( 'Password', 'buddypress' ); ?><br /> 
  48. <input type="password" name="pwd" id="sidebar-user-pass" class="input" value="" tabindex="98" /></label> 
  49.  
  50. <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="sidebar-rememberme" value="forever" tabindex="99" /> <?php _e( 'Remember Me', 'buddypress' ); ?></label></p> 
  51.  
  52. <input type="submit" name="wp-submit" id="sidebar-wp-submit" value="<?php esc_attr_e( 'Log In', 'buddypress' ); ?>" tabindex="100" /> 
  53.  
  54. <?php do_action( 'bp_sidebar_login_form' ); ?> 
  55.  
  56. </form> 
  57.  
  58. <?php do_action( 'bp_after_sidebar_login_form' ); ?> 
  59.  
  60. <?php endif; ?> 
  61.  
  62. <?php /** Show forum tags on the forums directory */ 
  63. if ( bp_is_active( 'forums' ) && bp_is_forums_component() && bp_is_directory() ) : ?> 
  64. <div id="forum-directory-tags" class="widget tags"> 
  65. <h3 class="widgettitle"><?php _e( 'Forum Topic Tags', 'buddypress' ); ?></h3> 
  66. <div id="tag-text"><?php bp_forums_tag_heat_map(); ?></div> 
  67. </div> 
  68. <?php endif; ?> 
  69.  
  70. <?php dynamic_sidebar( 'sidebar-1' ); ?> 
  71.  
  72. <?php do_action( 'bp_inside_after_sidebar' ); ?> 
  73.  
  74. <?php wp_meta(); ?> 
  75.  
  76. </div><!-- .padder --> 
  77. </div><!-- #sidebar --> 
  78.  
  79. <?php do_action( 'bp_after_sidebar' ); ?> 
.