ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilChatroomViewTask.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Modules/Chatroom/classes/class.ilChatroom.php';
5 require_once 'Modules/Chatroom/classes/class.ilChatroomUser.php';
6 
14 {
18  private $gui;
19 
24  {
25  $this->gui = $gui;
26  }
27 
32  private function cancelJoin($message)
33  {
34  ilUtil::sendFailure($message);
35  }
36 
42  private function showRoom(ilChatroom $room, ilChatroomUser $chat_user)
43  {
52  global $tpl, $ilUser, $ilCtrl, $rbacsystem, $lng, $ilNavigationHistory;
53 
54  if(!ilChatroom::checkUserPermissions('read', $this->gui->ref_id))
55  {
56  $ilCtrl->setParameterByClass('ilrepositorygui', 'ref_id', ROOT_FOLDER_ID);
57  $ilCtrl->redirectByClass('ilrepositorygui', '');
58  }
59 
60  $user_id = $chat_user->getUserId($ilUser);
61 
62  $ilNavigationHistory->addItem($_GET['ref_id'], $ilCtrl->getLinkTargetByClass('ilrepositorygui', 'view'), 'chtr');
63 
64  if($room->isUserBanned($user_id))
65  {
66  $this->cancelJoin($lng->txt('banned'));
67  return;
68  }
69 
70  $scope = $room->getRoomId();
71  $connector = $this->gui->getConnector();
72  $response = @$connector->connect($scope, $user_id);
73 
74  if(!$response)
75  {
76  ilUtil::sendFailure($lng->txt('unable_to_connect'), true);
77  $ilCtrl->redirectByClass('ilinfoscreengui', 'info');
78  }
79 
80  if(!$room->isSubscribed($chat_user->getUserId()) && $room->connectUser($chat_user))
81  {
82  $messageObject = array(
83  'type' => 'connected',
84  'users' => array(
85  array(
86  'login' => $chat_user->getUsername(),
87  'id' => $user_id,
88  ),
89  ),
90  'timestamp' => time() * 1000
91  );
92  $message = json_encode($messageObject);
93  $connector->sendMessage(
94  $scope,
95  $message
96  );
97 
98  $room->addHistoryEntry($messageObject);
99  }
100 
101  $connection_info = json_decode($response);
102  $settings = $connector->getSettings();
103  $known_private_room = $room->getActivePrivateRooms($ilUser->getId());
104 
105  $initial = new stdClass();
106  $initial->users = $room->getConnectedUsers();
107  $initial->private_rooms = array_values($known_private_room);
108  $initial->redirect_url = $ilCtrl->getLinkTarget($this->gui, 'view-lostConnection', '', false, false);
109  $initial->private_rooms_enabled = (boolean)$room->getSetting('private_rooms_enabled');
110 
111  $initial->userinfo = array(
112  'moderator' => $rbacsystem->checkAccess('moderate', (int)$_GET['ref_id']),
113  'userid' => $chat_user->getUserId()
114  );
115 
116  $smileys = array();
117 
118  include_once('Modules/Chatroom/classes/class.ilChatroomSmilies.php');
119 
120  if($settings->getSmiliesEnabled())
121  {
122  $smileys_array = ilChatroomSmilies::_getSmilies();
123  foreach($smileys_array as $smiley_array)
124  {
125  $new_keys = array();
126  $new_val = '';
127  foreach($smiley_array as $key => $value)
128  {
129  if($key == 'smiley_keywords')
130  {
131  $new_keys = explode("\n", $value);
132  }
133 
134  if($key == 'smiley_fullpath')
135  {
136  $new_val = $value;
137  }
138  }
139 
140  if(!$new_keys || !$new_val)
141  {
142  continue;
143  }
144 
145  foreach($new_keys as $new_key)
146  {
147  $smileys[$new_key] = $new_val;
148  }
149  }
150 
151  $initial->smileys = $smileys;
152  }
153  else
154  {
155  $initial->smileys = '{}';
156  }
157 
158  $initial->messages = array();
159 
160  if(isset($_REQUEST['sub']))
161  {
162  if($known_private_room[$_REQUEST['sub']])
163  {
164  if(!$room->isAllowedToEnterPrivateRoom($chat_user->getUserId(), $_REQUEST['sub']))
165  {
166  $initial->messages[] = array(
167  'type' => 'error',
168  'message' => $lng->txt('not_allowed_to_enter'),
169  );
170  }
171  else
172  {
173  $scope = $room->getRoomId();
174  $params = array();
175  $params['user'] = $chat_user->getUserId();
176  $params['sub'] = $_REQUEST['sub'];
177 
178  $params['message'] = json_encode(
179  array(
180  'type' => 'private_room_entered',
181  'user' => $user_id
182  )
183  );
184 
185  $query = http_build_query($params);
186  $connector = $this->gui->getConnector();
187  $response = $connector->enterPrivateRoom($scope, $query);
188 
189  $responseObject = json_decode($response);
190 
191  if($responseObject->success == true)
192  {
193  $room->subscribeUserToPrivateRoom($params['sub'], $params['user']);
194  }
195 
196  $message = json_encode(array(
197  'type' => 'private_room_entered',
198  'user' => $params['user'],
199  'sub' => $params['sub']
200  ));
201 
202  $connector->sendMessage($room->getRoomId(), $message, array('public' => 1, 'sub' => $params['sub']));
203 
204  $initial->enter_room = $_REQUEST['sub'];
205  $initial->messages[] = array(
206  'type' => 'notice',
207  'user' => $params['user'],
208  'sub' => $params['sub'],
209  'entersub' => 1
210  );
211  }
212 
213  if($_SESSION['show_invitation_message'])
214  {
215  $initial->messages[] = array(
216  'type' => 'notice',
217  'message' => $lng->txt('user_invited'),
218  'sub' => $_REQUEST['sub']
219  );
220  unset($_SESSION['show_invitation_message']);
221  }
222  }
223  else
224  {
225  $initial->messages[] = array(
226  'type' => 'error',
227  'message' => $lng->txt('user_invited'),
228  );
229  }
230  }
231 
232  if((int)$room->getSetting('display_past_msgs'))
233  {
234  $initial->messages = array_merge($initial->messages, array_reverse($room->getLastMessages($room->getSetting('display_past_msgs'), $chat_user)));
235  }
236 
237  $roomTpl = new ilTemplate('tpl.chatroom.html', true, true, 'Modules/Chatroom');
238  $roomTpl->setVariable('SESSION_ID', $connection_info->{'session-id'});
239  $roomTpl->setVariable('BASEURL', $settings->getBaseURL());
240  $roomTpl->setVariable('INSTANCE', $settings->getInstance());
241  $roomTpl->setVariable('SCOPE', $scope);
242  $roomTpl->setVariable('MY_ID', $user_id);
243  $roomTpl->setVariable('INITIAL_DATA', json_encode($initial));
244  $roomTpl->setVariable('POSTURL', $ilCtrl->getLinkTarget($this->gui, 'postMessage', '', true, true));
245 
246  $roomTpl->setVariable('ACTIONS', $lng->txt('actions'));
247  $roomTpl->setVariable('LBL_CREATE_PRIVATE_ROOM', $lng->txt('create_private_room_label'));
248  $roomTpl->setVariable('LBL_USER', $lng->txt('user'));
249  $roomTpl->setVariable('LBL_USER_TEXT', $lng->txt('invite_username'));
250  $roomTpl->setVariable('LBL_AUTO_SCROLL', $lng->txt('auto_scroll'));
251 
252  $roomTpl->setVariable('INITIAL_USERS', json_encode($room->getConnectedUsers()));
253 
254  $this->renderFontSettings($roomTpl, array());
255  $this->renderFileUploadForm($roomTpl);
256  $this->renderSendMessageBox($roomTpl);
257  $this->renderLanguageVariables($roomTpl);
258 
259  $roomRightTpl = new ilTemplate('tpl.chatroom_right.html', true, true, 'Modules/Chatroom');
260  $this->renderRightUsersBlock($roomRightTpl);
261 
262  require_once 'Services/UIComponent/Panel/classes/class.ilPanelGUI.php';
263  $right_content_panel = ilPanelGUI::getInstance();
264  $right_content_panel->setHeading($lng->txt('users'));
265  $right_content_panel->setPanelStyle(ilPanelGUI::PANEL_STYLE_SECONDARY);
266  $right_content_panel->setHeadingStyle(ilPanelGUI::HEADING_STYLE_BLOCK);
267  $right_content_panel->setBody($roomRightTpl->get());
268 
269  $tpl->setContent($roomTpl->get());
270  $tpl->setRightContent($right_content_panel->getHTML());
271  }
272 
276  protected function renderLanguageVariables(ilTemplate $roomTpl)
277  {
281  global $lng;
282 
283  $js_translations = array(
284  'LBL_MAINROOM' => 'chat_mainroom',
285  'LBL_LEAVE_PRIVATE_ROOM' => 'leave_private_room',
286  'LBL_JOIN' => 'chat_join',
287  'LBL_DELETE_PRIVATE_ROOM' => 'delete_private_room',
288  'LBL_INVITE_TO_PRIVATE_ROOM' => 'invite_to_private_room',
289  'LBL_KICK' => 'chat_kick',
290  'LBL_BAN' => 'chat_ban',
291  'LBL_KICK_QUESTION' => 'kick_question',
292  'LBL_BAN_QUESTION' => 'ban_question',
293  'LBL_ADDRESS' => 'chat_address',
294  'LBL_WHISPER' => 'chat_whisper',
295  'LBL_CONNECT' => 'chat_connection_established',
296  'LBL_DISCONNECT' => 'chat_connection_disconnected',
297  'LBL_TO_MAINROOM' => 'chat_to_mainroom',
298  'LBL_CREATE_PRIVATE_ROOM_JS' => 'chat_create_private_room_button',
299  'LBL_WELCOME_TO_CHAT' => 'welcome_to_chat',
300  'LBL_USER_INVITED' => 'user_invited',
301  'LBL_USER_KICKED' => 'user_kicked',
302  'LBL_USER_INVITED_SELF' => 'user_invited_self',
303  'LBL_PRIVATE_ROOM_CLOSED' => 'private_room_closed',
304  'LBL_PRIVATE_ROOM_ENTERED' => 'private_room_entered',
305  'LBL_PRIVATE_ROOM_LEFT' => 'private_room_left',
306  'LBL_PRIVATE_ROOM_ENTERED_USER' => 'private_room_entered_user',
307  'LBL_KICKED_FROM_PRIVATE_ROOM' => 'kicked_from_private_room',
308  'LBL_OK' => 'ok',
309  'LBL_CANCEL' => 'cancel',
310  'LBL_WHISPER_TO' => 'whisper_to',
311  'LBL_SPEAK_TO' => 'speak_to',
312  'LBL_HISTORY_CLEARED' => 'history_cleared',
313  'LBL_CLEAR_ROOM_HISTORY' => 'clear_room_history',
314  'LBL_CLEAR_ROOM_HISTORY_QUESTION' => 'clear_room_history_question',
315  'LBL_END_WHISPER' => 'end_whisper',
316  'LBL_SHOW_SETTINGS_JS' => 'show_settings',
317  'LBL_HIDE_SETTINGS' => 'hide_settings',
318  'LBL_TIMEFORMAT' => 'lang_timeformat_no_sec',
319  'LBL_DATEFORMAT' => 'lang_dateformat'
320  );
321  foreach($js_translations as $placeholder => $lng_variable)
322  {
323  $roomTpl->setVariable($placeholder, json_encode($lng->txt($lng_variable)));
324  }
325 
326  $roomTpl->setVariable('LBL_CREATE_PRIVATE_ROOM', $lng->txt('chat_create_private_room_button'));
327  $roomTpl->setVariable('LBL_CREATE_PRIVATE_ROOM_TEXT', $lng->txt('create_private_room_text'));
328  $roomTpl->setVariable('LBL_LAYOUT', $lng->txt('layout'));
329  $roomTpl->setVariable('LBL_SHOW_SETTINGS', $lng->txt('show_settings'));
330  $roomTpl->setVariable('LBL_USER_IN_ROOM', $lng->txt('user_in_room'));
331  $roomTpl->setVariable('LBL_USER_IN_ILIAS', $lng->txt('user_in_ilias'));
332  }
333 
337  protected function renderRightUsersBlock(ilTemplate $roomTpl)
338  {
342  global $lng;
343 
344  $roomTpl->setVariable('LBL_NO_FURTHER_USERS', $lng->txt('no_further_users'));
345  }
346 
350  protected function renderSendMessageBox(ilTemplate $roomTpl)
351  {
355  global $lng;
356 
357  $roomTpl->setVariable('LBL_MESSAGE', $lng->txt('chat_message'));
358  $roomTpl->setVariable('LBL_TOALL', $lng->txt('chat_message_to_all'));
359  $roomTpl->setVariable('LBL_OPTIONS', $lng->txt('chat_message_options'));
360  $roomTpl->setVariable('LBL_DISPLAY', $lng->txt('chat_message_display'));
361  $roomTpl->setVariable('LBL_SEND', $lng->txt('send'));
362  }
363 
370  private function showNameSelection(ilChatroomUser $chat_user)
371  {
377  global $lng, $ilCtrl, $tpl;
378 
379  require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
380 
381  $name_options = $chat_user->getChatNameSuggestions();
382  $formFactory = new ilChatroomFormFactory();
383  $selectionForm = $formFactory->getUserChatNameSelectionForm($name_options);
384 
385  $ilCtrl->saveParameter($this->gui, 'sub');
386 
387  $selectionForm->addCommandButton('view-joinWithCustomName', $lng->txt('enter'));
388  $selectionForm->setFormAction(
389  $ilCtrl->getFormAction($this->gui, 'view-joinWithCustomName')
390  );
391 
392  $tpl->setVariable('ADM_CONTENT', $selectionForm->getHtml());
393  }
394 
398  private function setupTemplate()
399  {
403  global $tpl;
404 
405  $tpl->addJavaScript('Modules/Chatroom/js/colorpicker/jquery.colorPicker.js');
406  $tpl->addJavaScript('Modules/Chatroom/js/chat.js');
407  $tpl->addJavaScript('Modules/Chatroom/js/iliaschat.jquery.js');
408  $tpl->addJavaScript('Services/jQuery/js/jquery.outside.events.min.js');
409  $tpl->addJavaScript('Modules/Chatroom/js/json2.js');
410 
411  $tpl->addJavaScript('./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js');
412 
413  $tpl->addCSS('Modules/Chatroom/js/colorpicker/colorPicker.css');
414  $tpl->addCSS('Modules/Chatroom/templates/default/style.css');
415  }
416 
423  public function joinWithCustomName()
424  {
429  global $ilUser, $lng;
430 
431  $this->gui->switchToVisibleMode();
432  $this->setupTemplate();
433  $room = ilChatroom::byObjectId($this->gui->object->getId());
434  $chat_user = new ilChatroomUser($ilUser, $room);
435  $failure = false;
436  $username = '';
437 
438  if($_REQUEST['custom_username_radio'] == 'custom_username')
439  {
440  $username = $_REQUEST['custom_username_text'];
441  }
442  elseif(method_exists($chat_user, 'build' . $_REQUEST['custom_username_radio']))
443  {
444  $username = $chat_user->{'build' . $_REQUEST['custom_username_radio']}();
445  }
446  else
447  {
448  $failure = true;
449  }
450 
451  if(!$failure && trim($username) != '')
452  {
453  $chat_user->setUsername($username);
454  $this->showRoom($room, $chat_user);
455  }
456  else
457  {
458  ilUtil::sendFailure($lng->txt('no_username_given'));
459  $this->showNameSelection($chat_user);
460  }
461  }
462 
469  public function executeDefault($method)
470  {
476  global $ilUser, $lng, $ilCtrl;
477 
478  include_once 'Modules/Chatroom/classes/class.ilChatroom.php';
479 
480  ilChatroom::checkUserPermissions('read', $this->gui->ref_id);
481 
482  $this->gui->switchToVisibleMode();
483  $this->setupTemplate();
484 
485  $chatSettings = new ilSetting('chatroom');
486  if(!$chatSettings->get('chat_enabled'))
487  {
488  $ilCtrl->redirect($this->gui, 'settings-general');
489  exit;
490  }
491 
492  $room = ilChatroom::byObjectId($this->gui->object->getId());
493 
494  if(!$room->getSetting('allow_anonymous') && $ilUser->isAnonymous())
495  {
496  $this->cancelJoin($lng->txt('anonymous_not_allowed'));
497  return;
498  }
499 
500  $chat_user = new ilChatroomUser($ilUser, $room);
501 
502  if($room->getSetting('allow_custom_usernames'))
503  {
504  if($room->isSubscribed($chat_user->getUserId()))
505  {
506  $chat_user->setUsername($chat_user->getUsername());
507  $this->showRoom($room, $chat_user);
508  }
509  else
510  {
511  $this->showNameSelection($chat_user);
512  }
513  }
514  else
515  {
516  $chat_user->setUsername($ilUser->getLogin());
517  $this->showRoom($room, $chat_user);
518  }
519  }
520 
524  public function invitePD()
525  {
530  global $ilUser, $ilCtrl;
531 
532  $chatSettings = new ilSetting('chatroom');
533  if(!$chatSettings->get('chat_enabled'))
534  {
535  $ilCtrl->redirect($this->gui, 'settings-general');
536  }
537 
538  $room = ilChatroom::byObjectId($this->gui->object->getId());
539  $chat_user = new ilChatroomUser($ilUser, $room);
540  $user_id = $_REQUEST['usr_id'];
541  $connector = $this->gui->getConnector();
542  $title = $room->getUniquePrivateRoomTitle($chat_user->getUsername());
543  $response = $connector->createPrivateRoom($room, $title, $chat_user);
544  $connector->inviteToPrivateRoom($room, $response->id, $ilUser, $user_id);
545  $room->sendInvitationNotification($this->gui, $chat_user, $user_id, $response->id);
546 
547  $_REQUEST['sub'] = $response->id;
548 
549  $_SESSION['show_invitation_message'] = $user_id;
550 
551  $ilCtrl->setParameter($this->gui, 'sub', $response->id);
552  $ilCtrl->redirect($this->gui, 'view');
553  }
554 
561  private function renderFontSettings(ilTemplate $roomTpl, array $defaultSettings)
562  {
567  global $lng, $ilCtrl;
568 
569  $font_family = array(
570  'sans' => 'Sans Serif',
571  'times' => 'Times',
572  'monospace' => 'Monospace',
573  );
574 
575  $font_style = array(
576  'italic' => $lng->txt('italic'),
577  'bold' => $lng->txt('bold'),
578  'normal' => $lng->txt('normal'),
579  'underlined' => $lng->txt('underlined'),
580  );
581 
582  $font_size = array(
583  'small' => $lng->txt('small'),
584  'normal' => $lng->txt('normal'),
585  'large' => $lng->txt('large')
586  );
587 
588  $default_font_color = '#000000';
589 
590  $default_font_family = (
591  isset($defaultSettings['font_family']) &&
592  isset($font_family[$defaultSettings['font_family']]) ?
593  $defaultSettings['font_family'] : 'sans'
594  );
595 
596  $default_font_style = (
597  isset($defaultSettings['font_style']) &&
598  isset($font_family[$defaultSettings['font_style']]) ?
599  $defaultSettings['font_style'] : 'normal'
600  );
601 
602  $default_font_size = (
603  isset($defaultSettings['font_size']) &&
604  isset($font_family[$defaultSettings['font_size']]) ?
605  $defaultSettings['font_size'] : 'normal'
606  );
607 
608  $roomTpl->setVariable('VAL_FONTCOLOR', $default_font_color);
609 
610  foreach($font_family as $font => $label)
611  {
612  $roomTpl->setCurrentBlock('chat_fontfamily');
613  $roomTpl->setVariable('VAL_FONTFAMILY', $font);
614  $roomTpl->setVariable('LBL_FONTFAMILY', $label);
615  $roomTpl->setVariable(
616  'SELECTED_FONTFAMILY', $font == $default_font_family ?
617  'selected="selected"' : ''
618  );
619  $roomTpl->parseCurrentBlock();
620  }
621 
622  foreach($font_style as $font => $label)
623  {
624  $roomTpl->setCurrentBlock('chat_fontstyle');
625  $roomTpl->setVariable('VAL_FONTSTYLE', $font);
626  $roomTpl->setVariable('LBL_FONTSTYLE', $label);
627  $roomTpl->setVariable(
628  'SELECTED_FONTSTYLE', $font == $default_font_style ?
629  'selected="selected"' : ''
630  );
631  $roomTpl->parseCurrentBlock();
632  }
633 
634  foreach($font_size as $font => $label)
635  {
636  $roomTpl->setCurrentBlock('chat_fontsize');
637  $roomTpl->setVariable('VAL_FONTSIZE', $font);
638  $roomTpl->setVariable('LBL_FONTSIZE', $label);
639  $roomTpl->setVariable(
640  'SELECTED_FONTSIZE',
641  $font == $default_font_size ? 'selected="selected"' : ''
642  );
643  $roomTpl->parseCurrentBlock();
644  }
645 
646  $roomTpl->setVariable('LBL_FONTCOLOR', $lng->txt('fontcolor'));
647  $roomTpl->setVariable('LBL_FONTFAMILY', $lng->txt('fontfamily'));
648  $roomTpl->setVariable('LBL_FONTSTYLE', $lng->txt('fontstyle'));
649  $roomTpl->setVariable('LBL_FONTSIZE', $lng->txt('fontsize'));
650 
651  $logoutLink = $ilCtrl->getLinkTarget($this->gui, 'view-logout');
652  $roomTpl->setVariable('LOGOUT_LINK', $logoutLink);
653  }
654 
659  public function renderFileUploadForm(ilTemplate $roomTpl)
660  {
661  // @todo: Not implemented yet
662  return;
663 
664  require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
665  $formFactory = new ilChatroomFormFactory();
666  $file_upload = $formFactory->getFileUploadForm();
667  //$file_upload->setFormAction( $ilCtrl->getFormAction($this->gui, 'UploadFile-uploadFile') );
668  $roomTpl->setVariable('FILE_UPLOAD', $file_upload->getHTML());
669  }
670 
674  public function logout()
675  {
680  global $tree, $ilCtrl;
681 
685  $pid = $tree->getParentId($this->gui->getRefId());
686  $ilCtrl->setParameterByClass('ilrepositorygui', 'ref_id', $pid);
687  $ilCtrl->redirectByClass('ilrepositorygui', '');
688  }
689 
693  public function lostConnection()
694  {
699  global $lng, $ilCtrl;
700 
701  ilUtil::sendFailure($lng->txt('lost_connection'), true);
702  $ilCtrl->redirectByClass('ilinfoscreengui', 'info');
703  }
704 }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
ILIAS Setting Class.
renderFileUploadForm(ilTemplate $roomTpl)
Prepares Fileupload form and displays it.
$failure
getUserId()
Returns Ilias User ID.
getActivePrivateRooms($userid)
exit
Definition: login.php:54
setUsername($username)
Sets and stores given username in SESSION.
getRoomId()
Returns roomID from $this->roomId.
static _getSmilies()
Fetches smilies from database.
Class ilChatroomViewTask.
$_GET["client_id"]
isUserBanned($user_id)
Returns true if there&#39;s an entry in banTable matching roomId and given $user_id.
getLastMessages($number, $chatuser=null)
getSetting($name)
Returns setting from $this->settings array by given name.
isSubscribed($chat_userid)
Returns true if entry exists in userTable matching given $chat_userid and $this->roomId.
executeDefault($requestedMethod)
Class ilChatroomFormFactory.
global $tpl
Definition: ilias.php:8
global $ilCtrl
Definition: ilias.php:18
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
addHistoryEntry($message, $recipient=null, $publicMessage=true)
Inserts entry into historyTable.
special template class to simplify handling of ITX/PEAR
getConnectedUsers()
Returns an array of connected users.
subscribeUserToPrivateRoom($room_id, $user_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
Class ilChatroom.
cancelJoin($message)
Calls ilUtil::sendFailure method using given $message as parameter.
getChatNameSuggestions()
Returns an array of chat-name suggestions.
static getInstance()
Get instance.
global $ilUser
Definition: imgupload.php:15
Class ilChatroomUser.
global $lng
Definition: privfeed.php:40
const PANEL_STYLE_SECONDARY
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
getUsername()
Returns username from Object or SESSION.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
const HEADING_STYLE_BLOCK
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
isAllowedToEnterPrivateRoom($chat_userid, $proom_id)
__construct(ilChatroomObjectGUI $gui)