当前位置: 首页>>代码示例>>PHP>>正文


PHP CUserPoints::getPointsImage方法代码示例

本文整理汇总了PHP中CUserPoints::getPointsImage方法的典型用法代码示例。如果您正苦于以下问题:PHP CUserPoints::getPointsImage方法的具体用法?PHP CUserPoints::getPointsImage怎么用?PHP CUserPoints::getPointsImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUserPoints的用法示例。


在下文中一共展示了CUserPoints::getPointsImage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getMembersData

 function getMembersData(&$params)
 {
     $model = CFactory::getModel('user');
     $db = JFactory::getDBO();
     $limit = $params->get('count', '5');
     $query = 'SELECT ' . $db->quoteName('userid') . ' FROM ' . $db->quoteName('#__community_users') . ' AS a ' . ' INNER JOIN ' . $db->quoteName('#__users') . ' AS b ON a.' . $db->quoteName('userid') . '=b.' . $db->quoteName('id') . ' WHERE ' . $db->quoteName('thumb') . '!=' . $db->Quote('components/com_community/assets/default_thumb.jpg') . ' ' . ' AND ' . $db->quoteName('block') . '=' . $db->Quote(0) . ' ' . ' ORDER BY ' . $db->quoteName('points') . ' DESC ' . ' LIMIT ' . $limit;
     $db->setQuery($query);
     $row = $db->loadObjectList();
     if ($db->getErrorNum()) {
         JError::raiseError(500, $db->stderr());
     }
     $_members = array();
     if (!empty($row)) {
         foreach ($row as $data) {
             $user = CFactory::getUser($data->userid);
             $_obj = new stdClass();
             $_obj->id = $data->userid;
             $_obj->name = $user->getDisplayName();
             $_obj->avatar = $user->getThumbAvatar();
             $CUserPoints = new CUserPoints();
             $_obj->karma = $CUserPoints->getPointsImage($user);
             $_obj->userpoints = $user->_points;
             $_obj->link = CRoute::_('index.php?option=com_community&view=profile&userid=' . $data->userid);
             $_members[] = $_obj;
         }
     }
     return $_members;
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:28,代码来源:helper.php

示例2: defined

 * @license		GNU/GPL, see LICENSE.php
 */
defined('_JEXEC') or die('Restricted access');
if ($my->isOnline() && $my->id != 0) {
    $inboxModel = CFactory::getModel('inbox');
    $filter = array();
    $filter['user_id'] = $my->id;
    $friendModel = CFactory::getModel('friends');
    $profileid = JRequest::getVar('userid', 0, 'GET');
    $params->def('unreadCount', $inboxModel->countUnRead($filter));
    $params->def('pending', $friendModel->countPending($my->id));
    $params->def('myLink', CRoute::_('index.php?option=com_community&view=profile&userid=' . $my->id));
    $params->def('myName', $my->getDisplayName());
    $params->def('myAvatar', $my->getAvatar());
    $params->def('myId', $my->id);
    $params->def('myKarma', CUserPoints::getPointsImage($my));
    $params->def('enablephotos', $config->get('enablephotos'));
    $params->def('enablevideos', $config->get('enablevideos'));
    $params->def('enablegroups', $config->get('enablegroups'));
    $params->def('enableevents', $config->get('enableevents'));
    $enablekarma = $config->get('enablekarma') ? $params->get('show_karma', 1) : $config->get('enablekarma');
    $params->def('enablekarma', $enablekarma);
    $js = modHelloMeHelper::getHelloMeScript($my->getStatus(), COwnerHelper::isMine($my->id, $profileid));
    $document = JFactory::getDocument();
    $document->addScriptDeclaration($js);
    if ($params->get('enable_facebookconnect', '1')) {
        $params->def('facebookuser', modHelloMeHelper::isFacebookUser());
    } else {
        $params->def('facebookuser', false);
    }
    CFactory::load('helpers', 'string');
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:default.php

示例3: CUserPoints

 $toolbar = CToolbarLibrary::getInstance();
 $newMessageCount = $toolbar->getTotalNotifications('inbox');
 $newEventInviteCount = $toolbar->getTotalNotifications('events');
 $newFriendInviteCount = $toolbar->getTotalNotifications('friends');
 $newGroupInviteCount = $toolbar->getTotalNotifications('groups');
 $myParams = $my->getParams();
 $newNotificationCount = $notifModel->getNotificationCount($my->id, '0', $myParams->get('lastnotificationlist', ''));
 $newEventInviteCount = $newEventInviteCount + $newNotificationCount;
 $params->def('unreadCount', $inboxModel->countUnRead($filter));
 $params->def('pending', $friendModel->countPending($my->id));
 $params->def('myLink', CRoute::_('index.php?option=com_community&view=profile&userid=' . $my->id));
 $params->def('myName', $my->getDisplayName());
 $params->def('myAvatar', $my->getAvatar());
 $params->def('myId', $my->id);
 $CUserPoints = new CUserPoints();
 $params->def('myKarma', $CUserPoints->getPointsImage($my));
 $params->def('enablephotos', $config->get('enablephotos'));
 $params->def('enablevideos', $config->get('enablevideos'));
 $params->def('enablegroups', $config->get('enablegroups'));
 $params->def('enableevents', $config->get('enableevents'));
 $enablekarma = $config->get('enablekarma') ? $params->get('show_karma', 1) : $config->get('enablekarma');
 $params->def('enablekarma', $enablekarma);
 $modHelloMeHelper = new modHelloMeHelper();
 $COwnerHelper = new COwnerHelper();
 $js = $modHelloMeHelper->getHelloMeScript($my->getStatus(), $COwnerHelper->isMine($my->id, $profileid));
 $document = JFactory::getDocument();
 $document->addScriptDeclaration($js);
 if ($params->get('enable_facebookconnect', '1')) {
     $params->def('facebookuser', $modHelloMeHelper->isFacebookUser());
 } else {
     $params->def('facebookuser', false);
开发者ID:Jougito,项目名称:DynWeb,代码行数:31,代码来源:default.php

示例4: _showHeader

 /**
  * Show the main profile header
  */
 function _showHeader(&$data)
 {
     jimport('joomla.utilities.arrayhelper');
     $my =& JFactory::getUser();
     $userid = JRequest::getVar('userid', $my->id);
     $user = CFactory::getUser($userid);
     $userModel = CFactory::getModel('user');
     CFactory::load('libraries', 'messaging');
     CFactory::load('helpers', 'owner');
     // Get the admin controls HTML data
     $adminControlHTML = '';
     $tmpl = new CTemplate();
     $editStatus = '';
     $editLink = '';
     if (COwnerHelper::isMine($my->id, $user->id)) {
         $editStatus = '<input id="new-status" style="border:1px solid #cccccc;" type="text" value="" size="38" onkeyup="if(event.keyCode == 13) {cStatusAct()}"/>';
         $editLink = '<span id="profile-status-edit" onclick="cStatusAct()">[' . JText::_('CC EDIT') . ']</span>';
     }
     // get how many unread message
     $filter = array();
     $inboxModel = CFactory::getModel('inbox');
     $filter['user_id'] = $my->id;
     $unread = $inboxModel->countUnRead($filter);
     // get how many pending connection
     $friendModel = CFactory::getModel('friends');
     $pending = $friendModel->countPending($my->id);
     $tmpl->set('karmaImgUrl', CUserPoints::getPointsImage($user));
     $tmpl->set('editStatus', $editStatus);
     $tmpl->set('editLink', $editLink);
     $tmpl->set('isMine', COwnerHelper::isMine($my->id, $user->id));
     $profile = JArrayHelper::toObject($data->profile);
     $profile->largeAvatar = $user->getAvatar();
     $profile->status = $user->getStatus();
     CFactory::load('libraries', 'activities');
     $postedOn = new JDate($user->_posted_on);
     $postedOn = CActivityStream::_createdLapse($postedOn);
     $profile->posted_on = $user->_posted_on == '0000-00-00 00:00:00' ? '' : $postedOn;
     // Assign videoId
     $profile->profilevideo = $data->videoid;
     $addbuddy = "joms.friends.connect('{$profile->id}')";
     $sendMsg = CMessaging::getPopup($profile->id);
     $config = CFactory::getConfig();
     $lastLogin = JText::_('CC NEVER LOGGED IN');
     if ($user->lastvisitDate != '0000-00-00 00:00:00') {
         //$now =& JFactory::getDate();
         $userLastLogin = new JDate($user->lastvisitDate);
         CFactory::load('libraries', 'activities');
         $lastLogin = CActivityStream::_createdLapse($userLastLogin);
     }
     // @todo : beside checking the owner, maybe we want to check for a cookie,
     // say every few hours only the hit get increment by 1.
     if (!COwnerHelper::isMine($my->id, $user->id)) {
         $user->viewHit();
     }
     $tmpl->set('lastLogin', $lastLogin);
     $tmpl->setRef('user', $user);
     $tmpl->set('addBuddy', $addbuddy);
     $tmpl->set('sendMsg', $sendMsg);
     $tmpl->set('config', $config);
     // @rule: myblog integrations
     $showBlogLink = false;
     CFactory::load('libraries', 'myblog');
     $myblog =& CMyBlog::getInstance();
     if ($config->get('enablemyblogicon') && $myblog) {
         if ($myblog->userCanPost($user->id)) {
             $showBlogLink = true;
         }
         $tmpl->set('blogItemId', $myblog->getItemId());
     }
     $multiprofile =& JTable::getInstance('MultiProfile', 'CTable');
     $multiprofile->load($user->getProfileType());
     // Get like
     $likesHTML = '';
     if ($user->getParams()->get('profileLikes', true)) {
         CFactory::load('libraries', 'like');
         $likes = new CLike();
         $likesHTML = $my->id == 0 ? $likes->getHtmlPublic('profile', $user->id) : $likes->getHTML('profile', $user->id, $my->id);
     }
     $tmpl->set('multiprofile', $multiprofile);
     $tmpl->set('showBlogLink', $showBlogLink);
     $tmpl->set('isFriend', CFriendsHelper::isConnected($user->id, $my->id) && $user->id != $my->id);
     $tmpl->set('profile', $profile);
     $tmpl->set('unread', $unread);
     $tmpl->set('pending', $pending);
     $tmpl->set('registerDate', $user->registerDate);
     $tmpl->set('adminControlHTML', $adminControlHTML);
     $tmpl->set('likesHTML', $likesHTML);
     $html = $tmpl->fetch('profile.header');
     return $html;
 }
开发者ID:bizanto,项目名称:Hooked,代码行数:93,代码来源:view.html.php

示例5: _getFriendsLocation

        /**
         *
         */
        private function _getFriendsLocation($friends, $town_field_id, $state_field_id, $country_field_id, $zip_field_id, $address_field_id, $show_karma)
        {
            require_once JPATH_ROOT . '/components/com_community/libraries/core.php';
            $db = JFactory::getDBO();
            $friends_id = implode(',', $friends);
            $sql = 'SELECT 	a.' . $db->quoteName('user_id') . ',
				      		a.' . $db->quoteName('value') . ' AS country,
				      		b.' . $db->quoteName('value') . ' AS state,
							c.' . $db->quoteName('value') . '	AS town,
							d.' . $db->quoteName('value') . '	AS address,
							e.' . $db->quoteName('value') . '	AS zip' . ' FROM ' . $db->quoteName('#__community_fields_values') . ' AS a' . ' LEFT JOIN ' . $db->quoteName('#__community_fields_values') . ' AS b' . ' ON a.' . $db->quoteName('user_id') . '=b.' . $db->quoteName('user_id') . ' AND b.' . $db->quoteName('field_id') . ' = ' . $db->Quote($state_field_id) . ' LEFT JOIN ' . $db->quoteName('#__community_fields_values') . ' AS c' . ' ON a.' . $db->quoteName('user_id') . '=c.' . $db->quoteName('user_id') . ' AND c.' . $db->quoteName('field_id') . ' = ' . $db->Quote($town_field_id) . ' LEFT JOIN ' . $db->quoteName('#__community_fields_values') . ' AS d' . ' ON a.' . $db->quoteName('user_id') . '=d.' . $db->quoteName('user_id') . ' AND d.' . $db->quoteName('field_id') . ' = ' . $db->Quote($address_field_id) . ' LEFT JOIN ' . $db->quoteName('#__community_fields_values') . ' AS e' . ' ON a.' . $db->quoteName('user_id') . '=e.' . $db->quoteName('user_id') . ' AND e.' . $db->quoteName('field_id') . ' = ' . $db->Quote($zip_field_id) . ' WHERE a.' . $db->quoteName('field_id') . ' = ' . $db->Quote($country_field_id) . ' AND	a.' . $db->quoteName('user_id') . ' IN (' . $friends_id . ')';
            $db->setQuery($sql);
            $row = $db->loadObjectList();
            // preload all users
            $CFactoryMethod = get_class_methods('CFactory');
            if (in_array('loadUsers', $CFactoryMethod)) {
                $uids = array();
                foreach ($row as $m) {
                    $uids[] = $m->user_id;
                }
                CFactory::loadUsers($uids);
            }
            $location = JArrayHelper::toObject($location);
            $location = new stdClass();
            foreach ($row as $data) {
                $user = CFactory::getUser($data->user_id);
                $country = JText::_($data->country);
                $state = JText::_($data->state);
                $town = JText::_($data->town);
                $address = $data->address;
                $zip = $data->zip;
                $fullAddress = $address . ", " . $town . ", " . $zip . ", " . $state . ", " . ", " . $country;
                $location->{$fullAddress} = new stdClass();
                $location->{$fullAddress}->{$data->user_id} = new stdClass();
                $location->{$fullAddress}->{$data->user_id}->username = $user->getDisplayName();
                $location->{$fullAddress}->{$data->user_id}->avatar = $user->getThumbAvatar();
                $location->{$fullAddress}->{$data->user_id}->link = CRoute::_('index.php?option=com_community&view=profile&userid=' . $data->user_id);
                switch ($show_karma) {
                    case 1:
                        $location->{$fullAddress}->{$data->user_id}->karma_points = "<div><img src='" . CUserPoints::getPointsImage($user) . "' alt=''/></div>";
                        break;
                    case 2:
                        $location->{$fullAddress}->{$data->user_id}->karma_points = "<div><small>" . JText::_('MOD_TOPMEMBERS_POINTS') . ": " . $user->_points . "</small></div>";
                        break;
                    default:
                        $location->{$fullAddress}->{$data->user_id}->karma_points = "<div></div>";
                }
            }
            return $location;
        }
开发者ID:joshjim27,项目名称:jobsglobal,代码行数:53,代码来源:myfriendslocation.php

示例6: modProfileUserinfo


//.........这里部分代码省略.........
     $filter = array();
     $inboxModel = CFactory::getModel('inbox');
     $filter['user_id'] = $my->id;
     $unread = $inboxModel->countUnRead($filter);
     // get how many pending connection
     $friendModel = CFactory::getModel('friends');
     $pending = $friendModel->countPending($my->id);
     $profile = JArrayHelper::toObject($data->profile);
     $profile->largeAvatar = $user->getAvatar();
     $profile->defaultAvatar = $user->isDefaultAvatar();
     $profile->status = $user->getStatus();
     $profile->defaultCover = $user->isDefaultCover();
     $profile->cover = $user->getCover();
     $profile->coverPostion = $params->get('coverPosition', '');
     if (strpos($profile->coverPostion, '%') === false) {
         $profile->coverPostion = 0;
     }
     $groupmodel = CFactory::getModel('groups');
     $profile->_groups = $groupmodel->getGroupsCount($profile->id);
     $eventmodel = CFactory::getModel('events');
     $profile->_events = $eventmodel->getEventsCount($profile->id);
     $profile->_friends = $user->_friendcount;
     $videoModel = CFactory::getModel('Videos');
     $profile->_videos = $videoModel->getVideosCount($profile->id);
     $photosModel = CFactory::getModel('photos');
     $profile->_photos = $photosModel->getPhotosCount($profile->id);
     if ($profile->status !== '') {
         $postedOn = new JDate($user->_posted_on);
         $postedOn = CActivityStream::_createdLapse($postedOn);
         $profile->posted_on = $user->_posted_on == '0000-00-00 00:00:00' ? '' : $postedOn;
     } else {
         $profile->posted_on = '';
     }
     /* is featured */
     $modelFeatured = CFactory::getModel('Featured');
     $profile->featured = $modelFeatured->isExists(FEATURED_USERS, $profile->id);
     // Assign videoId
     $profile->profilevideo = $data->videoid;
     $video = JTable::getInstance('Video', 'CTable');
     $video->load($profile->profilevideo);
     $profile->profilevideoTitle = $video->getTitle();
     $addbuddy = "joms.api.friendAdd('{$profile->id}')";
     $sendMsg = CMessaging::getPopup($profile->id);
     $config = CFactory::getConfig();
     $jConfig = JFactory::getConfig();
     $lastLogin = JText::_('COM_COMMUNITY_PROFILE_NEVER_LOGGED_IN');
     if ($user->lastvisitDate != '0000-00-00 00:00:00') {
         $userLastLogin = new JDate($user->lastvisitDate);
         $lastLogin = CActivityStream::_createdLapse($userLastLogin);
     }
     // @todo : beside checking the owner, maybe we want to check for a cookie,
     // say every few hours only the hit get increment by 1.
     if (!$isMine) {
         $user->viewHit();
     }
     // @rule: myblog integrations
     $showBlogLink = false;
     $myblog = CMyBlog::getInstance();
     if ($config->get('enablemyblogicon') && $myblog) {
         if ($myblog->userCanPost($user->id)) {
             $showBlogLink = true;
         }
         $tmpl->set('blogItemId', $myblog->getItemId());
     }
     $photoEnabled = $config->get('enablephotos') ? true : false;
     $eventEnabled = $config->get('enableevents') ? true : false;
     $groupEnabled = $config->get('enablegroups') ? true : false;
     $videoEnabled = $config->get('enablevideos') ? true : false;
     $isSEFEnabled = $jConfig->get('sef') ? true : false;
     $multiprofile = JTable::getInstance('MultiProfile', 'CTable');
     $multiprofile->load($user->getProfileType());
     CFactory::load('libraries', 'like');
     $like = new Clike();
     $isLikeEnabled = $like->enabled('profile') && $params->get('profileLikes', 1) ? 1 : 0;
     $isUserLiked = $like->userLiked('profile', $user->id, $my->id);
     /* likes count */
     $likes = $like->getLikeCount('profile', $user->id);
     /* User status */
     $status = new CUserStatus($user->id, 'profile');
     //respect wall setting
     if ($my->id && (!$config->get('lockprofilewalls') || $config->get('lockprofilewalls') && CFriendsHelper::isConnected($my->id, $profile->id)) || COwnerHelper::isCommunityAdmin()) {
         // Add default status box
         CUserHelper::addDefaultStatusCreator($status);
     }
     //$isblocked = $user->isBlocked();
     $isMine = COwnerHelper::isMine($my->id, $user->id);
     $isCommunityAdmin = COwnerHelper::isCommunityAdmin($user->id);
     // Check if user is blocked
     $getBlockStatus = new blockUser();
     $isblocked = $getBlockStatus->isUserBlocked($user->id, 'profile');
     // Get block user html
     //$blockUserHTML = $isMine || $isCommunityAdmin ? '' : CUserHelper::getBlockUserHTML($user->id, $isBlocked);
     $isMine = COwnerHelper::isMine($my->id, $user->id);
     $isCommunityAdmin = COwnerHelper::isCommunityAdmin($user->id);
     // Get reporting html
     $report = new CReportingLibrary();
     $reportsHTML = $isMine ? '' : $report->getReportingHTML(JText::_('COM_COMMUNITY_REPORT_USER'), 'profile,reportProfile', array($user->id));
     $tmpl = new CTemplate();
     echo $tmpl->set('karmaImgUrl', CUserPoints::getPointsImage($user))->set('reportsHTML', $reportsHTML)->set('isMine', $isMine)->set('lastLogin', $lastLogin)->set('addBuddy', $addbuddy)->set('sendMsg', $sendMsg)->set('config', $config)->set('multiprofile', $multiprofile)->set('showBlogLink', $showBlogLink)->set('isFriend', CFriendsHelper::isConnected($user->id, $my->id) && $user->id != $my->id)->set('isWaitingApproval', CFriendsHelper::isWaitingApproval($my->id, $user->id))->set('isWaitingResponse', CFriendsHelper::isWaitingApproval($user->id, $my->id))->set('isBlocked', $isblocked)->set('profile', $profile)->set('unread', $unread)->set('pending', $pending)->set('registerDate', $user->registerDate)->set('adminControlHTML', $adminControlHTML)->set('userstatus', $status)->set('user', $user)->set('isUserLiked', $isUserLiked)->set('likes', $likes)->set('isLikeEnabled', $isLikeEnabled)->set('photoEnabled', $photoEnabled)->set('eventEnabled', $eventEnabled)->set('groupEnabled', $groupEnabled)->set('videoEnabled', $videoEnabled)->set('about', $this->_getProfileHTML($data->profile))->set('isSEFEnabled', $isSEFEnabled)->set('blocked', $user->isBlocked())->fetch('profile/focus');
 }
开发者ID:Jougito,项目名称:DynWeb,代码行数:101,代码来源:view.html.php

示例7: _showHeader

 /**
  * Show the main profile header
  */
 public function _showHeader(&$data)
 {
     jimport('joomla.utilities.arrayhelper');
     $my =& JFactory::getUser();
     $userid = JRequest::getVar('userid', $my->id);
     $user = CFactory::getUser($userid);
     $params = $user->getParams();
     $userModel = CFactory::getModel('user');
     CFactory::load('libraries', 'messaging');
     CFactory::load('helpers', 'owner');
     $isMine = COwnerHelper::isMine($my->id, $user->id);
     // Get the admin controls HTML data
     $adminControlHTML = '';
     $tmpl = new CTemplate();
     // get how many unread message
     $filter = array();
     $inboxModel = CFactory::getModel('inbox');
     $filter['user_id'] = $my->id;
     $unread = $inboxModel->countUnRead($filter);
     // get how many pending connection
     $friendModel = CFactory::getModel('friends');
     $pending = $friendModel->countPending($my->id);
     $profile = JArrayHelper::toObject($data->profile);
     $profile->largeAvatar = $user->getAvatar();
     CFactory::load('libraries', 'activities');
     $profile->status = $user->getStatus();
     if ($profile->status !== '') {
         CFactory::load('libraries', 'activities');
         $postedOn = new JDate($user->_posted_on);
         $postedOn = CActivityStream::_createdLapse($postedOn);
         $profile->posted_on = $user->_posted_on == '0000-00-00 00:00:00' ? '' : $postedOn;
     } else {
         $profile->posted_on = '';
     }
     // Assign videoId
     $profile->profilevideo = $data->videoid;
     $video = JTable::getInstance('Video', 'CTable');
     $video->load($profile->profilevideo);
     $profile->profilevideoTitle = $video->getTitle();
     $addbuddy = "joms.friends.connect('{$profile->id}')";
     $sendMsg = CMessaging::getPopup($profile->id);
     $config = CFactory::getConfig();
     $lastLogin = JText::_('COM_COMMUNITY_PROFILE_NEVER_LOGGED_IN');
     if ($user->lastvisitDate != '0000-00-00 00:00:00') {
         //$now =& JFactory::getDate();
         $userLastLogin = new JDate($user->lastvisitDate);
         CFactory::load('libraries', 'activities');
         $lastLogin = CActivityStream::_createdLapse($userLastLogin);
     }
     // @todo : beside checking the owner, maybe we want to check for a cookie,
     // say every few hours only the hit get increment by 1.
     if (!$isMine) {
         $user->viewHit();
     }
     // @rule: myblog integrations
     $showBlogLink = false;
     CFactory::load('libraries', 'myblog');
     $myblog =& CMyBlog::getInstance();
     if ($config->get('enablemyblogicon') && $myblog) {
         if ($myblog->userCanPost($user->id)) {
             $showBlogLink = true;
         }
         $tmpl->set('blogItemId', $myblog->getItemId());
     }
     $multiprofile =& JTable::getInstance('MultiProfile', 'CTable');
     $multiprofile->load($user->getProfileType());
     // Get like
     $likesHTML = '';
     if ($user->getParams()->get('profileLikes', true)) {
         CFactory::load('libraries', 'like');
         $likes = new CLike();
         $likesHTML = $my->id == 0 ? $likes->getHtmlPublic('profile', $user->id) : $likes->getHTML('profile', $user->id, $my->id);
     }
     /* User status */
     CFactory::load('libraries', 'userstatus');
     $status = new CUserStatus($user->id, 'profile');
     //respect wall setting
     CFactory::load('helpers', 'friends');
     CFactory::load('helper', 'owner');
     if ($my->id && (!$config->get('lockprofilewalls') || $config->get('lockprofilewalls') && CFriendsHelper::isConnected($my->id, $profile->id)) || COwnerHelper::isCommunityAdmin()) {
         // Add default status box
         CFactory::load('helpers', 'user');
         CUserHelper::addDefaultStatusCreator($status);
     }
     $isblocked = $user->isBlocked();
     return $tmpl->set('karmaImgUrl', CUserPoints::getPointsImage($user))->set('isMine', $isMine)->set('lastLogin', $lastLogin)->setRef('user', $user)->set('addBuddy', $addbuddy)->set('sendMsg', $sendMsg)->set('config', $config)->set('multiprofile', $multiprofile)->set('showBlogLink', $showBlogLink)->set('isFriend', CFriendsHelper::isConnected($user->id, $my->id) && $user->id != $my->id)->set('isBlocked', $isblocked)->set('profile', $profile)->set('unread', $unread)->set('pending', $pending)->set('registerDate', $user->registerDate)->set('adminControlHTML', $adminControlHTML)->set('likesHTML', $likesHTML)->set('userstatus', $status)->fetch('profile.header');
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:90,代码来源:view.html.php


注:本文中的CUserPoints::getPointsImage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。