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

Fix formatting

This commit is contained in:
Tim Düsterhus 2014-02-28 17:06:50 +01:00
parent 40bc1163f4
commit f4c294a77c
59 changed files with 101 additions and 96 deletions

View File

@ -15,14 +15,14 @@
<permissions>admin.chat.canEditRoom,admin.chat.canDeleteRoom</permissions>
<showorder>1</showorder>
</acpmenuitem>
<acpmenuitem name="chat.acp.menu.link.room.add">
<controller><![CDATA[chat\acp\form\RoomAddForm]]></controller>
<parent>chat.acp.menu.link.chat</parent>
<permissions>admin.chat.canAddRoom</permissions>
<showorder>2</showorder>
</acpmenuitem>
<acpmenuitem name="chat.acp.menu.link.suspension.list">
<controller><![CDATA[chat\acp\page\ChatSuspensionListPage]]></controller>
<parent>chat.acp.menu.link.chat</parent>

View File

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

View File

@ -163,5 +163,4 @@
<p class="info">{lang}wcf.global.noItems{/lang}</p>
{/if}
{include file='footer'}

View File

@ -2,7 +2,7 @@
{if CHAT_LOG_ARCHIVETIME !== 0}
<script data-relocate="true" src="{$__wcf->getPath('chat')}acp/js/be.bastelstu.Chat.ACP.Log.js?version={PACKAGE_VERSION|rawurlencode}"></script>
{if $errorField === ''}
<script data-relocate="true">
//<![CDATA[
@ -15,7 +15,6 @@
{/if}
{/if}
<header class="boxHeadline">
<h1>{lang}{@$pageTitle}{/lang}</h1>
</header>
@ -55,7 +54,7 @@
<input type="submit" value="{lang}wcf.global.button.submit{/lang}" accesskey="s" />
</div>
</form>
<div class="contentNavigation">
<nav>
<ul>
@ -68,7 +67,7 @@
</ul>
</nav>
</div>
{if $errorField === ''}
<div id="messageLogContent" class="tabMenuContainer marginTop" data-active="timeTab-0" data-store="activeTabMenuItem" data-base-time="{$date}" data-room-id="{$room->roomID}">
<nav class="tabMenu">

View File

@ -1,5 +1,5 @@
{include file='header' pageTitle='chat.acp.room.list'}
<script data-relocate="true">
//<![CDATA[
$(function() {
@ -8,7 +8,7 @@
});
//]]>
</script>
<header class="boxHeadline">
<h1>{lang}chat.acp.room.list{/lang}</h1>
</header>
@ -27,6 +27,7 @@
</nav>
{/hascontent}
</div>
{if $objects|count}
<section id="roomList" class="container containerPadding sortableListContainer marginTop">
<ol class="sortableList" data-object-id="0">

View File

@ -1,9 +1,10 @@
#!/usr/bin/env php
<?php
namespace be\bastelstu\chat;
/**
* Builds the Chat
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Handles installation of Tims Chat.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -56,5 +56,6 @@ public function execute() {
));
}
}
$install = new Install();
$install->execute();

View File

@ -3,7 +3,7 @@
/**
* Handles updates of Tims Chat.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -52,5 +52,6 @@ public function execute() {
}
}
}
$update = new Update();
$update->execute();

View File

@ -6,7 +6,7 @@
/**
* Shows the chatroom add form.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -52,7 +52,7 @@ public function __run() {
*/
public function readParameters() {
parent::readParameters();
I18nHandler::getInstance()->register('title');
I18nHandler::getInstance()->register('topic');
}

View File

