예제 #1
0
 function icon($comment)
 {
     if (bb_get_option('avatars_show')) {
         echo '<div class="gravatar">';
         $user = bb_get_user($comment->poster_id);
         if ($user->user_url) {
             echo '<a href="' . $user->user_url . '">';
         }
         echo bb_get_avatar($user->user_email, 40);
         if ($user->user_url) {
             echo '</a>';
         }
         echo '</div>';
     }
 }
예제 #2
0
?>
</a> &raquo; <a href="<?php 
user_profile_link($user_id);
?>
"><?php 
echo get_user_display_name($user_id);
?>
</a> &raquo; <?php 
_e('Profile');
?>
</div>

<div class="vcard" role="main">

<?php 
if ($avatar = bb_get_avatar($user->ID)) {
    ?>
<div id="useravatar"><?php 
    echo $avatar;
    ?>
</div>
<?php 
    unset($avatar);
}
?>
<h2 id="userlogin"><span class="fn"><?php 
echo get_user_display_name($user->ID);
?>
</span> <small>(<span class="nickname"><?php 
echo get_user_name($user->ID);
?>
function bb_user_row($user, $role = '', $email = false)
{
    $actions = "<a href='" . esc_attr(get_user_profile_link($user->ID)) . "'>" . __('View') . "</a>";
    $title = '';
    if (bb_current_user_can('edit_user', $user_id)) {
        $actions .= " | <a href='" . esc_attr(bb_get_user_admin_link($user->ID)) . "'>" . __('Edit') . "</a>";
        $title = " title='" . esc_attr(sprintf(__('User ID: %d'), $user->ID)) . "'";
    }
    $r = "\t<tr id='user-{$user->ID}'" . get_alt_class("user-{$role}") . ">\n";
    $r .= "\t\t<td class=\"user\">" . bb_get_avatar($user->ID, 32) . "<span class=\"row-title\"><a href='" . get_user_profile_link($user->ID) . "'" . $title . ">" . get_user_name($user->ID) . "</a></span><div><span class=\"row-actions\">{$actions}</span>&nbsp;</div></td>\n";
    $r .= "\t\t<td><a href='" . get_user_profile_link($user->ID) . "'>" . get_user_display_name($user->ID) . "</a></td>\n";
    if ($email) {
        $email = bb_get_user_email($user->ID);
        $r .= "\t\t<td><a href='mailto:{$email}'>{$email}</a></td>\n";
    }
    $registered_time = bb_gmtstrtotime($user->user_registered);
    if ($registered_time < time() - 86400) {
        $time = date('Y/m/d\\<\\b\\r \\/\\>H:i:s', bb_offset_time($registered_time));
    } else {
        $time = sprintf(__('%s ago'), bb_since($registered_time));
    }
    $r .= "\t\t<td>" . $time . "</td>\n";
    if (!isset($user->capabilities) || !is_array($user->capabilities) || empty($user->capabilities)) {
        $role = array(__('Inactive (no role)'));
    } else {
        global $nxt_roles;
        $_roles = $nxt_roles->get_names();
        $role = array();
        foreach ($user->capabilities as $cap => $cap_set) {
            if (!$cap_set) {
                continue;
            }
            $role[] = $_roles[$cap];
        }
        if (!count($role)) {
            $role[] = __('None');
        }
    }
    $r .= "\t\t<td>" . join(', ', $role) . "</td>\n\t</tr>";
    return $r;
}
예제 #4
0
파일: profile.php 프로젝트: sonicmaster/RPG
	<tr>
		<td class="c" colspan="2"><a href="<?php 
bb_option('uri');
?>
"><?php 
bb_option('name');
?>
</a> &raquo; <?php 
_e('Profile');
?>
</th>
	</tr>

	<tr>
		<th class="userlogin" width="100px" align="center" valign="center"><?php 
echo bb_get_avatar($user->ID);
?>
<br><?php 
echo get_user_name($user->ID);
?>
</td>

		<td class="b" align="left">
<?php 
if ($updated) {
    ?>

		<td class="notice">
			<p><?php 
    _e('Profile updated');
    ?>
function post_author_avatar_link($size = '48', $default = '', $post_id = 0)
{
    if (!bb_get_option('avatars_show')) {
        return false;
    }
    $author_id = get_post_author_id($post_id);
    if ($link = get_user_link($author_id)) {
        echo '<a href="' . esc_attr($link) . '">' . bb_get_avatar($author_id, $size, $default) . '</a>';
    } else {
        echo bb_get_avatar($author_id, $size, $default);
    }
}
예제 #6
0
        topic_close_link(array('id' => $topic->topic_id, 'before' => '', 'after' => '', 'close_text' => __('Close'), 'open_text' => _x('Open', 'action')));
        ?>
 |
			<?php 
        topic_delete_link(array('id' => $topic->topic_id, 'before' => '', 'after' => '', 'delete_text' => __('Delete'), 'undelete_text' => __('Undelete')));
        ?>
		</span>&nbsp;
		</div>
	</td>
	<td class="author">
		<a class="author-link" href="<?php 
        user_profile_link($topic->topic_poster);
        ?>
">
			<?php 
        echo bb_get_avatar($topic->topic_poster, '16');
        ?>
			<?php 
        topic_author();
        ?>
		</a>
	</td>
	<td class="posts num"><?php 
        topic_posts();
        ?>
</td>
	<td class="date num">
<?php 
        if (get_topic_start_time('U') < time() - 86400) {
            topic_start_time('Y/m/d\\<\\b\\r \\/\\>H:i:s');
        } else {
예제 #7
0
파일: front-page.php 프로젝트: hara/bbtouch
    <h1><a href="<?php 
bb_uri();
?>
"><?php 
bb_option('name');
?>
</a></h1>
</div>

<div id="content">

<ul id="greeting">
<?php 
if (bb_is_user_logged_in()) {
    if ($user = bb_get_current_user_info()) {
        if ($avatar = bb_get_avatar($user->ID, '48')) {
            ?>
<li id="avatar"><?php 
            echo $avatar;
            ?>
</li>
<?php 
        }
        ?>
<li id="message"><?php 
        printf(__("Hello, %s!"), $user->display_name);
        ?>
</li>
<li id="logout"><?php 
        bb_logout_link();
        ?>
예제 #8
0
            } else {
                bb_delete_option($option);
            }
        }
    }
    $goback = add_query_arg('updated', 'true', wp_get_referer());
    bb_safe_redirect($goback);
    exit;
}
if (!empty($_GET['updated'])) {
    bb_admin_notice(__('<strong>Settings saved.</strong>'));
}
$remote_options = array('enable_pingback' => array('title' => __('Enable Pingbacks'), 'type' => 'checkbox', 'options' => array(1 => __('Allow link notifications from other sites.'))));
$bb_get_option_avatars_show = create_function('$a', 'return 1;');
add_filter('bb_get_option_avatars_show', $bb_get_option_avatars_show);
$avatar_options = array('avatars_show' => array('title' => __('Avatar display'), 'type' => 'radio', 'options' => array(0 => __('Don&#8217;t show avatars'), 1 => __('Show avatars'))), 'avatars_rating' => array('title' => __('Maximum rating'), 'type' => 'radio', 'options' => array('g' => __('G &#8212; Suitable for all audiences'), 'pg' => __('PG &#8212; Possibly offensive, usually for audiences 13 and above'), 'r' => __('R &#8212; Intended for adult audiences above 17'), 'x' => __('X &#8212; Even more mature than above'))), 'avatars_default' => array('title' => __('Default avatar'), 'type' => 'radio', 'options' => array('default' => bb_get_avatar('', 32, 'default') . ' ' . __('Mystery Man'), 'blank' => bb_get_avatar('', 32, 'blank') . ' ' . __('Blank'), 'logo' => bb_get_avatar('', 32, 'logo') . ' ' . __('Gravatar Logo'), 'identicon' => bb_get_avatar(rand(0, 999), 32, 'identicon') . ' ' . __('Identicon (Generated)'), 'wavatar' => bb_get_avatar(rand(0, 999), 32, 'wavatar') . ' ' . __('Wavatar (Generated)'), 'monsterid' => bb_get_avatar(rand(0, 999), 32, 'monsterid') . ' ' . __('MonsterID  (Generated)')), 'note' => array(__('For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their e-mail address.'))));
remove_filter('bb_get_option_avatars_show', $bb_get_option_avatars_show);
$bb_admin_body_class = ' bb-admin-settings';
bb_get_admin_header();
?>

<div class="wrap">

<h2><?php 
_e('Discussion Settings');
?>
</h2>
<?php 
do_action('bb_admin_notices');
?>