Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 10.21 KB | None | 0 0
  1. <!-- Start of the User navigation Menu for LOGGED IN members -->
  2. <?php if (is_user_logged_in()):?>
  3.  
  4. <?php if ( function_exists( 'bp_message_get_notices' ) ) : ?>
  5.             <?php bp_message_get_notices(); /* Site wide notices to all users */ ?>
  6. <?php endif; ?>
  7.  
  8. <div id="accordion">
  9.  
  10. <!-- Start of the first menu. If you want to add more Menus copy and paste from here until the "end menu" section (line 7 till 34) if you want to keep the other panes then you can paste the code at line 147 -->
  11. <h3 id="profile_pane" class="current">My Profile</h3>
  12.      
  13. <div class="pane" style="display:block" min-height="300">
  14.    
  15. <!-- This shows the avatar and a welcome message -->
  16.         <div id="sidebar-me">  
  17.             <a href="<?php echo bp_loggedin_user_domain() ?>" title="<?php _e( 'My Profile', 'buddypress' ) ?>"><?php bp_loggedin_user_avatar                       ( 'type=thumb&width=40&height=40' ) ?>
  18.             </a>
  19.             <h4><?php bp_loggedinuser_link() ?></h4>
  20.             <p></p>
  21.             <h6>Welcome back!</h6>
  22.        
  23.                     <!-- Start of the actual navigation use the $userlink example below to fetch the users homepage link. Check how the URLs below are structured to make sense of it all. If you have problems editing just ask some help in the forums! -->
  24.                    
  25.                     <?php $userLink = bp_get_loggedin_user_link();?>
  26.                     <div id="profile_nav">
  27.                         <li><a href="<?php echo $userLink; ?>">Visit My Profile</a></li>
  28.                         <li><a href="<?php echo $userLink; ?>profile/edit">Edit Profile</a></li>
  29.                         <li><a href="<?php echo $userLink; ?>profile/change-avatar">Change Avatar</a></li> 
  30.                         <li><a href="<?php echo wp_logout_url(site_url() ); ?>">Log Out</a></li>
  31.                     </div>
  32.                     <!-- End Nav -->
  33.         </div>
  34.     <!-- end pane -->  
  35. </div>
  36. <!-- end menu -->
  37.  
  38. <!-- My Groups -->
  39. <h3 id="group_pane">My Groups</h3>
  40. <div class="pane">
  41.     <div id="sidebar-me">
  42.             <a href="<?php echo bp_loggedin_user_domain() ?>" title="<?php _e( 'My Profile', 'buddypress' ) ?>">
  43.                 <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
  44.             </a>
  45.             <h4><?php bp_loggedinuser_link() ?></h4>
  46.             <p></p>
  47.             <h6>View your Groups</h6>
  48.  
  49.             <?php $authorLink = bp_get_loggedin_user_username();?>
  50.             <div id="profile_nav">
  51.             <li><a href="<?php echo $userLink;?>groups">My Groups</a></li>
  52.             <li><a href="<?php echo $userLink;?>activity/groups">My Group Activity</a></li>
  53.             <li><a href="<?php bp_root_domain() ?>/groups/create">Create a Group</a></li>
  54.             <li><a href="<?php bp_root_domain() ?>/groups">View Group Directory</a></li>        </div>
  55.     </div>
  56. </div>
  57. <!-- end menu -->
  58. <!-- My Tricks Menu -->
  59. <h3 id="membership_pane">My Membership</h3>
  60. <div class="pane">
  61.     <div id="sidebar-me">
  62.             <a href="<?php echo bp_loggedin_user_domain() ?>" title="<?php _e( 'My Profile', 'buddypress' ) ?>">
  63.                 <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
  64.             </a>
  65.             <h4><?php bp_loggedinuser_link() ?></h4>
  66.             <p></p>
  67.             <h6>Manage your Membership</h6>
  68.  
  69.             <?php $authorLink = bp_get_loggedin_user_username();?>
  70.         <div id="profile_nav">
  71.             <li><a href="<?php echo $userLink;?>membership/">Membership Overview</a></li>
  72.             <li><a href="<?php bp_root_domain() ?>/welcome/">Upgrade Membership</a></li>
  73.             <li><a href="<?php echo $userLink;?>profile/downloads/">My Downloads</a></li>
  74.             <li><a href="<?php echo $userLink;?>">Cancel Membership</a></li>
  75.         </div>
  76.     </div>
  77. </div>
  78. <!-- end menu -->
  79.  
  80. <!-- INSERT NEW MENU PANEL CODE HERE. SEE DOCUMENTATION FOR CODE SAMPLE -->
  81.  
  82. <!-- My Messages Menu This shows your Messages. Thanks to TravelJunkie from BP.org for this (once again) Remove this is if you don't want to use it :) -->
  83.     <h3 id="messages_pane"><?php _e('Messagebox', 'Slick'); ?></h3>
  84.    
  85.     <div class="pane">
  86.                 <div id="sidebar-me">
  87.                
  88.                             <?php $userLink = bp_get_loggedin_user_link();?>
  89.                             <div id="inbox_notice"><a href="<?php echo $userLink; ?>messages/inbox"><?php _e('>> view all messages', 'Slick'); ?></a>   </div>      <!-- How many messages do you want to show? -->
  90.             <?php if ( bp_has_message_threads('per_page=2') ) : ?>
  91.             <ul id="message-threads">
  92.                 <?php while ( bp_message_threads() ) : bp_message_thread(); ?>
  93.                 <li<?php if ( bp_message_thread_has_unread() ) : ?> class="unread"<?php else: ?> class="read"<?php endif; ?>>
  94.                     <div class="message-thread">        
  95.                         <?php bp_message_thread_avatar() ?>
  96.                         <div class="message-subject">
  97.                             <a href="<?php bp_message_thread_view_link() ?>" title="<?php _e( "View Message", "buddypress" ); ?>"><?php bp_message_thread_subject() ?></a>
  98.                          </div>
  99.                         <div class="message-meta">
  100.                             <?php _e( 'From:', 'buddypress' ); ?> <?php bp_message_thread_from() ?> - <?php bp_message_thread_last_post_date() ?>
  101.                         </div>
  102.                     </div>
  103.                 </li>
  104.                 <?php endwhile; ?>
  105.             </ul>
  106.         <?php else: ?>
  107.             <div id="message" class="info">
  108.                 <p>No Messages. Sorry!</p>
  109.             </div> 
  110.         <?php endif; ?></div>  
  111. </div>
  112. <!-- end menu -->
  113.  
  114. <!-- INSERT NEW MENU PANEL CODE HERE. SEE DOCUMENTATION FOR CODE SAMPLE -->
  115.  
  116. <!-- Notifications: Also remove this if you don't need it. Would be stupid though! -->
  117. <h3 id="notifications_pane">Updates <span> <?php
  118. global $bp;
  119. if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
  120.     <span class="notifications_menu"><?php echo count($notifications) ?></span>
  121. <?php
  122. } ?>
  123. </span></h3>
  124.    
  125.     <div class="pane">
  126.                 <div id="sidebar-me">
  127.             <a href="<?php echo bp_loggedin_user_domain() ?>" title="<?php _e( 'My Profile', 'buddypress' ) ?>">
  128.                 <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
  129.             </a>
  130.             <h4><?php bp_loggedinuser_link() ?></h4>
  131.             <p></p>
  132.             <h6>Anything New?</h6>
  133.            
  134. <div id="profile_nav">
  135. <?php
  136.     global $bp;
  137.  
  138.     if ( !is_user_logged_in() )
  139.         return false;
  140.  
  141.     echo '<li"><a href="' . $bp->loggedin_user->domain . '">';
  142.     _e( '', 'buddypress' );
  143.  
  144.     if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>
  145.         <span><?php echo count($notifications) ?></span>
  146.     <?php
  147.     }
  148.  
  149.     echo '</a>';
  150.     echo '<ul>';
  151.  
  152.     if ( $notifications ) { ?>
  153.         <?php $counter = 0; ?>
  154.         <?php for ( $i = 0; $i < count($notifications); $i++ ) { ?>
  155.             <?php $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>
  156.             <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>
  157.             <?php $counter++; ?>
  158.         <?php } ?>
  159.     <?php } else { ?>
  160.         <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'No new notifications.', 'buddypress' ); ?></a></li>
  161.     <?php
  162.     }
  163.  
  164.     echo '</ul>';
  165.     echo '</li>';
  166. ?>
  167. </div>
  168. </div>
  169. <!-- end menu -->
  170. </div>
  171.  
  172. <!-- Site Administration Menu -->
  173. <?php if ( current_user_can('administrator') ) : ?>
  174. <h3 id="admin_pane">Site Administration</h3>
  175. <div class="pane">
  176.     <div id="sidebar-me">
  177.             <a href="<?php echo bp_loggedin_user_domain() ?>" title="<?php _e( 'My Profile', 'buddypress' ) ?>">
  178.                 <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
  179.             </a>
  180.             <h4><?php bp_loggedinuser_link() ?></h4>
  181.             <p></p>
  182.             <h6>Manage your Community</h6>
  183.  
  184.             <?php $authorLink = bp_get_loggedin_user_username();?>
  185.         <div id="profile_nav">
  186.             <li><a href="<?php bp_root_domain() ?>/wp-admin/post-new.php">Write Post</a></li>
  187.             <li><a href="<?php bp_root_domain() ?>/wp-admin/plugins.php">Add/View Plugins</a></li>
  188.             <li><a href="<?php bp_root_domain() ?>/wp-admin/admin.php?page=functions.php">Theme Options</a></li>
  189.             <li><a href="<?php bp_root_domain() ?>/wp-admin/widgets.php">Add Widgets</a></li>
  190.         </div>
  191.     </div>
  192. </div>
  193. <?php endif; ?>
  194. <!-- end menu -->
  195.  
  196. <!-- INSERT NEW MENU PANEL CODE HERE. SEE DOCUMENTATION FOR CODE SAMPLE -->
  197.  
  198. <!-- S2 Member Menu -->
  199. <?php if ( current_user_can('administrator') ) : ?>            
  200. <h3 id="membership_pane">S2Member Quicklinks</h3>
  201. <div class="pane">
  202.     <div id="sidebar-me">
  203.             <a href="<?php echo bp_loggedin_user_domain() ?>" title="<?php _e( 'My Profile', 'buddypress' ) ?>">
  204.                 <?php bp_loggedin_user_avatar( 'type=thumb&width=40&height=40' ) ?>
  205.             </a>
  206.             <h4><?php bp_loggedinuser_link() ?></h4>
  207.             <p></p>
  208.             <h6>Manage your Community</h6>
  209.  
  210.             <?php $authorLink = bp_get_loggedin_user_username();?>
  211.         <div id="profile_nav">
  212.             <li><a href="<?php echo $userLink;?>membership/">Membership Overview</a></li>
  213.             <li><a href="<?php bp_root_domain() ?>/welcome/">Upgrade Membership</a></li>
  214.             <li><a href="<?php echo $userLink;?>profile/downloads/">My Downloads</a></li>
  215.             <li><a href="<?php echo $userLink;?>">Cancel Membership</a></li>       
  216.         </div>
  217.     </div>
  218. </div>
  219. <?php endif; ?>
  220. <!-- end menu -->
  221.  
  222. <!-- start accordion for users who are not logged in -->
  223.  
  224. <!-- Login Menu -->
  225. <?php else :?>
  226. <div id="accordion">
  227.     <h3 class="current">Log in below</h6></h3>
  228.      
  229.     <div class="pane" style="display:block" height="400">
  230.    
  231. <div id="sidebar-me">      
  232.  
  233. <div class="formdetails">
  234. <form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
  235. <label class"loginpanel" for="log">Username : </label><input type="text" name="log" class ="loginpanel" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="15" />
  236. <label for="pwd">Password : </label><input type="password" name="pwd" class ="loginpanel" id="pwd" size="15" /><p></p>
  237. <input type="submit" name="submit" value="Login" class="button" id="login_button" />
  238. <label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> Remember me</label><input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" />
  239. </form>
  240. </div>
  241. <div id="profile_nav">
  242.             <h6>or you can:</h6>
  243. <div class="generic-button">       
  244. <?php printf( __( '<a href="%s" title="Create an account">create an account</a>.', 'buddypress' ), site_url( BP_REGISTER_SLUG . '/' ) ) ?>
  245. </div> 
  246. </div>
  247. </div>
  248. </div>
  249. <!-- end menu -->  
  250.  
  251.    
  252. <?php endif;?>
  253. <!-- end menu -->
  254.  
  255. <!-- INSERT NEW MENU PANEL FOR NON LOGGED IN MEMBERS HERE. SEE DOCUMENTATION FOR CODE SAMPLE -->
  256.  
  257. <!-- activate tabs with JavaScript -->
  258. <script>
  259. jQuery(function() {
  260.  
  261. jQuery("#accordion").tabs("#accordion div.pane", {tabs: 'h3', effect: 'slide',  initialIndex: null});
  262. });
  263. </script>
  264.  
  265.  
  266. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement