1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Merge branch 'master' into protocol

This commit is contained in:
Maximilian Mader 2013-09-05 20:35:07 +02:00
commit dcfc8a94cd
33 changed files with 266 additions and 148 deletions

View File

@ -0,0 +1 @@
{if $__chat->isActiveApplication()}<img src="{$__wcf->getPath('chat')}images/chatLogo.png" style="width: 246px; height: 90px;" alt="" />{/if}

View File

@ -0,0 +1,4 @@
<dl>
<dt>{lang}wcf.acp.index.system.software.chatVersion{/lang}</dt>
<dd>{$__chat->getPackage()->packageVersion}</dd>
</dl>

View File

@ -1,6 +1,6 @@
{include file='header' pageTitle='chat.acp.suspension.list'}
<script>
<script data-relocate="true">
//<![CDATA[
$(function() {
new WCF.Search.User('#username', null, false, [ ], false);

View File

@ -1,7 +1,7 @@
{include file='header' pageTitle='chat.acp.room.'|concat:$action}
<script src="{@$__wcf->getPath('wcf')}js/WCF.ACL.js"></script>
<script>
<script data-relocate="true" src="{@$__wcf->getPath('wcf')}js/WCF.ACL.js"></script>
<script data-relocate="true">
//<![CDATA[
$(function() {
new WCF.ACL.List($('#groupPermissions'), {@$objectTypeID}, ''{if $roomID|isset}, {@$roomID}{/if});
@ -18,7 +18,7 @@
{/if}
{if $success|isset}
<p class="success">{lang}wcf.global.form.{$action}.success{/lang}</p>
<p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
{/if}
<div class="contentNavigation">
@ -87,4 +87,4 @@
</div>
</form>
{include file='footer'}
{include file='footer'}

View File

@ -1,6 +1,6 @@
{include file='header' pageTitle='chat.acp.room.list'}
<script>
<script data-relocate="true">
//<![CDATA[
$(function() {
new WCF.Action.Delete('\\chat\\data\\room\\RoomAction', $('.chatRoomRow'));

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/cronjob.xsd">
<import>
<cronjob>
<classname>chat\system\cronjob\CleanupCronjob</classname>
<description>Cleans up Tims Chat</description>
<startminute>*/15</startminute>
<starthour>*</starthour>
<startdom>*</startdom>
<startmonth>*</startmonth>
<startdow>*</startdow>
<active>1</active>
<canbeedited>1</canbeedited>
<canbedisabled>0</canbedisabled>
</cronjob>
</import>
</data>

17
eventListener.xml Normal file
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/maelstrom/eventListener.xsd">
<import>
<eventlistener>
<eventclassname>wcf\system\cronjob\HourlyCleanUpCronjob</eventclassname>
<eventname>execute</eventname>
<listenerclassname>chat\system\event\listener\HourlyCleanUpCronjobExecuteChatCleanUpListener</listenerclassname>
<environment>user</environment>
</eventlistener>
<eventlistener>
<eventclassname>wcf\system\cronjob\HourlyCleanUpCronjob</eventclassname>
<eventname>execute</eventname>
<listenerclassname>chat\system\event\listener\HourlyCleanUpCronjobExecuteChatCleanUpListener</listenerclassname>
<environment>admin</environment>
</eventlistener>
</import>
</data>

View File

@ -86,8 +86,7 @@ Initialize **Tims Chat**. Bind needed DOM events and initialize data structures.
When **Tims Chat** becomes focused mark the chat as active and remove the number of new messages from the title.
$(window).focus ->
document.title = v.titleTemplate.fetch
title: $('#timsChatRoomList .active a').text()
document.title = v.titleTemplate.fetch currentRoom
newMessageCount = 0
isActive = true
@ -391,9 +390,9 @@ Free the fish.
fish = $ """<div id="fish">#{WCF.String.escapeHTML('><((((\u00B0>')}</div>"""
fish.css
position: 'absolute'
top: '150px'
left: '400px'
position: 'fixed'
top: '50%'
left: '50%'
color: 'black'
textShadow: '1px 1px white'
zIndex: 9999
@ -404,8 +403,8 @@ Free the fish.
top = Math.random() * 100 - 50
fish = $ '#fish'
left *= -1 unless fish.width() < (fish.position().left + left) < ($(document).width() - fish.width())
top *= -1 unless fish.height() < (fish.position().top + top) < ($(document).height() - fish.height())
left *= -1 unless fish.width() < (fish.position().left + left) < ($(window).width() - fish.width())
top *= -1 unless fish.height() < (fish.position().top + top) < ($(window).height() - fish.height())
if left > 0
fish.text '><((((\u00B0>' if left > 0
@ -413,8 +412,8 @@ Free the fish.
fish.text '<\u00B0))))><'
fish.animate
top: "+=#{top}"
left: "+=#{left}"
top: (fish.position().top + top)
left: (fish.position().left + left)
, 1e3
, 1.5e3
@ -572,6 +571,7 @@ Remove all users that left the chat.
$('.timsChatUser').each ->
unless foundUsers[$(@).attr('id')]?
console.log "Removing User: '#{$(@).data('username')}'"
WCF.Dropdown.removeDropdown $(@).attr 'id'
do $(@).remove
@ -614,9 +614,8 @@ Send out notifications for the given `message`. The number of unread messages wi
return if isActive or $('#timsChatNotify').data('status') is 0
document.title = v.titleTemplate.fetch
title: $('#timsChatRoomList .active a').text()
newMessageCount: ++newMessageCount
document.title = v.titleTemplate.fetch $.extend {}, currentRoom,
newMessageCount: ++newMessageCount
title = WCF.Language.get 'chat.general.notify.title'
content = "#{message.username}#{message.separator} #{message.message}"
@ -650,7 +649,7 @@ Fetch the roomlist from the server and update it in the GUI.
for room in data.returnValues
li = $ '<li></li>'
li.addClass 'active' if room.active
$("""<a href="#{room.link}">#{room.title}</a>""").addClass('timsChatRoom').data('roomID', room.roomID).appendTo li
$("""<a href="#{room.link}">#{room.title} <span class="badge">#{WCF.String.formatNumeric room.userCount}</span></a>""").addClass('timsChatRoom').data('roomID', room.roomID).appendTo li
$('#timsChatRoomList ul').append li
if window.history?.replaceState?
@ -825,8 +824,6 @@ And finally export the public methods and variables.
insertText: insertText
freeTheFish: freeTheFish
join: join
closePrivateChannel: closePrivateChannel # TODO: REMOVE AFTER DEBUGGING
openPrivateChannel: openPrivateChannel # TODO: REMOVE AFTER DEBUGGING
listener:
add: addListener
remove: removeListener

View File

@ -35,7 +35,7 @@ public function prune() {
WHERE
time < ?";
$stmt = \wcf\system\WCF::getDB()->prepareStatement($sql);
$stmt->execute(array(TIME_NOW - CHAT_LOG_ARCHIVETIME));
$stmt->execute(array(TIME_NOW - CHAT_LOG_ARCHIVETIME * 60));
$objectIDs = array();
while ($objectID = $stmt->fetchColumn()) $objectIDs[] = $objectID;
@ -66,7 +66,7 @@ public function validateSend() {
$this->parameters['enableHTML'] = false;
// validate text
if (\wcf\util\StringUtil::length($this->parameters['text']) > CHAT_MAX_LENGTH) throw new UserInputException('text', 'tooLong');
if (mb_strlen($this->parameters['text']) > CHAT_MAX_LENGTH) throw new UserInputException('text', 'tooLong');
// search for disallowed bbcodes
$disallowedBBCodes = \wcf\system\bbcode\BBCodeParser::getInstance()->validateBBCodes($this->parameters['text'], explode(',', WCF::getSession()->getPermission('user.chat.allowedBBCodes')));

View File

@ -23,6 +23,13 @@ class Room extends \chat\data\CHATDatabaseObject implements \wcf\system\request\
*/
protected static $databaseTableIndexName = 'roomID';
/**
* cached users
*
* @var array<\wcf\data\user\UserProfile>
*/
protected static $users = null;
/**
* @see \wcf\data\chat\room\ChatRoom::getTitle();
*/
@ -133,36 +140,27 @@ public function getTopic() {
return \wcf\system\WCF::getLanguage()->get($this->topic);
}
/**
* Returns the number of users currently active in this room.
*
* @return integer
*/
public function countUsers() {
$sql = "SELECT
COUNT(*)
FROM
wcf".WCF_N."_user
WHERE
chatRoomID = ?";
$stmt = WCF::getDB()->prepareStatement($sql);
$stmt->execute(array($this->roomID));
return $stmt->fetchColumn();
}
/**
* Returns the users that are currently active in this room.
*
* @return \wcf\data\user\UserProfileList
* @return array<\wcf\data\user\UserProfile>
*/
public function getUsers() {
$userList = new \wcf\data\user\UserProfileList();
$userList->getConditionBuilder()->add('user_table.chatRoomID = ?', array($this->roomID));
if (self::$users === null) {
$userList = new \wcf\data\user\UserProfileList();
$userList->getConditionBuilder()->add('user_table.chatRoomID IS NOT NULL', array());
$userList->readObjects();
$users = $userList->getObjects();
foreach ($users as $user) {
if (!isset(self::$users[$user->chatRoomID])) self::$users[$user->chatRoomID] = array();
self::$users[$user->chatRoomID][] = $user;
}
}
if (!isset(self::$users[$this->roomID])) self::$users[$this->roomID] = array();
$userList->readObjects();
return $userList;
return self::$users[$this->roomID];
}
/**

View File

@ -149,7 +149,8 @@ public function getRoomList() {
'object' => $room
)),
'roomID' => $room->roomID,
'active' => $room->roomID == $this->parameters['room']->roomID
'active' => $room->roomID == $this->parameters['room']->roomID,
'userCount' => count($room->getUsers())
);
}

View File

@ -147,7 +147,7 @@ public function readCommands() {
foreach ($files as $file) {
$command = $regex->replace(basename($file), '');
if ($command == 'Plain') continue;
$this->commands[] = \wcf\util\StringUtil::toLowerCase($command);
$this->commands[] = mb_strtolower($command);
}
$this->commands = array_merge($this->commands, array_keys(\chat\system\command\CommandHandler::getAliasMap()));

View File

@ -46,7 +46,7 @@ class NewMessagesPage extends \wcf\page\AbstractPage {
/**
* All the users that are currently in the room $this->room.
*
* @var array<\wcf\data\user\User>
* @var array<\wcf\data\user\UserProfile>
*/
public $users = array();
@ -114,7 +114,7 @@ public function show() {
$json['messages'][] = $message->jsonify(true);
}
\wcf\system\user\storage\UserStorageHandler::getInstance()->loadStorage(array_keys($this->users->getObjects()));
\wcf\system\user\storage\UserStorageHandler::getInstance()->loadStorage(array_keys($this->users));
foreach ($this->users as $user) {
$json['users'][] = array(

View File

@ -15,9 +15,4 @@ class CHATCore extends \wcf\system\application\AbstractApplication {
* @see wcf\system\application\AbstractApplication::$abbreviation
*/
protected $abbreviation = 'chat';
/**
* @see wcf\system\application\IApplication::__run()
*/
public function __run() {}
}

View File

@ -97,7 +97,7 @@ public function getRoom() {
* @return string
*/
public function getParameters() {
$parts = explode(' ', StringUtil::substring($this->text, StringUtil::length(static::COMMAND_CHAR)), 2);
$parts = explode(' ', mb_substr($this->text, mb_strlen(static::COMMAND_CHAR)), 2);
if (!isset($parts[1])) return '';
return $parts[1];
@ -107,7 +107,7 @@ public function getParameters() {
* Loads the command.
*/
public function loadCommand() {
$parts = explode(' ', StringUtil::substring($this->text, StringUtil::length(static::COMMAND_CHAR)), 2);
$parts = explode(' ', mb_substr($this->text, mb_strlen(static::COMMAND_CHAR)), 2);
$class = '\chat\system\command\commands\\'.ucfirst(strtolower($parts[0])).'Command';
if (!class_exists($class)) {

View File

@ -1,7 +1,6 @@
<?php
namespace chat\system\command\commands;
use \wcf\system\WCF;
use \wcf\util\StringUtil;
/**
* Marks the user as away.

View File

@ -1,6 +1,5 @@
<?php
namespace chat\system\command\commands;
use \wcf\util\StringUtil;
/**
* Changes the color of the username
@ -18,27 +17,156 @@ class ColorCommand extends \chat\system\command\AbstractCommand {
* @var array<integer>
*/
public static $colors = array(
'red' => 0xFF0000,
'blue' => 0x0000FF,
'green' => 0x00FF00,
'yellow' => 0xFFFF00,
'black' => 0x000000,
'white' => 0xFFFFFF,
'orange' => 0xFFA500,
'purple' => 0xA020F0,
'weed' => 0xF5DEB3,
'pink' => 0xFFC0CB,
'grey' => 0xBEBEBE,
'khaki' => 0xF0E68C,
'lavender' => 0xE6E6FA,
'maroon' => 0xB03060,
'gold' => 0xFFD700,
'navyblue' => 0x000080,
'royalblue' => 0x4169E1,
'aquamarine' => 0x7FFFD4,
'cyan' => 0x00FFFF,
'magenta' => 0x00FFFF,
'oxford' => 0xF02D // looks like green
'aliceblue' => 0xF0F8FF,
'antiquewhite' => 0xFAEBD7,
'aqua' => 0x00FFFF,
'aquamarine' => 0x7FFFD4,
'azure' => 0xF0FFFF,
'beige' => 0xF5F5DC,
'bisque' => 0xFFE4C4,
'black' => 0x000000,
'blanchedalmond' => 0xFFEBCD,
'blue' => 0x0000FF,
'bluescreenblue' => 0x0000AA,
'blueviolet' => 0x8A2BE2,
'brown' => 0xA52A2A,
'burlywood' => 0xDEB887,
'cadetblue' => 0x5F9EA0,
'chartreuse' => 0x7FFF00,
'chocolate' => 0xD2691E,
'coral' => 0xFF7F50,
'cornflowerblue' => 0x6495ED,
'cornsilk' => 0xFFF8DC,
'crimson' => 0xDC143C,
'cyan' => 0x00FFFF,
'darkblue' => 0x00008B,
'darkcyan' => 0x008B8B,
'darkgoldenrod' => 0xB8860B,
'darkgray' => 0xA9A9A9,
'darkgrey' => 0xA9A9A9,
'darkgreen' => 0x006400,
'darkkhaki' => 0xBDB76B,
'darkmagenta' => 0x8B008B,
'darkolivegreen' => 0x556B2F,
'darkorange' => 0xFF8C00,
'darkorchid' => 0x9932CC,
'darkred' => 0x8B0000,
'darksalmon' => 0xE9967A,
'darkseagreen' => 0x8FBC8F,
'darkslateblue' => 0x483D8B,
'darkslategray' => 0x2F4F4F,
'darkslategrey' => 0x2F4F4F,
'darkturquoise' => 0x00CED1,
'darkviolet' => 0x9400D3,
'deeppink' => 0xFF1493,
'deepskyblue' => 0x00BFFF,
'dimgray' => 0x696969,
'dimgrey' => 0x696969,
'dodgerblue' => 0x1E90FF,
'firebrick' => 0xB22222,
'floralwhite' => 0xFFFAF0,
'forestgreen' => 0x228B22,
'fuchsia' => 0xFF00FF,
'gainsboro' => 0xDCDCDC,
'ghostwhite' => 0xF8F8FF,
'gold' => 0xFFD700,
'goldenrod' => 0xDAA520,
'gray' => 0x808080,
'grey' => 0x808080,
'green' => 0x008000,
'greenyellow' => 0xADFF2F,
'honeydew' => 0xF0FFF0,
'hotpink' => 0xFF69B4,
'indianred' => 0xCD5C5C,
'indigo' => 0x4B0082,
'ivory' => 0xFFFFF0,
'khaki' => 0xF0E68C,
'lavender' => 0xE6E6FA,
'lavenderblush' => 0xFFF0F5,
'lawngreen' => 0x7CFC00,
'lemonchiffon' => 0xFFFACD,
'lightblue' => 0xADD8E6,
'lightcoral' => 0xF08080,
'lightcyan' => 0xE0FFFF,
'lightgoldenrodyellow' => 0xFAFAD2,
'lightgray' => 0xD3D3D3,
'lightgrey' => 0xD3D3D3,
'lightgreen' => 0x90EE90,
'lightpink' => 0xFFB6C1,
'lightsalmon' => 0xFFA07A,
'lightseagreen' => 0x20B2AA,
'lightskyblue' => 0x87CEFA,
'lightslategray' => 0x778899,
'lightslategrey' => 0x778899,
'lightsteelblue' => 0xB0C4DE,
'lightyellow' => 0xFFFFE0,
'lime' => 0x00FF00,
'limegreen' => 0x32CD32,
'linen' => 0xFAF0E6,
'magenta' => 0xFF00FF,
'maroon' => 0x800000,
'mediumaquamarine' => 0x66CDAA,
'mediumblue' => 0x0000CD,
'mediumorchid' => 0xBA55D3,
'mediumpurple' => 0x9370D8,
'mediumseagreen' => 0x3CB371,
'mediumslateblue' => 0x7B68EE,
'mediumspringgreen' => 0x00FA9A,
'mediumturquoise' => 0x48D1CC,
'mediumvioletred' => 0xC71585,
'midnightblue' => 0x191970,
'mintcream' => 0xF5FFFA,
'mistyrose' => 0xFFE4E1,
'moccasin' => 0xFFE4B5,
'navajowhite' => 0xFFDEAD,
'navy' => 0x000080,
'oldlace' => 0xFDF5E6,
'olive' => 0x808000,
'olivedrab' => 0x6B8E23,
'orange' => 0xFFA500,
'orangered' => 0xFF4500,
'orchid' => 0xDA70D6,
'oxford' => 0xF02D, // looks like green
'palegoldenrod' => 0xEEE8AA,
'palegreen' => 0x98FB98,
'paleturquoise' => 0xAFEEEE,
'palevioletred' => 0xD87093,
'papayawhip' => 0xFFEFD5,
'peachpuff' => 0xFFDAB9,
'peru' => 0xCD853F,
'pink' => 0xFFC0CB,
'plum' => 0xDDA0DD,
'powderblue' => 0xB0E0E6,
'purple' => 0x800080,
'red' => 0xFF0000,
'rosybrown' => 0xBC8F8F,
'royalblue' => 0x4169E1,
'saddlebrown' => 0x8B4513,
'sadwin' => 0x2067B2,
'salmon' => 0xFA8072,
'sandybrown' => 0xF4A460,
'seagreen' => 0x2E8B57,
'seashell' => 0xFFF5EE,
'sienna' => 0xA0522D,
'silver' => 0xC0C0C0,
'skyblue' => 0x87CEEB,
'slateblue' => 0x6A5ACD,
'slategray' => 0x708090,
'slategrey' => 0x708090,
'snow' => 0xFFFAFA,
'springgreen' => 0x00FF7F,
'steelblue' => 0x4682B4,
'tan' => 0xD2B48C,
'teal' => 0x008080,
'thistle' => 0xD8BFD8,
'tomato' => 0xFF6347,
'turquoise' => 0x40E0D0,
'violet' => 0xEE82EE,
'wheat' => 0xF5DEB3,
'white' => 0xFFFFFF,
'whitesmoke' => 0xF5F5F5,
'yellow' => 0xFFFF00,
'yellowgreen' => 0x9ACD32
);
public function __construct(\chat\system\command\CommandHandler $commandHandler) {

View File

@ -14,7 +14,7 @@ class FreeCommand extends MeCommand {
public function __construct(\chat\system\command\CommandHandler $commandHandler) {
parent::__construct($commandHandler);
if (\wcf\util\StringUtil::toLowerCase($this->commandHandler->getParameters()) != 'the fish') {
if (mb_strtolower($this->commandHandler->getParameters()) != 'the fish') {
throw new \InvalidArgumentException();
}

View File

@ -4,7 +4,6 @@
use \wcf\data\user\User;
use \wcf\system\WCF;
use \wcf\util\DateUtil;
use \wcf\util\StringUtil;
/**
* Shows information about the specified user.

View File

@ -1,6 +1,5 @@
<?php
namespace chat\system\command\commands;
use \wcf\util\StringUtil;
/**
* Indicates an action. The message is shown without the colon.

View File

@ -1,7 +1,6 @@
<?php
namespace chat\system\command\commands;
use \wcf\system\WCF;
use \wcf\util\StringUtil;
/**
* Creates a temporary room

View File

@ -1,5 +1,5 @@
<?php
namespace chat\system\cronjob;
namespace chat\system\event\listener;
use \chat\data;
/**
@ -9,13 +9,13 @@
* @copyright 2010-2013 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
* @package be.bastelstu.chat
* @subpackage system.cronjob
* @subpackage system.event.listener
*/
class CleanupCronjob implements \wcf\system\cronjob\ICronjob {
class HourlyCleanUpCronjobExecuteChatCleanUpListener implements \wcf\system\event\IEventListener {
/**
* @see wcf\system\ICronjob::execute()
* @see \wcf\system\event\IEventListener::execute()
*/
public function execute(\wcf\data\cronjob\Cronjob $cronjob) {
public function execute($eventObj, $className, $eventName) {
$messageAction = new data\message\MessageAction(array(), 'prune');
$messageAction->executeAction();
$roomAction = new data\room\RoomAction(array(), 'prune');

View File

@ -58,7 +58,7 @@ public static function getPackageID() {
* @return string
*/
public static function gradient($string, $start, $end) {
if (($length = \wcf\util\StringUtil::length($string)) === 0) return '';
if (($length = mb_strlen($string)) === 0) return '';
if ($start === $end) {
return '<span style="color:rgb('.($start >> 16 & 255).','.($start >> 8 & 255).','.($start & 255).')">'.\wcf\util\StringUtil::encodeHTML($string).'</span>';
@ -87,8 +87,8 @@ public static function gradient($string, $start, $end) {
*/
public static function str_split($string, $length = 1) {
$result = array();
for ($i = 0, $max = \wcf\util\StringUtil::length($string); $i < $max; $i += $length) {
$result[] = \wcf\util\StringUtil::substring($string, $i, $length);
for ($i = 0, $max = mb_strlen($string); $i < $max; $i += $length) {
$result[] = mb_substr($string, $i, $length);
}
return $result;
}

View File

@ -180,12 +180,9 @@
}
ul {
display: table;
width: 100%;
.timsChatMessage {
display: table-row;
height: 20px;
min-height: 20px;
clear: both;
.transition(opacity, .2s);
&.unloaded {
@ -227,8 +224,9 @@
> .text {
img {
max-width: 480px;
max-height: 320px;
max-width: 100%;
height: auto;
width: auto;
}
}
}
@ -427,18 +425,8 @@
}
@media only screen and (max-width: 800px) {
#timsChatMessageContainer {
overflow: auto;
.timsChatMessage {
> time {
display: none !important;
}
> .usernameContainer {
min-width: 0px !important;
}
}
.timsChatMessage .text li > time, #smilies {
display: none !important;
}
}

View File

@ -15,7 +15,7 @@ CREATE TABLE chat1_message (
username VARCHAR(255) DEFAULT NULL,
receiver INT(10) DEFAULT NULL,
time INT(10) NOT NULL,
type TINYINT(3) NOT NULL DEFAULT 1,
type TINYINT(3) NOT NULL DEFAULT 0,
message MEDIUMTEXT NOT NULL,
enableSmilies TINYINT(1) NOT NULL DEFAULT 1,
enableHTML TINYINT(1) NOT NULL DEFAULT 0,

View File

@ -85,6 +85,8 @@
<item name="wcf.acp.option.chat_display_join_leave"><![CDATA[Join- und Leave-Nachrichten anzeigen]]></item>
<item name="wcf.acp.option.chat_display_join_leave.description"><![CDATA[Soll eine Nachricht angezeigt werden, wenn ein Nutzer den Chat betritt oder verlässt?]]></item>
<item name="wcf.acp.option.chat_max_length"><![CDATA[Maximale Textlänge]]></item>
<item name="wcf.acp.option.chat_command_aliases"><![CDATA[Befehls-Aliase]]></item>
<item name="wcf.acp.option.chat_command_aliases.description"><![CDATA[Geben Sie zeilenweise eine Kombination aus Alias und Zielbefehl an. Alias und Zielbefehl werden durch einen Doppelpunkt voneinander getrennt.]]></item>
<item name="wcf.acp.option.category.chat.log"><![CDATA[Protokoll]]></item>
<item name="wcf.acp.option.chat_log_active"><![CDATA[Protokoll aktivieren]]></item>
@ -104,8 +106,16 @@
<item name="chat.error.notFound"><![CDATA[Der Befehl „{$exception->getCommand()}“ wurde nicht gefunden.]]></item>
<item name="chat.error.userNotFound"><![CDATA[Der Benutzer „{$exception->getUsername()}“ wurde nicht gefunden.]]></item>
<item name="chat.error.permissionDenied"><![CDATA[Sie dürfen diesen Befehl nicht verwenden.]]></item>
<item name="chat.error.duplicateTab"><![CDATA[Der Chat wurde in einem weiteren Tab geöffnet.]]></item>
<item name="chat.error.join"><![CDATA[Der Chatraum konnte nicht betreten werden.]]></item>
<item name="chat.error.duplicateTab"><![CDATA[Sie haben den Chat in einem weiteren Browserfenster geöffnet. Diese Instanz wurde daher zur Vermeidung von Problemen deaktiviert.]]></item>
<item name="chat.error.join"><![CDATA[Es gibt Probleme den gewählten Chatraum zu betreten.]]></item>
<item name="chat.error.onMessageLoad"><![CDATA[Es gibt Probleme beim Laden neuer Nachrichten. Folgende Gründe können zu dieser Meldung führen:
<ul class="nativeList">
<li>Ihnen wurden die Zugriffsrechte auf den Raum genommen</li>
<li>Es gibt Probleme mit Ihrer Internetkonnektivität, die dazu führen, dass die Anfragen nicht durchgeführt werden können</li>
<li>Sie haben den Chat mehrmals geöffnet</li>
<li>Es gibt Probleme auf Seiten des Servers</li>
</ul>
Probieren Sie den Chat neu zu laden<!-- , bei Risiken und Nebenwirkungen fragen Sie ihren Arzt oder Administrator -->.]]></item>
<item name="chat.error.reload"><![CDATA[Neu laden]]></item>
</category>
@ -166,10 +176,10 @@
<item name="chat.message.4"><![CDATA[ist jetzt wieder da.]]></item>
<!-- 5 = TYPE_MODERATE -->
<item name="chat.message.5.restore"><![CDATA[hat {@$link} zurückgesetzt.]]></item>
<item name="chat.message.5.mute"><![CDATA[hat {@$link} bis {@$expires|plainTime} geknebelt{if !$reason|empty}: {$reason}{else}.{/if}]]></item>
<item name="chat.message.5.ban"><![CDATA[hat {@$link} bis {@$expires|plainTime} gebannt{if !$reason|empty}: {$reason}{else}.{/if}]]></item>
<item name="chat.message.5.gmute"><![CDATA[hat {@$link} bis {@$expires|plainTime} global geknebelt{if !$reason|empty}: {$reason}{else}.{/if}]]></item>
<item name="chat.message.5.gban"><![CDATA[hat {@$link} bis {@$expires|plainTime} global gebannt{if !$reason|empty}: {$reason}{else}.{/if}]]></item>
<item name="chat.message.5.mute"><![CDATA[hat {@$link} bis {@$expires|plainTime} geknebelt{if !$reason|empty}: {@$reason}{else}.{/if}]]></item>
<item name="chat.message.5.ban"><![CDATA[hat {@$link} bis {@$expires|plainTime} gebannt{if !$reason|empty}: {@$reason}{else}.{/if}]]></item>
<item name="chat.message.5.gmute"><![CDATA[hat {@$link} bis {@$expires|plainTime} global geknebelt{if !$reason|empty}: {@$reason}{else}.{/if}]]></item>
<item name="chat.message.5.gban"><![CDATA[hat {@$link} bis {@$expires|plainTime} global gebannt{if !$reason|empty}: {@$reason}{else}.{/if}]]></item>
<item name="chat.message.5.unmute"><![CDATA[hat {@$link} entknebelt.]]></item>
<item name="chat.message.5.unban"><![CDATA[hat {@$link} entbannt.]]></item>
<item name="chat.message.5.ungmute"><![CDATA[hat {@$link} global entknebelt.]]></item>

View File

@ -34,7 +34,7 @@
<instruction type="aclOption">aclOption.xml</instruction>
<instruction type="acpMenu">acpMenu.xml</instruction>
<instruction type="userGroupOption">userGroupOption.xml</instruction>
<instruction type="cronjob">cronjob.xml</instruction>
<instruction type="eventListener">eventListener.xml</instruction>
<instruction type="dashboardBox">dashboardBox.xml</instruction>
<instruction type="script" run="standalone">acp/be.bastelstu.chat.install.php</instruction>
</instructions>
@ -51,6 +51,7 @@
<instruction type="aclOption">aclOption.xml</instruction>
<instruction type="acpMenu">acpMenu.xml</instruction>
<instruction type="userGroupOption">userGroupOption.xml</instruction>
<instruction type="eventListener">eventListener.xml</instruction>
<instruction type="dashboardBox">dashboardBox.xml</instruction>
<instruction type="script" run="standalone">acp/be.bastelstu.chat.update.php</instruction>
</instructions>

View File

@ -39,6 +39,7 @@
<ul>
<li><a href="http://www.wbbaddons.de/user/2020-noone/"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>-noone-</a></li>
<li><a href="https://github.com/Gabbid"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>Gabi</a></li>
<li>Alexandra Glass</li>
<li><a href="https://github.com/Leon-"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>Stefan Hahn</a></li>
<li><a href="http://www.wbbaddons.de"{if EXTERNAL_LINK_TARGET_BLANK} target="_blank"{/if}>Martin Schwendowius</a></li>
</ul>
@ -46,4 +47,4 @@
</dl>
</div>
{/if}
{/if}
{/if}

View File

@ -0,0 +1 @@
{if $__chat->isActiveApplication()}{if !$__wcf->getStyleHandler()->getStyle()->getPageLogo()}<img src="{$__wcf->getPath('chat')}images/chatLogo.png" style="width: 246px; height: 90px;" alt="" />{/if}{/if}

View File

@ -5,7 +5,7 @@
{include file='headInclude' sandbox=false}
{include file='javascriptInclude' application='chat'}
<script>
<script data-relocate="true">
//<![CDATA[
(function ($, window) {
$(function(){
@ -18,7 +18,7 @@
'chat.general.privateChannelTopic': '{lang}chat.general.privateChannelTopic{/lang}',
'chat.general.closePrivateChannel': '{lang}chat.general.closePrivateChannel{/lang}',
'chat.general.closeTopic': '{lang}chat.general.closeTopic{/lang}',
'chat.error.onMessageLoad': '{lang}chat.error.onMessageLoad{/lang}',
'chat.error.onMessageLoad': '{@"chat.error.onMessageLoad"|language|encodeJS}',
'chat.error.duplicateTab': '{lang}chat.error.duplicateTab{/lang}',
'chat.error.join': '{lang}chat.error.join{/lang}',
'chat.error.reload': '{lang}chat.error.reload{/lang}'

View File

@ -35,7 +35,7 @@
{@$roomList}
</ul>
</div>
<script>
<script data-relocate="true">
//<![CDATA[
(function($, window, undefined) {
proxy = new WCF.Action.Proxy({

View File

@ -1,3 +1,3 @@
<script src="{$__wcf->getPath('chat')}js/be.bastelstu.Chat{if !ENABLE_DEBUG_MODE}.min{/if}.js?version={PACKAGE_VERSION|rawurlencode}"></script>
<script data-relocate="true" src="{$__wcf->getPath('chat')}js/be.bastelstu.Chat{if !ENABLE_DEBUG_MODE}.min{/if}.js?version={PACKAGE_VERSION|rawurlencode}"></script>
<!--script src="{$__wcf->getPath('chat')}js/be.bastelstu.Chat.Log{if !ENABLE_DEBUG_MODE}.min{/if}.js?version={PACKAGE_VERSION|rawurlencode}"></script-->
{event name='javascript'}

View File

@ -12,24 +12,21 @@
<environment>user</environment>
<templatename>header</templatename>
<eventname>headerLogo</eventname>
<templatecode><![CDATA[{if $__chat->isActiveApplication()}{if !$__wcf->getStyleHandler()->getStyle()->getPageLogo()}<img src="{$__wcf->getPath('chat')}images/chatLogo.png" style="width: 246px; height: 90px;" alt="" />{/if}{/if}]]></templatecode>
<templatecode><![CDATA[{include file='__headerLogo' application='chat'}]]></templatecode>
</templatelistener>
<templatelistener name="headerLogo">
<environment>admin</environment>
<templatename>header</templatename>
<eventname>headerLogo</eventname>
<templatecode><![CDATA[{if $__chat->isActiveApplication()}<img src="{$__wcf->getPath('chat')}images/chatLogo.png" style="width: 246px; height: 90px;" alt="" />{/if}]]></templatecode>
<templatecode><![CDATA[{include file='__headerLogo' application='chat'}]]></templatecode>
</templatelistener>
<templatelistener name="softwareVersions">
<environment>admin</environment>
<templatename>index</templatename>
<eventname>softwareVersions</eventname>
<templatecode><![CDATA[<dl>
<dt>{lang}wcf.acp.index.system.software.chatVersion{/lang}</dt>
<dd>{$__chat->getPackage()->packageVersion}</dd>
</dl>]]></templatecode>
<templatecode><![CDATA[{include file='__softwareVersions' application='chat'}]]></templatecode>
</templatelistener>
</import>
</data>