4include_once(
"Services/Block/classes/class.ilBlockGUI.php");
 
    5require_once 
'Services/Mail/classes/class.ilMailFormCall.php';
 
    6include_once 
'Services/Mail/classes/class.ilMailGlobalServices.php';
 
   31                $this->
setTitle($lng->txt(
"users_online"));
 
   65                if (
$ilCtrl->getCmdClass() == 
"ilpublicuserprofilegui")
 
   72                        case "showUserProfile":
 
   89                $next_class = 
$ilCtrl->getNextClass();
 
   95                        case "ilpublicuserprofilegui":
 
   96                                include_once(
'./Services/User/classes/class.ilPublicUserProfileGUI.php');
 
   98                                $profile_gui->setBackUrl(
$ilCtrl->getParentReturn($this));
 
   99                                return $ilCtrl->forwardCommand($profile_gui);
 
  103                                return $this->
$cmd();
 
  111                $this->users_online_pref = 
$ilUser->getPref(
"show_users_online");
 
  113                if ($this->users_online_pref != 
"y" && $this->users_online_pref != 
"associated")
 
  126                        return parent::getHTML();
 
  137                if ($this->users_online_pref == 
"associated")
 
  143                        $this->users = ilObjUser::_getUsersOnline(0, 
true);
 
  146                $this->num_users = 0;
 
  149                if (
$ilUser->getId() != ANONYMOUS_USER_ID &&
 
  152                        $this->users[
$ilUser->getId()] =
 
  153                                array(
"user_id" => 
$ilUser->getId(),
 
  154                                        "firstname" => 
$ilUser->getFirstname(),
 
  155                                        "lastname" => 
$ilUser->getLastname(),
 
  156                                        "title" => 
$ilUser->getUTitle(),
 
  157                                        "login" => 
$ilUser->getLogin());
 
  160                foreach ($this->users as $user_id => $user)
 
  162                        if ($user_id != ANONYMOUS_USER_ID)
 
  168                                $this->visitors = $user[
"num"];
 
  182                include_once(
"Services/Notes/classes/class.ilNote.php");
 
  186                        $this->
setRowTemplate(
"tpl.users_online_row.html", 
"Services/PersonalDesktop");
 
  192                        parent::fillDataSection();
 
  211                $this->mail_allowed = (
$ilUser->getId() != ANONYMOUS_USER_ID &&
 
  214                foreach ($this->users as $user_id => $user)
 
  218                                "login" => $user[
"login"]
 
  224                if (count(
$data) == 0)
 
  228                        $this->enabledetailrow = 
false;
 
  241                $a_set[
"mail_to"] = 
"";
 
  242                if($this->mail_allowed &&
 
  245                        $a_set[
'mail_url'] = 
ilMailFormCall::getLinkTarget($this->topGuiObj, 
'', array(), array(
'type' => 
'new', 
'rcp_to' => urlencode($a_set[
'login'])));
 
  249                $a_set[
"profile"] = in_array(
 
  256                        if ($a_set[
"mail_url"] != 
"")
 
  258                                $this->tpl->setCurrentBlock(
"mailto_link");
 
  259                                $this->tpl->setVariable(
"TXT_MAIL", 
$lng->txt(
"mail"));
 
  260                                $this->tpl->setVariable(
"MAIL_URL", $a_set[
"mail_url"]);
 
  261                                $this->tpl->parseCurrentBlock();
 
  264                        $chatSettings = 
new ilSetting(
'chatroom');
 
  265                        if($chatSettings->get(
'chat_enabled'))
 
  275                                include_once 
'./Modules/Chatroom/classes/class.ilObjChatroom.php';
 
  276                                if($a_set[
"id"] == 
$ilUser->getId() &&
 
  280                                        $this->tpl->setCurrentBlock(
'chat_link');
 
  281                                        $this->tpl->setVariable(
'TXT_CHAT_INVITE', 
$lng->txt(
'chat_enter_public_room'));
 
  282                                        $this->tpl->setVariable(
'TXT_CHAT_INVITE_TOOLTIP', 
$lng->txt(
'chat_enter_public_room_tooltip'));
 
  285                                        $this->tpl->parseCurrentBlock();
 
  290                        $this->tpl->setCurrentBlock(
"usr_image");
 
  291                        $this->tpl->setVariable(
"USR_IMAGE",
 
  293                        $this->tpl->setVariable(
"USR_ALT", 
$lng->txt(
"personal_picture"));
 
  294                        $this->tpl->parseCurrentBlock();
 
  295                        $this->tpl->touchBlock(
"usr_image_space");
 
  298                        $osi_server = $pd_set->get(
"osi_host");
 
  304                                $im_arr = array(
"icq" => 0,
 
  314                                if (trim($osi_server) != 
"")
 
  322                                foreach ($im_arr as $im_name => $im_check)
 
  331                                                                $im_url = 
"http://http://www.icq.com/people/".$im_id;
 
  335                                                                $im_url = 
"http://edit.yahoo.com/config/send_webmesg?target=".$im_id.
"&src=pg";
 
  339                                                                $im_url = 
"http://messenger.live.com";
 
  344                                                                $im_url = 
"http://aimexpress.aim.com";
 
  348                                                                $im_url = 
"skype:".$im_id.
"?call";
 
  356                                                        $this->tpl->setCurrentBlock(
"im_link_start");
 
  357                                                        $this->tpl->setVariable(
"URL_IM",$im_url);
 
  358                                                        $this->tpl->parseCurrentBlock();
 
  359                                                        $this->tpl->touchBlock(
"im_link_end");
 
  362                                                $this->tpl->setCurrentBlock(
"instant_messengers");
 
  363                                                $this->tpl->setVariable(
"IMG_IM_ICON", $im_img);
 
  364                                                $this->tpl->setVariable(
"TXT_IM_ICON", 
$lng->txt(
"im_".$im_name));
 
  365                                                $icon_id = 
"im_".$im_name.
"_usr_".$a_set[
"id"];
 
  366                                                $this->tpl->setVariable(
"ICON_ID", $icon_id);
 
  368                                                include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
 
  370                                                        "top center", 
"bottom center");
 
  372                                                $this->tpl->parseCurrentBlock();
 
  379                if(!$a_set[
"profile"])
 
  381                        $this->tpl->setVariable(
"USR_LOGIN", $a_set[
"login"]);
 
  385                        $this->tpl->setVariable(
"USR_LOGIN", 
"<br />".$a_set[
"login"]);
 
  389                        $this->tpl->setVariable(
"USR_LOGIN", 
" [".$a_set[
"login"].
"]");
 
  393                if ($a_set[
"profile"])
 
  395                        include_once 
"Services/User/classes/class.ilUserUtil.php";
 
  398                        $this->tpl->setCurrentBlock(
"profile_link");
 
  399                        $this->tpl->setVariable(
"TXT_VIEW", 
$lng->txt(
"profile"));
 
  405                                include_once 
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
 
  411                                $ilCtrl->setParameter($this, 
"user", $a_set[
"id"]);
 
  412                                $this->tpl->setVariable(
"LINK_PROFILE",
 
  413                                        $ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui", 
"getHTML"));    
 
  418                                include_once 
"Services/Link/classes/class.ilLink.php";
 
  419                                $this->tpl->setVariable(
"LINK_PROFILE", 
ilLink::_getLink($a_set[
"id"], 
"usr"));
 
  420                                $this->tpl->setVariable(
"LINK_TARGET", 
"_blank");
 
  423                        $this->tpl->setVariable(
"USR_ID", $a_set[
"id"]);
 
  424                        $this->tpl->setVariable(
"LINK_FULLNAME", $user_name);
 
  425                        $this->tpl->parseCurrentBlock();
 
  429                        $this->tpl->setVariable(
"USR_FULLNAME", 
"");
 
  441                if (empty($this->visitors) || $this->users_online_pref == 
"associated")
 
  445                elseif ($this->visitors == 
"1")
 
  447                        $visitor_text = 
"1 ".$lng->txt(
"visitor");
 
  451                        $visitor_text = $visitors.
" ".
$lng->txt(
"visitors");
 
  455                if ($this->num_users > 0)
 
  457                        $user_kind = ($this->users_online_pref == 
"associated") ? 
"associated_user" : 
"registered_user";
 
  458                        if ($this->num_users == 1)
 
  460                                $user_list = $this->num_users.
" ".
$lng->txt($user_kind);
 
  465                                $user_list = $this->num_users.
" ".
$lng->txt($user_kind.
"s");
 
  468                        if (!empty($visitor_text))
 
  470                                $user_list .= 
" ".$lng->txt(
"and").
" ".$visitor_text;
 
  475                        $user_list = $visitor_text;
 
  478                return '<div class="small">'.$user_list.
"</div>";
 
  483                global $rbacsystem, 
$lng;
 
  508                include_once 
'./Modules/Chatroom/classes/class.ilObjChatroom.php';
 
  510                if($a_usr_id == 
$ilUser->getId())
 
  520                        $this->tpl->setCurrentBlock(
"chat_link");
 
  521                        $this->tpl->setVariable(
"TXT_CHAT_INVITE",
$lng->txt(
'chat_invite_public_room'));
 
  524                        $this->tpl->setVariable(
"CHAT_LINK",
'./ilias.php?baseClass=ilRepositoryGUI&ref_id='.
ilObjChatroom::_getPublicRefId().
'&usr_id='.$a_usr_id.
'&cmd=view-invitePD');
 
  525                        $this->tpl->setVariable(
'TXT_CHAT_INVITE_TOOLTIP', 
$lng->txt(
'chat_invite_public_room_tooltip'));
 
  526                        $this->tpl->parseCurrentBlock();
 
This class represents a block method of a block.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
setLimit($a_limit)
Set Limit.
getCurrentDetailLevel()
Get Current Detail Level.
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
setData($a_data)
Set Data.
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setColSpan($a_colspan)
Set Columns Span.
setTitle($a_title)
Set Title.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
setCurrentDetailLevel($a_currentdetaillevel)
Set Current Detail Level.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static getMailObjectRefId()
Determines the reference id of the mail object and stores this information in a local cache variable.
static getDefaultPortfolio($a_user_id)
Get default portfolio of user.
_lookupIm($a_user_id, $a_type)
Lookup IM.
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
_lookupPref($a_usr_id, $a_keyword)
GUI class for personal desktop.
GUI class for public user profile presentation.
static getNamePresentation($a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false)
Default behaviour is:
BlockGUI class for Personal Desktop Users Online block.
getUsers()
Get online users.
ilUsersOnlineBlockGUI()
Constructor.
getListRowData()
Get list data.
fillDataSection()
Fill data section.
static isRepositoryObject()
Is block used in repository object?
& executeCommand()
execute command
static getBlockType()
Get block type.
getOverview()
Get overview.
__showChatInvitation($a_usr_id)
__showActiveChatsOfUser($a_usr_id)
getHTML()
Handle config status.
fillRow($a_set)
get flat bookmark list for personal desktop
static getScreenMode()
Get Screen Mode for current command.
static getAssociatedUsersOnline($a_user_id)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)