当前位置: 首页>>代码示例>>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;未经允许,请勿转载。