public static function list_history_post_be_rate($history) { if ($history['type'] !== 'post-be-rate') { return false; } ?> <li class="list-group-item"> <?php theme_custom_point::the_list_icon('thumbs-up'); ?> <?php theme_custom_point::the_point_sign($history['points']); ?> <span class="history-text"> <?php $post = theme_cache::get_post($history['post-id']); if (!$post) { echo ___('The post has been deleted.'); } else { echo sprintf(___('You post %1$s has been rated %2$d %3$s by %4$s.'), '<a href="' . theme_cache::get_permalink($history['post-id']) . '">' . theme_cache::get_the_title($history['post-id']) . '</a>', abs($history['points']), theme_custom_point::get_point_name(), esc_html(get_author_meta('display_name', $history['rater-id']))); } ?> </span> <?php theme_custom_point::the_time($history); ?> </li> <?php }
public static function list_history_save_avatar($history) { if ($history['type'] !== 'save-avatar') { return false; } ?> <li class="list-group-item"> <?php theme_custom_point::the_list_icon('github-alt'); ?> <?php theme_custom_point::the_point_sign(0 - abs(theme_custom_point::get_point_value('save-avatar'))); ?> <span class="history-text"> <?php echo ___('You modified your avatar.'); ?> </span> <?php theme_custom_point::the_time($history); ?> </li> <?php }
/** * list noti be-bomb */ public static function list_noti_be_bomb($noti) { if ($noti['type'] !== 'be-bomb') { return false; } if ($noti['hit']) { $points = '<strong class="label label-success">' . $noti['points'] . '</strong>'; } else { $points = '<strong class="label label-danger">+' . $noti['points'] . '</strong>'; } if (class_exists('number_user_nicename')) { $fight_back_url = self::get_tabs('bomb', $noti['attacker-id'] + number_user_nicename::$prefix_number)['url']; } else { $fight_back_url = self::get_tabs('bomb', $noti['attacker-id'])['url']; } ?> <div class="media"> <div class="media-left"> <a href="<?php theme_cache::get_author_posts_url($noti['attacker-id']); ?> "> <img src="<?php echo theme_cache::get_avatar_url($noti['attacker-id']); ?> " class="avatar media-object" alt="avatar" width="60" height="60"> </a> </div> <div class="media-body"> <h4 class="media-heading"> <a class="label label-default" href="<?php echo self::get_tabs('bomb')['url']; ?> "><i class="fa fa-<?php echo self::get_tabs('bomb')['icon']; ?> "></i> <?php echo ___('Bomb world'); ?> </a> <?php echo $points; ?> <?php theme_custom_point::the_time($noti); ?> <?php if ($noti['hit']) { ?> <a class="fight-back btn btn-danger btn-xs" href="<?php echo $fight_back_url; ?> " target="_blank"><strong><?php echo ___('It is time to fight back'); ?> <i class="fa fa-external-link"></i></strong></a> <?php } ?> </h4> <div class="excerpt"> <p> <?php $attacker_name = theme_cache::get_the_author_meta('display_name', $noti['attacker-id']); $attacker_name = '<a href="' . theme_cache::get_author_posts_url($noti['attacker-id']) . '" target="_blank">' . $attacker_name . '</a>'; if ($noti['hit']) { echo sprintf(___('%1$s bombed you and hit. You lost %2$s %3$s.'), $attacker_name, '<strong>' . (0 - abs($noti['points'])) . '</strong>', theme_custom_point::get_point_name()); } else { echo sprintf(___('%1$s bombed you but miss! You got %2$s %3$s.'), $attacker_name, '<strong>+' . abs($noti['points']) . '</strong>', theme_custom_point::get_point_name()); } ?> </p> </div> </div><!-- /.media-body --> </div><!-- /.media --> <?php }
public static function list_history($meta) { if ($meta['type'] !== self::$type_key) { return; } global $post; $post = theme_cache::get_post($meta['post-id']); setup_postdata($post); ?> <li class="list-group-item"> <?php theme_custom_point::the_list_icon('eye'); ?> <?php theme_custom_point::the_point_sign($meta['points']); ?> <span class="history-text"> <?php echo sprintf(___('Your post %1$s reached per hundred views, %2$s %3$s. Views are %4$s.'), '<a href="' . theme_cache::get_permalink($post->ID) . '" target="_blank">' . theme_cache::get_the_title($post->ID) . ' <i class="fa fa-external-link"></i></a>', '<strong>+' . $meta['points'] . '</strong>', theme_custom_point::get_point_name(), '<strong>' . $meta['views'] . '</strong>'); ?> </span> <?php theme_custom_point::the_time($meta); ?> </li> <?php wp_reset_postdata(); }