當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserStatus::getUserAllInfo方法代碼示例

本文整理匯總了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;
}
開發者ID:volvor,項目名稱:SocialProfile,代碼行數:10,代碼來源:UserUserFollows_AjaxFunctions.php

示例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 = '♀';
開發者ID:Reasno,項目名稱:SocialProfile,代碼行數:67,代碼來源:SpecialViewFollows.php


注:本文中的UserStatus::getUserAllInfo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。