Exemple #1
0
">
					<?php 
$context->ra_list_avatar($args, 40);
?>
				</a>			
			</div>
			<div class="answeredby">
				<a href="<?php 
echo qa_path_html('user/' . $handle);
?>
"><?php 
echo ra_name($handle);
?>
</a>
				<span class="points"><?php 
echo _ra_lang('Points') . '<span>' . ra_user_points($handle) . '</span>';
?>
</span>
			</div>
		</div>
		<div class="content-inner">
			<?php 
$context->error(@$args['error']);
$context->a_item_content($args);
$context->post_meta($args, 'qa-a-item');
?>
		</div>
		<?php 
if (isset($args['main_form_tags'])) {
    $context->output('<form ' . $args['main_form_tags'] . '>');
}
Exemple #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;
}
Exemple #3
0
    function sc_ra_user_compact()
    {
        if (qw_hook_exist(__FUNCTION__)) {
            $args = func_get_args();
            array_unshift($args, $this);
            return qw_event_hook(__FUNCTION__, $args, NULL);
        }
        $handle = explode('/', qa_request());
        $handle = $handle[1];
        ob_start();
        ?>
			<div class="user-compact">
			<div class="user-info clearfix">
				<div class="avatar pull-left">
					<?php 
        echo ra_get_avatar($handle, 40);
        ?>
				</div>	
				<div class="name-point">
					<h5><?php 
        echo $handle;
        ?>
</h5>
					<span class="points"><?php 
        echo ra_user_points($handle);
        ?>
</span>
				</div>
			</div>
			<ul class="user-list-menu">
				<?php 
        if (ra_is_admin()) {
            echo '<li class="edit-profile-link"><a id="edit-user" class="btn btn-xs btn-success edit-profile icon-edit" href="' . qa_path_absolute('user/' . $handle, array('state' => 'edit')) . '">Edit User</a></li>';
        }
        foreach ($this->content['navigation']['sub'] as $k => $nav) {
            if ($k != 'wall') {
                echo '<li><a href="' . @$nav['url'] . '">' . @$nav['label'] . '</a></li>';
            }
        }
        ?>
			</ul>
			</div>
			<?php 
        $this->output(ob_get_clean());
    }