Ejemplo n.º 1
0
</a></h3>
				<p class="forum-description"><?php 
    bbp_forum_content();
    ?>
</p>
			</div>

			<div class="forum-count">
				<?php 
    bbp_forum_topic_count();
    ?>
			</div>

			<div class="forum-freshness">
				<?php 
    echo apoc_get_avatar(array('user_id' => bbp_get_forum_last_reply_author_id(), 'link' => true, 'size' => 50));
    ?>
				<div class="freshest-meta">
					<a class="freshest-title" href="<?php 
    echo $link;
    ?>
" title=""><?php 
    bbp_forum_last_topic_title();
    ?>
</a>
					<span class="freshest-author">By <?php 
    bbp_author_link(array('post_id' => bbp_get_forum_last_topic_id(), 'type' => 'name'));
    ?>
</span>
					<span class="freshest-time"><?php 
    bbp_topic_last_active_time(bbp_get_forum_last_topic_id());
Ejemplo n.º 2
0
    bbp_forum_title(bbp_get_topic_forum_id());
    ?>
</a>
			<?php 
}
?>
		</p>
	</div>
	
	<div class="forum-count">
		<?php 
bbp_topic_post_count();
?>
	</div>
	
	<div class="forum-freshness">
		<?php 
echo apoc_get_avatar(array('user_id' => bbp_get_reply_author_id(bbp_get_topic_last_active_id()), 'link' => true, 'size' => 50));
?>
		<div class="freshest-meta">
			<span class="freshest-author">By <?php 
bbp_author_link(array('post_id' => bbp_get_topic_last_active_id(), 'type' => 'name'));
?>
</span>
			<span class="freshest-time"><?php 
bbp_topic_last_active_time();
?>
</span>
		</div>
	</div>	
</li>
Ejemplo n.º 3
0
function apoc_topic_byline($args = '')
{
    // Default arguments
    $defaults = array('topic_id' => 0, 'before' => '<p class="post-byline">', 'after' => '</p>', 'size' => 50, 'echo' => true);
    $args = wp_parse_args($args, $defaults);
    // Validate topic_id
    $topic_id = bbp_get_topic_id($args['topic_id']);
    // Get the author avatar
    $avatar = apoc_get_avatar(array('user_id' => bbp_get_topic_author_id(), 'size' => $args['size']));
    // Build the topic description
    $voice_count = bbp_get_topic_voice_count($topic_id);
    $reply_count = bbp_get_topic_reply_count($topic_id, true) + 1;
    $time_since = bbp_get_topic_freshness_link($topic_id);
    $author = bbp_get_author_link(array('post_id' => $topic_id, 'type' => 'name'));
    // Singular/Plural
    $reply_count = sprintf(_n('%d posts', '%d posts', $reply_count), $reply_count);
    $voice_count = sprintf(_n('%s member', '%s members', $voice_count), $voice_count);
    // Topic has replies
    $last_reply = bbp_get_topic_last_active_id($topic_id);
    if (!empty($last_reply)) {
        $last_updated_by = bbp_get_author_link(array('post_id' => $last_reply, 'type' => 'name'));
        $retstr = sprintf('This topic by %1$s contains %2$s by %3$s, and was last updated by %4$s, %5$s.', $author, $reply_count, $voice_count, $last_updated_by, $time_since);
        // Topic has no replies
    } elseif (!empty($voice_count) && !empty($reply_count)) {
        $retstr = sprintf('This topic contains %1$s by %2$s.', $reply_count, $voice_count);
        // Topic has no replies and no voices
    } elseif (empty($voice_count) && empty($reply_count)) {
        $retstr = sprintf('This topic has no replies yet.');
    }
    // Combine the elements together
    $retstr = $args['before'] . $avatar . '<span>' . $retstr . '</span>' . $args['after'];
    // Return filtered result
    if (true == $args['echo']) {
        echo $retstr;
    } else {
        return $retstr;
    }
}
Ejemplo n.º 4
0
<div id="top-login" class="<?php 
echo $logged_in ? 'logged-in' : 'logged-out';
?>
">

	<form name="top-login-form" id="top-login-form" action="<?php 
echo SITEURL . '/wp-login.php';
?>
" method="post">			
		
		<?php 
if ($logged_in) {
    ?>
		<fieldset>	
			<?php 
    echo apoc_get_avatar(array('user_id' => $user_id, 'size' => 24, 'link' => true));
    ?>
			<span id="user-welcome">Welcome back, <?php 
    echo $user->display_name;
    ?>
.</span>
			<a id="login-logout" class="admin-bar-button button" href="<?php 
    echo wp_logout_url($url);
    ?>
" title="Log out of this account."><i class="fa fa-lock"></i>Log Out</a>
		</fieldset>

		<?php 
} else {
    ?>
		<fieldset>	
Ejemplo n.º 5
0
/**
 * Apocrypha Theme Single Activity Comment
 * Andrew Clayton
 * Version 2.0
 * 10-11-2014
 */
?>

<li id="acomment-<?php 
bp_activity_comment_id();
?>
" class="activity-comment">
	<div class="acomment-avatar">
		<?php 
echo apoc_get_avatar(array('user_id' => bp_get_activity_comment_user_id(), 'size' => 50));
?>
	</div>

	<div class="acomment-body">
		<header class="activity-header">
			<?php 
printf(__('<a href="%1$s">%2$s</a> replied <a href="%3$s" class="activity-time-since"><span class="time-since">%4$s</span></a>', 'buddypress'), bp_get_activity_comment_user_link(), bp_get_activity_comment_name(), bp_get_activity_thread_permalink(), bp_get_activity_comment_date_recorded());
?>
			
			<?php 
if (bp_activity_user_can_delete()) {
    ?>
		
			<div class="actions">
				<a href="<?php