| 1 |
<?php |
| 2 |
// Exit if accessed directly |
| 3 |
if( !defined( 'ABSPATH' ) ) exit; |
| 4 |
?> |
| 5 |
|
| 6 |
<div class="wpforo-profile-wrap"> |
| 7 |
<?php if( !empty($user) && ( $wpforo->current_userid == $user['userid'] || $wpforo->perm->usergroup_can('vprf')) ) : |
| 8 |
$filtered_user = apply_filters('wpforo_profile_header_obj', $user); |
| 9 |
extract($filtered_user); |
| 10 |
$enabled_for_usergroup = ( isset($wpforo->member->options['rating_badge_ug'][$groupid]) && $wpforo->member->options['rating_badge_ug'][$groupid] ) ? true : false ; |
| 11 |
?> |
| 12 |
|
| 13 |
<div class="wpforo-profile-head-wrap"> |
| 14 |
<?php $avatar_image_html = wpforo_user_avatar($filtered_user, 150, 'alt="' . esc_html($display_name) . '"'); |
| 15 |
$avatar_image_url = wpforo_avatar_url($avatar_image_html); |
| 16 |
$bg = ($avatar_image_url) ? "background-image:url('" . esc_url($avatar_image_url) . "');" : ''; ?> |
| 17 |
<div class="wpforo-profile-head-bg" style="<?php echo $bg ?>"> |
| 18 |
<div class="wpfx"></div> |
| 19 |
</div> |
| 20 |
<div id="m_" class="wpforo-profile-head"> |
| 21 |
<?php do_action( 'wpforo_profile_plugin_menu_action', $userid ); ?> |
| 22 |
<div class="h-header"> |
| 23 |
<div class="wpfy" <?php if( !$enabled_for_usergroup ) echo ' style="height:125px;" ' ?>></div> |
| 24 |
<div class="wpf-profile-info-wrap"> |
| 25 |
|
| 26 |
<div class="h-picture"> |
| 27 |
<?php if( $wpforo->perm->usergroup_can('va') && wpforo_feature('avatars', $wpforo) ): ?> |
| 28 |
<div class="wpf-profile-img-wrap"><?php echo $avatar_image_html; ?></div> |
| 29 |
<?php else: ''; endif; ?> |
| 30 |
<div class="wpf-profile-data-wrap"> |
| 31 |
<div class="profile-display-name"> |
| 32 |
<?php $wpforo->member->show_online_indicator($userid) ?> |
| 33 |
<?php echo $display_name ? esc_html($display_name) : esc_html(urldecode($user_nicename)) ?> |
| 34 |
<div class="profile-stat-data-item"><?php wpforo_phrase('Group') ?>: <?php wpforo_phrase($groupname) ?></div> |
| 35 |
<div class="profile-stat-data-item"><?php wpforo_phrase('Joined') ?>: <?php wpforo_date($user_registered, 'Y/m/d') ?></div> |
| 36 |
<div class="profile-stat-data-item"><?php wpforo_phrase('Title') ?>: <?php wpforo_member_title($filtered_user); ?></div> |
| 37 |
</div> |
| 38 |
</div> |
| 39 |
<div class="wpf-cl"></div> |
| 40 |
</div> |
| 41 |
|
| 42 |
<div class="h-header-info"> |
| 43 |
<div class="h-top"> |
| 44 |
<div class="profile-stat-data"> |
| 45 |
<?php do_action( 'wpforo_profile_data_item', $wpforo->current_object ) ?> |
| 46 |
<?php if( wpforo_feature('rating', $wpforo) && $enabled_for_usergroup ): ?> |
| 47 |
<div class="profile-rating-bar"> |
| 48 |
<div class="profile-rating-bar-wrap" title="<?php wpforo_phrase('Member Rating') ?>"> |
| 49 |
<?php $levels = $wpforo->member->levels(); ?> |
| 50 |
<?php $rating_level = $wpforo->member->rating_level( $posts, false );?> |
| 51 |
<?php for( $a=1; $a <= $rating_level; $a++ ): ?> |
| 52 |
<div class="rating-bar-cell" style="background-color:<?php echo esc_attr($filtered_user['stat']['color']); ?>;"> |
| 53 |
<i class="fa <?php echo sanitize_html_class($wpforo->member->rating($a, 'icon')) ?>"></i> |
| 54 |
</div> |
| 55 |
<?php endfor; ?> |
| 56 |
<?php for( $i = ($rating_level+1); $i <= (count($levels)-1); $i++ ): ?> |
| 57 |
<div class="wpfbg-7 rating-bar-cell" > |
| 58 |
<i class="fa <?php echo sanitize_html_class($wpforo->member->rating($i, 'icon')) ?>"></i> |
| 59 |
</div> |
| 60 |
<?php endfor; ?> |
| 61 |
</div> |
| 62 |
</div> |
| 63 |
<div class="wpf-profile-badge" title="<?php wpforo_phrase('Rating Badge') ?>" style="background-color:<?php echo esc_attr($filtered_user['stat']['color']); ?>;"> |
| 64 |
<?php echo $wpforo->member->rating_badge($rating_level, 'short'); ?> |
| 65 |
</div> |
| 66 |
<?php endif; ?> |
| 67 |
<?php do_action('wpforo_after_member_badge', $filtered_user); ?> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
</div> |
| 71 |
<div class="wpf-clear"></div> |
| 72 |
</div> |
| 73 |
</div> |
| 74 |
<div class="h-footer"> |
| 75 |
<div class="h-bottom"> |
| 76 |
<?php $wpforo->tpl->member_menu($userid) ?> |
| 77 |
<div class="wpf-clear"></div> |
| 78 |
</div> |
| 79 |
</div> |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
<div class="wpforo-profile-content"> |
| 83 |
<?php $wpforo->tpl->member_template() ?> |
| 84 |
</div> |
| 85 |
<?php elseif( !empty($user) && !( $wpforo->current_userid == $user['userid'] || $wpforo->perm->usergroup_can('vprf')) ) : ?> |
| 86 |
<div class="wpforo-profile-content wpfbg-7"> |
| 87 |
<div class="wpfbg-7" style="border: #E6E6E6 1px solid; margin-top:3px;"> |
| 88 |
<div style="border: 1px dotted #91cf89; display: block; font-size: 14px; text-align: center; padding: 5px 10px; margin: 10px auto; width: auto; color: #000; background-color: #F5F5F5;"> |
| 89 |
<?php wpforo_phrase('You don\'t have permission to this page') ?> |
| 90 |
</div> |
| 91 |
</div> |
| 92 |
</div> |
| 93 |
<?php else : ?> |
| 94 |
<div class="wpforo-profile-content wpfbg-7"> |
| 95 |
<div class="wpfbg-7" style="border: #E6E6E6 1px solid; margin-top:3px;"> |
| 96 |
<div style="border: 1px dotted #91cf89; display: block; font-size: 14px; text-align: center; padding: 5px 10px; margin: 10px auto; width: auto; color: #000; background-color: #F5F5F5;"> |
| 97 |
<?php $wpforo->tpl->member_error() ?> |
| 98 |
</div> |
| 99 |
</div> |
| 100 |
</div> |
| 101 |
<?php endif; ?> |
| 102 |
</div> |