本文整理汇总了PHP中BOL_AvatarService类的典型用法代码示例。如果您正苦于以下问题:PHP BOL_AvatarService类的具体用法?PHP BOL_AvatarService怎么用?PHP BOL_AvatarService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BOL_AvatarService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: importAvatars
private function importAvatars($avatarUrl)
{
$avatarUrl = trim($avatarUrl);
if (substr($avatarUrl, -1) === '/') {
$avatarUrl = substr($avatarUrl, 0, -1);
}
$avatarDir = BOL_AvatarService::getInstance()->getAvatarsDir();
$first = 0;
$count = 150;
while (true) {
$list = BOL_UserService::getInstance()->findList($first, $count, true);
$first += $count;
if (empty($list)) {
break;
}
foreach ($list as $user) {
for ($size = 1; $size < 4; $size++) {
$path = BOL_AvatarService::getInstance()->getAvatarPath($user->id, $size);
$avatarName = str_replace($avatarDir, '', $path);
$content = file_get_contents($avatarUrl . '/' . $avatarName);
if (!empty($content)) {
OW::getStorage()->fileSetContent($path, $content);
}
}
}
}
}
示例2: userSearch
public function userSearch($query)
{
$kw = $query['kw'];
$data = $query['data'];
$friendMode = $data['friendsMode'];
$idList = array();
$userIds = array();
if ($friendMode) {
if (OW::getUser()->isAuthenticated()) {
$userId = OW::getUser()->getId();
$userIds = EQUESTIONS_BOL_Service::getInstance()->findFriends($kw, $userId);
}
} else {
$userIds = EQUESTIONS_BOL_Service::getInstance()->findUsers($kw);
}
foreach ($userIds as $u) {
if ($u != OW::getUser()->getId()) {
$idList[] = $u;
}
}
$allList = empty($idList) ? array() : BOL_AvatarService::getInstance()->getDataForUserAvatars($idList, true, false, true, false);
$cachelist = array();
foreach ($allList as $uid => $info) {
$info['userId'] = $uid;
$info['kw'] = strtolower($info['title']);
$cachelist[$uid] = $info;
}
return $cachelist;
}
示例3: __construct
/**
* @return Constructor.
*/
public function __construct(BASE_CLASS_WidgetParameter $paramObj)
{
parent::__construct();
//echo "call";
$avatarService = BOL_AvatarService::getInstance();
$userId = OW::getUser()->getId();
$avatars = BOL_AvatarService::getInstance()->getDataForUserAvatars(array($userId), true, true, true, true, 2);
// $avatars = BOL_AvatarService::getInstance()->getAvatarsUrlList(array($userId), 2);
// echo '<pre>';
// print_r($avatars);
// echo '</pre>';
$this->assign('avatar', $avatars[$userId]);
$event = new BASE_CLASS_EventCollector('base.on_avatar_toolbar_collect', array('userId' => $userId));
OW::getEventManager()->trigger($event);
$toolbarItems = $event->getData();
// echo '<pre>';
// print_r($toolbarItems);
// echo '</pre>';
$tplToolbarItems = array();
foreach ($toolbarItems as $item) {
if (empty($item['title']) || empty($item['url']) || empty($item['iconClass'])) {
continue;
}
$order = empty($item['order']) ? count($tplToolbarItems) + 1 : (int) $item['order'];
if (!empty($tplToolbarItems[$order])) {
$order = count($tplToolbarItems) + 1;
}
$tplToolbarItems[$order] = $item;
}
ksort($tplToolbarItems);
$this->assign('toolbarItems', array_values($tplToolbarItems));
}
示例4: buildData
protected function buildData($userIds, $group = null, $ignoreUserIds = array())
{
if (empty($userIds)) {
return array();
}
$avatarData = BOL_AvatarService::getInstance()->getDataForUserAvatars($userIds, true, true, true, false);
$infoList = $this->getInfoList($userIds);
$onlineList = BOL_UserService::getInstance()->findOnlineStatusForUserList($userIds);
$out = array();
foreach ($userIds as $userId) {
if (in_array($userId, $ignoreUserIds)) {
continue;
}
$data = array();
$data['id'] = $userId;
$data['url'] = $avatarData[$userId]['url'];
$data['avatar'] = $avatarData[$userId]['src'];
$data['text'] = $avatarData[$userId]['title'];
$data['info'] = '<span class="ow_live_on"></span>' . implode(' ', $infoList[$userId]);
$data['online'] = $onlineList[$userId];
$itemCmp = new MCOMPOSE_CMP_UserItem($data);
$item = array();
$item["id"] = self::ID_PREFIX . "_" . $userId;
$item["text"] = $data['text'];
$item['html'] = $itemCmp->render();
$item['url'] = $data['url'];
$item['count'] = null;
if (!empty($group)) {
$item['group'] = $group;
}
$out[self::ID_PREFIX . '_' . $userId] = $item;
}
return $out;
}
示例5: onBeforeRender
public function onBeforeRender()
{
parent::onBeforeRender();
$displayCount = 60;
$list = $this->getList();
$idList = empty($list['idList']) ? array() : $list['idList'];
$allList = BOL_AvatarService::getInstance()->getDataForUserAvatars($idList, true, false, true, false);
$allList = empty($allList) ? array() : $allList;
$cachelist = array();
foreach ($allList as $uid => $info) {
$info['userId'] = $uid;
$info['kw'] = strtolower($info['title']);
$cachelist[$uid] = $info;
}
$tplList = array_slice($cachelist, 0, $displayCount);
$this->initJs($cachelist, $list['count']);
$this->assign('list', $tplList);
$this->assign('friendsMode', $this->friendsMode);
$this->assign('uniqId', $this->uniqId);
$language = OW::getLanguage();
$this->assign('langs', array('ask' => $language->text('equestions', 'user_select_button_ask')));
$this->assign('fakeAvatar', array('src' => '-', 'title' => '-'));
$moderator = OW::getUser()->isAuthorized('equestions');
$this->assign('moderator', $moderator);
}
示例6: __construct
public function __construct($userId)
{
parent::__construct();
$cover = UHEADER_BOL_Service::getInstance()->findCoverByUserId($userId);
if (empty($cover)) {
$this->assign('error', OW::getLanguage()->text('uheader', 'cover_not_found'));
return;
}
$src = UHEADER_BOL_Service::getInstance()->getCoverUrl($cover);
$settings = $cover->getSettings();
$height = $settings['dimensions']['height'];
$width = $settings['dimensions']['width'];
$top = 0;
if ($height < self::MIN_HEIGHT) {
$top = (self::MIN_HEIGHT - $height) / 2;
}
$avatarsData = BOL_AvatarService::getInstance()->getDataForUserAvatars(array($userId));
$this->assign('user', $avatarsData[$userId]);
$this->assign('src', $src);
$this->assign('top', $top);
$this->assign('dimensions', $settings['dimensions']);
$cmtParams = new BASE_CommentsParams('uheader', UHEADER_CLASS_CommentsBridge::ENTITY_TYPE);
$cmtParams->setWrapInBox(false);
$cmtParams->setEntityId($cover->id);
$cmtParams->setOwnerId($userId);
$cmtParams->setDisplayType(BASE_CommentsParams::DISPLAY_TYPE_TOP_FORM_WITH_PAGING);
$photoCmts = new BASE_CMP_Comments($cmtParams);
$this->addComponent('comments', $photoCmts);
}
示例7: __construct
public function __construct($users, $size, $layout)
{
parent::__construct();
$questionService = BOL_QuestionService::getInstance();
$userService = BOL_UserService::getInstance();
$this->uniqId = uniqid('ucl_');
$idList = $this->fetchIdList($users);
$qList = $questionService->getQuestionData($idList, array('sex', 'birthdate'));
$displayNames = $userService->getDisplayNamesForList($idList);
$urls = $userService->getUserUrlsForList($idList);
$tplData = array();
foreach ($idList as $userId) {
$tplData[$userId] = array();
$tplData[$userId]['displayName'] = empty($displayNames[$userId]) ? null : $displayNames[$userId];
$tplData[$userId]['url'] = empty($urls[$userId]) ? null : $urls[$userId];
$tplData[$userId]['sex'] = empty($qList[$userId]['sex']) || in_array($layout, array(3, 4)) ? null : strtolower(BOL_QuestionService::getInstance()->getQuestionValueLang('sex', $qList[$userId]['sex']));
$tplData[$userId]['birthdate'] = null;
if (!empty($qList[$userId]['birthdate']) && in_array($layout, array(1, 3))) {
$date = UTIL_DateTime::parseDate($qList[$userId]['birthdate'], UTIL_DateTime::MYSQL_DATETIME_DATE_FORMAT);
$age = UTIL_DateTime::getAge($date['year'], $date['month'], $date['day']);
$tplData[$userId]['birthdate'] = $age;
}
$avatar = BOL_AvatarService::getInstance()->getAvatarUrl($userId, 2);
$tplData[$userId]['thumb'] = $avatar ? $avatar : BOL_AvatarService::getInstance()->getDefaultAvatarUrl(2);
}
$sizes = array('small' => 100, 'medium' => 150, 'big' => OW::getConfig()->getValue('base', 'avatar_big_size'));
$this->assign('list', $tplData);
$avatarSize = $sizes[$size];
$this->assign('size', $size);
$this->assign('uniqId', $this->uniqId);
OW::getDocument()->addStyleDeclaration('.uc-avatar-size { width: ' . $avatarSize . 'px; height: ' . ($avatarSize + $avatarSize / 10) . 'px; }');
OW::getDocument()->addStyleDeclaration('.uc-carousel-size { height: ' . ($avatarSize + 50) . 'px; }');
OW::getDocument()->addStyleDeclaration('.uc-shape-waterWheel .uc-carousel { width: ' . ($avatarSize + 20) . 'px; }');
}
示例8: __construct
public function __construct($conversationData)
{
parent::__construct();
$this->consoleItem = new BASE_CMP_ConsoleListItem();
$this->convId = $conversationData['conversationId'];
$userId = OW::getUser()->getId();
$conversationService = MAILBOX_BOL_ConversationService::getInstance();
$this->opponentId = $conversationData['opponentId'];
$avatarUrl = BOL_AvatarService::getInstance()->getAvatarUrl($this->opponentId);
$this->avatarUrl = $avatarUrl ? $avatarUrl : BOL_AvatarService::getInstance()->getDefaultAvatarUrl();
$this->profileUrl = BOL_UserService::getInstance()->getUserUrl($this->opponentId);
$this->displayName = BOL_UserService::getInstance()->getDisplayName($this->opponentId);
$this->mode = $conversationData['mode'];
$this->text = $conversationData['previewText'];
$this->dateLabel = $conversationData['dateLabel'];
$this->unreadMessageCount = $conversationService->countUnreadMessagesForConversation($this->convId, $userId);
if ($this->mode == 'mail') {
$this->url = $conversationService->getConversationUrl($this->convId);
$this->addClass('ow_mailbox_request_item ow_cursor_default');
}
if ($this->mode == 'chat') {
$this->url = 'javascript://';
$this->addClass('ow_chat_request_item ow_cursor_default');
$js = "\$('.consoleChatItem#mailboxConsoleMessageItem{$this->convId}').bind('click', function(){\n var convId = \$(this).data('convid');\n var opponentId = \$(this).data('opponentid');\n OW.trigger('mailbox.open_dialog', {convId: convId, opponentId: opponentId, mode: 'chat', isSelected: true});\n OW.Console.getItem('mailbox').hideContent();\n });";
OW::getDocument()->addOnloadScript($js);
}
if ($conversationData['conversationRead'] == 0) {
$this->addClass('ow_console_new_message');
}
}
示例9: getList
public function getList($params)
{
$service = SKADATEIOS_ABOL_Service::getInstance();
$auth = array('photo.view' => $service->getAuthorizationActionStatus('photo', 'view'), 'base.search_users' => $service->getAuthorizationActionStatus('base', 'search_users'));
$this->assign('auth', $auth);
if ($auth["base.search_users"]["status"] != BOL_AuthorizationService::STATUS_AVAILABLE) {
$this->assign("list", array());
$this->assign("total", 0);
return;
}
$_criteriaList = array_filter($params["criteriaList"]);
$userId = OW::getUser()->getId();
$userInfo = BOL_QuestionService::getInstance()->getQuestionData(array($userId), array("sex"));
$_criteriaList["sex"] = !empty($userInfo[$userId]["sex"]) ? $userInfo[$userId]["sex"] : null;
$questionList = BOL_QuestionService::getInstance()->findQuestionByNameList(array_keys($_criteriaList));
$criteriaList = array();
foreach ($_criteriaList as $questionName => $questionValue) {
if (empty($questionList[$questionName])) {
continue;
}
$criteriaList[$questionName] = $this->convertQuestionValue($questionList[$questionName]->presentation, $questionValue);
}
$idList = OW::getEventManager()->call("usearch.get_user_id_list", array("criterias" => $criteriaList, "limit" => array($params["first"], $params["count"])));
$idList = empty($idList) ? array() : $idList;
//$idList = BOL_UserService::getInstance()->findUserIdListByQuestionValues($criteriaList, $params["first"], $params["count"]);
$total = BOL_UserService::getInstance()->countUsersByQuestionValues($params["criteriaList"]);
$userData = BOL_AvatarService::getInstance()->getDataForUserAvatars($idList, false, false, true, true);
$questionsData = BOL_QuestionService::getInstance()->getQuestionData($idList, array("googlemap_location", "birthdate"));
foreach ($questionsData as $userId => $data) {
$date = UTIL_DateTime::parseDate($data['birthdate'], UTIL_DateTime::MYSQL_DATETIME_DATE_FORMAT);
$userData[$userId]["ages"] = UTIL_DateTime::getAge($date['year'], $date['month'], $date['day']);
$userData[$userId]["location"] = empty($data["googlemap_location"]["address"]) ? null : $data["googlemap_location"]["address"];
}
$photoList = array();
$avatarList = array();
foreach ($idList as $userId) {
$bigAvatar = SKADATE_BOL_Service::getInstance()->findAvatarByUserId($userId);
$avatarList[$userId] = $bigAvatar ? SKADATE_BOL_Service::getInstance()->getAvatarUrl($userId, $bigAvatar->hash) : BOL_AvatarService::getInstance()->getAvatarUrl($userId, 2);
$event = new OW_Event('photo.getMainAlbum', array('userId' => $userId));
OW::getEventManager()->trigger($event);
$album = $event->getData();
$photos = !empty($album['photoList']) ? $album['photoList'] : array();
foreach ($photos as $photo) {
$photoList[$userId][] = array("src" => $photo["url"]["main"]);
}
}
$bookmarksList = OW::getEventManager()->call("bookmarks.get_mark_list", array("userId" => OW::getUser()->getId(), "idList" => $idList));
$bookmarksList = empty($bookmarksList) ? array() : $bookmarksList;
$list = array();
foreach ($idList as $userId) {
$list[] = array("userId" => $userId, "photos" => empty($photoList[$userId]) ? array() : $photoList[$userId], "avatar" => $avatarList[$userId], "name" => empty($userData[$userId]["title"]) ? "" : $userData[$userId]["title"], "label" => $userData[$userId]["label"], "labelColor" => $userData[$userId]["labelColor"], "location" => empty($userData[$userId]["location"]) ? "" : $userData[$userId]["location"], "ages" => $userData[$userId]["ages"], "bookmarked" => !empty($bookmarksList[$userId]));
}
$this->assign("list", $list);
$this->assign("total", $total);
$allowSendMessage = OW::getPluginManager()->isPluginActive('mailbox');
$this->assign("actions", array("bookmark" => OW::getPluginManager()->isPluginActive('bookmarks'), "message" => $allowSendMessage, "wink" => OW::getPluginManager()->isPluginActive('winks')));
BOL_AuthorizationService::getInstance()->trackAction("base", "search_users");
$mailboxModes = OW::getEventManager()->call('mailbox.get_active_mode_list');
$this->assign("mailboxModes", empty($mailboxModes) ? array() : $mailboxModes);
}
示例10: onConsolePagesCollect
public function onConsolePagesCollect(BASE_CLASS_EventCollector $event)
{
OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('base')->getStaticJsUrl() . 'underscore-min.js', 'text/javascript', 3000);
OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('base')->getStaticJsUrl() . 'backbone-min.js', 'text/javascript', 3000);
// OW::getDocument()->addScript( OW::getPluginManager()->getPlugin('base')->getStaticJsUrl().'backbone.js', 'text/javascript', 3000 );
OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('mailbox')->getStaticJsUrl() . 'mobile_mailbox.js', 'text/javascript', 3000);
$userListUrl = OW::getRouter()->urlForRoute('mailbox_user_list');
$convListUrl = OW::getRouter()->urlForRoute('mailbox_conv_list');
$authorizationResponderUrl = OW::getRouter()->urlFor('MAILBOX_CTRL_Ajax', 'authorization');
$pingResponderUrl = OW::getRouter()->urlFor('MAILBOX_CTRL_Ajax', 'ping');
$getHistoryResponderUrl = OW::getRouter()->urlFor('MAILBOX_CTRL_Ajax', 'getHistory');
$userId = OW::getUser()->getId();
$displayName = BOL_UserService::getInstance()->getDisplayName($userId);
$avatarUrl = BOL_AvatarService::getInstance()->getAvatarUrl($userId);
if (empty($avatarUrl)) {
$avatarUrl = BOL_AvatarService::getInstance()->getDefaultAvatarUrl();
}
$profileUrl = BOL_UserService::getInstance()->getUserUrl($userId);
$lastSentMessage = MAILBOX_BOL_ConversationService::getInstance()->getLastSentMessage($userId);
$lastMessageTimestamp = (int) ($lastSentMessage ? $lastSentMessage->timeStamp : 0);
$params = array('getHistoryResponderUrl' => $getHistoryResponderUrl, 'pingResponderUrl' => $pingResponderUrl, 'authorizationResponderUrl' => $authorizationResponderUrl, 'userListUrl' => $userListUrl, 'convListUrl' => $convListUrl, 'pingInterval' => 5000, 'lastMessageTimestamp' => $lastMessageTimestamp, 'user' => array('userId' => $userId, 'displayName' => $displayName, 'profileUrl' => $profileUrl, 'avatarUrl' => $avatarUrl));
$js = UTIL_JsGenerator::composeJsString('OWM.Mailbox = new MAILBOX_Mobile({$params});', array('params' => $params));
OW::getDocument()->addOnloadScript($js, 'text/javascript', 3000);
$event->add(array('key' => 'convers', 'cmpClass' => 'MAILBOX_MCMP_ConsoleConversationsPage', 'order' => 2));
}
示例11: copyBigAvatar
public function copyBigAvatar($userId)
{
$avatarService = BOL_AvatarService::getInstance();
$avatar = $avatarService->findByUserId($userId);
if (!$avatar) {
return false;
}
// remove old
$this->removeBigAvatar($userId);
$origAvatarPath = $avatarService->getAvatarPath($userId, 3);
$tmpPath = $this->getAvatarPluginFilesPath($userId, $avatar->hash);
if (!is_writable(dirname($tmpPath))) {
return false;
}
$storage = OW::getStorage();
$storage->copyFileToLocalFS($origAvatarPath, $tmpPath);
$image = new UTIL_Image($tmpPath);
$width = $image->getWidth();
if ($width < self::BIG_AVATAR_WIDTH) {
@unlink($tmpPath);
return false;
}
// store new
$newAvatar = new SKADATE_BOL_Avatar();
$newAvatar->userId = $userId;
$newAvatar->avatarId = $avatar->id;
$newAvatar->hash = $avatar->hash;
SKADATE_BOL_AvatarDao::getInstance()->save($newAvatar);
$bigAvatarPath = $this->getAvatarPath($userId, $avatar->hash);
$image->resizeImage(self::BIG_AVATAR_WIDTH, self::BIG_AVATAR_HEIGHT, true)->saveImage($tmpPath);
$storage->copyFile($tmpPath, $bigAvatarPath);
@unlink($tmpPath);
return true;
}
示例12: uploadTmpAvatar
public function uploadTmpAvatar($file)
{
if (isset($file)) {
$lang = OW::getLanguage();
if (!UTIL_File::validateImage($file['name'])) {
return array('result' => false, 'error' => $lang->text('base', 'not_valid_image'));
}
if (!empty($file['error'])) {
$message = BOL_FileService::getInstance()->getUploadErrorMessage($file['error']);
}
if (!empty($message)) {
return array('result' => false, 'error' => $message);
}
$filesize = OW::getConfig()->getValue('base', 'avatar_max_upload_size');
if (empty($file['size']) || $filesize * 1024 * 1024 < $file['size']) {
$message = OW::getLanguage()->text('base', 'upload_file_max_upload_filesize_error');
return array('result' => false, 'error' => $message);
}
$avatarService = BOL_AvatarService::getInstance();
$key = $avatarService->getAvatarChangeSessionKey();
$uploaded = $avatarService->uploadUserTempAvatar($key, $file['tmp_name']);
if (!$uploaded) {
return array('result' => false, 'error' => $lang->text('base', 'upload_avatar_faild'));
}
$url = $avatarService->getTempAvatarUrl($key, 3);
return array('result' => true, 'url' => $url);
}
return array('result' => false);
}
示例13: __construct
/**
* @return Constructor.
*/
public function __construct(BASE_CLASS_WidgetParameter $paramObj)
{
parent::__construct();
$avatarService = BOL_AvatarService::getInstance();
$viewerId = OW::getUser()->getId();
$userId = $paramObj->additionalParamList['entityId'];
if ($viewerId == $userId) {
$this->assign('owner', true);
$this->assign('changeAvatarUrl', OW::getRouter()->urlForRoute('base_avatar_crop'));
} else {
$this->assign('owner', false);
}
$avatar = $avatarService->getAvatarUrl($userId, 2);
$this->assign('avatar', $avatar ? $avatar : $avatarService->getDefaultAvatarUrl(2));
$roles = BOL_AuthorizationService::getInstance()->getRoleListOfUsers(array($userId));
$this->assign('role', !empty($roles[$userId]) ? $roles[$userId] : null);
$userService = BOL_UserService::getInstance();
$showPresence = true;
// Check privacy permissions
$eventParams = array('action' => 'base_view_my_presence_on_site', 'ownerId' => $userId, 'viewerId' => OW::getUser()->getId());
try {
OW::getEventManager()->getInstance()->call('privacy_check_permission', $eventParams);
} catch (RedirectException $e) {
$showPresence = false;
}
$this->assign('isUserOnline', $userService->findOnlineUserById($userId) && $showPresence);
$this->assign('userId', $userId);
$this->assign('avatarSize', OW::getConfig()->getValue('base', 'avatar_big_size'));
}
示例14: onBeforeRender
public function onBeforeRender()
{
parent::onBeforeRender();
$userList = array();
$userDtoList = array();
$userService = BOL_UserService::getInstance();
$questionService = BOL_QuestionService::getInstance();
$userIdList = array_keys($this->userList);
$userDataList = BOL_QuestionService::getInstance()->getQuestionData($userIdList, $this->fieldList);
foreach ($userService->findUserListByIdList($userIdList) as $userDto) {
$userDtoList[$userDto->id] = $userDto;
}
foreach ($this->userList as $userId => $fieldList) {
$fields = array_diff(array_keys($fieldList), $this->fieldList);
$fieldsData = $questionService->getQuestionData(array($userId), $fields);
$userList[$userId]['fields'] = array_merge(!empty($userDataList[$userId]) ? $userDataList[$userId] : array(), !empty($fieldsData[$userId]) ? $fieldsData[$userId] : array(), $fieldList);
$userList[$userId]['dto'] = $userDtoList[$userId];
}
$this->assign('userList', $userList);
$this->assign('avatars', BOL_AvatarService::getInstance()->getAvatarsUrlList($userIdList, 2));
$this->assign('onlineList', !empty($userIdList) ? $userService->findOnlineStatusForUserList($userIdList) : array());
$this->assign('usernameList', $userService->getUserNamesForList($userIdList));
$this->assign('displaynameList', $userService->getDisplayNamesForList($userIdList));
$this->assign('displayActivity', $this->displayActivity);
}
示例15: getList
public function getList($params)
{
$data = OW::getEventManager()->call("guests.get_guests_list", array("userId" => OW::getUser()->getId()));
if (empty($data)) {
$this->assign("list", array());
return;
}
$idList = array();
$viewedMap = array();
$timeMap = array();
foreach ($data as $item) {
$idList[] = $item["userId"];
$viewedMap[$item["userId"]] = $item["viewed"];
$timeMap[$item["userId"]] = UTIL_DateTime::formatDate($item["timeStamp"]);
}
OW::getEventManager()->call("guests.mark_guests_viewed", array("userId" => OW::getUser()->getId(), "guestIds" => $idList));
$bookmarkList = OW::getEventManager()->call("bookmarks.get_mark_list", array("userId" => OW::getUser()->getId(), "idList" => $idList));
$bookmarkList = empty($bookmarkList) ? array() : $bookmarkList;
$avatarList = BOL_AvatarService::getInstance()->getDataForUserAvatars($idList, true, false);
$onlineMap = BOL_UserService::getInstance()->findOnlineStatusForUserList($idList);
foreach ($avatarList as $userId => $user) {
$color = array('r' => '100', 'g' => '100', 'b' => '100');
if (!empty($user['labelColor'])) {
$_color = explode(', ', trim($user['labelColor'], 'rgba()'));
$color = array('r' => $_color[0], 'g' => $_color[1], 'b' => $_color[2]);
}
$list[] = array("userId" => $userId, "displayName" => $user["title"], "avatarUrl" => $user["src"], "label" => $user["label"], "labelColor" => $color, "viewed" => $viewedMap[$userId], "online" => $onlineMap[$userId], "bookmarked" => !empty($bookmarkList[$userId]), "time" => $timeMap[$userId]);
}
$this->assign("list", $list);
}