예제 #1
0
    public static function post_btn($post_id)
    {
        $point_img = theme_custom_point::get_point_img_url();
        $point_values = array_filter((array) self::get_point_values());
        $count_point_values = count($point_values);
        $default_point_value = $point_values[0];
        if ($count_point_values > 1) {
            sort($point_values);
        }
        ?>
		<div class="meta meta-post-point">
			<a 
				href="javascript:;" 
				class="post-point-btn" 
				title="<?php 
        echo sprintf(__x('Rate %d %s.', 'E.g. Rate 3 points'), $default_point_value, theme_custom_point::get_point_name());
        ?>
" 
				data-post-id="<?php 
        echo $post_id;
        ?>
" 
				data-points="<?php 
        echo $default_point_value;
        ?>
" 
			>
				<div id="post-point-number-<?php 
        echo $post_id;
        ?>
" class="number"><?php 
        echo number_format((int) self::get_post_points_count($post_id));
        ?>
</div>
				<div class="tx"><?php 
        echo ___('Rate it');
        ?>
</div>
			</a>
			<?php 
        if (!wp_is_mobile() && $count_point_values > 1) {
            ?>
				<div class="box">
					<?php 
            foreach ($point_values as $v) {
                $class = $v == $default_point_value ? 'active' : null;
                ?>
<a 
							href="javascript:;" 
							class="post-point-btn <?php 
                echo $class;
                ?>
" 
							title="<?php 
                echo sprintf(__x('Rate %d %s.', 'E.g. Rate 3 points'), $v, theme_custom_point::get_point_name());
                ?>
" 
							data-post-id="<?php 
                echo $post_id;
                ?>
" 
							data-points="<?php 
                echo $v;
                ?>
" 
						><?php 
                echo $v;
                ?>
</a><?php 
            }
            ?>
				</div>
			<?php 
        }
        ?>
		</div>
		<?php 
    }
예제 #2
0
<div class="panel">
	<div class="content">
		<?php 
echo theme_custom_point::get_point_des();
?>
<div class="media">
	<div class="media-left">
		<img class="media-object" src="<?php 
echo theme_custom_point::get_point_img_url();
?>
" alt="">
	</div>
	<div class="media-body">
		<h4 class="media-heading">
			<strong class="total-point"><?php 
echo number_format(theme_custom_point::get_point(theme_cache::get_current_user_id()));
?>
</strong>
		</h4>
	</div>
</div>
</div><!-- /.content -->
<?php 
$history_list = theme_custom_point::get_history_list(array('posts_per_page' => 20));
if (empty($history_list)) {
    ?>
	<div class="content">
		<div class="page-tip"><?php 
    echo status_tip('info', ___('Your have not any history yet.'));
    ?>
</div>
예제 #3
0
    /**
     * My statistics
     */
    public static function my_statistics()
    {
        $current_user_id = theme_cache::get_current_user_id();
        ?>
		<div class="panel">
			<div class="heading">
				<i class="fa fa-pie-chart"></i>
				<?php 
        echo ___('My statistics');
        ?>
			</div>
			<div class="content">
				<a class="media" href="<?php 
        echo theme_custom_user_settings::get_tabs('history')['url'];
        ?>
" title="<?php 
        echo ___('Views my histories');
        ?>
">
					<div class="media-left">
						<img class="media-object" src="<?php 
        echo theme_custom_point::get_point_img_url();
        ?>
" alt="">
					</div>
					<div class="media-body">
						<h4 class="media-heading"><strong class="total-point"><?php 
        echo number_format(theme_custom_point::get_point($current_user_id));
        ?>
</strong></h4>
					</div>
				</a>
				<div class="row">
					<!-- posts count -->
					<div class="g-phone-1-2">
						<?php 
        echo sprintf(___('My posts: %s'), '<a href="' . theme_cache::get_author_posts_url($current_user_id) . '">' . theme_custom_author_profile::get_count('works', $current_user_id) . '</a>');
        ?>
					</div>
					<!-- comments count -->
					<div class="g-phone-1-2">
						<?php 
        echo sprintf(___('My comments: %s'), '<a href="' . theme_custom_author_profile::get_tabs('comments', $current_user_id)['url'] . '">' . theme_custom_author_profile::get_count('comments', $current_user_id) . '</a>');
        ?>
					</div>
					<!-- followers count -->
					<div class="g-phone-1-2">
						<?php 
        echo sprintf(___('My followers: %s'), '<a href="' . theme_custom_author_profile::get_tabs('followers_count', $current_user_id)['url'] . '">' . theme_custom_author_profile::get_count('followers_count', $current_user_id) . '</a>');
        ?>
					</div>
					<!-- following count -->
					<div class="g-tablet-1-2 g-desktop-1-3">
						<?php 
        echo sprintf(___('My following: %s'), '<a href="' . theme_custom_author_profile::get_tabs('following_count', $current_user_id)['url'] . '">' . theme_custom_author_profile::get_count('following_count', $current_user_id) . '</a>');
        ?>
					</div>
				</div>
			</div>
		</div>
		<?php 
    }
예제 #4
0
<?php

global $current_user;
get_currentuserinfo();
if (theme_custom_point::get_point_img_url()) {
    $point_icon = '<img src="' . theme_custom_point::get_point_img_url() . '" alt="icon" width="15" height="15">';
} else {
    $point_icon = '<i class="fa fa-diamond fa-fw"></i>';
}
?>
<div class="panel">
	<div class="content">
		<?php 
echo theme_custom_point_bomb::get_des();
?>
		<div class="page-tip" id="fm-bomb-loading"><?php 
echo status_tip('loading', ___('Loading, please wait...'));
?>
</div>
		<form class="form-horizontal" action="post" id="fm-bomb" method="javascript:;">
			<div class="form-group">
				<div class="g-tablet-2-5">
					<div class="bomb-area bomb-area-attacker">
						<p>
							<img id="bomb-attacker-avatar" src="<?php 
echo theme_cache::get_avatar_url($current_user->ID);
?>
" alt="<?php 
echo ___('Avatar');
?>
" class="avatar" width="100" height="100" >