Beispiel #1
0
     * @since BuddyPress (1.1.0)
     */
    do_action('bp_after_message_thread_list');
    ?>

    <?php 
    /**
     * Fires before the display of the message thread reply form.
     *
     * @since BuddyPress (1.1.0)
     */
    do_action('bp_before_message_thread_reply');
    ?>

    <form id="send-reply" action="<?php 
    bp_messages_form_action();
    ?>
" method="post" class="standard-form">

      <div class="message-box">

        <div class="message-metadata">

          <?php 
    /** This action is documented in bp-templates/bp-legacy/buddypress-functions.php */
    do_action('bp_before_message_meta');
    ?>

          <div class="avatar-box">
            <?php 
    bp_loggedin_user_avatar('type=thumb&height=30&width=30');
<?php

/**
 * BuddyPress - Members Single Messages Compose
 *
 * @package BuddyPress
 * @subpackage bp-legacy
 */
?>
<form action="<?php 
bp_messages_form_action('compose');
?>
" method="post" id="send_message_form" class="standard-form" enctype="multipart/form-data">

	<?php 
/**
 * Fires before the display of message compose content.
 *
 * @since 1.1.0
 */
do_action('bp_before_messages_compose_content');
?>

	<label for="send-to-input"><?php 
_e("Send To (Username or Friend's Name)", 'buddypress');
?>
</label>
	<ul class="first acfb-holder">
		<li>
			<?php 
bp_message_get_recipient_tabs();
Beispiel #3
0
				</div><!-- .message-content -->

				<?php do_action( 'bp_after_message_content' ) ?>

				<div class="clear"></div>

			</div><!-- .message-box -->

		<?php endwhile; ?>

		<?php do_action( 'bp_after_message_thread_list' ) ?>

		<?php do_action( 'bp_before_message_thread_reply' ) ?>

		<form id="send-reply" action="<?php bp_messages_form_action() ?>" method="post" class="standard-form">

			<div class="message-box">

				<div class="message-metadata">

					<?php do_action( 'bp_before_message_meta' ) ?>

					<div class="avatar-box">
						<?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ) ?>

						<strong><?php _e( 'Send a Reply', 'buddypress' ) ?></strong>
					</div>

					<?php do_action( 'bp_after_message_meta' ) ?>
function messages_view_thread($thread_id)
{
    global $bp;
    $thread = new BP_Messages_Thread($thread_id, true);
    if (!$thread->has_access) {
        unset($_GET['mode']);
        ?>
		<div id="message" class="error">
			<p><?php 
        _e('There was an error when viewing that message', 'buddypress');
        ?>
</p>
		</div>
	<?php 
    } else {
        if ($thread->messages) {
            ?>
			<?php 
            $thread->mark_read();
            ?>
				
			<div class="wrap">
				<h2 id="message-subject"><?php 
            echo $thread->subject;
            ?>
</h2>
				<table class="form-table">
					<tbody>
						<tr>
							<td>
								<img src="<?php 
            echo $bp->messages->image_base;
            ?>
/email_open.gif" alt="Message" style="vertical-align: top;" /> &nbsp;
								<?php 
            _e('Sent between ', 'buddypress');
            ?>
 <?php 
            echo BP_Messages_Thread::get_recipient_links($thread->recipients);
            ?>
 
								<?php 
            _e('and', 'buddypress');
            ?>
 <?php 
            echo bp_core_get_userlink($bp->loggedin_user->id);
            ?>
. 
							</td>
						</tr>
					</tbody>
				</table>
				
		<?php 
            $counter = 0;
            foreach ($thread->messages as $message) {
                $alt = $counter % 2 == 1 ? ' alt' : '';
                ?>
					<a name="<?php 
                echo 'm-' . $message->id;
                ?>
"></a>
					<div class="message-box<?php 
                echo $alt;
                ?>
">
						<div class="avatar-box">
							<?php 
                echo apply_filters('bp_get_message_sender_avatar', bp_core_get_avatar($message->sender_id, 1));
                ?>
							<h3><?php 
                echo apply_filters('bp_get_message_sender_id', bp_core_get_userlink($message->sender_id));
                ?>
</h3>
							<small><?php 
                echo apply_filters('bp_get_message_date_sent', bp_format_time(strtotime($message->date_sent)));
                ?>
</small>
						</div>
						
						<?php 
                do_action('messages_custom_fields_output_before');
                ?>
						
						<?php 
                echo apply_filters('bp_get_message_content', stripslashes($message->message));
                ?>
						
						<?php 
                do_action('messages_custom_fields_output_after');
                ?>
		
						<div class="clear"></div>
					</div>
				<?php 
                $counter++;
            }
            ?>
				<form id="send-reply" action="<?php 
            bp_messages_form_action();
            ?>
" method="post">
					<div class="message-box">
							<div id="messagediv">
								<div class="avatar-box">
									<?php 
            if (function_exists('bp_core_get_avatar')) {
                echo bp_core_get_avatar($bp->loggedin_user->id, 1);
            }
            ?>
					
									<h3><?php 
            _e("Reply: ", 'buddypress');
            ?>
</h3>
								</div>
								<label for="reply"></label>
								<div>
									<textarea name="content" id="message_content" rows="15" cols="40"><?php 
            echo htmlspecialchars(wp_filter_kses($content));
            ?>
</textarea>
								</div>
							</div>
							<p class="submit">
								<input type="submit" name="send" value="<?php 
            _e('Send Reply', 'buddypress');
            ?>
 &rarr;" id="send_reply_button"/>
							</p>
							<input type="hidden" id="thread_id" name="thread_id" value="<?php 
            echo attribute_escape($thread->thread_id);
            ?>
" />
							<input type="hidden" name="subject" id="subject" value="<?php 
            _e('Re: ', 'buddypress');
            echo str_replace('Re: ', '', $thread->last_message_subject);
            ?>
" />
					</div>
					
					<?php 
            wp_nonce_field('messages_send_message', '_wpnonce_send_message');
            ?>
				</form>
			</div>
			<?php 
        }
    }
}
Beispiel #5
0
<form action="<?php bp_messages_form_action('compose') ?>" method="post" id="send_message_form" class="standard-form">

	<?php do_action( 'bp_before_messages_compose_content' ) ?>

	<label for="send-to-input"><?php _e("Send To (Username or Friend's Name)", 'buddypress') ?> &nbsp; <span class="ajax-loader"></span></label>
	<ul class="first acfb-holder">
		<li>
			<?php bp_message_get_recipient_tabs() ?>
			<input type="text" name="send-to-input" class="send-to-input" id="send-to-input" />
		</li>
	</ul>

	<?php if ( is_super_admin() ) : ?>
		<input type="checkbox" id="send-notice" name="send-notice" value="1" /> <?php _e( "This is a notice to all users.", "buddypress" ) ?>
	<?php endif; ?>

	<label for="subject"><?php _e( 'Subject', 'buddypress') ?></label>
	<input type="text" name="subject" id="subject" value="<?php bp_messages_subject_value() ?>" />

	<label for="content"><?php _e( 'Message', 'buddypress') ?></label>
	<textarea name="content" id="message_content" rows="15" cols="40"><?php bp_messages_content_value() ?></textarea>

	<input type="hidden" name="send_to_usernames" id="send-to-usernames" value="<?php bp_message_get_recipient_usernames(); ?>" class="<?php bp_message_get_recipient_usernames() ?>" />

	<?php do_action( 'bp_after_messages_compose_content' ) ?>

	<div class="submit">
		<input type="submit" value="<?php _e( "Send Message", 'buddypress' ) ?> &rarr;" name="send" id="send" />
		<span class="ajax-loader"></span>
	</div>