mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Insert Topic-Message
This commit is contained in:
parent
3f3fc9e130
commit
66f9cd2ec7
@ -19,6 +19,7 @@ class ChatPage extends AbstractPage {
|
|||||||
public $chatVersion = '';
|
public $chatVersion = '';
|
||||||
//public $neededModules = array('CHAT_ACTIVE');
|
//public $neededModules = array('CHAT_ACTIVE');
|
||||||
//public $neededPermissions = array('user.chat.canEnter');
|
//public $neededPermissions = array('user.chat.canEnter');
|
||||||
|
public $joinMessage = null;
|
||||||
public $room = null;
|
public $room = null;
|
||||||
public $roomID = 0;
|
public $roomID = 0;
|
||||||
public $rooms = array();
|
public $rooms = array();
|
||||||
@ -33,6 +34,7 @@ public function assignVariables() {
|
|||||||
|
|
||||||
WCF::getTPL()->assign(array(
|
WCF::getTPL()->assign(array(
|
||||||
'chatVersion' => $this->chatVersion,
|
'chatVersion' => $this->chatVersion,
|
||||||
|
'joinMessage' => $this->joinMessage,
|
||||||
'room' => $this->room,
|
'room' => $this->room,
|
||||||
'roomID' => $this->roomID,
|
'roomID' => $this->roomID,
|
||||||
'rooms' => $this->rooms,
|
'rooms' => $this->rooms,
|
||||||
@ -65,18 +67,25 @@ public function readData() {
|
|||||||
|
|
||||||
$this->readRoom();
|
$this->readRoom();
|
||||||
$this->readUserData();
|
$this->readUserData();
|
||||||
chat\message\ChatMessageEditor::create(array(
|
$this->joinMessage = chat\message\ChatMessageEditor::create(array(
|
||||||
'roomID' => $this->room->roomID,
|
'roomID' => $this->room->roomID,
|
||||||
'sender' => WCF::getUser()->userID,
|
'sender' => WCF::getUser()->userID,
|
||||||
'username' => WCF::getUser()->username,
|
'username' => WCF::getUser()->username,
|
||||||
'time' => TIME_NOW,
|
'time' => TIME_NOW,
|
||||||
'type' => chat\message\ChatMessage::TYPE_JOIN,
|
'type' => chat\message\ChatMessage::TYPE_JOIN,
|
||||||
'message' => 'join',
|
'message' => '',
|
||||||
'enableSmilies' => 0,
|
|
||||||
'enableHTML' => 0,
|
|
||||||
'color1' => $this->userData['color'][1],
|
'color1' => $this->userData['color'][1],
|
||||||
'color2' => $this->userData['color'][2]
|
'color2' => $this->userData['color'][2]
|
||||||
));
|
));
|
||||||
|
if ($this->room->topic != '') {
|
||||||
|
chat\message\ChatMessageEditor::create(array(
|
||||||
|
'roomID' => $this->room->roomID,
|
||||||
|
'sender' => WCF::getUser()->userID,
|
||||||
|
'time' => TIME_NOW,
|
||||||
|
'type' => chat\message\ChatMessage::TYPE_INFORMATION,
|
||||||
|
'message' => WCF::getLanguage()->getDynamicVariable($this->room->topic)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
$this->readDefaultSmileys();
|
$this->readDefaultSmileys();
|
||||||
$this->readChatVersion();
|
$this->readChatVersion();
|
||||||
|
Loading…
Reference in New Issue
Block a user