@ -5,7 +5,7 @@
/**
* Shows the chatroom edit form.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -53,7 +53,7 @@ class ChatSuspensionListPage extends \wcf\page\SortablePage {
/*
* username
*
*
* @var String
*/
public $filterUsername = null;
@ -67,7 +67,7 @@ class ChatSuspensionListPage extends \wcf\page\SortablePage {
/*
* issuer username
*
*
* @var String
*/
public $filterIssuerUsername = null;

View File

@ -3,7 +3,7 @@
/**
* Basic implementation that sets proper table name.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -7,7 +7,7 @@
/**
* Represents a chat message.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -132,7 +132,7 @@ public function getUsername($colored = false) {
/**
* Converts this message into json-form.
*
*
* @param boolean $raw
* @return string
*/

View File

@ -7,7 +7,7 @@
/**
* Executes message related actions.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -167,22 +167,6 @@ public function send() {
return $returnValues['returnValues'];
}
/**
* Fetches messages in between the specified timestamps.
*
* @return array Array containing message table, containerID and information about an empty message table.
*/
public function getMessages() {
// read messages
$messages = ViewableMessageList::getMessagesBetween($this->parameters['room'], $this->parameters['start'], $this->parameters['end']);
return array(
'noMessages' => (count($messages) == 0) ? true : null,
'containerID' => $this->parameters['containerID'],
'template' => WCF::getTPL()->fetch('__messageLogTable', 'chat', array('messages' => $messages), true)
);
}
/**
* Validates getting messages.
*/
@ -200,6 +184,25 @@ public function validateGetMessages() {
if ($this->parameters['room'] === null) throw new \wcf\system\exception\IllegalLinkException();
}
/**
* Fetches messages in between the specified timestamps.
*
* @return array Array containing message table, containerID and information about an empty message table.
*/
public function getMessages() {
// read messages
$messages = ViewableMessageList::getMessagesBetween($this->parameters['room'], $this->parameters['start'], $this->parameters['end']);
return array(
'noMessages' => (count($messages) == 0) ? true : null,
'containerID' => $this->parameters['containerID'],
'template' => WCF::getTPL()->fetch('__messageLogTable', 'chat', array('messages' => $messages), true)
);
}
/**
* Validates setting an attachment.
*/
public function validateSendAttachment() {
// read user data
$this->parameters['userData']['color1'] = WCF::getUser()->chatColor1;
@ -243,6 +246,9 @@ public function validateSendAttachment() {
}
}
/**
* Creates a message linked to an attachment
*/
public function sendAttachment() {
$this->parameters['type'] = Message::TYPE_ATTACHMENT;
$this->parameters['text'] = '[attach]'. $this->parameters['objectID'] .'[/attach]';

View File

@ -18,7 +18,7 @@ class MessageList extends \wcf\data\DatabaseObjectList {
/**
* Reads the newest messages for the given room.
*
*
* @param \chat\data\room\Room $room
* @param integer $number
* @return array<\chat\data\message\Message>

View File

@ -3,7 +3,7 @@
/**
* Represents a viewable chat message.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -5,7 +5,7 @@
/**
* Represents a chat room.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -77,7 +77,7 @@ public function canEnter(\wcf\data\user\User $user = null) {
/**
* Returns whether the user is allowed to write messages in this room.
*
*
* @param \wcf\data\user\User $user
* @return boolean
*/
@ -115,7 +115,7 @@ public function canWrite(\wcf\data\user\User $user = null) {
/**
* Returns the ID of this chatroom.
*
*
* @see \wcf\system\request\IRouteController
*/
public function getID() {

View File

@ -4,7 +4,7 @@
/**
* Provides functions to edit chat rooms.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -4,7 +4,7 @@
/**
* Represents a chat suspension.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -4,7 +4,7 @@
/**
* Provides functions to edit chat suspensions.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Represents a list of chat suspensions.
*
*
* @author Maximilian Mader
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -6,7 +6,7 @@
/**
* Shows the chat-interface
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Shows information about Tims chat.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -32,7 +32,7 @@ class CopyrightPage extends \wcf\page\AbstractPage {
public $templateName = '__copyright';
/**
* @see \wcf\page\IPage::assignVariables()
* @see \wcf\page\IPage::assignVariables()
*/
public function assignVariables() {
parent::assignVariables();

View File

@ -6,7 +6,7 @@
/**
* Loads new messages.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Chat core
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -4,7 +4,7 @@
/**
* Attachment object type implementation for chat messages.
*
*
* @author Maximilian Mader
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -48,10 +48,6 @@ public function canDownload($objectID) {
return false;
}
public function canPreview($objectID) {
return $this->canDownload($objectID);
}
/**
* @see wcf\system\attachment\IAttachmentObjectType::canUpload()
*/

View File

@ -4,7 +4,7 @@
/**
* Default implementation for commands.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -4,7 +4,7 @@
/**
* Default implementation for restricted commands
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -7,7 +7,7 @@
/**
* Default implementation for suspension commands
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -7,7 +7,7 @@
/**
* Default implementation for suspension commands
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -4,7 +4,7 @@
/**
* Handles commands
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -80,7 +80,7 @@ public function isCommand($text = null) {
/**
* Returns the whole message.
*
*
* @return string
*/
public function getText() {

View File

@ -4,7 +4,7 @@
/**
* Marks the user as away.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Bans a user.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Changes the color of the username
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Informs everyone that the fish was freed. OH A NOEZ.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Globally bans a user.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Globally mutes a user.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -7,7 +7,7 @@
/**
* Shows information about the specified user.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -5,7 +5,7 @@
/**
* Invites a user into a temproom.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Indicates an action. The message is shown without the colon.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Mutes a user.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Sends a message that starts with a slash.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -6,7 +6,7 @@
/**
* Resets the color of a user
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -4,7 +4,7 @@
/**
* Creates a temporary room
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Bans a user.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Unbans a user globally.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Unmutes a user globally.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Unmutes a user.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* Shows the users that are online
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -4,7 +4,7 @@
/**
* Whispers a message.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -4,7 +4,7 @@
/**
* Vaporizes unneeded data.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -3,7 +3,7 @@
/**
* PageMenuItemProvider for chat.
*
*
* @author Tim Düsterhus
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>
@ -20,7 +20,7 @@ class ChatPageMenuItemProvider extends \wcf\system\menu\page\DefaultPageMenuItem
/**
* Hides the button when there is no valid room
*
*
* @see \wcf\system\menu\page\PageMenuItemProvider::isVisible()
*/
public function isVisible() {

View File

@ -6,7 +6,7 @@
/**
* Handles chat-permissions.
*
*
* @author Tim Düsterhus, Marcel Werk
* @copyright 2010-2014 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
@ -80,7 +80,7 @@ public function __construct(\wcf\data\user\User $user = null) {
/**
* Fetches the given permission for the given room
*
*
* @param \chat\data\room\Room $room
* @param string $permission
* @return boolean

View File

@ -51,7 +51,7 @@ public static function getPackageID() {
* Creates a gradient out of two colors represented by an integer.
* The first byte is red, the second byte is green, the third one is blue.
* The numbers can be easily expressed in hexadecimal notation: 0xFF0000 being red.
*
*
* @param string $string
* @param integer $start
* @param integer $end

View File

@ -1,6 +1,6 @@
/**
* Styles for Tims Chat
*
*
* @author Tim Düsterhus, Maximilian Mader
* @copyright 2010-2014 Tim Düsterhus
* @license Creative Commons Attribution-NonCommercial-ShareAlike <http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode>

View File

@ -10,7 +10,7 @@
<parent>chat</parent>
</category>
</categories>
<options>
<!-- general chat options -->
<option name="module_chat">

View File

@ -3,7 +3,7 @@
<head>
<title>{if $room}{$room} - {/if}{lang}chat.global.title{/lang} - {PAGE_TITLE|language}</title>
{include file='headInclude' sandbox=false}
{include file='headInclude'}
{if $room}
{include file='javascriptInclude' application='chat'}
<script data-relocate="true">
@ -130,7 +130,7 @@
</fieldset>
<button type="submit" class="marginTop invisible" accesskey="s">{lang}wcf.global.button.submit{/lang}</button>
</form>
{if MODULE_SMILEY && $smileyCategories|count}
{include file='messageFormSmilies' wysiwygSelector=''}
{/if}

View File

@ -4,7 +4,7 @@
<header class="boxHeadline boxSubHeadline">
<h2>{lang}chat.header.menu.chat{/lang}</h2>
</header>
<div class="container marginTop">
<ul class="containerList">
{@$roomList}

View File

@ -6,6 +6,7 @@
</ul>
</div>
</fieldset>
<fieldset id="timsChatRoomListContainer">
<legend>{lang}chat.global.rooms{/lang}</legend>
<div id="timsChatRoomList">