Advertisement
Guest User

Buddypress single.php

a guest
Nov 24th, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.15 KB | None | 0 0
  1. <?php
  2. /**
  3.  * BuddyPress - Members Single Message
  4.  *
  5.  * @package BuddyPress
  6.  * @subpackage bp-legacy
  7.  */
  8.  
  9. ?>
  10.  
  11. <?php
  12.  
  13.         /**
  14.          * Fires before the display of the message thread reply form.
  15.          *
  16.          * @since 1.1.0
  17.          */
  18.         do_action( 'bp_before_message_thread_reply' ); ?>
  19.  
  20.         <form id="send-reply" action="<?php bp_messages_form_action(); ?>" method="post" class="standard-form">
  21.  
  22.             <div class="message-box">
  23.  
  24.                 <div class="message-metadata">
  25.  
  26.                     <?php
  27.  
  28.                     /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
  29.                     do_action( 'bp_before_message_meta' ); ?>
  30.  
  31.                     <div class="avatar-box">
  32.                         <?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?>
  33.  
  34.                         <strong><?php _e( 'Send a Reply', 'buddypress' ); ?></strong>
  35.                     </div>
  36.  
  37.                     <?php
  38.  
  39.                     /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
  40.                     do_action( 'bp_after_message_meta' ); ?>
  41.  
  42.                 </div><!-- .message-metadata -->
  43.  
  44.                 <div class="message-content">
  45.  
  46.                     <?php
  47.  
  48.                     /**
  49.                      * Fires before the display of the message reply box.
  50.                      *
  51.                      * @since 1.1.0
  52.                      */
  53.                     do_action( 'bp_before_message_reply_box' ); ?>
  54.  
  55.                     <label for="message_content" class="bp-screen-reader-text"><?php _e( 'Reply to Message', 'buddypress' ); ?></label>
  56.                     <textarea name="content" id="message_content" rows="15" cols="40"></textarea>
  57.  
  58.                     <?php
  59.  
  60.                     /**
  61.                      * Fires after the display of the message reply box.
  62.                      *
  63.                      * @since 1.1.0
  64.                      */
  65.                     do_action( 'bp_after_message_reply_box' ); ?>
  66.  
  67.                     <div class="submit">
  68.                         <input type="submit" name="send" value="<?php esc_attr_e( 'Send Reply', 'buddypress' ); ?>" id="send_reply_button"/>
  69.                     </div>
  70.  
  71.                     <input type="hidden" id="thread_id" name="thread_id" value="<?php bp_the_thread_id(); ?>" />
  72.                     <input type="hidden" id="messages_order" name="messages_order" value="<?php bp_thread_messages_order(); ?>" />
  73.                     <?php wp_nonce_field( 'messages_send_message', 'send_message_nonce' ); ?>
  74.  
  75.                 </div><!-- .message-content -->
  76.  
  77.             </div><!-- .message-box -->
  78.  
  79.         </form><!-- #send-reply -->
  80.  
  81.         <?php
  82.  
  83.         /**
  84.          * Fires after the display of the message thread reply form.
  85.          *
  86.          * @since 1.1.0
  87.          */
  88.         do_action( 'bp_after_message_thread_reply' ); ?>
  89.  
  90.  
  91.  
  92.  
  93. <div id="message-thread">
  94.  
  95.     <?php
  96.  
  97.     /**
  98.      * Fires before the display of a single member message thread content.
  99.      *
  100.      * @since 1.1.0
  101.      */
  102.     do_action( 'bp_before_message_thread_content' ); ?>
  103.  
  104.     <?php  
  105.     $args = array(
  106.        'order'     => 'DESC'
  107.     );
  108. if ( bp_thread_has_messages( $args ) ) : ?>
  109.  
  110.         <h3 id="message-subject"><?php bp_the_thread_subject(); ?></h3>
  111.  
  112.         <p id="message-recipients">
  113.             <span class="highlight">
  114.  
  115.                 <?php if ( bp_get_thread_recipients_count() <= 1 ) : ?>
  116.  
  117.                     <?php _e( 'You are alone in this conversation.', 'buddypress' ); ?>
  118.  
  119.                 <?php elseif ( bp_get_max_thread_recipients_to_list() <= bp_get_thread_recipients_count() ) : ?>
  120.  
  121.                     <?php printf( __( 'Conversation between %s recipients.', 'buddypress' ), number_format_i18n( bp_get_thread_recipients_count() ) ); ?>
  122.  
  123.                 <?php else : ?>
  124.  
  125.                     <?php printf( __( 'Conversation between %s and you.', 'buddypress' ), bp_get_thread_recipients_list() ); ?>
  126.  
  127.                 <?php endif; ?>
  128.  
  129.             </span>
  130.  
  131.             <a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>" title="<?php esc_attr_e( "Delete Conversation", "buddypress" ); ?>"><?php _e( 'Delete', 'buddypress' ); ?></a>
  132.         </p>
  133.  
  134.         <?php
  135.  
  136.         /**
  137.          * Fires before the display of the message thread list.
  138.          *
  139.          * @since 1.1.0
  140.          */
  141.         do_action( 'bp_before_message_thread_list' ); ?>
  142.  
  143.         <?php while ( bp_thread_messages() ) : bp_thread_the_message(); ?>
  144.             <?php bp_get_template_part( 'members/single/messages/message' ); ?>
  145.         <?php endwhile; ?>
  146.  
  147.         <?php
  148.  
  149.         /**
  150.          * Fires after the display of the message thread list.
  151.          *
  152.          * @since 1.1.0
  153.          */
  154.         do_action( 'bp_after_message_thread_list' ); ?>
  155.  
  156.  
  157.  
  158.  
  159.     <?php endif; ?>
  160.  
  161.     <?php
  162.  
  163.     /**
  164.      * Fires after the display of a single member message thread content.
  165.      *
  166.      * @since 1.1.0
  167.      */
  168.     do_action( 'bp_after_message_thread_content' ); ?>
  169.  
  170. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement