<?php

/**
 * Apocrypha Theme Forum Single Reply
 * Andrew Clayton
 * Version 2.0
 * 7-22-2014
 */
// Get the reply author object
$author = new Apoc_User(bbp_get_reply_author_id(), 'reply');
?>

<li id="post-<?php 
bbp_reply_id();
?>
" class="reply">
	
	<header class="reply-header">
		<time class="reply-time" datetime="<?php 
echo get_the_time('Y-m-d\\TH:i');
?>
"><?php 
echo bp_core_time_since(strtotime(get_the_time('c')), current_time('timestamp'));
?>
</time>
		<?php 
apoc_report_post_button('reply');
?>
		
		<div class="reply-admin-links">
			<?php 
Esempio n. 2
0
function apoc_private_message_reply()
{
    // Bail if not a POST action
    if ('POST' !== strtoupper($_SERVER['REQUEST_METHOD'])) {
        return;
    }
    // Check the nonce and register the new message
    check_ajax_referer('messages_send_message');
    $result = messages_new_message(array('thread_id' => (int) $_REQUEST['thread_id'], 'content' => $_REQUEST['content']));
    // If the new message was registered successfully
    if ($result) {
        $user = new Apoc_User(get_current_user_id(), 'reply');
        ?>
	<li class="reply new-message">

		<header class="reply-header">
			<time class="reply-time">Right Now</time>
		</header>	

		<section class="reply-body">	
			<div class="reply-author">
				<?php 
        echo $user->block;
        ?>
			</div>
			<div class="reply-content">
				<?php 
        echo wpautop(stripslashes($_REQUEST['content']));
        ?>
			</div>
			<?php 
        $user->signature();
        ?>
		</section>				
	</li>
	
	<?php 
        // Otherwise, process errors
    } else {
        echo '<p class="error">There was a problem sending that reply. Please try again.</p>';
    }
    exit;
}
Esempio n. 3
0
<?php

/**
 * Apocrypha Theme User Profile Header
 * Andrew Clayton
 * Version 2.0
 * 12-12-2014
 */
// Get the currently displayed user
global $user;
$user = new Apoc_User(bp_displayed_user_id(), 'profile', 200);
?>

<div id="profile-header">

	<header class="post-header <?php 
echo $user->faction;
?>
">
		<h1 id="profile-title" class="post-title">User Profile - <?php 
echo $user->fullname;
?>
</h1>
		<p id="profile-description" class="post-byline"><?php 
echo $user->byline;
?>
</p>		
		<div id="profile-actions" class="header-actions">
		<?php 
if (bbp_is_user_home()) {
    ?>
Esempio n. 4
0
 /** 
  * Constructor function for Edit Profile class
  * Inherits the arguments $user_id and $context from the Apoc_User class
  * Checks to see if the edit form has been submitted, if so, update the form
  */
 function __construct($user_id = 0)
 {
     // Construct the user
     parent::__construct($user_id, 'profile');
     // Was the form submitted?
     if ('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['action'] == 'update-user') {
         $this->save($user_id);
     }
 }
Esempio n. 5
0
<?php

/**
 * Apocrypha Theme Comments Template
 * Andrew Clayton
 * Version 2.0
 * 9-13-2014
 */
// Get some information
global $comment;
$count = apoc()->counts['comment'];
$user = new Apoc_User($comment->user_id, 'reply');
// Display the comment
?>
<li id="comment-<?php 
echo $comment->comment_ID;
?>
" class="reply">
	
	<header class="reply-header">
		<time class="reply-time" datetime="<?php 
echo date('Y-m-d\\TH:i', strtotime($comment->comment_date));
?>
"><?php 
echo bp_core_time_since($comment->comment_date_gmt, current_time('timestamp', true));
?>
</time>
		<?php 
apoc_report_post_button('comment');
?>
		<div class="reply-admin-links">