예제 #1
0
 function sc_ra_user_badges()
 {
     if (qw_hook_exist(__FUNCTION__)) {
         $args = func_get_args();
         array_unshift($args, $this);
         return qw_event_hook(__FUNCTION__, $args, NULL);
     }
     if (!qa_opt('badge_active')) {
         return;
     }
     $handle = $this->content['raw']['account']['handle'];
     $this->output('<div class="widget"><h3 class="widget-title">Badges</h3>');
     $this->output('<div class="user-badges-user">' . ra_user_badge($handle) . '</div></div>');
 }
예제 #2
0
function ra_ajax_user_popover()
{
    $handle_id = qa_post_text('handle');
    $handle = qa_post_text('handle');
    require_once QA_INCLUDE_DIR . 'qa-db-users.php';
    if (isset($handle)) {
        $userid = qa_handle_to_userid($handle);
        $badges = ra_user_badge($handle);
        if (defined('QA_WORDPRESS_INTEGRATE_PATH')) {
            $userid = qa_handle_to_userid($handle);
            $cover = get_user_meta($userid, 'cover');
            $cover = $cover[0];
        } else {
            $profile = ra_user_profile($handle);
            $cover = @$profile['cover'];
        }
        if (isset($cover)) {
            $image_file = explode('.', $cover);
            $cover = 'style="background:url(' . qa_opt('site_url') . 'images/' . @$image_file[0] . '_s.' . $image_file[1] . ') no-repeat scroll 0 0 / cover;"';
        }
        ?>
		<div id="<?php 
        echo $userid;
        ?>
_popover" class="user-popover">
			<div class="cover" <?php 
        echo @$cover;
        ?>
>
				<div class="avatar pull-left"><?php 
        echo ra_get_avatar($handle, 50);
        ?>
</div>
			</div>
			<div class="bar">		
				<span class="followers-count pull-right icon-star btn btn-warning"><?php 
        echo ra_user_followers_count($handle);
        ?>
</span>
				<h3 class="name"><?php 
        echo ra_name($handle);
        ?>
</h3>				
			</div>
			<div class="extra clearfix">
				<div class="points">
					<?php 
        echo '<span>' . ra_user_points($handle) . '</span>' . _ra_lang('P');
        ?>
				</div>
				<div class="badges">
					<?php 
        echo $badges;
        ?>
				</div>
			</div>
		</div>	
		<?php 
    }
    die;
}
예제 #3
0
?>
<div class="profile-fields clearfix">
	<div class="profile-avatar pull-left">
		<?php 
echo $p['avatar']['html'];
?>
		<h3><?php 
echo $this->content['raw']['account']['handle'] . '<span>' . qa_html(qa_user_level_string($this->content['raw']['account']['level']));
?>
</span></h3>
		<div class="points icon-radio-checked"><?php 
echo $user[0]['points'];
?>
</div>
		<div class="badges"><?php 
echo ra_user_badge($handle);
?>
</div>
		
	</div>
	<div class="user-info">
		<div class="profile-buttons">
			<?php 
if (qa_opt('allow_private_messages') && qa_get_logged_in_userid() != $this->content['raw']['account']['userid'] && !($this->content['raw']['account']['flags'] & QA_USER_FLAGS_NO_MESSAGES)) {
    echo '<a class="btn btn-mini icon-envelope" href="' . qa_path_html('message/' . $handle) . '">Send message</a>';
}
if (qa_get_logged_in_userid() == $this->content['raw']['account']['userid']) {
    echo '<a class="btn btn-mini edit-profile icon-edit" href="' . qa_path_html('account') . '">Edit</a>';
}
?>
		</div>