本文整理汇总了PHP中UserStatus::getUserAllInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP UserStatus::getUserAllInfo方法的具体用法?PHP UserStatus::getUserAllInfo怎么用?PHP UserStatus::getUserAllInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserStatus
的用法示例。
在下文中一共展示了UserStatus::getUserAllInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wfUserFollowsInfoResponse
function wfUserFollowsInfoResponse($username)
{
$user = User::newFromName($username);
$ust = new UserStatus($user);
$sites = $ust->getUserAllInfo();
$ret = array('success' => true, 'result' => $sites);
$out = json_encode($ret);
//TODO: use wfMessage instead of hard code
return $out;
}
示例2: execute
//.........这里部分代码省略.........
if ($rel_type == 1) {
$out->setPageTitle($this->msg('ur-title-friend', $user_name)->parse());
$total = $followingCount;
$target = SpecialPage::getTitleFor('ViewFollows');
$query1 = array('user' => $user_name, 'rel_type' => 1);
$query2 = array('user' => $user_name, 'rel_type' => 2);
$rem = $this->msg('ur-remove-relationship-friend')->plain();
$output .= '<div class="back-links">
<a href="' . htmlspecialchars($back_link->getFullURL()) . '">' . $this->msg('ur-backlink', $user_name)->parse() . '</a> | ' . Linker::LinkKnown($target, $noticestr, array(), $query2) . '
</div>
<div class="relationship-wrapper"><div class="relationship-count">' . $this->msg('ur-relationship-count-friends', $user_name, $total)->text() . '</div><div class="relationship-list">';
} else {
$out->setPageTitle($this->msg('ur-title-foe', $user_name)->parse());
$total = $followerCount;
$rem = $this->msg('ur-remove-relationship-foe')->plain();
$output .= '<div class="back-links">
<a href="' . htmlspecialchars($back_link->getFullURL()) . '">' . $this->msg('ur-backlink', $user_name)->parse() . '</a> | ' . Linker::LinkKnown($target, $noticedstr, array(), $query1);
if ($user_name == $wgUser->getName()) {
$output .= '| ' . Linker::LinkKnown($blast, '向关注我的人群发信息');
}
$output .= '</div>
<div class="relationship-wrapper"><div class="relationship-count">' . $this->msg('ur-relationship-count-foes', $user_name, $total)->text() . '</div><div class="relationship-list">';
}
if ($per_follow) {
$x = 1;
foreach ($per_follow as $follow) {
// $indivRelationship = UserRelationship::getUserRelationshipByID(
// $relationship['user_id'],
// $user->getID()
// );
$username = $follow['user_name'];
$userobj = User::newFromName($username);
$ust = new UserStatus($userobj);
$allinfo = $ust->getUserAllInfo();
// Safe titles
$userPage = Title::makeTitle(NS_USER, $allinfo['username']);
// $indivFollow = $uuf->checkUserUserFollow($user, User::newFromId($follow['user_id']));
$is_follow = $allinfo['is_follow'];
if ($is_follow == 'Y') {
$followButton = '<li class="user-user-follow unfollow" data-username="' . $allinfo['username'] . '"><a><i class="fa fa-minus-square-o"></i>取关</a></li> ';
} else {
$followButton = '<li class="user-user-follow" data-username="' . $allinfo['username'] . '"><i class="fa fa-plus-square-o"></i></i>关注</li> ';
}
$userPageURL = htmlspecialchars($userPage->getFullURL());
// $avatar = new wAvatar( $follow['user_id'], 'ml' );
// $avatar_img = $avatar->getAvatarURL();
$avatar_img = $allinfo['url'];
$user_gender = $allinfo['gender'];
$user_status = $allinfo['status'];
$user_count = $allinfo['usercounts'];
$user_counted = $allinfo['usercounted'];
$editcount = $allinfo['editcount'];
// $commonfollow = $allinfo['commonfollow'];
// $minefollowerhim = $allinfo['minefollowerhim'];
$user_level = $allinfo['level'];
$username_length = strlen($allinfo['username']);
$username_space = stripos($allinfo['username'], ' ');
if (($username_space == false || $username_space >= "30") && $username_length > 30) {
$user_name_display = substr($allinfo['username'], 0, 30) . ' ' . substr($allinfo['username'], 30, 50);
} else {
$user_name_display = $allinfo['username'];
}
if ($user_gender == 'male') {
$genderIcon = '♂';
} elseif ($user_gender == 'female') {
$genderIcon = '♀';