1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Merge branch 'master' into attachments

This commit is contained in:
Maximilian Mader 2013-10-16 14:11:02 +02:00
commit 5862f1c283
6 changed files with 44 additions and 6 deletions

View File

@ -11,9 +11,7 @@
<h1>{lang}chat.acp.room.{$action}{/lang}</h1> <h1>{lang}chat.acp.room.{$action}{/lang}</h1>
</header> </header>
{if $errorField} {include file='formError'}
<p class="error">{lang}wcf.global.form.error{/lang}</p>
{/if}
{if $success|isset} {if $success|isset}
<p class="success">{lang}wcf.global.success.{$action}{/lang}</p> <p class="success">{lang}wcf.global.success.{$action}{/lang}</p>
@ -82,6 +80,7 @@
<div class="formSubmit"> <div class="formSubmit">
<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" /> <input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
{@SECURITY_TOKEN_INPUT_TAG}
</div> </div>
</form> </form>

View File

@ -18,8 +18,16 @@ final class Install {
*/ */
private $styles = null; private $styles = null;
/**
* Do we need to update the page title?
*
* @var boolean
*/
private $updateTitle = false;
public function __construct() { public function __construct() {
$this->styles = \wcf\system\style\StyleHandler::getInstance()->getAvailableStyles(); $this->styles = \wcf\system\style\StyleHandler::getInstance()->getAvailableStyles();
if (!defined('PAGE_TITLE') || !PAGE_TITLE) $this->updateTitle = true;
} }
/** /**
@ -29,6 +37,23 @@ public function execute() {
foreach ($this->styles as $style) { foreach ($this->styles as $style) {
\wcf\system\style\StyleHandler::getInstance()->resetStylesheet($style); \wcf\system\style\StyleHandler::getInstance()->resetStylesheet($style);
} }
if ($this->updateTitle) {
$sql = "UPDATE
wcf".WCF_N."_option
SET
optionValue = ?
WHERE
optionName = ?";
$stmt = \wcf\system\WCF::getDB()->prepareStatement($sql);
$stmt->execute(array('Tims Chat 3', 'page_title'));
\wcf\data\option\OptionEditor::resetCache();
}
\wcf\system\dashboard\DashboardHandler::setDefaultValues('com.woltlab.wcf.user.DashboardPage', array(
// content
'be.bastelstu.chat.onlineList' => 1
));
} }
} }
$install = new Install(); $install = new Install();

View File

@ -1,6 +1,6 @@
<?php <?php
namespace chat\system\command\commands; namespace chat\system\command\commands;
use \wcf\data\user\User; use \wcf\data\user\UserProfile;
/** /**
* Whispers a message. * Whispers a message.
@ -29,8 +29,13 @@ public function __construct(\chat\system\command\CommandHandler $commandHandler)
throw new \InvalidArgumentException(); throw new \InvalidArgumentException();
} }
$this->user = User::getUserByUsername($username); $this->user = UserProfile::getUserProfileByUsername($username);
if (!$this->user->userID) throw new \chat\system\command\UserNotFoundException($username); if (!$this->user->userID) throw new \chat\system\command\UserNotFoundException($username);
if (!\wcf\system\WCF::getSession()->getPermission('user.profile.cannotBeIgnored')) {
if ($this->user->isIgnoredUser(\wcf\system\WCF::getUser()->userID)) {
throw new \wcf\system\exception\UserInputException('text', \wcf\system\WCF::getLanguage()->getDynamicVariable('chat.error.whisper.ignoresYou', array('user' => $this->user)));
}
}
$this->didInit(); $this->didInit();
} }

View File

@ -56,6 +56,8 @@
<item name="wcf.acp.group.option.user.chat.canEnter"><![CDATA[Kann Chat betreten]]></item> <item name="wcf.acp.group.option.user.chat.canEnter"><![CDATA[Kann Chat betreten]]></item>
<item name="wcf.acp.group.option.user.chat.canWrite"><![CDATA[Kann im Chat schreiben]]></item> <item name="wcf.acp.group.option.user.chat.canWrite"><![CDATA[Kann im Chat schreiben]]></item>
<item name="wcf.acp.group.option.user.chat.canTempRoom"><![CDATA[Kann temporäre Räume erstellen]]></item> <item name="wcf.acp.group.option.user.chat.canTempRoom"><![CDATA[Kann temporäre Räume erstellen]]></item>
<item name="wcf.acp.group.option.user.chat.allowedBBCodes"><![CDATA[Erlaubte BBCodes]]></item>
<item name="wcf.acp.group.option.user.chat.allowedBBCodes.description"><![CDATA[Die hier ausgewählten BBCodes dürfen von Mitglieder dieser Benutzergruppe verwendet werden.]]></item>
<item name="wcf.acp.group.option.category.mod.chat"><![CDATA[Chat]]></item> <item name="wcf.acp.group.option.category.mod.chat"><![CDATA[Chat]]></item>
<item name="wcf.acp.group.option.mod.chat.canAlwaysEnter"><![CDATA[Kann Räume immer betreten]]></item> <item name="wcf.acp.group.option.mod.chat.canAlwaysEnter"><![CDATA[Kann Räume immer betreten]]></item>
@ -74,6 +76,10 @@
<item name="wcf.acp.group.option.mod.chat.canGmute.description"><![CDATA[Impliziert „Kann knebeln“]]></item> <item name="wcf.acp.group.option.mod.chat.canGmute.description"><![CDATA[Impliziert „Kann knebeln“]]></item>
<item name="wcf.acp.group.option.category.admin.chat"><![CDATA[Chat]]></item> <item name="wcf.acp.group.option.category.admin.chat"><![CDATA[Chat]]></item>
<item name="wcf.acp.group.option.admin.chat.canAddRoom"><![CDATA[Kann Räume erstellen]]></item>
<item name="wcf.acp.group.option.admin.chat.canEditRoom"><![CDATA[Kann Räume bearbeiten]]></item>
<item name="wcf.acp.group.option.admin.chat.canDeleteRoom"><![CDATA[Kann Räume löschen]]></item>
<item name="wcf.acp.group.option.admin.chat.canReadLog"><![CDATA[Kann Protokoll einsehen]]></item>
<item name="wcf.acp.group.option.admin.chat.canManageSuspensions"><![CDATA[Kann Sanktionen verwalten]]></item> <item name="wcf.acp.group.option.admin.chat.canManageSuspensions"><![CDATA[Kann Sanktionen verwalten]]></item>
<item name="wcf.acp.group.option.admin.chat.canManageSuspensions.description"><![CDATA[Impliziert „Kann bannen“, „Kann knebeln“, „Kann global bannen“, „Kann global knebeln“ und gegenbenenfalls weitere Rechte.]]></item> <item name="wcf.acp.group.option.admin.chat.canManageSuspensions.description"><![CDATA[Impliziert „Kann bannen“, „Kann knebeln“, „Kann global bannen“, „Kann global knebeln“ und gegenbenenfalls weitere Rechte.]]></item>
</category> </category>

View File

@ -16,7 +16,7 @@
</authorinformation> </authorinformation>
<requiredpackages> <requiredpackages>
<requiredpackage minversion="2.0.0 Beta 8">com.woltlab.wcf</requiredpackage> <requiredpackage minversion="2.0.0 Beta 11">com.woltlab.wcf</requiredpackage>
<requiredpackage file="requirements/be.bastelstu.max.wcf.jCounter.tar">be.bastelstu.max.wcf.jCounter</requiredpackage> <requiredpackage file="requirements/be.bastelstu.max.wcf.jCounter.tar">be.bastelstu.max.wcf.jCounter</requiredpackage>
<requiredpackage file="requirements/be.bastelstu.wcf.nodePush.tar">be.bastelstu.wcf.nodePush</requiredpackage> <requiredpackage file="requirements/be.bastelstu.wcf.nodePush.tar">be.bastelstu.wcf.nodePush</requiredpackage>
</requiredpackages> </requiredpackages>

View File

@ -106,6 +106,9 @@
<form id="timsChatForm" action="{link application='chat' controller='Chat' action='Send'}{/link}" method="post"> <form id="timsChatForm" action="{link application='chat' controller='Chat' action='Send'}{/link}" method="post">
<fieldset> <fieldset>
<dl class="wide" id="timsChatInputContainer"> <dl class="wide" id="timsChatInputContainer">
<dt>
{lang}chat.general.message{/lang}
</dt>
<dd> <dd>
<input id="timsChatInput" accesskey="w" type="text" class="inputText long" name="text" autocomplete="off" maxlength="{@CHAT_MAX_LENGTH}" disabled="disabled" placeholder="{lang}chat.general.submit.default{/lang}" /> <input id="timsChatInput" accesskey="w" type="text" class="inputText long" name="text" autocomplete="off" maxlength="{@CHAT_MAX_LENGTH}" disabled="disabled" placeholder="{lang}chat.general.submit.default{/lang}" />
<small class="innerError" style="display: none;">Lorem ipsum dolor sit amet.</small> <small class="innerError" style="display: none;">Lorem ipsum dolor sit amet.</small>