local bugfix build
fixed app.php/portal display fixed if page has ?style=2 or any ? in link as that was breaking the load scripts
68
.travis.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
sudo: required
|
||||
|
||||
language: php
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.3.3
|
||||
env: DB=mysqli
|
||||
- php: 5.3
|
||||
env: DB=mysqli # MyISAM
|
||||
- php: 5.4
|
||||
env: DB=mysqli
|
||||
- php: 5.4
|
||||
env: DB=mysql
|
||||
- php: 5.4
|
||||
env: DB=mariadb
|
||||
- php: 5.4
|
||||
env: DB=postgres
|
||||
- php: 5.4
|
||||
env: DB=sqlite3
|
||||
- php: 5.4
|
||||
env: DB=mysqli;SLOWTESTS=1
|
||||
- php: 5.5
|
||||
env: DB=mysqli
|
||||
- php: 5.6
|
||||
env: DB=mysqli
|
||||
- php: hhvm
|
||||
env: DB=mysqli
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
fast_finish: true
|
||||
|
||||
env:
|
||||
global:
|
||||
- EXTNAME="dmzx/mChat-Extension" # CHANGE name of the extension HERE
|
||||
- SNIFF="1" # Should we run code sniffer on your code?
|
||||
- IMAGE_ICC="0" # Should we run icc profile sniffer on your images?
|
||||
- EPV="0" # Should we run EPV (Extension Pre Validator) on your code?
|
||||
- PHPBB_BRANCH="develop-ascraeus"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /^develop-.*$/
|
||||
|
||||
before_install:
|
||||
- sudo mkdir travis
|
||||
- git clone "https://github.com/nickvergessen/phpbb-ext-acme-demo.git"
|
||||
- sudo cp phpbb-ext-acme-demo/phpunit.xml.dist ./
|
||||
- sudo cp phpbb-ext-acme-demo/travis/prepare-phpbb.sh travis
|
||||
- sudo rm -rf phpbb-ext-acme-demo
|
||||
|
||||
install:
|
||||
- composer install --no-interaction --prefer-source
|
||||
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
|
||||
- cd ../../phpBB3
|
||||
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
|
||||
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION
|
||||
|
||||
before_script:
|
||||
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
|
||||
|
||||
script:
|
||||
- sh -c "if [ '$SNIFF' != '0' ]; then travis/ext-sniff.sh $DB $TRAVIS_PHP_VERSION $EXTNAME; fi"
|
||||
- sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION; fi"
|
||||
- phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php
|
||||
- sh -c "if [ '$EPV' != '0' ] && [ '$TRAVIS_PHP_VERSION' = '5.3.3' ] && [ '$DB' = 'mysqli' ]; then phpBB/ext/$EXTNAME/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"
|
||||
23
README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# mChat-Extension
|
||||
phpBB 3.1.x mChat Extension with board3 portal edits
|
||||
|
||||
[](https://travis-ci.org/talonos/mChat-Extension)
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
1. Download the latest release.
|
||||
2. Unzip the downloaded release, and change the name of the folder to `mchat`.
|
||||
3. In the `ext` directory of your phpBB board, create a new directory named `dmzx` (if it does not already exist).
|
||||
4. Copy the `mchat` folder to `/ext/dmzx/` (if done correctly, you'll have the main extension class at (your forum root)/ext/dmzx/mchat/composer.json).
|
||||
5. Navigate in the ACP to `Customise -> Manage extensions`.
|
||||
6. Look for `mChat Extension` under the Disabled Extensions list, and click its `Enable` link.
|
||||
|
||||
## Uninstall
|
||||
|
||||
1. Navigate in the ACP to `Customise -> Extension Management -> Extensions`.
|
||||
2. Look for `mChat Extension` under the Enabled Extensions list, and click its `Disable` link.
|
||||
3. To permanently uninstall, click `Delete Data` and then delete the `/ext/dmzx/mchat` folder.
|
||||
|
||||
## License
|
||||
[GNU General Public License v2](http://opensource.org/licenses/GPL-2.0)
|
||||
28
acp/acp_mchat_info.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\acp;
|
||||
|
||||
class acp_mchat_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => '\dmzx\mchat\acp\acp_mchat_module',
|
||||
'title' => 'ACP_CAT_MCHAT',
|
||||
'modes' => array(
|
||||
'configuration' => array(
|
||||
'title' => 'ACP_MCHAT_CONFIG',
|
||||
'auth' => 'ext_dmzx/mchat && acl_a_mchat',
|
||||
'cat' => array('ACP_CAT_MCHAT')
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
45
acp/acp_mchat_module.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\acp;
|
||||
|
||||
class acp_mchat_module
|
||||
{
|
||||
public $u_action;
|
||||
|
||||
public function main($id, $mode)
|
||||
{
|
||||
global $phpbb_container, $request, $user;
|
||||
|
||||
// Get an instance of the admin controller
|
||||
$admin_controller = $phpbb_container->get('dmzx.mchat.admin.controller');
|
||||
|
||||
// Requests
|
||||
$action = $request->variable('action', '');
|
||||
if ($request->is_set_post('add'))
|
||||
{
|
||||
$action = 'add';
|
||||
}
|
||||
|
||||
// Add the ACP lang file
|
||||
$user->add_lang_ext('dmzx/mchat', 'info_acp_mchat');
|
||||
|
||||
// Load the display settings handle in the admin controller
|
||||
$admin_controller->display_options();
|
||||
|
||||
// Load a template from adm/style for our ACP page
|
||||
$this->tpl_name = 'acp_mchat';
|
||||
|
||||
// Set the page title for our ACP page
|
||||
$this->page_title = 'MCHAT_TITLE';
|
||||
|
||||
// Make the $u_action url available in the admin controller
|
||||
$admin_controller->set_page_url($this->u_action);
|
||||
}
|
||||
}
|
||||
245
adm/style/acp_mchat.html
Normal file
@@ -0,0 +1,245 @@
|
||||
<!-- INCLUDECSS css/mchatacp.css -->
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
<h1 class="ExtensionName"><!-- IF META_DISPLAY_NAME -->{META_DISPLAY_NAME}<!-- ENDIF --></h1>
|
||||
<!-- IF S_VERSIONCHECK && S_UP_TO_DATE -->
|
||||
<div class="description_bubble small_bubble" title="{UP_TO_DATE_MSG}">
|
||||
<span class="description_name">{L_VERSION}</span>
|
||||
<span class="description_value description_value_ok" id="meta_version">{META_VERSION}</span>
|
||||
</div>
|
||||
<!-- ELSE IF S_VERSIONCHECK && not S_UP_TO_DATE -->
|
||||
<div class="description_bubble small_bubble" title="{UP_TO_DATE_MSG}">
|
||||
<span class="description_name">{L_VERSION}</span>
|
||||
<span class="description_value description_value_old" id="meta_version">{META_VERSION}</span>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<div class="description_bubble small_bubble">
|
||||
<span class="description_name">{L_VERSION}</span>
|
||||
<span class="description_value" id="meta_version">{META_VERSION}</span>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_VERSIONCHECK && not S_UP_TO_DATE -->
|
||||
<!-- BEGIN updates_available -->
|
||||
<fieldset>
|
||||
<span class="requirements_title">{L_LATEST_VERSION}</span>
|
||||
<div class="extension_latest_version_wrapper">
|
||||
<strong class="extension_latest_version">{updates_available.current}</strong>
|
||||
<!-- IF updates_available.download-->
|
||||
<a href="{updates_available.download}" class="extension_author_link" title="{L_DOWNLOAD_LATEST}">{L_DOWNLOAD} {META_NAME} {LATEST_VERSION}</i></a>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF updates_available.announcement -->
|
||||
<a href="{updates_available.announcement}" class="extension_author_link" title="{L_ANNOUNCEMENT_TOPIC}">{L_RELEASE_ANNOUNCEMENT}</i></a>
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
</fieldset>
|
||||
<!-- END updates_available -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ERROR -->
|
||||
<div class="errorbox"><h3>{L_WARNING}</h3>
|
||||
<p>{MCHAT_ERROR}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="acp_mchat" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_MAIN}</legend>
|
||||
<dl>
|
||||
<dt><label for="mchat_message_top">{L_MCHAT_MESSAGE_TOP}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_MESSAGE_TOP_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_message_top" value="1"<!-- IF MCHAT_MESSAGE_TOP --> id="mchat_message_top" checked="checked"<!-- ENDIF --> /> {L_MCHAT_TOP}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_message_top" value="0"<!-- IF not MCHAT_MESSAGE_TOP --> id="mchat_message_top" checked="checked"<!-- ENDIF --> /> {L_MCHAT_BOTTOM}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_new_posts_topic">{L_MCHAT_NEW_POSTS_TOPIC}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_NEW_POSTS_TOPIC_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_new_posts_topic" value="1"<!-- IF MCHAT_NEW_POSTS_TOPIC --> id="mchat_new_posts_topic" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_new_posts_topic" value="0"<!-- IF not MCHAT_NEW_POSTS_TOPIC --> id="mchat_new_posts_topic" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_new_posts_reply">{L_MCHAT_NEW_POSTS_REPLY}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_NEW_POSTS_REPLY_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_new_posts_reply" value="1"<!-- IF MCHAT_NEW_POSTS_REPLY --> id="mchat_new_posts_reply" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_new_posts_reply" value="0"<!-- IF not MCHAT_NEW_POSTS_REPLY --> id="mchat_new_posts_reply" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_new_posts_edit">{L_MCHAT_NEW_POSTS_EDIT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_NEW_POSTS_EDIT_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_new_posts_edit" value="1"<!-- IF MCHAT_NEW_POSTS_EDIT --> id="mchat_new_posts_edit" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_new_posts_edit" value="0"<!-- IF not MCHAT_NEW_POSTS_EDIT --> id="mchat_new_posts_edit" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_new_posts_quote">{L_MCHAT_NEW_POSTS_QUOTE}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_NEW_POSTS_QUOTE_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_new_posts_quote" value="1"<!-- IF MCHAT_NEW_POSTS_QUOTE --> id="mchat_new_posts_quote" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_new_posts_quote" value="0"<!-- IF not MCHAT_NEW_POSTS_QUOTE --> id="mchat_new_posts_quote" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_static_message">{L_MCHAT_STATIC_MESSAGE}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_STATIC_MESSAGE_EXPLAIN}</span></dt>
|
||||
<dd><textarea name="mchat_static_message" id="mchat_static_message" rows="3" cols="40">{MCHAT_STATIC_MESSAGE}</textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_refresh">{L_MCHAT_REFRESH}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_REFRESH_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_refresh" id="mchat_refresh" size="10" value="{MCHAT_REFRESH}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_timeout">{L_MCHAT_USER_TIMEOUT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_TIMEOUT_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_timeout" id="mchat_timeout" size="10" maxlength="4" value="{MCHAT_TIMEOUT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_on_index">{L_MCHAT_ON_INDEX}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_ON_INDEX_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_on_index" value="1"<!-- IF MCHAT_ON_INDEX --> id="mchat_on_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_on_index" value="0"<!-- IF not MCHAT_ON_INDEX --> id="mchat_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_on_portal">{L_MCHAT_ON_PORTAL}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_ON_PORTAL_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_on_portal" value="1"<!-- IF MCHAT_ON_PORTAL --> id="mchat_on_portal" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_on_portal" value="0"<!-- IF not MCHAT_ON_PORTAL --> id="mchat_on_portal" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_index_height">{L_MCHAT_INDEX_HEIGHT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_INDEX_HEIGHT_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_index_height" id="mchat_index_height" size="10" maxlength="4" value="{MCHAT_INDEX_HEIGHT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_message_num">{L_MCHAT_MESSAGE_NUM}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_MESSAGE_NUM_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_message_num" id="mchat_message_num" size="10" maxlength="4" value="{MCHAT_MESSAGE_NUM}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_location">{L_MCHAT_LOCATION}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_LOCATION_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_location" value="1"<!-- IF MCHAT_LOCATION --> id="mchat_location" checked="checked"<!-- ENDIF --> /> {L_MCHAT_TOP_OF_FORUM}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_location" value="0"<!-- IF not MCHAT_LOCATION --> id="mchat_location" checked="checked"<!-- ENDIF --> /> {L_MCHAT_BOTTOM_OF_FORUM}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_custom_page">{L_MCHAT_CUSTOM_PAGE}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_CUSTOM_PAGE_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_custom_page" value="1"<!-- IF MCHAT_CUSTOM_PAGE --> id="mchat_custom_page" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_custom_page" value="0"<!-- IF not MCHAT_CUSTOM_PAGE --> id="mchat_custom_page" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_custom_height">{L_MCHAT_CUSTOM_HEIGHT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_CUSTOM_HEIGHT_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_custom_height" id="mchat_custom_height" size="10" maxlength="4" value="{MCHAT_CUSTOM_HEIGHT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_prune">{L_MCHAT_PRUNE}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_PRUNE_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_prune" value="1"<!-- IF MCHAT_PRUNE --> id="mchat_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_prune" value="0"<!-- IF not MCHAT_PRUNE --> id="mchat_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_prune_num">{L_MCHAT_PRUNE_NUM}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_PRUNE_NUM_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_prune_num" size="10" id="mchat_prune_num" value="{MCHAT_PRUNE_NUM}" /></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_MESSAGES}</legend>
|
||||
<dl>
|
||||
<dt><label for="mchat_flood_time">{L_MCHAT_FLOOD_TIME}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_FLOOD_TIME_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_flood_time" id="mchat_flood_time" size="10" value="{MCHAT_FLOOD_TIME}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_message_limit">{L_MCHAT_MESSAGE_LIMIT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_MESSAGE_LIMIT_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_message_limit" id="mchat_message_limit" size="10" value="{MCHAT_MESSAGE_LIMIT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_archive_limit">{L_MCHAT_ARCHIVE_LIMIT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_ARCHIVE_LIMIT_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_archive_limit" id="mchat_archive_limit" size="10" value="{MCHAT_ARCHIVE_LIMIT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_live_updates">{L_MCHAT_LIVE_UPDATES}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_LIVE_UPDATES_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_live_updates" value="1"<!-- IF MCHAT_LIVE_UPDATES --> id="mchat_live_updates" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_live_updates" value="0"<!-- IF not MCHAT_LIVE_UPDATES --> id="mchat_live_updates" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_avatars">{L_MCHAT_AVATARS}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_AVATARS_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_avatars" value="1"<!-- IF MCHAT_AVATARS --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_avatars" value="0"<!-- IF not MCHAT_AVATARS --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_pause_on_input">{L_MCHAT_PAUSE_ON_INPUT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_PAUSE_ON_INPUT_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_pause_on_input" value="1"<!-- IF MCHAT_PAUSE_ON_INPUT --> id="mchat_pause_on_input" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_pause_on_input" value="0"<!-- IF not MCHAT_PAUSE_ON_INPUT --> id="mchat_pause_on_input" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_override_min_post_chars">{L_MCHAT_OVERRIDE_MIN_POST_CHARS}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_override_min_post_chars" value="1"<!-- IF MCHAT_OVERRIDE_MIN_POST_CHARS --> id="mchat_override_min_post_chars" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_override_min_post_chars" value="0"<!-- IF not MCHAT_OVERRIDE_MIN_POST_CHARS --> id="mchat_override_min_post_chars" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_override_smilie_limit">{L_MCHAT_OVERRIDE_SMILIE_LIMIT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_override_smilie_limit" value="1"<!-- IF MCHAT_OVERRIDE_SMILIE_LIMIT --> id="mchat_override_smilie_limit" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_override_smilie_limit" value="0"<!-- IF not MCHAT_OVERRIDE_SMILIE_LIMIT --> id="mchat_override_smilie_limit" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_edit_delete_limit">{L_MCHAT_EDIT_DELETE_LIMIT}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_EDIT_DELETE_LIMIT_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_edit_delete_limit" id="mchat_edit_delete_limit" size="10" value="{MCHAT_EDIT_DELETE_LIMIT}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_max_message_lngth">{L_MCHAT_MAX_MESSAGE_LENGTH}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_max_message_lngth" id="mchat_max_message_lngth" size="10" value="{MCHAT_MAX_MESSAGE_LNGTH}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_dateoptions">{L_MCHAT_DATE_FORMAT}{L_COLON}</label><br /><span>{L_MCHAT_DATE_FORMAT_EXPLAIN}</span></dt>
|
||||
<dd>
|
||||
<select name="mchat_dateoptions" id="mchat_dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('mchat_date').value = default_dateformat; } else { document.getElementById('mchat_date').value = this.value; }">
|
||||
{S_MCHAT_DATEFORMAT_OPTIONS}
|
||||
</select>
|
||||
</dd>
|
||||
<dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="mchat_date" id="mchat_date" value="{MCHAT_DATE}" maxlength="30" /></div></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_bbcode_disallowed">{L_MCHAT_BBCODES_DISALLOWED}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_BBCODES_DISALLOWED_EXPLAIN}</span></dt>
|
||||
<dd><textarea name="mchat_bbcode_disallowed" id="mchat_bbcode_disallowed" rows="3" cols="40">{MCHAT_BBCODE_DISALLOWED}</textarea></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_rules">{L_ACP_MCHAT_RULES}{L_COLON}</label><br />
|
||||
<span>{L_ACP_MCHAT_RULES_EXPLAIN}</span></dt>
|
||||
<dd><textarea name="mchat_rules" id="mchat_rules" rows="8" cols="40">{MCHAT_RULES}</textarea></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{L_MCHAT_STATS}</legend>
|
||||
<dl>
|
||||
<dt><label for="mchat_whois">{L_MCHAT_WHOIS}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_WHOIS_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_whois" value="1"<!-- IF MCHAT_WHOIS --> id="mchat_whois" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_whois" value="0"<!-- IF not MCHAT_WHOIS --> id="mchat_whois" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_stats_index">{L_MCHAT_STATS_INDEX}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_STATS_INDEX_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="mchat_stats_index" value="1"<!-- IF MCHAT_STATS_INDEX --> id="mchat_stats_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" name="mchat_stats_index" value="0"<!-- IF not MCHAT_STATS_INDEX --> id="mchat_stats_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_whois">{L_MCHAT_WHOIS_REFRESH}{L_COLON}</label><br />
|
||||
<span>{L_MCHAT_WHOIS_REFRESH_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="mchat_whois_refresh" id="mchat_whois" size="10" value="{MCHAT_WHOIS_REFRESH}" /></dd>
|
||||
</dl>
|
||||
|
||||
</fieldset>
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
{S_FORM_TOKEN}
|
||||
</p>
|
||||
</form>
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
51
adm/style/acp_users_mchat.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<form id="users_mchat" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_UCP_PROFILE_MCHAT}</legend>
|
||||
<dl>
|
||||
<dt><label for="mchat_index">{L_DISPLAY_MCHAT}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_index" value="1"<!-- IF DISPLAY_MCHAT --> id="mchat_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_index" value="0"<!-- IF not DISPLAY_MCHAT --> id="mchat_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_sound">{L_SOUND_MCHAT}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_sound" value="1"<!-- IF SOUND_MCHAT --> id="mchat_sound" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_sound" value="0"<!-- IF not SOUND_MCHAT --> id="mchat_sound" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_statsindex">{L_DISPLAY_STATS_INDEX}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="1"<!-- IF STATS_MCHAT --> id="mchat_statsindex" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="0"<!-- IF not STATS_MCHAT --> id="mchat_statsindex" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_topics">{L_DISPLAY_NEW_TOPICS}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_topics" value="1"<!-- IF TOPICS_MCHAT --> id="mchat_topics" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_topics" value="0"<!-- IF not TOPICS_MCHAT --> id="mchat_topics" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_avatars">{L_DISPLAY_AVATARS}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="1"<!-- IF AVATARS_MCHAT --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="0"<!-- IF not AVATARS_MCHAT --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="mchat_input_type">{L_CHAT_AREA}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_input_area" value="1"<!-- IF INPUT_AREA --> id="mchat_input_type" checked="checked"<!-- ENDIF --> /> {L_INPUT_AREA}</label>
|
||||
<label><input type="radio" name="user_mchat_input_area" value="0"<!-- IF not INPUT_AREA --> id=""mchat_input_type" checked="checked"<!-- ENDIF --> /> {L_TEXT_AREA}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
103
adm/style/css/mchatacp.css
Normal file
@@ -0,0 +1,103 @@
|
||||
/* Extension details */
|
||||
.requirements_title {
|
||||
display: inline-block;
|
||||
color: #115098;
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
margin-top: 8px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
.description_bubble {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
border-radius: 15px;
|
||||
border: 1px solid #D7D7D7;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.description_name {
|
||||
display: inline-block;
|
||||
padding: 7px 15px;
|
||||
}
|
||||
.description_value {
|
||||
display: inline-block;
|
||||
padding: 6px 15px;
|
||||
border-left: 1px solid #D7D7D7;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
.description_value_ok {
|
||||
display: inline-block;
|
||||
padding: 6px 15px;
|
||||
border: 0;
|
||||
border-radius: 15px;
|
||||
color: #edfbf7;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
background: #228822;
|
||||
background: -moz-linear-gradient(top, #92d992 0%, #228822 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #92d992), color-stop(100%, #228822));
|
||||
background: -webkit-linear-gradient(top, #92d992 0%, #228822 100%);
|
||||
background: -o-linear-gradient(top, #92d992 0%, #228822 100%);
|
||||
background: -ms-linear-gradient(top, #92d992 0%, #228822 100%);
|
||||
background: linear-gradient(to bottom, #92d992 0%, #228822 100%);
|
||||
}
|
||||
.description_value_old {
|
||||
display: inline-block;
|
||||
padding: 6px 15px;
|
||||
border: 0;
|
||||
border-radius: 15px;
|
||||
color: #edfbf7;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
background: #BC2A4D;
|
||||
background: -moz-linear-gradient(top, #e08389 0%, #BC2A4D 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e08389), color-stop(100%, #BC2A4D));
|
||||
background: -webkit-linear-gradient(top, #e08389 0%, #BC2A4D 100%);
|
||||
background: -o-linear-gradient(top, #e08389 0%, #BC2A4D 100%);
|
||||
background: -ms-linear-gradient(top, #e08389 0%, #BC2A4D 100%);
|
||||
background: linear-gradient(to bottom, #e08389 0%, #BC2A4D 100%);
|
||||
}
|
||||
fieldset {
|
||||
border-radius: 15px;
|
||||
}
|
||||
h1.ExtensionName {
|
||||
color: #115098;
|
||||
}
|
||||
.big_bubble .description_name {
|
||||
width: 90px;
|
||||
}
|
||||
.big_bubble .description_value {
|
||||
width: 210px;
|
||||
}
|
||||
.small_bubble .description_name {
|
||||
width: 70px;
|
||||
}
|
||||
.small_bubble .description_value {
|
||||
width: 80px;
|
||||
}
|
||||
.extension_author_link {
|
||||
display: inline-block;
|
||||
padding: 6px 15px;
|
||||
border-radius: 15px;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
border: 1px solid #D7D7D7;
|
||||
}
|
||||
.extension_author_link:hover {
|
||||
background-color: #115098;
|
||||
color: #edfbf7;
|
||||
border: 1px solid #115098;
|
||||
}
|
||||
.extension_latest_version_wrapper {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
border-radius: 15px;
|
||||
margin-left: 5px;
|
||||
text-align: center;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
.extension_latest_version {
|
||||
display: inline-block;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
101
b3pmchat.php
Normal file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package Board3 Portal v2.1+ - mchat on portal
|
||||
* @copyright (c) Board3 Group ( www.board3.de )
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @mchat on portal by Talonos @ http://pretereo-stormrage.co.uk
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat;
|
||||
|
||||
/**
|
||||
* @package mchat
|
||||
*/
|
||||
class b3pmchat extends \board3\portal\modules\module_base
|
||||
{
|
||||
/**
|
||||
* Allowed columns: Just sum up your options (Exp: left + right = 10)
|
||||
* top 1
|
||||
* left 2
|
||||
* center 4
|
||||
* right 8
|
||||
* bottom 16
|
||||
*/
|
||||
public $columns = 21;
|
||||
|
||||
/**
|
||||
* Default guildox
|
||||
*/
|
||||
public $name = 'PORTAL_MCHAT_TITLE';
|
||||
|
||||
/**
|
||||
* Default module-image:
|
||||
* file must be in "{T_THEME_PATH}/images/portal/"
|
||||
*/
|
||||
public $image_src = '';
|
||||
|
||||
/**
|
||||
* module-language file
|
||||
* file must be in "language/{$user->lang}/mods/portal/"
|
||||
*/
|
||||
public $language = array(
|
||||
'vendor' => 'dmzx/mchat',
|
||||
'file' => 'common',
|
||||
);
|
||||
|
||||
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/**
|
||||
* Constructor for clock module
|
||||
*
|
||||
* @param \phpbb\config\config $config phpBB config
|
||||
* @param \phpbb\template\template $template phpBB template
|
||||
*/
|
||||
public function __construct($config, $template)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->template = $template;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function get_template_center($module_id)
|
||||
{
|
||||
|
||||
$this->template->assign_vars(array(
|
||||
'S_DISPLAY_MCHAT_PORTAL_PLACEHOLDER' => ($this->config['board3_mchat_' . $module_id]) ? true : false,
|
||||
));
|
||||
return '@dmzx_mchat/mchat_portal.html';
|
||||
}
|
||||
|
||||
public function get_template_acp($module_id)
|
||||
{
|
||||
return array(
|
||||
'title' => 'PORTAL_MCHAT_TITLE',
|
||||
'vars' => array(
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* API functions
|
||||
*/
|
||||
public function install($module_id)
|
||||
{
|
||||
$this->config->set('board3_mchat_' . $module_id, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall($module_id, $db)
|
||||
{
|
||||
|
||||
$this->config->delete('board3_mchat_' . $module_id);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
45
composer.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "dmzx/mchat",
|
||||
"type": "phpbb-extension",
|
||||
"description": "mChat Extension for phpbb 3.1.x",
|
||||
"homepage": "http://www.dmzx-web.net",
|
||||
"version": "0.3.4",
|
||||
"time": "2015-03-10",
|
||||
"keywords": ["phpbb", "extension", "mchat"],
|
||||
"license": "GPL-2.0",
|
||||
"authors": [
|
||||
{
|
||||
"name": "dmzx",
|
||||
"homepage": "http://www.dmzx-web.net",
|
||||
"email": "info@dmzx-web.net",
|
||||
"role": "Extension Developer"
|
||||
},
|
||||
{
|
||||
"name": "kasimi",
|
||||
"homepage": "https://www.phpbb.com/community/memberlist.php?mode=viewprofile&u=1330603",
|
||||
"role": "Extension Co-Developer"
|
||||
},
|
||||
{
|
||||
"name": "Rich McGirr",
|
||||
"homepage": "http://rmcgirr83.org",
|
||||
"role": "Author"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpbb/epv": "dev-master"
|
||||
},
|
||||
"extra": {
|
||||
"display-name": "mChat Extension",
|
||||
"soft-require": {
|
||||
"phpbb/phpbb": "3.1.*"
|
||||
},
|
||||
"version-check": {
|
||||
"host": "www.dmzx-web.net",
|
||||
"directory": "/versions",
|
||||
"filename": "mchat_version.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
13
config/routing.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
dmzx_mchat_controller:
|
||||
path: /mchat
|
||||
defaults: { _controller: dmzx.mchat.main.controller:page, page: custom }
|
||||
dmzx_mchat_page_controller:
|
||||
path: /mchat/{page}
|
||||
defaults: { _controller: dmzx.mchat.main.controller:page }
|
||||
requirements:
|
||||
action: 'archive|rules|whois'
|
||||
dmzx_mchat_action_controller:
|
||||
path: /mchat-{action}
|
||||
defaults: { _controller: dmzx.mchat.main.controller:action }
|
||||
requirements:
|
||||
action: 'add|edit|del|clean|refresh|whois'
|
||||
65
config/services.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
imports:
|
||||
- { resource: tables.yml }
|
||||
|
||||
services:
|
||||
dmzx.mchat.admin.controller:
|
||||
class: dmzx\mchat\controller\admin_controller
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@template'
|
||||
- '@log'
|
||||
- '@user'
|
||||
- '@cache'
|
||||
- '@request'
|
||||
- '@ext.manager'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
dmzx.mchat.main.controller:
|
||||
class: dmzx\mchat\controller\main_controller
|
||||
arguments:
|
||||
- '@dmzx.mchat.core'
|
||||
- '@request'
|
||||
dmzx.mchat.core:
|
||||
class: dmzx\mchat\core\mchat
|
||||
arguments:
|
||||
- '@dmzx.mchat.functions_mchat'
|
||||
- '@config'
|
||||
- '@controller.helper'
|
||||
- '@template'
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@pagination'
|
||||
- '@request'
|
||||
- '@dispatcher'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
dmzx.mchat.functions_mchat:
|
||||
class: dmzx\mchat\core\functions_mchat
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@log'
|
||||
- '@dbal.conn'
|
||||
- '@cache.driver'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '%dmzx.mchat.table.mchat%'
|
||||
- '%dmzx.mchat.table.mchat_sessions%'
|
||||
dmzx.mchat.listener:
|
||||
class: dmzx\mchat\event\listener
|
||||
arguments:
|
||||
- '@dmzx.mchat.functions_mchat'
|
||||
- '@dmzx.mchat.core'
|
||||
- '@controller.helper'
|
||||
- '@user'
|
||||
- '%core.php_ext%'
|
||||
tags:
|
||||
- { name: event.listener }
|
||||
dmzx.mchat.b3pmchat:
|
||||
class: dmzx\mchat\b3pmchat
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@template'
|
||||
tags:
|
||||
- { name: board3.portal.module }
|
||||
3
config/tables.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
parameters:
|
||||
dmzx.mchat.table.mchat: %core.table_prefix%mchat
|
||||
dmzx.mchat.table.mchat_sessions: %core.table_prefix%mchat_sessions
|
||||
262
controller/admin_controller.php
Normal file
@@ -0,0 +1,262 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\controller;
|
||||
|
||||
class admin_controller
|
||||
{
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbb\log\log_interface */
|
||||
protected $log;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var \phpbb\cache\service */
|
||||
protected $cache;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbb\extension\manager */
|
||||
protected $phpbb_extension_manager;
|
||||
|
||||
/** @var string */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
/** @var string */
|
||||
public $u_action;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\template\template $template
|
||||
* @param \phpbb\log\log_interface $log
|
||||
* @param \phpbb\user $user
|
||||
* @param \phpbb\cache\service $cache
|
||||
* @param \phpbb\request\request $request
|
||||
* @param \phpbb\extension\manager $phpbb_extension_manager
|
||||
* @param string $phpbb_root_path
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(\phpbb\config\config $config, \phpbb\template\template $template, \phpbb\log\log_interface $log, \phpbb\user $user, \phpbb\cache\service $cache, \phpbb\request\request $request, \phpbb\extension\manager $phpbb_extension_manager, $phpbb_root_path, $php_ext)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->template = $template;
|
||||
$this->log = $log;
|
||||
$this->user = $user;
|
||||
$this->cache = $cache;
|
||||
$this->request = $request;
|
||||
$this->phpbb_extension_manager = $phpbb_extension_manager;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the options a user can configure for this extension
|
||||
*
|
||||
* @return null
|
||||
* @access public
|
||||
*/
|
||||
public function display_options()
|
||||
{
|
||||
add_form_key('acp_mchat');
|
||||
|
||||
$mchat_config = array(
|
||||
'mchat_archive_limit' => array('default' => 25, 'validation' => array('num', false, 25, 50)),
|
||||
'mchat_avatars' => array('default' => 1, 'validation' => array()),
|
||||
'mchat_bbcode_disallowed' => array('default' => '', 'validation' => array('string', false, 0, 255)),
|
||||
'mchat_custom_height' => array('default' => 350, 'validation' => array('num', false, 50, 1000)),
|
||||
'mchat_custom_page' => array('default' => 1, 'validation' => array()),
|
||||
'mchat_date' => array('default' => 'D M d, Y g:i a', 'validation' => array('string', false, 0, 255)),
|
||||
'mchat_edit_delete_limit' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_flood_time' => array('default' => 0, 'validation' => array('num', false, 0, 30)),
|
||||
'mchat_index_height' => array('default' => 250, 'validation' => array('num', false, 50, 1000)),
|
||||
'mchat_live_updates' => array('default' => 1, 'validation' => array()),
|
||||
'mchat_location' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_max_message_lngth' => array('default' => 500, 'validation' => array('num', false, 0, 500)),
|
||||
'mchat_message_limit' => array('default' => 10, 'validation' => array('num', false, 10, 30)),
|
||||
'mchat_message_num' => array('default' => 10, 'validation' => array('num', false, 10, 50)),
|
||||
'mchat_message_top' => array('default' => 1, 'validation' => array()),
|
||||
'mchat_new_posts_edit' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_new_posts_quote' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_new_posts_reply' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_new_posts_topic' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_on_index' => array('default' => 1, 'validation' => array()),
|
||||
'mchat_on_portal' => array('default' => 1, 'validation' => array()),
|
||||
'mchat_override_min_post_chars' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_override_smilie_limit' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_pause_on_input' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_prune' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_prune_num' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_refresh' => array('default' => 10, 'validation' => array('num', false, 5, 60)),
|
||||
'mchat_rules' => array('default' => '', 'validation' => array('string', false, 0, 255)),
|
||||
'mchat_static_message' => array('default' => '', 'validation' => array('string', false, 0, 255)),
|
||||
'mchat_stats_index' => array('default' => 0, 'validation' => array()),
|
||||
'mchat_timeout' => array('default' => 0, 'validation' => array('num', false, 0, (int) $this->config['session_length'])),
|
||||
'mchat_whois' => array('default' => 1, 'validation' => array()),
|
||||
'mchat_whois_refresh' => array('default' => 60, 'validation' => array('num', false, 30, 300)),
|
||||
);
|
||||
|
||||
if ($this->request->is_set_post('submit'))
|
||||
{
|
||||
if (!function_exists('validate_data'))
|
||||
{
|
||||
include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
|
||||
}
|
||||
|
||||
$mchat_new_config = array();
|
||||
$validation = array();
|
||||
foreach ($mchat_config as $key => $value)
|
||||
{
|
||||
$mchat_new_config[$key] = $this->request->variable($key, $value['default'], is_string($value['default']));
|
||||
if (!empty($value['validation']))
|
||||
{
|
||||
$validation[$key] = $value['validation'];
|
||||
}
|
||||
}
|
||||
|
||||
$error = validate_data($mchat_new_config, $validation);
|
||||
|
||||
if (!check_form_key('acp_mchat'))
|
||||
{
|
||||
$error[] = 'FORM_INVALID';
|
||||
}
|
||||
|
||||
// Replace "error" strings with their real, localised form
|
||||
// The /e modifier is deprecated since PHP 5.5.0
|
||||
//$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$this->user->lang('\\1'))) ? \$this->user->lang('\\1') : '\\1'", $error);
|
||||
foreach ($error as $i => $err)
|
||||
{
|
||||
$lang = $this->user->lang($err);
|
||||
if (!empty($lang))
|
||||
{
|
||||
$error[$i] = $lang;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($error))
|
||||
{
|
||||
// Set the options the user configured
|
||||
foreach ($mchat_new_config as $config_name => $config_value)
|
||||
{
|
||||
$this->config->set($config_name, $config_value);
|
||||
}
|
||||
|
||||
// Add an entry into the log table
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_CONFIG_UPDATE');
|
||||
|
||||
trigger_error($this->user->lang('MCHAT_CONFIG_SAVED') . adm_back_link($this->u_action));
|
||||
}
|
||||
}
|
||||
|
||||
$dateformat_options = '';
|
||||
foreach ($this->user->lang['dateformats'] as $format => $null)
|
||||
{
|
||||
$dateformat_options .= '<option value="' . $format . '"' . (($format == $this->config['mchat_date']) ? ' selected="selected"' : '') . '>';
|
||||
$dateformat_options .= $this->user->format_date(time(), $format, false) . ((strpos($format, '|') !== false) ? $this->user->lang('VARIANT_DATE_SEPARATOR') . $this->user->format_date(time(), $format, true) : '');
|
||||
$dateformat_options .= '</option>';
|
||||
}
|
||||
|
||||
$s_custom = false;
|
||||
$dateformat_options .= '<option value="custom"';
|
||||
if (!isset($this->user->lang['dateformats'][$this->config['mchat_date']]))
|
||||
{
|
||||
$dateformat_options .= ' selected="selected"';
|
||||
$s_custom = true;
|
||||
}
|
||||
$dateformat_options .= '>' . $this->user->lang('MCHAT_CUSTOM_DATEFORMAT') . '</option>';
|
||||
|
||||
$template_variables = array();
|
||||
foreach ($mchat_config as $key => $value)
|
||||
{
|
||||
$template_variables[strtoupper($key)] = $this->config[$key];
|
||||
}
|
||||
|
||||
$this->template->assign_vars(array_merge($template_variables, array(
|
||||
'MCHAT_ERROR' => !empty($error) ? implode('<br />', $error) : '',
|
||||
'MCHAT_VERSION' => $this->config['mchat_version'],
|
||||
'L_MCHAT_BBCODES_DISALLOWED_EXPLAIN' => sprintf($this->user->lang('MCHAT_BBCODES_DISALLOWED_EXPLAIN'), '<a href="' . append_sid("{$this->phpbb_root_path}adm/index.$this->php_ext", 'i=bbcodes', true, $this->user->session_id) . '">', '</a>'),
|
||||
'L_MCHAT_TIMEOUT_EXPLAIN' => sprintf($this->user->lang('MCHAT_USER_TIMEOUT_EXPLAIN'),'<a href="' . append_sid("{$this->phpbb_root_path}adm/index.$this->php_ext", 'i=board&mode=load', true, $this->user->session_id) . '">', '</a>', $this->config['session_length']),
|
||||
'S_MCHAT_DATEFORMAT_OPTIONS' => $dateformat_options,
|
||||
'S_CUSTOM_DATEFORMAT' => $s_custom,
|
||||
'U_ACTION' => $this->u_action,
|
||||
)));
|
||||
|
||||
// Version check
|
||||
$this->user->add_lang(array('install', 'acp/extensions', 'migrator'));
|
||||
$ext_name = 'dmzx/mchat';
|
||||
$md_manager = new \phpbb\extension\metadata_manager($ext_name, $this->config, $this->phpbb_extension_manager, $this->template, $this->user, $this->phpbb_root_path);
|
||||
try
|
||||
{
|
||||
$this->metadata = $md_manager->get_metadata('all');
|
||||
}
|
||||
catch(\phpbb\extension\exception $e)
|
||||
{
|
||||
trigger_error($e, E_USER_WARNING);
|
||||
}
|
||||
$md_manager->output_template_data();
|
||||
try
|
||||
{
|
||||
$updates_available = $this->version_check($md_manager, $this->request->variable('versioncheck_force', false));
|
||||
$this->template->assign_vars(array(
|
||||
'S_UP_TO_DATE' => empty($updates_available),
|
||||
'S_VERSIONCHECK' => true,
|
||||
'UP_TO_DATE_MSG' => $this->user->lang(empty($updates_available) ? 'UP_TO_DATE' : 'NOT_UP_TO_DATE', $md_manager->get_metadata('display-name')),
|
||||
));
|
||||
foreach ($updates_available as $branch => $version_data)
|
||||
{
|
||||
$this->template->assign_block_vars('updates_available', $version_data);
|
||||
}
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
{
|
||||
$this->template->assign_vars(array(
|
||||
'S_VERSIONCHECK_STATUS' => $e->getCode(),
|
||||
'VERSIONCHECK_FAIL_REASON' => $e->getMessage() !== $this->user->lang('VERSIONCHECK_FAIL') ? $e->getMessage() : '',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
protected function version_check(\phpbb\extension\metadata_manager $md_manager, $force_update = false, $force_cache = false)
|
||||
{
|
||||
$meta = $md_manager->get_metadata('all');
|
||||
if (!isset($meta['extra']['version-check']))
|
||||
{
|
||||
throw new \RuntimeException($this->user->lang('NO_VERSIONCHECK'), 1);
|
||||
}
|
||||
$version_check = $meta['extra']['version-check'];
|
||||
$version_helper = new \phpbb\version_helper($this->cache, $this->config, new \phpbb\file_downloader(), $this->user);
|
||||
$version_helper->set_current_version($meta['version']);
|
||||
$version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename']);
|
||||
$version_helper->force_stability($this->config['extension_force_unstable'] ? 'unstable' : null);
|
||||
return $updates = $version_helper->get_suggested_updates($force_update, $force_cache);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set page url
|
||||
*
|
||||
* @param string $u_action Custom form action
|
||||
* @return null
|
||||
* @access public
|
||||
*/
|
||||
public function set_page_url($u_action)
|
||||
{
|
||||
$this->u_action = $u_action;
|
||||
}
|
||||
}
|
||||
63
controller/main_controller.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\controller;
|
||||
|
||||
use \Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
class main_controller
|
||||
{
|
||||
/** @var \dmzx\mchat\core\mchat */
|
||||
protected $mchat;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \dmzx\mchat\core\mchat $mchat
|
||||
* @param \phpbb\request\request $request
|
||||
*/
|
||||
public function __construct(\dmzx\mchat\core\mchat $mchat, \phpbb\request\request $request)
|
||||
{
|
||||
$this->mchat = $mchat;
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
/**
|
||||
* Controller for mChat
|
||||
*
|
||||
* @param $page The page to render, one of custom|archive|rules|whois
|
||||
* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
|
||||
*/
|
||||
public function page($page)
|
||||
{
|
||||
return call_user_func(array($this->mchat, 'page_' . $page));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Controller for mChat actions called with Ajax requests
|
||||
*
|
||||
* @param $action The action to perform, one of add|edit|del|clean|refresh|whois
|
||||
* @return A Symfony JsonResponse object
|
||||
*/
|
||||
public function action($action)
|
||||
{
|
||||
if (!$this->request->is_ajax())
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'NO_AUTH_OPERATION');
|
||||
}
|
||||
|
||||
$data = call_user_func(array($this->mchat, 'action_' . $action));
|
||||
|
||||
return new JsonResponse($data);
|
||||
}
|
||||
}
|
||||
556
core/functions_mchat.php
Normal file
@@ -0,0 +1,556 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\core;
|
||||
|
||||
class functions_mchat
|
||||
{
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var \phpbb\auth\auth */
|
||||
protected $auth;
|
||||
|
||||
/** @var \phpbb\log\log */
|
||||
protected $log;
|
||||
|
||||
/** @var \phpbb\db\driver\driver_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var \phpbb\cache\driver\driver_interface */
|
||||
protected $cache;
|
||||
|
||||
/** @var string */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
/** @var string */
|
||||
protected $mchat_table;
|
||||
|
||||
/** @var string */
|
||||
protected $mchat_sessions_table;
|
||||
|
||||
/** @var array */
|
||||
protected $foes = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\user $user
|
||||
* @param \phpbb\auth\auth $auth
|
||||
* @param \phpbb\log\log_interface $log
|
||||
* @param \phpbb\db\driver\driver_interface $db
|
||||
* @param \phpbb\cache\driver\driver_interface $cache
|
||||
* @param string $phpbb_root_path
|
||||
* @param string $php_ext
|
||||
* @param string $mchat_table
|
||||
* @param string $mchat_sessions_table
|
||||
*/
|
||||
function __construct(\phpbb\config\config $config, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\log\log_interface $log, \phpbb\db\driver\driver_interface $db, \phpbb\cache\driver\driver_interface $cache, $phpbb_root_path, $php_ext, $mchat_table, $mchat_sessions_table)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->user = $user;
|
||||
$this->auth = $auth;
|
||||
$this->log = $log;
|
||||
$this->db = $db;
|
||||
$this->cache = $cache;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
$this->mchat_table = $mchat_table;
|
||||
$this->mchat_sessions_table = $mchat_sessions_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a number of seconds to a string in the format 'x hours y minutes z seconds'
|
||||
*/
|
||||
protected function mchat_format_seconds($time)
|
||||
{
|
||||
$times = array();
|
||||
|
||||
$hours = floor($time / 3600);
|
||||
if ($hours)
|
||||
{
|
||||
$time -= $hours * 3600;
|
||||
$times[] = $hours . ' ' . $this->user->lang($hours > 1 ? 'MCHAT_HOURS' : 'MCHAT_HOUR');
|
||||
}
|
||||
|
||||
$minutes = floor($time / 60);
|
||||
if ($minutes)
|
||||
{
|
||||
$time -= $minutes * 60;
|
||||
$times[] = $minutes . ' ' . $this->user->lang($minutes > 1 ? 'MCHAT_MINUTES' : 'MCHAT_MINUTE');
|
||||
}
|
||||
|
||||
$seconds = ceil($time);
|
||||
if ($seconds)
|
||||
{
|
||||
$times[] = $seconds . ' ' . $this->user->lang($seconds > 1 ? 'MCHAT_SECONDS' : 'MCHAT_SECOND');
|
||||
}
|
||||
|
||||
return sprintf($this->user->lang('MCHAT_ONLINE_EXPLAIN'), implode(' ', $times));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total session time in seconds
|
||||
*/
|
||||
protected function mchat_session_time()
|
||||
{
|
||||
return !empty($this->config['mchat_timeout']) ? $this->config['mchat_timeout'] : (!empty($this->config['load_online_time']) ? $this->config['load_online_time'] * 60 : $this->config['session_length']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns data about users who are currently chatting
|
||||
*/
|
||||
public function mchat_active_users()
|
||||
{
|
||||
$mchat_users = array();
|
||||
|
||||
$check_time = time() - $this->mchat_session_time();
|
||||
|
||||
$sql = 'SELECT m.user_id, u.username, u.user_type, u.user_allow_viewonline, u.user_colour
|
||||
FROM ' . $this->mchat_sessions_table . ' m
|
||||
LEFT JOIN ' . USERS_TABLE . ' u ON m.user_id = u.user_id
|
||||
WHERE m.user_lastupdate >= ' . (int) $check_time . '
|
||||
ORDER BY u.username ASC';
|
||||
$result = $this->db->sql_query($sql);
|
||||
$rows = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$can_view_hidden = $this->auth->acl_get('u_viewonline');
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
if (!$row['user_allow_viewonline'])
|
||||
{
|
||||
if (!$can_view_hidden)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$row['username'] = '<em>' . $row['username'] . '</em>';
|
||||
}
|
||||
|
||||
$mchat_users[] = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST'));
|
||||
}
|
||||
|
||||
return array(
|
||||
'online_userlist' => implode($this->user->lang('COMMA_SEPARATOR'), $mchat_users),
|
||||
'mchat_users_count' => count($mchat_users) ? $this->user->lang(count($mchat_users) > 1 ? 'MCHAT_ONLINE_USERS_TOTAL' : 'MCHAT_ONLINE_USER_TOTAL', count($mchat_users)) : $this->user->lang('MCHAT_NO_CHATTERS'),
|
||||
'refresh_message' => $this->mchat_format_seconds($this->mchat_session_time()),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts the current user into the mchat_sessions table
|
||||
*/
|
||||
public function mchat_add_user_session()
|
||||
{
|
||||
// Remove expired sessions from the database
|
||||
$check_time = time() - $this->mchat_session_time();
|
||||
$sql = 'DELETE FROM ' . $this->mchat_sessions_table . '
|
||||
WHERE user_lastupdate < ' . $check_time;
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
if ($this->user->data['user_type'] == USER_FOUNDER || $this->user->data['user_type'] == USER_NORMAL && $this->user->data['user_id'] != ANONYMOUS && !$this->user->data['is_bot'])
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . $this->mchat_sessions_table . '
|
||||
WHERE user_id = ' . (int) $this->user->data['user_id'];
|
||||
$result = $this->db->sql_query($sql);
|
||||
$row = $this->db->sql_fetchrow($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$sql = 'UPDATE ' . $this->mchat_sessions_table . '
|
||||
SET user_lastupdate = ' . time() . '
|
||||
WHERE user_id = ' . (int) $this->user->data['user_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'INSERT INTO ' . $this->mchat_sessions_table . ' ' . $this->db->sql_build_array('INSERT', array(
|
||||
'user_id' => $this->user->data['user_id'],
|
||||
'user_ip' => $this->user->data['user_ip'],
|
||||
'user_lastupdate' => time(),
|
||||
));
|
||||
}
|
||||
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prune messages
|
||||
*/
|
||||
public function mchat_prune()
|
||||
{
|
||||
if ($this->config['mchat_prune'])
|
||||
{
|
||||
$mchat_total_messages = $this->mchat_total_message_count();
|
||||
|
||||
if ($mchat_total_messages > $this->config['mchat_prune_num'])
|
||||
{
|
||||
$sql = 'SELECT message_id
|
||||
FROM '. $this->mchat_table . '
|
||||
ORDER BY message_id ASC';
|
||||
$result = $this->db->sql_query_limit($sql, 1);
|
||||
$first_id = (int) $this->db->sql_fetchfield('message_id');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
// Compute new oldest message id
|
||||
$delete_id = $mchat_total_messages - $this->config['mchat_prune_num'] + $first_id;
|
||||
|
||||
// Delete older messages
|
||||
$this->mchat_action('prune', null, $delete_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total number of messages
|
||||
*/
|
||||
public function mchat_total_message_count()
|
||||
{
|
||||
return $this->db->get_row_count($this->mchat_table);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch messages from the database
|
||||
*/
|
||||
public function mchat_get_messages($sql_where, $total = 0, $offset = 0)
|
||||
{
|
||||
$sql_array = array(
|
||||
'SELECT' => 'm.*, u.username, u.user_colour, u.user_avatar, u.user_avatar_type, u.user_avatar_width, u.user_avatar_height, u.user_allow_pm',
|
||||
'FROM' => array($this->mchat_table => 'm'),
|
||||
'LEFT_JOIN' => array(
|
||||
array(
|
||||
'FROM' => array(USERS_TABLE => 'u'),
|
||||
'ON' => 'm.user_id = u.user_id',
|
||||
)
|
||||
),
|
||||
'WHERE' => $sql_where,
|
||||
'ORDER_BY' => 'm.message_id DESC',
|
||||
);
|
||||
|
||||
$sql = $this->db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $this->db->sql_query_limit($sql, $total, $offset);
|
||||
$rows = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the user legend markup
|
||||
*/
|
||||
public function mchat_legend()
|
||||
{
|
||||
// Grab group details for legend display for who is online on the custom page
|
||||
$order_legend = $this->config['legend_sort_groupname'] ? 'group_name' : 'group_legend';
|
||||
if ($this->auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
|
||||
{
|
||||
$sql = 'SELECT group_id, group_name, group_colour, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_legend <> 0
|
||||
ORDER BY ' . $order_legend . ' ASC';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g
|
||||
LEFT JOIN ' . USER_GROUP_TABLE . ' ug ON (g.group_id = ug.group_id AND ug.user_id = ' . $this->user->data['user_id'] . ' AND ug.user_pending = 0)
|
||||
WHERE g.group_legend <> 0
|
||||
AND (g.group_type <> ' . GROUP_HIDDEN . '
|
||||
OR ug.user_id = ' . (int) $this->user->data['user_id'] . ')
|
||||
ORDER BY g.' . $order_legend . ' ASC';
|
||||
}
|
||||
$result = $this->db->sql_query($sql);
|
||||
$rows = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$legend = array();
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
$colour_text = $row['group_colour'] ? ' style="color:#' . $row['group_colour'] . '"' : '';
|
||||
$group_name = $row['group_type'] == GROUP_SPECIAL ? $this->user->lang('G_' . $row['group_name']) : $row['group_name'];
|
||||
if ($row['group_name'] == 'BOTS' || $this->user->data['user_id'] != ANONYMOUS && !$this->auth->acl_get('u_viewprofile'))
|
||||
{
|
||||
$legend[] = '<span' . $colour_text . '>' . $group_name . '</span>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$legend[] = '<a' . $colour_text . ' href="' . append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=group&g='.$row['group_id']) . '">' . $group_name . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
return $legend;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all foes of the current user
|
||||
*/
|
||||
public function mchat_foes()
|
||||
{
|
||||
if (is_null($this->foes))
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ZEBRA_TABLE . '
|
||||
WHERE foe = 1 AND user_id = ' . (int) $this->user->data['user_id'];
|
||||
$result = $this->db->sql_query($sql);
|
||||
$rows = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$this->foes = array();
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
$this->foes[] = $row['zebra_id'];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->foes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds forbidden BBCodes to the passed SQL where statement
|
||||
*/
|
||||
public function mchat_sql_append_forbidden_bbcodes($sql_where)
|
||||
{
|
||||
$disallowed_bbcodes = explode('|', strtoupper($this->config['mchat_bbcode_disallowed']));
|
||||
|
||||
if (!empty($disallowed_bbcodes))
|
||||
{
|
||||
$sql_where .= ' AND ' . $this->db->sql_in_set('UPPER(b.bbcode_tag)', $disallowed_bbcodes, true);
|
||||
}
|
||||
|
||||
return $sql_where;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserts a message with posting information into the database
|
||||
*/
|
||||
public function mchat_insert_posting($mode, $data)
|
||||
{
|
||||
$mode_config = array(
|
||||
'post' => $this->config['mchat_new_posts_topic'],
|
||||
'quote' => $this->config['mchat_new_posts_quote'],
|
||||
'edit' => $this->config['mchat_new_posts_edit'],
|
||||
'reply' => $this->config['mchat_new_posts_reply'],
|
||||
);
|
||||
|
||||
if (empty($mode_config[$mode]))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$mchat_new_data = $this->user->lang('MCHAT_NEW_' . strtoupper($mode));
|
||||
|
||||
$message = utf8_normalize_nfc($mchat_new_data . ': [url=' . generate_board_url() . '/viewtopic.' . $this->php_ext . '?p=' . $data['post_id'] . '#p' . $data['post_id'] . ']' . $data['post_subject'] . '[/url] '. $this->user->lang('MCHAT_IN') . ' [url=' . generate_board_url() . '/viewforum.' . $this->php_ext . '?f=' . $data['forum_id'] . ']' . $data['forum_name'] . ' [/url] ' . $this->user->lang('MCHAT_IN_SECTION'));
|
||||
|
||||
$uid = $bitfield = $options = ''; // will be modified by generate_text_for_storage
|
||||
generate_text_for_storage($message, $uid, $bitfield, $options, true, false, false);
|
||||
$sql_ary = array(
|
||||
'forum_id' => $data['forum_id'],
|
||||
'post_id' => $data['post_id'],
|
||||
'user_id' => $this->user->data['user_id'],
|
||||
'user_ip' => $this->user->data['session_ip'],
|
||||
'message' => $message,
|
||||
'bbcode_bitfield' => $bitfield,
|
||||
'bbcode_uid' => $uid,
|
||||
'bbcode_options' => $options,
|
||||
'message_time' => time(),
|
||||
);
|
||||
$sql = 'INSERT INTO ' . $this->mchat_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the current user is flooding the chat
|
||||
*/
|
||||
public function mchat_is_user_flooding()
|
||||
{
|
||||
if (!$this->config['mchat_flood_time'] || $this->auth->acl_get('u_mchat_flood_ignore'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$sql = 'SELECT message_time
|
||||
FROM ' . $this->mchat_table . '
|
||||
WHERE user_id = ' . (int) $this->user->data['user_id'] . '
|
||||
ORDER BY message_time DESC';
|
||||
$result = $this->db->sql_query_limit($sql, 1);
|
||||
$message_time = (int) $this->db->sql_fetchfield('message_time');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $message_time && time() - $message_time < $this->config['mchat_flood_time'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns user ID & name of the specified message
|
||||
*/
|
||||
public function mchat_author_for_message($message_id)
|
||||
{
|
||||
$sql = 'SELECT u.user_id, u.username, m.message_time
|
||||
FROM ' . $this->mchat_table . ' m
|
||||
LEFT JOIN ' . USERS_TABLE . ' u ON m.user_id = u.user_id
|
||||
WHERE m.message_id = ' . (int) $message_id;
|
||||
$result = $this->db->sql_query($sql);
|
||||
$row = $this->db->sql_fetchrow($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $row;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of message IDs that have been deleted from the message table
|
||||
*/
|
||||
public function mchat_missing_ids($start_id, $end_id)
|
||||
{
|
||||
if ($this->config['mchat_edit_delete_limit'])
|
||||
{
|
||||
$sql_where = 'message_time < ' . (time() - $this->config['mchat_edit_delete_limit']);
|
||||
$cache_ttl = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_where = 'message_id < ' . (int) $start_id;
|
||||
$cache_ttl = 3600;
|
||||
}
|
||||
|
||||
$sql = 'SELECT message_id
|
||||
FROM ' . $this->mchat_table . '
|
||||
WHERE ' . $sql_where . '
|
||||
ORDER BY message_id DESC';
|
||||
$result = $this->db->sql_query_limit($sql, 1, 0, $cache_ttl);
|
||||
$earliest_id = (int) $this->db->sql_fetchfield('message_id');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
if (!$earliest_id)
|
||||
{
|
||||
$sql = 'SELECT MIN(message_id) as earliest_id
|
||||
FROM ' . $this->mchat_table;
|
||||
$result = $this->db->sql_query($sql, 3600);
|
||||
$earliest_id = $this->db->sql_fetchfield('earliest_id');
|
||||
$this->db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (!$earliest_id)
|
||||
{
|
||||
return range($start_id, $end_id);
|
||||
}
|
||||
|
||||
$sql = 'SELECT (t1.message_id + 1) AS start, (
|
||||
SELECT MIN(t3.message_id) - 1
|
||||
FROM ' . $this->mchat_table . ' t3
|
||||
WHERE t3.message_id > t1.message_id
|
||||
) AS end
|
||||
FROM ' . $this->mchat_table . ' t1
|
||||
WHERE t1.message_id > ' . (int) $earliest_id . ' AND NOT EXISTS (
|
||||
SELECT t2.message_id
|
||||
FROM ' . $this->mchat_table . ' t2
|
||||
WHERE t2.message_id = t1.message_id + 1
|
||||
)';
|
||||
|
||||
$result = $this->db->sql_query($sql);
|
||||
$rows = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$missing_ids = array();
|
||||
|
||||
if ($start_id < $earliest_id && !$this->config['mchat_edit_delete_limit'])
|
||||
{
|
||||
$missing_ids[] = range($start_id, $earliest_id - 1);
|
||||
}
|
||||
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
if ($row['end'])
|
||||
{
|
||||
$missing_ids[] = range($row['start'], $row['end']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$latest_message = $row['start'] - 1;
|
||||
if ($end_id > $latest_message)
|
||||
{
|
||||
$missing_ids[] = range($latest_message + 1, $end_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Flatten
|
||||
if (!empty($missing_ids))
|
||||
{
|
||||
$missing_ids = call_user_func_array('array_merge', $missing_ids);
|
||||
}
|
||||
|
||||
return $missing_ids;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs add|edit|del|clean|prune actions
|
||||
*/
|
||||
public function mchat_action($action, $sql_ary = null, $message_id = 0, $log_username = '')
|
||||
{
|
||||
switch ($action)
|
||||
{
|
||||
// User adds a message
|
||||
case 'add':
|
||||
$sql = 'INSERT INTO ' . $this->mchat_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
|
||||
$this->mchat_add_user_session();
|
||||
break;
|
||||
// User edits a message
|
||||
case 'edit':
|
||||
$sql = 'UPDATE ' . $this->mchat_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE message_id = ' . (int) $message_id;
|
||||
$this->mchat_add_user_session();
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_EDITED_MCHAT', false, array($log_username));
|
||||
break;
|
||||
// User deletes a message
|
||||
case 'del':
|
||||
$sql = 'DELETE FROM ' . $this->mchat_table . ' WHERE message_id = ' . (int) $message_id;
|
||||
$this->mchat_add_user_session();
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_DELETED_MCHAT', false, array($log_username));
|
||||
$this->cache->destroy('sql', $this->mchat_table);
|
||||
break;
|
||||
// Founder purges all messages
|
||||
case 'clean':
|
||||
$sql = 'TRUNCATE TABLE ' . $this->mchat_table;
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_TABLE_PRUNED');
|
||||
$this->cache->destroy('sql', $this->mchat_table);
|
||||
break;
|
||||
// User triggers messages to be pruned
|
||||
case 'prune':
|
||||
$sql = 'DELETE FROM ' . $this->mchat_table . ' WHERE message_id < ' . (int) $message_id;
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_TABLE_PRUNED');
|
||||
$this->cache->destroy('sql', $this->mchat_table);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
if ($result !== false)
|
||||
{
|
||||
switch ($action)
|
||||
{
|
||||
case 'add':
|
||||
if ($this->db->sql_nextid() == 1)
|
||||
{
|
||||
$this->cache->destroy('sql', $this->mchat_table);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
902
core/mchat.php
Normal file
@@ -0,0 +1,902 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\core;
|
||||
|
||||
class mchat
|
||||
{
|
||||
/** @var \dmzx\mchat\core\functions_mchat */
|
||||
protected $functions_mchat;
|
||||
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\controller\helper */
|
||||
protected $helper;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var \phpbb\auth\auth */
|
||||
protected $auth;
|
||||
|
||||
/** @var \phpbb\pagination */
|
||||
protected $pagination;
|
||||
|
||||
/** @var \phpbb\request\request */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbb\event\dispatcher_interface */
|
||||
protected $dispatcher;
|
||||
|
||||
/** @var string */
|
||||
protected $root_path;
|
||||
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
/** @var boolean */
|
||||
protected $is_mchat_rendered = false;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \dmzx\mchat\core\functions_mchat $functions_mchat
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\controller\helper $helper
|
||||
* @param \phpbb\template\template $template
|
||||
* @param \phpbb\user $user
|
||||
* @param \phpbb\auth\auth $auth
|
||||
* @param \phpbb\pagination $pagination
|
||||
* @param \phpbb\request\request $request
|
||||
* @param \phpbb\event\dispatcher_interface $dispatcher
|
||||
* @param string $root_path
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(\dmzx\mchat\core\functions_mchat $functions_mchat, \phpbb\config\config $config, \phpbb\controller\helper $helper, \phpbb\template\template $template, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \phpbb\request\request $request, \phpbb\event\dispatcher_interface $dispatcher, $root_path, $php_ext)
|
||||
{
|
||||
$this->functions_mchat = $functions_mchat;
|
||||
$this->config = $config;
|
||||
$this->helper = $helper;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
$this->auth = $auth;
|
||||
$this->pagination = $pagination;
|
||||
$this->request = $request;
|
||||
$this->dispatcher = $dispatcher;
|
||||
$this->root_path = $root_path;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render mChat on the index page
|
||||
*/
|
||||
public function page_index()
|
||||
{
|
||||
if (!$this->auth->acl_get('u_mchat_view'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->assign_whois();
|
||||
|
||||
if ($this->config['mchat_on_index'])
|
||||
{
|
||||
// TODO This might be redundant
|
||||
// If mChat is used on the index by a user without an avatar, a default avatar is used.
|
||||
// However, T_THEME_PATH points to ./../styles/... because the controller at /mchat is called, but we need it to be ./styles...
|
||||
// Setting this value to true solves this.
|
||||
if (!defined('PHPBB_USE_BOARD_URL_PATH'))
|
||||
{
|
||||
define('PHPBB_USE_BOARD_URL_PATH', true);
|
||||
}
|
||||
|
||||
global $root_path;
|
||||
$root_path = './';
|
||||
|
||||
$this->assign_bbcodes_smilies();
|
||||
|
||||
$this->render_page('index');
|
||||
}
|
||||
if ($this->config['mchat_on_portal'])
|
||||
{
|
||||
// TODO This might be redundant
|
||||
// If mChat is used on the index by a user without an avatar, a default avatar is used.
|
||||
// However, T_THEME_PATH points to ./../styles/... because the controller at /mchat is called, but we need it to be ./styles...
|
||||
// Setting this value to true solves this.
|
||||
if (!defined('PHPBB_USE_BOARD_URL_PATH'))
|
||||
{
|
||||
define('PHPBB_USE_BOARD_URL_PATH', true);
|
||||
}
|
||||
|
||||
global $root_path;
|
||||
$root_path = './';
|
||||
|
||||
$this->assign_bbcodes_smilies();
|
||||
|
||||
$this->render_page('index');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the mChat custom page
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function page_custom()
|
||||
{
|
||||
if (!$this->auth->acl_get('u_mchat_view') || !$this->config['mchat_custom_page'])
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_NO_CUSTOM_PAGE');
|
||||
}
|
||||
|
||||
$this->functions_mchat->mchat_prune();
|
||||
|
||||
$this->functions_mchat->mchat_add_user_session();
|
||||
|
||||
$this->assign_whois();
|
||||
|
||||
$this->assign_bbcodes_smilies();
|
||||
|
||||
$this->template->assign_var('MCHAT_CUSTOM_PAGE', true);
|
||||
|
||||
$this->render_page('custom');
|
||||
|
||||
// Add to navlinks
|
||||
$this->template->assign_block_vars('navlinks', array(
|
||||
'FORUM_NAME' => $this->user->lang('MCHAT_TITLE'),
|
||||
'U_VIEW_FORUM' => $this->helper->route('dmzx_mchat_controller'),
|
||||
));
|
||||
|
||||
return $this->helper->render('mchat_body.html', $this->user->lang('MCHAT_TITLE'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the mChat archive
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function page_archive()
|
||||
{
|
||||
if (!$this->auth->acl_get('u_mchat_view') || !$this->auth->acl_get('u_mchat_archive'))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_NOACCESS_ARCHIVE');
|
||||
}
|
||||
|
||||
$this->functions_mchat->mchat_prune();
|
||||
|
||||
$this->template->assign_var('MCHAT_ARCHIVE_PAGE', true);
|
||||
|
||||
$this->render_page('archive');
|
||||
|
||||
// Add to navlinks
|
||||
$this->template->assign_block_vars_array('navlinks', array(
|
||||
array(
|
||||
'FORUM_NAME' => $this->user->lang('MCHAT_TITLE'),
|
||||
'U_VIEW_FORUM' => $this->helper->route('dmzx_mchat_controller'),
|
||||
),
|
||||
array(
|
||||
'FORUM_NAME' => $this->user->lang('MCHAT_ARCHIVE'),
|
||||
'U_VIEW_FORUM' => $this->helper->route('dmzx_mchat_page_controller', array('page' => 'archive')),
|
||||
),
|
||||
));
|
||||
|
||||
return $this->helper->render('mchat_body.html', $this->user->lang('MCHAT_ARCHIVE_PAGE'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Controller for mChat IP WHOIS
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response A Symfony Response object
|
||||
*/
|
||||
public function page_whois()
|
||||
{
|
||||
if (!$this->auth->acl_get('u_mchat_ip'))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'NO_AUTH_OPERATION');
|
||||
}
|
||||
|
||||
if (!function_exists('user_ipwhois'))
|
||||
{
|
||||
include($this->root_path . 'includes/functions_user.' . $this->php_ext);
|
||||
}
|
||||
|
||||
$this->template->assign_var('WHOIS', user_ipwhois($this->request->variable('ip', '')));
|
||||
|
||||
return $this->helper->render('viewonline_whois.html', $this->user->lang('WHO_IS_ONLINE'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Controller for mChat Rules page
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function page_rules()
|
||||
{
|
||||
if (empty($this->config['mchat_rules']) && empty($this->user->lang['MCHAT_RULES']))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(404, 'MCHAT_NO_RULES');
|
||||
}
|
||||
|
||||
// If the rules are defined in the language file use them, else just use the entry in the database
|
||||
$mchat_rules = isset($this->user->lang['MCHAT_RULES']) ? $this->user->lang('MCHAT_RULES') : $this->config['mchat_rules'];
|
||||
$mchat_rules = explode("\n", $mchat_rules);
|
||||
$mchat_rules = array_map('utf8_htmlspecialchars', $mchat_rules);
|
||||
$mchat_rules = implode('<br />', $mchat_rules);
|
||||
|
||||
$this->template->assign_var('MCHAT_RULES', $mchat_rules);
|
||||
|
||||
return $this->helper->render('mchat_rules.html', $this->user->lang('MCHAT_HELP'));
|
||||
}
|
||||
|
||||
/**
|
||||
* User submits a message
|
||||
*
|
||||
* @return array data sent to client as JSON
|
||||
*/
|
||||
public function action_add()
|
||||
{
|
||||
if (!$this->auth->acl_get('u_mchat_use') || !check_form_key('mchat', -1))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_NOACCESS');
|
||||
}
|
||||
|
||||
if ($this->functions_mchat->mchat_is_user_flooding())
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(400, 'MCHAT_NOACCESS');
|
||||
}
|
||||
|
||||
$message = $this->request->variable('message', '', true);
|
||||
|
||||
$sql_ary = $this->process_message(utf8_ucfirst($message), array(
|
||||
'user_id' => $this->user->data['user_id'],
|
||||
'user_ip' => $this->user->data['session_ip'],
|
||||
'message_time' => time(),
|
||||
));
|
||||
|
||||
$this->functions_mchat->mchat_action('add', $sql_ary);
|
||||
|
||||
/**
|
||||
* Event render_helper_add
|
||||
*
|
||||
* @event dmzx.mchat.core.render_helper_add
|
||||
* @since 0.1.2
|
||||
*/
|
||||
$this->dispatcher->dispatch('dmzx.mchat.core.render_helper_add');
|
||||
|
||||
return $this->action_refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
* User edits a message
|
||||
*
|
||||
* @return array data sent to client as JSON
|
||||
*/
|
||||
public function action_edit()
|
||||
{
|
||||
if (!defined('PHPBB_USE_BOARD_URL_PATH'))
|
||||
{
|
||||
define('PHPBB_USE_BOARD_URL_PATH', true);
|
||||
}
|
||||
|
||||
$message_id = $this->request->variable('message_id', 0);
|
||||
|
||||
if (!$message_id || !check_form_key('mchat', -1))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_NOACCESS');
|
||||
}
|
||||
|
||||
$author = $this->functions_mchat->mchat_author_for_message($message_id);
|
||||
|
||||
if (!$author || !$this->auth_message('u_mchat_edit', $author['user_id'], $author['message_time']))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_NOACCESS');
|
||||
}
|
||||
|
||||
$message = $this->request->variable('message', '', true);
|
||||
|
||||
$sql_ary = $this->process_message($message, array(
|
||||
'edit_time' => time(),
|
||||
));
|
||||
|
||||
// TODO Don't update the message if the user submitted it unedited
|
||||
$this->functions_mchat->mchat_action('edit', $sql_ary, $message_id, $author['username']);
|
||||
|
||||
/**
|
||||
* Event render_helper_edit
|
||||
*
|
||||
* @event dmzx.mchat.core.render_helper_edit
|
||||
* @since 0.1.4
|
||||
*/
|
||||
$this->dispatcher->dispatch('dmzx.mchat.core.render_helper_edit');
|
||||
|
||||
$sql_where = 'm.message_id = ' . (int) $message_id;
|
||||
$rows = $this->functions_mchat->mchat_get_messages($sql_where, 1);
|
||||
|
||||
$this->assign_global_template_data();
|
||||
$this->assign_messages($rows);
|
||||
|
||||
return array('edit' => $this->render_template('mchat_messages.html'));
|
||||
}
|
||||
|
||||
/**
|
||||
* User deletes a message
|
||||
*
|
||||
* @return array data sent to client as JSON
|
||||
*/
|
||||
public function action_del()
|
||||
{
|
||||
$message_id = $this->request->variable('message_id', 0);
|
||||
|
||||
if (!$message_id || !check_form_key('mchat', -1))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_NOACCESS');
|
||||
}
|
||||
|
||||
$author = $this->functions_mchat->mchat_author_for_message($message_id);
|
||||
|
||||
if (!$author || !$this->auth_message('u_mchat_delete', $author['user_id'], $author['message_time']))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_NOACCESS');
|
||||
}
|
||||
|
||||
/**
|
||||
* Event render_helper_delete
|
||||
*
|
||||
* @event dmzx.mchat.core.render_helper_delete
|
||||
* @since 0.1.4
|
||||
*/
|
||||
$this->dispatcher->dispatch('dmzx.mchat.core.render_helper_delete');
|
||||
|
||||
$this->functions_mchat->mchat_action('del', null, $message_id, $author['username']);
|
||||
|
||||
return array('del' => true);
|
||||
}
|
||||
|
||||
/**
|
||||
* User purges all messagas
|
||||
*
|
||||
* @return array data sent to client as JSON
|
||||
*/
|
||||
public function action_clean()
|
||||
{
|
||||
if ($this->user->data['user_type'] != USER_FOUNDER || !check_form_key('mchat', -1))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(403, 'MCHAT_NOACCESS');
|
||||
}
|
||||
|
||||
$this->functions_mchat->mchat_action('clean');
|
||||
|
||||
return array('clean' => true);
|
||||
}
|
||||
|
||||
/**
|
||||
* User checks for new messages
|
||||
*
|
||||
* @return array sent to client as JSON
|
||||
*/
|
||||
public function action_refresh()
|
||||
{
|
||||
if (!defined('PHPBB_USE_BOARD_URL_PATH'))
|
||||
{
|
||||
define('PHPBB_USE_BOARD_URL_PATH', true);
|
||||
}
|
||||
|
||||
$message_first_id = $this->request->variable('message_first_id', 0);
|
||||
$message_last_id = $this->request->variable('message_last_id', 0);
|
||||
$message_edits = $this->request->variable('message_edits', array(0));
|
||||
|
||||
// Request new messages
|
||||
$sql_where = 'm.message_id > ' . (int) $message_last_id;
|
||||
|
||||
// Request edited messages
|
||||
if ($this->config['mchat_live_updates'] && $message_last_id > 0)
|
||||
{
|
||||
$sql_time_limit = $this->config['mchat_edit_delete_limit'] ? sprintf(' AND m.message_time > %d', time() - $this->config['mchat_edit_delete_limit']) : '';
|
||||
$sql_where .= sprintf(' OR (m.message_id BETWEEN %d AND %d AND m.edit_time > 0%s)', (int) $message_first_id , (int) $message_last_id, $sql_time_limit);
|
||||
}
|
||||
|
||||
// Exclude post notifications
|
||||
if (!$this->user->data['user_mchat_topics'])
|
||||
{
|
||||
$sql_where = '(' . $sql_where . ') AND m.forum_id = 0';
|
||||
}
|
||||
|
||||
$rows = $this->functions_mchat->mchat_get_messages($sql_where);
|
||||
$rows_refresh = array();
|
||||
$rows_edit = array();
|
||||
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
$message_id = $row['message_id'];
|
||||
if ($message_id > $message_last_id)
|
||||
{
|
||||
$rows_refresh[] = $row;
|
||||
}
|
||||
else if (!isset($message_edits[$message_id]) || $message_edits[$message_id] < $row['edit_time'])
|
||||
{
|
||||
$rows_edit[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
// Assign new messages
|
||||
$this->assign_global_template_data();
|
||||
$this->assign_messages($rows_refresh);
|
||||
$response = array('refresh' => true, 'add' => $this->render_template('mchat_messages.html'));
|
||||
|
||||
// Assign edited messages
|
||||
if (!empty($rows_edit))
|
||||
{
|
||||
$response['edit'] = array();
|
||||
foreach ($rows_edit as $row)
|
||||
{
|
||||
$this->assign_messages(array($row));
|
||||
$response['edit'][$row['message_id']] = $this->render_template('mchat_messages.html');
|
||||
}
|
||||
}
|
||||
|
||||
// Request deleted messages
|
||||
if ($this->config['mchat_live_updates'] && $message_last_id > 0)
|
||||
{
|
||||
$deleted_message_ids = $this->functions_mchat->mchat_missing_ids($message_first_id, $message_last_id);
|
||||
if (!empty($deleted_message_ids))
|
||||
{
|
||||
$response['del'] = $deleted_message_ids;
|
||||
}
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* User requests who is chatting
|
||||
*
|
||||
* @return array data sent to client as JSON
|
||||
*/
|
||||
public function action_whois()
|
||||
{
|
||||
$this->assign_whois();
|
||||
|
||||
return array('whois' => $this->render_template('mchat_whois.html'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the template variables for the header link
|
||||
*/
|
||||
public function render_page_header_link()
|
||||
{
|
||||
$this->template->assign_vars(array(
|
||||
'MCHAT_ALLOW_VIEW' => $this->auth->acl_get('u_mchat_view'),
|
||||
'S_MCHAT_CUSTOM_PAGE' => $this->config['mchat_custom_page'],
|
||||
'U_MCHAT' => $this->helper->route('dmzx_mchat_controller'),
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a condition to the WHERE key of the SQL array to not fetch disallowed BBCodes from the database
|
||||
*
|
||||
* @param $sql_ary array
|
||||
* @return array
|
||||
*/
|
||||
public function remove_disallowed_bbcodes($sql_ary)
|
||||
{
|
||||
// Add disallowed BBCodes to the template only if we're rendering for mChat
|
||||
if ($this->is_mchat_rendered)
|
||||
{
|
||||
$sql_ary['WHERE'] = $this->functions_mchat->mchat_sql_append_forbidden_bbcodes($sql_ary['WHERE']);
|
||||
}
|
||||
|
||||
return $sql_ary;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders data for a page
|
||||
*
|
||||
* @param $page The page we are rendering for, one of index|custom|archive
|
||||
*/
|
||||
protected function render_page($page)
|
||||
{
|
||||
// Add lang file
|
||||
$this->user->add_lang('posting');
|
||||
|
||||
// If the static message is defined in the language file use it, else the entry in the database is used
|
||||
if (isset($this->user->lang['STATIC_MESSAGE']))
|
||||
{
|
||||
$this->config['mchat_static_message'] = $this->user->lang('STATIC_MESSAGE');
|
||||
}
|
||||
$pagelocsource = $this->user->page['page'];
|
||||
$pagelocremove = "?";
|
||||
if (strpbrk($pagelocremove,$pagelocsource) !== false)
|
||||
{
|
||||
$pageloc = preg_replace("/\?.+/", "", $pagelocsource);
|
||||
//$pageloc = $this->user->page['page'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$pageloc = $this->user->page['page'];
|
||||
}
|
||||
|
||||
$this->template->assign_vars(array(
|
||||
'MCHAT_FILE_NAME' => $this->helper->route('dmzx_mchat_controller'),
|
||||
'MCHAT_REFRESH_JS' => 1000 * $this->config['mchat_refresh'],
|
||||
'MCHAT_INPUT_TYPE' => $this->user->data['user_mchat_input_area'],
|
||||
'MCHAT_RULES' => !empty($this->user->lang['MCHAT_RULES']) || !empty($this->config['mchat_rules']),
|
||||
'MCHAT_ALLOW_USE' => $this->auth->acl_get('u_mchat_use'),
|
||||
'MCHAT_ALLOW_SMILES' => $this->config['allow_smilies'] && $this->auth->acl_get('u_mchat_smilies'),
|
||||
'MCHAT_ALLOW_BBCODES' => $this->config['allow_bbcode'] && $this->auth->acl_get('u_mchat_bbcode'),
|
||||
'MCHAT_MESSAGE_TOP' => $this->config['mchat_message_top'],
|
||||
'MCHAT_ARCHIVE_URL' => $this->helper->route('dmzx_mchat_page_controller', array('page' => 'archive')),
|
||||
'MCHAT_INDEX_HEIGHT' => $this->config['mchat_index_height'],
|
||||
'MCHAT_CUSTOM_HEIGHT' => $this->config['mchat_custom_height'],
|
||||
'MCHAT_READ_ARCHIVE_BUTTON' => $this->auth->acl_get('u_mchat_archive'),
|
||||
'MCHAT_FOUNDER' => $this->user->data['user_type'] == USER_FOUNDER,
|
||||
'MCHAT_STATIC_MESS' => !empty($this->config['mchat_static_message']) ? htmlspecialchars_decode($this->config['mchat_static_message']) : '',
|
||||
'L_MCHAT_COPYRIGHT' => base64_decode('PGEgaHJlZj0iaHR0cDovL3JtY2dpcnI4My5vcmciPlJNY0dpcnI4MzwvYT4gJmNvcHk7IDxhIGhyZWY9Imh0dHA6Ly93d3cuZG16eC13ZWIubmV0IiB0aXRsZT0id3d3LmRtengtd2ViLm5ldCI+ZG16eDwvYT4='),
|
||||
'MCHAT_MESSAGE_LNGTH' => $this->config['mchat_max_message_lngth'],
|
||||
'MCHAT_MESS_LONG' => sprintf($this->user->lang('MCHAT_MESS_LONG'), $this->config['mchat_max_message_lngth']),
|
||||
'MCHAT_USER_TIMEOUT_TIME' => gmdate('H:i:s', (int) $this->config['mchat_timeout']),
|
||||
'MCHAT_WHOIS_REFRESH' => $this->config['mchat_whois'] ? 1000 * $this->config['mchat_whois_refresh'] : 0,
|
||||
'MCHAT_WHOIS_REFRESH_EXPLAIN' => sprintf($this->user->lang('WHO_IS_REFRESH_EXPLAIN'), $this->config['mchat_whois_refresh']),
|
||||
'MCHAT_PAUSE_ON_INPUT' => $this->config['mchat_pause_on_input'],
|
||||
'MCHAT_REFRESH_YES' => sprintf($this->user->lang('MCHAT_REFRESH_YES'), $this->config['mchat_refresh']),
|
||||
'MCHAT_LIVE_UPDATES' => $this->config['mchat_live_updates'],
|
||||
'S_MCHAT_LOCATION' => $this->config['mchat_location'],
|
||||
'S_MCHAT_SOUND_YES' => $this->user->data['user_mchat_sound'],
|
||||
'U_MORE_SMILIES' => generate_board_url() . append_sid("/{$this->root_path}/posting.{$this->php_ext}", 'mode=smilies'),
|
||||
'U_MCHAT_RULES' => $this->helper->route('dmzx_mchat_page_controller', array('page' => 'rules')),
|
||||
'S_MCHAT_ON_INDEX' => $this->config['mchat_on_index'] && !empty($this->user->data['user_mchat_index']),
|
||||
'S_DISPLAY_MCHAT_PORTAL' => $this->config['mchat_on_portal'],
|
||||
'U_MCHATLOC' => $pageloc,
|
||||
));
|
||||
|
||||
$sql_where = $this->user->data['user_mchat_topics'] ? '' : 'm.forum_id = 0';
|
||||
$limit = $page == 'archive' ? $this->config['mchat_archive_limit'] : $this->config[$page == 'index' ? 'mchat_message_num' : 'mchat_message_limit'];
|
||||
$start = $page == 'archive' ? $this->request->variable('start', 0) : 0;
|
||||
$rows = $this->functions_mchat->mchat_get_messages($sql_where, $limit, $start);
|
||||
|
||||
$this->assign_global_template_data();
|
||||
$this->assign_messages($rows);
|
||||
|
||||
// Render pagination
|
||||
if ($page == 'archive')
|
||||
{
|
||||
$archive_url = $this->helper->route('dmzx_mchat_page_controller', array('page' => 'archive'));
|
||||
$total_messages = $this->functions_mchat->mchat_total_message_count();
|
||||
$this->pagination->generate_template_pagination($archive_url, 'pagination', 'start', $total_messages, $limit, $start);
|
||||
$this->template->assign_var('MCHAT_TOTAL_MESSAGES', sprintf($this->user->lang('MCHAT_TOTALMESSAGES'), $total_messages));
|
||||
}
|
||||
|
||||
// Render legend
|
||||
if ($page != 'index' && $this->config['mchat_whois'])
|
||||
{
|
||||
$legend = $this->functions_mchat->mchat_legend();
|
||||
$this->template->assign_var('LEGEND', implode(', ', $legend));
|
||||
}
|
||||
|
||||
if ($this->auth->acl_get('u_mchat_use'))
|
||||
{
|
||||
add_form_key('mchat');
|
||||
}
|
||||
|
||||
$this->is_mchat_rendered = true;
|
||||
|
||||
/**
|
||||
* Event render_helper_aft
|
||||
*
|
||||
* @event dmzx.mchat.core.render_helper_aft
|
||||
* @since 0.1.2
|
||||
*/
|
||||
$this->dispatcher->dispatch('dmzx.mchat.core.render_helper_aft');
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns all message rows to the template
|
||||
*/
|
||||
protected function assign_global_template_data()
|
||||
{
|
||||
$this->template->assign_vars(array(
|
||||
'MCHAT_ALLOW_IP' => $this->auth->acl_get('u_mchat_ip'),
|
||||
'MCHAT_ALLOW_PM' => $this->auth->acl_get('u_mchat_pm'),
|
||||
'MCHAT_ALLOW_LIKE' => $this->auth->acl_get('u_mchat_like'),
|
||||
'MCHAT_ALLOW_QUOTE' => $this->auth->acl_get('u_mchat_quote'),
|
||||
'MCHAT_EDIT_DELETE_LIMIT' => 1000 * $this->config['mchat_edit_delete_limit'],
|
||||
'MCHAT_EDIT_DELETE_IGNORE' => $this->config['mchat_edit_delete_limit'] && $this->auth->acl_get('m_'),
|
||||
'MCHAT_USER_TIMEOUT' => 1000 * $this->config['mchat_timeout'],
|
||||
'S_MCHAT_AVATARS' => $this->display_avatars(),
|
||||
'EXT_URL' => generate_board_url() . '/ext/dmzx/mchat/',
|
||||
'STYLE_PATH' => generate_board_url() . '/styles/' . $this->user->style['style_path'],
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if we need do display avatars in the messages, otherwise false
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function display_avatars()
|
||||
{
|
||||
return $this->config['mchat_avatars'] && $this->user->optionget('viewavatars') && $this->user->data['user_mchat_avatars'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns all message rows to the template
|
||||
*
|
||||
* @param $rows array
|
||||
*/
|
||||
protected function assign_messages($rows)
|
||||
{
|
||||
if (empty($rows))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Reverse the array if messages appear at the bottom
|
||||
if (!$this->config['mchat_message_top'])
|
||||
{
|
||||
$rows = array_reverse($rows);
|
||||
}
|
||||
|
||||
$foes = $this->functions_mchat->mchat_foes();
|
||||
|
||||
$this->template->destroy_block_vars('mchatrow');
|
||||
|
||||
$user_avatars = array();
|
||||
|
||||
foreach ($rows as $i => $row)
|
||||
{
|
||||
if (!isset($user_avatars[$row['user_id']]))
|
||||
{
|
||||
$display_avatar = $this->display_avatars() && $row['user_avatar'];
|
||||
$user_avatars[$row['user_id']] = !$display_avatar ? '' : phpbb_get_user_avatar(array(
|
||||
'avatar' => $row['user_avatar'],
|
||||
'avatar_type' => $row['user_avatar_type'],
|
||||
'avatar_width' => $row['user_avatar_width'] > $row['user_avatar_height'] ? 40 : (40 / $row['user_avatar_height']) * $row['user_avatar_width'],
|
||||
'avatar_height' => $row['user_avatar_height'] > $row['user_avatar_width'] ? 40 : (40 / $row['user_avatar_width']) * $row['user_avatar_height'],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($rows as $i => $row)
|
||||
{
|
||||
// Auth checks
|
||||
if ($row['forum_id'] != 0 && !$this->auth->acl_get('f_read', $row['forum_id']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$message_edit = $row['message'];
|
||||
decode_message($message_edit, $row['bbcode_uid']);
|
||||
$message_edit = str_replace('"', '"', $message_edit);
|
||||
$message_edit = mb_ereg_replace("'", '’', $message_edit);
|
||||
|
||||
if (in_array($row['user_id'], $foes))
|
||||
{
|
||||
$row['message'] = sprintf($this->user->lang('MCHAT_FOE'), get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST')));
|
||||
}
|
||||
|
||||
$row['username'] = mb_ereg_replace("'", "’", $row['username']);
|
||||
$message = str_replace("'", '’', $row['message']);
|
||||
|
||||
$username_full = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST'));
|
||||
|
||||
// Remove root path if we render messages for the index page
|
||||
if (strpos($this->user->data['session_page'], 'app.' . $this->php_ext) === false)
|
||||
{
|
||||
$username_full = str_replace('.' . $this->root_path, '', $username_full);
|
||||
}
|
||||
|
||||
$this->template->assign_block_vars('mchatrow', array(
|
||||
'S_ROW_COUNT' => $i,
|
||||
'MCHAT_ALLOW_BAN' => $this->auth->acl_get('a_authusers'),
|
||||
'MCHAT_ALLOW_EDIT' => $this->auth_message('u_mchat_edit', $row['user_id'], $row['message_time']),
|
||||
'MCHAT_ALLOW_DEL' => $this->auth_message('u_mchat_delete', $row['user_id'], $row['message_time']),
|
||||
'MCHAT_USER_AVATAR' => $user_avatars[$row['user_id']],
|
||||
'U_VIEWPROFILE' => $row['user_id'] != ANONYMOUS ? generate_board_url() . append_sid("/{$this->root_path}memberlist.{$this->php_ext}", 'mode=viewprofile&u=' . $row['user_id']) : '',
|
||||
'MCHAT_IS_POSTER' => $row['user_id'] != ANONYMOUS && $this->user->data['user_id'] == $row['user_id'],
|
||||
'MCHAT_PM' => $row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id'] && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_')) ? generate_board_url() . append_sid("/{$this->root_path}ucp.{$this->php_ext}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
|
||||
'MCHAT_MESSAGE_EDIT' => $message_edit,
|
||||
'MCHAT_MESSAGE_ID' => $row['message_id'],
|
||||
'MCHAT_USERNAME_FULL' => $username_full,
|
||||
'MCHAT_USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST')),
|
||||
'MCHAT_USERNAME_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST')),
|
||||
'MCHAT_USER_IP' => $row['user_ip'],
|
||||
'MCHAT_U_IP' => $this->helper->route('dmzx_mchat_page_controller', array('page' => 'whois', 'ip' => $row['user_ip'])),
|
||||
'MCHAT_U_BAN' => generate_board_url() . append_sid("/{$this->root_path}adm/index.{$this->php_ext}" ,'i=permissions&mode=setting_user_global&user_id[0]=' . $row['user_id'], true, $this->user->session_id),
|
||||
'MCHAT_MESSAGE' => censor_text(generate_text_for_display($row['message'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options'])),
|
||||
'MCHAT_TIME' => $this->user->format_date($row['message_time'], $this->config['mchat_date']),
|
||||
'MCHAT_MESSAGE_TIME' => $row['message_time'],
|
||||
'MCHAT_EDIT_TIME' => $row['edit_time'],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns BBCodes and smilies to the template
|
||||
*/
|
||||
protected function assign_bbcodes_smilies()
|
||||
{
|
||||
// Display custom bbcodes
|
||||
if ($this->config['allow_bbcode'] && $this->auth->acl_get('u_mchat_bbcode'))
|
||||
{
|
||||
$default_bbcodes = array('B', 'I', 'U', 'QUOTE', 'CODE', 'LIST', 'IMG', 'URL', 'SIZE', 'COLOR', 'EMAIL', 'FLASH');
|
||||
|
||||
// Let's remove the default bbcodes
|
||||
$disallowed_bbcode_array = explode('|', strtoupper($this->config['mchat_bbcode_disallowed']));
|
||||
|
||||
foreach ($default_bbcodes as $default_bbcode)
|
||||
{
|
||||
if (!in_array($default_bbcode, $disallowed_bbcode_array))
|
||||
{
|
||||
$this->template->assign_vars(array(
|
||||
'S_MCHAT_BBCODE_' . $default_bbcode => true,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('display_custom_bbcodes'))
|
||||
{
|
||||
include($this->root_path . 'includes/functions_display.' . $this->php_ext);
|
||||
}
|
||||
|
||||
display_custom_bbcodes();
|
||||
}
|
||||
|
||||
// Smile row
|
||||
if ($this->config['allow_smilies'] && $this->auth->acl_get('u_mchat_smilies'))
|
||||
{
|
||||
if (!function_exists('generate_smilies'))
|
||||
{
|
||||
include($this->root_path . 'includes/functions_posting.' . $this->php_ext);
|
||||
}
|
||||
|
||||
generate_smilies('inline', 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns whois and stats at the bottom of the index page
|
||||
*/
|
||||
protected function assign_whois()
|
||||
{
|
||||
if ($this->config['mchat_whois'] || $this->config['mchat_stats_index'] && $this->user->data['user_mchat_stats_index'])
|
||||
{
|
||||
$mchat_stats = $this->functions_mchat->mchat_active_users();
|
||||
$this->template->assign_vars(array(
|
||||
'MCHAT_INDEX_STATS' => $this->config['mchat_stats_index'] && $this->user->data['user_mchat_stats_index'],
|
||||
'MCHAT_USERS_COUNT' => $mchat_stats['mchat_users_count'],
|
||||
'MCHAT_USERS_LIST' => !empty($mchat_stats['online_userlist']) ? $mchat_stats['online_userlist'] : '',
|
||||
'MCHAT_ONLINE_EXPLAIN' => $mchat_stats['refresh_message'],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether an author has edit or delete permissions for a message
|
||||
*
|
||||
* @param $permission string One of u_mchat_edit|u_mchat_delete
|
||||
* @param $author_id int The user id of the message
|
||||
* @param $message_time int The message created time
|
||||
* @return bool
|
||||
*/
|
||||
protected function auth_message($permission, $author_id, $message_time)
|
||||
{
|
||||
if (!$this->auth->acl_get($permission))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->auth->acl_get('m_'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
$can_edit_delete = $this->config['mchat_edit_delete_limit'] == 0 || $message_time >= time() - $this->config['mchat_edit_delete_limit'];
|
||||
return $can_edit_delete && $this->user->data['user_id'] == $author_id && $this->user->data['is_registered'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs bound checks on the message and returns an array containing the message,
|
||||
* BBCode options and additional data ready to be sent to the database
|
||||
*
|
||||
* @param $message string
|
||||
* @param $merge_ary array
|
||||
* @return array
|
||||
*/
|
||||
protected function process_message($message, $merge_ary)
|
||||
{
|
||||
// Must have something other than bbcode in the message
|
||||
$message_chars = trim(preg_replace('#\[/?[^\[\]]+\]#mi', '', $message));
|
||||
if (!$message || !utf8_strlen($message_chars))
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(501, 'MCHAT_NOACCESS');
|
||||
}
|
||||
|
||||
// Must not exceed character limit, excluding whitespaces
|
||||
$message_chars = preg_replace('#\s#m', '', $message);
|
||||
if (utf8_strlen($message_chars) > $this->config['mchat_max_message_lngth'])
|
||||
{
|
||||
throw new \phpbb\exception\http_exception(413, 'MCHAT_MESS_LONG', array($this->config['mchat_max_message_lngth']));
|
||||
}
|
||||
|
||||
// We override the $this->config['min_post_chars'] entry?
|
||||
if ($this->config['mchat_override_min_post_chars'])
|
||||
{
|
||||
$old_cfg['min_post_chars'] = $this->config['min_post_chars'];
|
||||
$this->config['min_post_chars'] = 0;
|
||||
}
|
||||
|
||||
// We do the same for the max number of smilies?
|
||||
if ($this->config['mchat_override_smilie_limit'])
|
||||
{
|
||||
$old_cfg['max_post_smilies'] = $this->config['max_post_smilies'];
|
||||
$this->config['max_post_smilies'] = 0;
|
||||
}
|
||||
|
||||
$mchat_bbcode = $this->config['allow_bbcode'] && $this->auth->acl_get('u_mchat_bbcode');
|
||||
$mchat_urls = $this->config['allow_post_links'] && $this->auth->acl_get('u_mchat_urls');
|
||||
$mchat_smilies = $this->config['allow_smilies'] && $this->auth->acl_get('u_mchat_smilies');
|
||||
|
||||
// Add function part code from http://wiki.phpbb.com/Parsing_text
|
||||
$uid = $bitfield = $options = '';
|
||||
generate_text_for_storage($message, $uid, $bitfield, $options, $mchat_bbcode, $mchat_urls, $mchat_smilies);
|
||||
|
||||
// Not allowed bbcodes
|
||||
if (!$mchat_bbcode)
|
||||
{
|
||||
$message = preg_replace('#\[/?[^\[\]]+\]#Usi', '', $message);
|
||||
}
|
||||
|
||||
// Disallowed bbcodes
|
||||
if ($this->config['mchat_bbcode_disallowed'])
|
||||
{
|
||||
$bbcode_replace = array(
|
||||
'#\[(' . $this->config['mchat_bbcode_disallowed'] . ')[^\[\]]+\]#Usi',
|
||||
'#\[/(' . $this->config['mchat_bbcode_disallowed'] . ')[^\[\]]+\]#Usi',
|
||||
);
|
||||
|
||||
$message = preg_replace($bbcode_replace, '', $message);
|
||||
}
|
||||
|
||||
// Reset the config settings
|
||||
if (isset($old_cfg['min_post_chars']))
|
||||
{
|
||||
$this->config['min_post_chars'] = $old_cfg['min_post_chars'];
|
||||
}
|
||||
|
||||
if (isset($old_cfg['max_post_smilies']))
|
||||
{
|
||||
$this->config['max_post_smilies'] = $old_cfg['max_post_smilies'];
|
||||
}
|
||||
|
||||
return array_merge($merge_ary, array(
|
||||
'message' => str_replace("'", ''', $message),
|
||||
'bbcode_bitfield' => $bitfield,
|
||||
'bbcode_uid' => $uid,
|
||||
'bbcode_options' => $options,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a template file and returns it
|
||||
*
|
||||
* @param $template_file string
|
||||
* @return string
|
||||
*/
|
||||
protected function render_template($template_file)
|
||||
{
|
||||
$this->template->set_filenames(array('body' => $template_file));
|
||||
$content = $this->template->assign_display('body', '', true);
|
||||
|
||||
return trim(str_replace(array("\r", "\n"), '', $content));
|
||||
}
|
||||
}
|
||||
227
event/listener.php
Normal file
@@ -0,0 +1,227 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\event;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class listener implements EventSubscriberInterface
|
||||
{
|
||||
/** @var \dmzx\mchat\core\functions_mchat */
|
||||
protected $functions_mchat;
|
||||
|
||||
/** @var \dmzx\mchat\core\mchat */
|
||||
protected $mchat;
|
||||
|
||||
/** @var \phpbb\controller\helper */
|
||||
protected $helper;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \dmzx\mchat\core\functions_mchat $functions_mchat
|
||||
* @param \dmzx\mchat\core\mchat $mchat
|
||||
* @param \phpbb\controller\helper $helper
|
||||
* @param \phpbb\user $user
|
||||
* @param string $php_ext
|
||||
*/
|
||||
public function __construct(\dmzx\mchat\core\functions_mchat $functions_mchat, \dmzx\mchat\core\mchat $mchat, \phpbb\controller\helper $helper, \phpbb\user $user, $php_ext)
|
||||
{
|
||||
$this->functions_mchat = $functions_mchat;
|
||||
$this->mchat = $mchat;
|
||||
$this->helper = $helper;
|
||||
$this->user = $user;
|
||||
$this->php_ext = $php_ext;
|
||||
}
|
||||
|
||||
static public function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
'core.viewonline_overwrite_location' => 'add_page_viewonline',
|
||||
'core.user_setup' => 'load_language_on_setup',
|
||||
'core.page_header' => 'display_mchat_on_index',
|
||||
'core.posting_modify_submit_post_after' => 'posting_modify_submit_post_after',
|
||||
'core.permissions' => 'permissions',
|
||||
'core.display_custom_bbcodes_modify_sql' => 'display_custom_bbcodes_modify_sql',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function add_page_viewonline($event)
|
||||
{
|
||||
if (strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/mchat') === 0)
|
||||
{
|
||||
$event['location'] = $this->user->lang('MCHAT_TITLE');
|
||||
$event['location_url'] = $this->helper->route('dmzx_mchat_controller');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function load_language_on_setup($event)
|
||||
{
|
||||
$lang_set_ext = $event['lang_set_ext'];
|
||||
$lang_set_ext[] = array(
|
||||
'ext_name' => 'dmzx/mchat',
|
||||
'lang_set' => 'common',
|
||||
);
|
||||
$event['lang_set_ext'] = $lang_set_ext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a URL to the mchat controller file for the header linklist
|
||||
*
|
||||
* @param object $event The event object
|
||||
* @return null
|
||||
* @access public
|
||||
*/
|
||||
public function add_page_header_link($event)
|
||||
{
|
||||
$this->mchat->render_page_header_link();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if mchat should be displayed on index.
|
||||
*
|
||||
* @param object $event The event object
|
||||
* @return null
|
||||
* @access public
|
||||
*/
|
||||
public function display_mchat_on_index($event)
|
||||
{
|
||||
$pagelocsource = $this->user->page['page'];
|
||||
$pagelocremove = "?";
|
||||
if (strpbrk($pagelocremove,$pagelocsource) !== false)
|
||||
{
|
||||
$pageloc = preg_replace("/\?.+/", "", $pagelocsource);
|
||||
//$pageloc = $this->user->page['page'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$pageloc = $this->user->page['page'];
|
||||
}
|
||||
$this->mchat->render_page_header_link();
|
||||
|
||||
if ($pageloc == "index.php")
|
||||
{
|
||||
$this->mchat->page_index();
|
||||
}
|
||||
if ($pageloc == "app.php")
|
||||
{
|
||||
$this->mchat->page_index();
|
||||
}
|
||||
if ($pageloc == "portal")
|
||||
{
|
||||
$this->mchat->page_index();
|
||||
}
|
||||
if ($pageloc == "app.php/portal")
|
||||
{
|
||||
$this->mchat->page_index();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function posting_modify_submit_post_after($event)
|
||||
{
|
||||
$this->functions_mchat->mchat_insert_posting($event['mode'], array(
|
||||
'forum_id' => $event['forum_id'],
|
||||
'forum_name' => $event['post_data']['forum_name'],
|
||||
'post_id' => $event['data']['post_id'],
|
||||
'post_subject' => $event['post_data']['post_subject'],
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function display_custom_bbcodes_modify_sql($event)
|
||||
{
|
||||
$event['sql_ary'] = $this->mchat->remove_disallowed_bbcodes($event['sql_ary']);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function permissions($event)
|
||||
{
|
||||
$event['permissions'] = array_merge($event['permissions'], array(
|
||||
'u_mchat_use' => array(
|
||||
'lang' => 'ACL_U_MCHAT_USE',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_view' => array(
|
||||
'lang' => 'ACL_U_MCHAT_VIEW',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_edit' => array(
|
||||
'lang' => 'ACL_U_MCHAT_EDIT',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_delete' => array(
|
||||
'lang' => 'ACL_U_MCHAT_DELETE',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_ip' => array(
|
||||
'lang' => 'ACL_U_MCHAT_IP',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_pm' => array(
|
||||
'lang' => 'ACL_U_MCHAT_PM',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_like' => array(
|
||||
'lang' => 'ACL_U_MCHAT_LIKE',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_quote' => array(
|
||||
'lang' => 'ACL_U_MCHAT_QUOTE',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_flood_ignore' => array(
|
||||
'lang' => 'ACL_U_MCHAT_FLOOD_IGNORE',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_archive' => array(
|
||||
'lang' => 'ACL_U_MCHAT_ARCHIVE',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_bbcode' => array(
|
||||
'lang' => 'ACL_U_MCHAT_BBCODE',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_smilies' => array(
|
||||
'lang' => 'ACL_U_MCHAT_SMILIES',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'u_mchat_urls' => array(
|
||||
'lang' => 'ACL_U_MCHAT_URLS',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
'a_mchat' => array(
|
||||
'lang' => 'ACL_A_MCHAT',
|
||||
'cat' => 'mChat'
|
||||
),
|
||||
));
|
||||
|
||||
$event['categories'] = array_merge($event['categories'], array(
|
||||
'mChat' => 'ACP_CAT_MCHAT',
|
||||
));
|
||||
}
|
||||
}
|
||||
132
language/de/common.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Senden',
|
||||
'MCHAT_IN' => 'in',
|
||||
'MCHAT_IN_SECTION' => 'Abschnitt',
|
||||
'MCHAT_LIKES' => 'Mag diesen Beitrag',
|
||||
'MCHAT_ANNOUNCEMENT' => 'Ankündigen',
|
||||
'MCHAT_ARCHIVE' => 'Archiv',
|
||||
'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archiv',
|
||||
'MCHAT_BBCODES' => 'BBCodes',
|
||||
'MCHAT_CLEAN' => 'Alle Nachrichten im mChat löschen',
|
||||
'MCHAT_CLEANED' => 'Alle Nachrichten wurden erfolgreich gelöscht',
|
||||
'MCHAT_CLEAR_INPUT' => 'Zurücksetzen',
|
||||
'MCHAT_COPYRIGHT' => '<a href="http://rmcgirr83.org">RMcGirr83</a> © <a href="http://www.dmzx-web.net" title="www.dmzx-web.net">dmzx</a>',
|
||||
'MCHAT_CUSTOM_BBCODES' => 'Eigene BBCodes',
|
||||
'MCHAT_DELALLMESS' => 'Alle Nachrichten löschen?',
|
||||
'MCHAT_DELCONFIRM' => 'Nachricht endgültig löschen?',
|
||||
'MCHAT_DELITE' => 'Löschen',
|
||||
'MCHAT_EDIT' => 'Bearbeiten',
|
||||
'MCHAT_EDITINFO' => 'Bearbeite die Nachricht und klick auf OK',
|
||||
'MCHAT_ERROR' => 'Fehler',
|
||||
'MCHAT_FLOOD' => 'Du kannst keine Nachricht so schnell nach deiner letzten Nachricht schreiben',
|
||||
'MCHAT_FOE' => 'Die Nachricht wurde von <strong>% 1 $ s </ strong> gemacht, der derzeit auf der Ignorieren-Liste steht.',
|
||||
'MCHAT_HELP' => 'mChat Regeln',
|
||||
'MCHAT_HIDE_LIST' => 'Verstecke Liste',
|
||||
'MCHAT_HOUR' => 'Stunde ',
|
||||
'MCHAT_HOURS' => 'Stunden',
|
||||
'MCHAT_IP' => 'IP whois für',
|
||||
'MCHAT_MINUTE' => 'Minute ',
|
||||
'MCHAT_MINUTES' => 'Minuten ',
|
||||
'MCHAT_MESS_LONG' => 'Deine Nachricht ist zu lang.\nBitte kürze deine Nachricht auf %s Zeichen',
|
||||
'MCHAT_NO_CUSTOM_PAGE' => 'Die separate Seite für mChat ist derzeit nicht aktiviert!',
|
||||
'MCHAT_NO_RULES' => 'The mChat rules page is not activated at this time!',
|
||||
'MCHAT_NOACCESS' => 'Du hast keine Berechtigung im mChat zu schreiben',
|
||||
'MCHAT_NOACCESS_ARCHIVE' => 'Du hast keine Berechtigung das Archiv zu sehen',
|
||||
'MCHAT_NOJAVASCRIPT' => 'Dein Browser unterstützt kein Javascript oder Javascript ist deaktiviert',
|
||||
'MCHAT_NOMESSAGE' => 'Keine Nachrichten',
|
||||
'MCHAT_NOMESSAGEINPUT' => 'Du hast keine Nachricht eingegeben',
|
||||
'MCHAT_NOSMILE' => 'Keine Smilies gefunden',
|
||||
'MCHAT_NOTINSTALLED_USER' => 'Der mChat ist nicht installiert. Bitte kontaktiere den Boardgründer.',
|
||||
'MCHAT_NOT_INSTALLED' => 'Die mChat Datenbankeinträge fehlen.<br />Führe bitte den %sInstaller%s aus, um die Datenbankänderungen für mChat durchzuführen.',
|
||||
'MCHAT_OK' => 'OK',
|
||||
'MCHAT_PAUSE' => 'Pausiert',
|
||||
'MCHAT_LOAD' => 'Wird geladen',
|
||||
'MCHAT_PERMISSIONS' => 'Ändere die Benutzerrechte',
|
||||
'MCHAT_REFRESHING' => 'Aktualisiere...',
|
||||
'MCHAT_REFRESH_NO' => 'Automatische Aktualisierung ist ausgeschaltet',
|
||||
'MCHAT_REFRESH_YES' => 'Automatische Aktualisierung alle <strong>%d</strong> Sekunden',
|
||||
'MCHAT_RESPOND' => 'Antworte dem Benutzer',
|
||||
'MCHAT_RESET_QUESTION' => 'Lösche den Eingabebereich?',
|
||||
'MCHAT_SESSION_OUT' => 'mChat Sitzung ist abgelaufen',
|
||||
'MCHAT_SHOW_LIST' => 'Zeige Liste',
|
||||
'MCHAT_SECOND' => 'Sekunde ',
|
||||
'MCHAT_SECONDS' => 'Sekunden ',
|
||||
'MCHAT_SESSION_ENDS' => 'Deine mChat-Sitzung endet in',
|
||||
'MCHAT_SMILES' => 'Smilies',
|
||||
'MCHAT_TOTALMESSAGES' => 'Nachrichten insgesamt: <strong>%s</strong>',
|
||||
'MCHAT_USESOUND' => 'Sound aktivieren?',
|
||||
'MCHAT_ONLINE_USERS_TOTAL' => 'Insgesamt sind <strong>%d</strong> Benutzer im mChat ',
|
||||
'MCHAT_ONLINE_USER_TOTAL' => 'Insgesamt ist <strong>%d</strong> Benutzer im mChat ',
|
||||
'MCHAT_NO_CHATTERS' => 'Derzeit sind keine Benutzer im mChat',
|
||||
'MCHAT_ONLINE_EXPLAIN' => '(basierend auf den aktiven Besuchern der letzten %s)',
|
||||
'WHO_IS_CHATTING' => 'Wer ist im mChat',
|
||||
'WHO_IS_REFRESH_EXPLAIN' => 'Aktualisieren alle <strong>%d</strong> Sekunden',
|
||||
'MCHAT_NEW_POST' => 'Neues Thema',
|
||||
'MCHAT_NEW_REPLY' => 'Erstelle eine neue Antwort',
|
||||
'MCHAT_NEW_QUOTE' => 'Antworte mit einem Zitat',
|
||||
'MCHAT_NEW_EDIT' => 'Bearbeite',
|
||||
|
||||
// UCP
|
||||
'UCP_PROFILE_MCHAT' => 'mChat Einstellung',
|
||||
'DISPLAY_MCHAT' => 'mChat auf der Indexseite anzeigen',
|
||||
'SOUND_MCHAT' => 'Aktiviere Sound für mChat',
|
||||
'DISPLAY_STATS_INDEX' => 'Zeige die "Wer ist im mChat" Statistik auf der Indexseite an',
|
||||
'DISPLAY_NEW_TOPICS' => 'Zeige neue Beiträge im mChat an',
|
||||
'DISPLAY_AVATARS' => 'Zeige Avatare im mChat an',
|
||||
'CHAT_AREA' => 'Chat Umgebung',
|
||||
'CHAT_AREA_EXPLAIN' => 'Wähle welche Art von Umgebung für die Eingabe mit einem Chat: <br /> Ein Textbereich oder <br /> einem Eingangsbereich',
|
||||
'INPUT_AREA' => 'Eingangsbereich',
|
||||
'TEXT_AREA' => 'Textbereich',
|
||||
'UCP_CAT_MCHAT' => 'mChat',
|
||||
'UCP_MCHAT_CONFIG' => 'mChat',
|
||||
|
||||
// Preferences
|
||||
'LOG_MCHAT_TABLE_PRUNED' => 'mChat Tabelle löschen',
|
||||
'ACP_USER_MCHAT' => 'mChat Einstellung',
|
||||
'LOG_DELETED_MCHAT' => '<strong>Lösche mChat Nachricht</strong><br />» %1$en',
|
||||
'LOG_EDITED_MCHAT' => '<strong>Editiere mChat Nachricht</strong><br />» %1$en',
|
||||
'MCHAT_TOP_POSTERS' => 'Top Poster',
|
||||
'MCHAT_NEW_CHAT' => 'Neue mChat Nachricht!',
|
||||
'MCHAT_SEND_PM' => 'Sende private Nachricht',
|
||||
|
||||
// Custom edits
|
||||
'REPLY_WITH_LIKE' => 'mir gefällt dieser Beitrag',
|
||||
|
||||
// board3.de portal lang
|
||||
'PORTAL_MCHAT_TITLE' => 'mChat',
|
||||
'PORTAL_MCHAT_TITLE_EXP' => 'mChat Einstellungen für den Board3-Portal-Block',
|
||||
'PORTAL_MCHAT' => 'Anzeige im Portal',
|
||||
'PORTAL_MCHAT_EXP' => 'Verwenden Sie diese Einstellung zum Anzeigen des mChat im Portal.',
|
||||
));
|
||||
173
language/de/info_acp_mchat.php
Normal file
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Konfiguration',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
'ACP_MCHAT_TITLE' => 'Mini-Chat',
|
||||
'ACP_MCHAT_TITLE_EXPLAIN' => 'Ein Mini-Chat (aka Shoutbox) für dein Forum',
|
||||
'MCHAT_TABLE_DELETED' => 'Die mChat Tabelle wurde erfolgreich gelöscht',
|
||||
'MCHAT_TABLE_CREATED' => 'Die mChat Tabelle wurde erfolgreich erstellt',
|
||||
'MCHAT_TABLE_UPDATED' => 'Die mChat Tabelle wurde erfolgreich upgedated',
|
||||
'MCHAT_NOTHING_TO_UPDATE' => 'Es gibt nichts zu tun....fahre fort',
|
||||
'UCP_CAT_MCHAT' => 'mChat Präferenzen',
|
||||
'UCP_MCHAT_CONFIG' => 'mChat Benutzerpräferenzen',
|
||||
|
||||
// ACP entries
|
||||
'ACP_MCHAT_RULES' => 'Regeln',
|
||||
'ACP_MCHAT_RULES_EXPLAIN' => 'Gib deine Regeln hier ein. Jeder Regel in eine neue Zeile.<br />Lass das Feld frei um die Anzeige zu deaktivieren. Das Limit liegt bei 255 Zeichen.<br /><strong>Diese Nachricht kann übersetzt werden.</strong> (editiere hierzu die Datei: mchat_lang.php und lies die Anweisungen).',
|
||||
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>mChat-Konfiguration erfolgreich geändert</strong>',
|
||||
'MCHAT_CONFIG_SAVED' => 'Die mChat-Konfiguration wurde erfolgreich geändert',
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_VERSION' => 'Version:',
|
||||
'MCHAT_AVATARS' => 'Avatare anzeigen',
|
||||
'MCHAT_AVATARS_EXPLAIN' => 'Wenn ja gesetzt ist, wird ein in der Größe verändertes Benutzer Avatare angezeigt.',
|
||||
'MCHAT_ON_INDEX' => 'mChat im Index',
|
||||
'MCHAT_ON_INDEX_EXPLAIN' => 'Ermöglicht die Anzeige des MCHAT auf der Indexseite.',
|
||||
'MCHAT_INDEX_HEIGHT' => 'Index Seiten Höhe',
|
||||
'MCHAT_INDEX_HEIGHT_EXPLAIN' => 'Die Höhe der Chat Box in Pixeln auf der Index-Seite des Forums.<br /><em>Du kannst nur von 50 bis 1000 Pixel einstellen</em>.',
|
||||
'MCHAT_LOCATION' => 'Platzierung im Forum',
|
||||
'MCHAT_LOCATION_EXPLAIN' => 'Wähle die Position von mChat auf der Startseite.',
|
||||
'MCHAT_TOP_OF_FORUM' => 'Oberhalb des Forums',
|
||||
'MCHAT_BOTTOM_OF_FORUM' => 'Unterhalb des Forums',
|
||||
'MCHAT_REFRESH' => 'Aktualisieren',
|
||||
'MCHAT_REFRESH_EXPLAIN' => 'Anzahl der Sekunden, bevor Chat automatisch aktualisiert wird.<br /><em>Sie sind von 5 bis 60 Sekunden begrenzt</em>.',
|
||||
'MCHAT_LIVE_UPDATES' => 'Live Updates von bearbeiteten und gelöschten Nachrichten',
|
||||
'MCHAT_LIVE_UPDATES_EXPLAIN' => 'Wenn ein Benutzer Nachrichten bearbeitet oder löscht, werden die Änderungen für alle anderen live aktualisiert, ohne dass sich die Seite zu aktualisiert. Deaktivieren Sie diese Option, wenn Leistungsprobleme auftreten.',
|
||||
'MCHAT_PRUNE' => 'Automatisches Löschen erlauben',
|
||||
'MCHAT_PRUNE_EXPLAIN' => 'Stelle JA ein, um die automatische Löschfunktion zu aktivieren.<br /><em>Hat nur Auswirkung, wenn ein Benutzer die separate Seite oder das Archiv betrachtet.</em.',
|
||||
'MCHAT_PRUNE_NUM' => 'Anzahl verbleibender Nachrichten nach dem automatischem Löschen',
|
||||
'MCHAT_PRUNE_NUM_EXPLAIN' => 'Die Anzahl der Nachrichten, die nach dem Löschen im Chat verbleiben.',
|
||||
'MCHAT_MESSAGE_LIMIT' => 'Nachrichtenlimit',
|
||||
'MCHAT_MESSAGE_LIMIT_EXPLAIN' => 'Die maximale Anzahl der Nachrichten, die auf der Hauptseite des Forums angezeigt werden soll.<br /><em>Empfohlen sind zwischen 10 und 20</em>.',
|
||||
'MCHAT_MESSAGE_NUM' => 'Nachrichtengrenze',
|
||||
'MCHAT_MESSAGE_NUM_EXPLAIN' => 'Die maximale Anzahl von Nachrichten im Chat-Bereich die auf der Indexseite angezeigt werden. <br /> <Em> Empfohlen von 10 bis 50 </ em>.',
|
||||
'MCHAT_ARCHIVE_LIMIT' => 'Archivlimit',
|
||||
'MCHAT_ARCHIVE_LIMIT_EXPLAIN' => 'Die maximale Anzahl Nachrichten pro Seite im Archiv.<br /> <em>Empfohlen sind 25 bis 50</e.',
|
||||
'MCHAT_FLOOD_TIME' => 'Flood-Intervall',
|
||||
'MCHAT_FLOOD_TIME_EXPLAIN' => 'Die Zeit in Sekunden, die ein Benutzer warten muß, bis er eine neue Nachricht im mChat absenden kann.<br /><em>Empfohlen sind 5 bis 30, stelle 0 ein, um die Funktion zu deaktivieren</.',
|
||||
'MCHAT_EDIT_DELETE_LIMIT' => 'Frist für die Bearbeitung und das Löschen von Nachrichten',
|
||||
'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Nachrichten, die älter als die angegebene Anzahl von Sekunden können vom Autor nicht mehr bearbeitet oder gelöscht werden.<br />Benutzer, die bearbeiten/löschen dürfen und von der <em>Moderator Genehmigung befreit sind</ me> von dieser Frist. <br /> Bei 0 wird unbegrenztes Bearbeiten und Löschen ermöglicht.',
|
||||
'MCHAT_MAX_MESSAGE_LENGTH' => 'Maximale Nachrichtenlänge',
|
||||
'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Die maximal erlaubte Anzahl von Zeichen pro Nachricht.<br /><em>Empfohlen sind 100 bis 500, stelle 0 ein, um die Funktion zu deaktivieren</em>.',
|
||||
'MCHAT_CUSTOM_PAGE' => 'Eigenständige Seite',
|
||||
'MCHAT_CUSTOM_PAGE_EXPLAIN' => 'Erlaubt die Benutzung des Chats auf einer eigenständigen Seite.',
|
||||
'MCHAT_CUSTOM_HEIGHT' => 'Höhe der eigenen mChat Seite',
|
||||
'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'Die Höhe der Chat-Box in Pixeln auf der eigenen mChat Seite.<br /><em>Du kannst nur von 50 bis 1000 Pixel einstellen</em>.',
|
||||
'MCHAT_DATE_FORMAT' => 'Datums-Format',
|
||||
'MCHAT_DATE_FORMAT_EXPLAIN' => 'Die Syntax entspricht der der date()-Funktion von PHP <a href="http://www.php.net/date">date()</a>',
|
||||
'MCHAT_CUSTOM_DATEFORMAT' => 'Eigenes…',
|
||||
'MCHAT_WHOIS' => 'Whois',
|
||||
'MCHAT_WHOIS_EXPLAIN' => 'Erlaubt es die Benutzer anzuzeigen, die sich gerade auf der mChat-Seite befinden.',
|
||||
'MCHAT_WHOIS_REFRESH' => 'Whois aktualisieren',
|
||||
'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Die Anzahl Sekunden, bis die Whois-anzeige aktualisiert wird.<br /><strong>Nicht unter 30 Sekunden einstellen!</strong>.',
|
||||
'MCHAT_BBCODES_DISALLOWED' => 'Nicht erlaubte BBcodes',
|
||||
'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Hier kann man BBcodes eintragen, die <strong>nicht</strong> in einer Nachricht verwendet werden dürfen.<br />BBcodes mit einem senkrechten Strich trennen, beispielsweise: b|u|code',
|
||||
'MCHAT_STATIC_MESSAGE' => 'Permanente Nachricht in der Chatbox',
|
||||
'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Hier kannst du eine permanente Nachricht für die Benutzer des mChats eingeben.<br />Lass es frei um keine Nachricht anzuzeigen. Deine Nachricht kann 255 Zeichen umfassen.<br /><strong>Diese Nachricht kann auch übersetzt werden.</strong> (Editiere hierzu die Datei mchat_lang.php file und lies die Anweisungen.).',
|
||||
'MCHAT_USER_TIMEOUT' => 'Zeitüberschreitung für Benutzer',
|
||||
'MCHAT_USER_TIMEOUT_EXPLAIN' => 'Stelle einen Wert für die Zeitüberschreitung in Sekunden ein, nach der die Sitzung für einen Benutzer im mChat endet. Stelle 0 ein für kein Timeout Limit.<br /><em>Das Limit ist das Selbe, wie in deinen %sForum Einstellungen für Sitzungen%s. Derzeit beträgt dieser Wert %s Sekunden.</em>',
|
||||
'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Smilielimit überschreiben?',
|
||||
'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Falls JA eingestellt ist, wird das eingestellte Limit im Forum für Smilies im mChat aufgehoben.',
|
||||
'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Minimale Anzahl von Zeichen aufheben?',
|
||||
'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Falls ja eingestellt ist, wird das Limit für die minimale Anzahl an Zeichen für mChat-Nachrichten aufgehoben.',
|
||||
'MCHAT_NEW_POSTS_TOPIC' => 'Zeige New Topic Beiträge an',
|
||||
'MCHAT_NEW_POSTS_TOPIC_EXPLAIN' => 'Stelle auf Ja, damit neue Themen und Beiträge aus dem Forum im Chat Nachrichtenbereich angezeigt werden.',
|
||||
'MCHAT_NEW_POSTS_REPLY' => 'Zeige neue Antworten in Beiträgen an',
|
||||
'MCHAT_NEW_POSTS_REPLY_EXPLAIN' => 'Stelle auf Ja, damit beantwortete Beiträge aus dem Forum im Chat Nachrichtenbereich angezeigt werden.',
|
||||
'MCHAT_NEW_POSTS_EDIT' => 'Zeige editierte Beiträge an',
|
||||
'MCHAT_NEW_POSTS_EDIT_EXPLAIN' => 'Stelle auf Ja, damit bearbeitete Beiträge aus dem Forum im Chat Nachrichtenbereich angezeigt werden.',
|
||||
'MCHAT_NEW_POSTS_QUOTE' => 'Zeige zitierte Beiträge an',
|
||||
'MCHAT_NEW_POSTS_QUOTE_EXPLAIN' => 'Stelle auf Ja, damit die zitierten Beiträge aus dem Forum im Chat Nachrichtenbereich angezeigt werden.',
|
||||
'MCHAT_MAIN' => 'Hauptkonfiguration',
|
||||
'MCHAT_STATS' => 'Wer ist im mChat?',
|
||||
'MCHAT_STATS_INDEX' => 'Anzeige auf dem Index',
|
||||
'MCHAT_STATS_INDEX_EXPLAIN' => 'Zeigt auf dem Index an wer im Mini-Chat ist.',
|
||||
'MCHAT_MESSAGE_TOP' => 'Nachricht unten / oben',
|
||||
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'Hier kannst Du einstellen, ob der Nachrichtenbereich oben oder unten angezeigt werden soll.',
|
||||
'MCHAT_BOTTOM' => 'Unten',
|
||||
'MCHAT_TOP' => 'Oben',
|
||||
'MCHAT_MESSAGES' => 'Nachrichten-Einstellungen',
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Den Chat während einer Nachrichteneingabe nicht aktualisieren',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Falls JA eingestellt ist, ist das automatische Aktualisieren während der Eingabe einer Nachricht deaktiviert.',
|
||||
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'Das angegebene Datumsformat ist zu lang.',
|
||||
'TOO_SHORT_DATE' => 'Das angegebene Datumsformat ist zu kurz.',
|
||||
'TOO_SMALL_REFRESH' => 'Das Aktualisierungsintervall ist zu kurz.',
|
||||
'TOO_LARGE_REFRESH' => 'Das Aktualisierungsintervall ist zu lang.',
|
||||
'TOO_SMALL_MESSAGE_LIMIT' => 'Das Nachrichtenlimit ist zu klein.',
|
||||
'TOO_LARGE_MESSAGE_LIMIT' => 'Das Nachrichtenlimit ist zu groß.',
|
||||
'TOO_SMALL_ARCHIVE_LIMIT' => 'Der Wert des Archivlimits ist zu klein.',
|
||||
'TOO_LARGE_ARCHIVE_LIMIT' => 'Der Wert des Archivlimits ist zu groß.',
|
||||
'TOO_SMALL_FLOOD_TIME' => 'Das Flood-Intervall ist zu kurz.',
|
||||
'TOO_LARGE_FLOOD_TIME' => 'Das Flood-Intervall ist zu lang.',
|
||||
'TOO_SMALL_MAX_MESSAGE_LNGTH' => 'Der Wert der maximalen Nachrichtenlänge ist zu klein.',
|
||||
'TOO_LARGE_MAX_MESSAGE_LNGTH' => 'Der Wert der maximalen Nachrichtenlänge ist zu groß.',
|
||||
'TOO_SMALL_MAX_WORDS_LNGTH' => 'Der Wert der maximalen Wortlänge ist zu groß.',
|
||||
'TOO_LARGE_MAX_WORDS_LNGTH' => 'Der Wert für die maximale Wortlänge ist zu groß.',
|
||||
'TOO_SMALL_WHOIS_REFRESH' => 'Der Wert für die Whois-Aktualisierung ist zu klein.',
|
||||
'TOO_LARGE_WHOIS_REFRESH' => 'Der Wert für die Whois-Aktualisierung ist zu groß.',
|
||||
'TOO_SMALL_INDEX_HEIGHT' => 'Der Wert für die Höhe des Index ist zu klein.',
|
||||
'TOO_LARGE_INDEX_HEIGHT' => 'Der Wert für die Höhe des Index ist zu groß.',
|
||||
'TOO_SMALL_CUSTOM_HEIGHT' => 'Der Wert für die Höhe des Chats auf einer separaten Seite ist zu klein.',
|
||||
'TOO_LARGE_CUSTOM_HEIGHT' => 'Der Wert für die Höhe des Chats auf einer separaten Seite ist zu groß',
|
||||
'TOO_SHORT_STATIC_MESSAGE' => 'Der Wert für die Länge der permanenten Nachricht ist zu klein.',
|
||||
'TOO_LONG_STATIC_MESSAGE' => 'Der Wert für die Länge der permanenten Nachricht ist zu groß.',
|
||||
'TOO_SMALL_TIMEOUT' => 'Der Wert für die Zeitüberschreitung eines Benutzers ist zu klein.',
|
||||
'TOO_LARGE_TIMEOUT' => 'Der Wert für die Zeitüberschreitung eines Benutzers ist zu groß.',
|
||||
|
||||
// User perms
|
||||
'ACL_U_MCHAT_USE' => 'Kann mChat benutzen',
|
||||
'ACL_U_MCHAT_VIEW' => 'Kann mChat sehen',
|
||||
'ACL_U_MCHAT_EDIT' => 'Kann mChat bearbeiten',
|
||||
'ACL_U_MCHAT_DELETE' => 'Kann mChat Nachricht löschen',
|
||||
'ACL_U_MCHAT_IP' => 'Kann mChat IP sehen',
|
||||
'ACL_U_MCHAT_PM' => 'Kann Private Nachricht im mChat verwenden',
|
||||
'ACL_U_MCHAT_LIKE' => 'Kann "gefällt mir" Nachrichten im mChat verwenden',
|
||||
'ACL_U_MCHAT_QUOTE' => 'Kann Zitate im mChat verwenden',
|
||||
'ACL_U_MCHAT_FLOOD_IGNORE' => 'Kann den mChat Flood ignorieren',
|
||||
'ACL_U_MCHAT_ARCHIVE' => 'Kann das mChat Archiv sehen',
|
||||
'ACL_U_MCHAT_BBCODE' => 'Kann BBCode im mChat verwenden',
|
||||
'ACL_U_MCHAT_SMILIES' => 'Kann Smilies im mChat verwenden',
|
||||
'ACL_U_MCHAT_URLS' => 'Kann Url im mChat posten',
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Kann mChat Einstellung managen',
|
||||
|
||||
//board3
|
||||
'MCHAT_ON_PORTAL' => 'mChat im Portal',
|
||||
'MCHAT_ON_PORTAL_EXPLAIN' => 'Ermöglicht die Anzeige des MCHAT auf der Board3-Portalseite.',
|
||||
));
|
||||
133
language/en/common.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Send',
|
||||
'MCHAT_IN' => 'in',
|
||||
'MCHAT_IN_SECTION' => 'section',
|
||||
'MCHAT_LIKES' => 'Likes this post',
|
||||
'MCHAT_ANNOUNCEMENT' => 'Announcement',
|
||||
'MCHAT_ARCHIVE' => 'Archive',
|
||||
'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archive',
|
||||
'MCHAT_BBCODES' => 'BBCodes',
|
||||
'MCHAT_CLEAN' => 'Purge',
|
||||
'MCHAT_CLEANED' => 'All messages have been successfully removed',
|
||||
'MCHAT_CLEAR_INPUT' => 'Reset',
|
||||
'MCHAT_COPYRIGHT' => '<a href="http://rmcgirr83.org">RMcGirr83</a> © <a href="http://www.dmzx-web.net" title="www.dmzx-web.net">dmzx</a>',
|
||||
'MCHAT_CUSTOM_BBCODES' => 'Custom BBCodes',
|
||||
'MCHAT_DELALLMESS' => 'Remove all messages?',
|
||||
'MCHAT_DELCONFIRM' => 'Do you confirm removal?',
|
||||
'MCHAT_DELITE' => 'Delete',
|
||||
'MCHAT_EDIT' => 'Edit',
|
||||
'MCHAT_EDITINFO' => 'Edit the message and click OK',
|
||||
'MCHAT_ERROR' => 'Error',
|
||||
'MCHAT_FLOOD' => 'You can not post another message so soon after your last',
|
||||
'MCHAT_FOE' => 'This message was made by <strong>%1$s</strong> who is currently on your ignore list.',
|
||||
'MCHAT_HELP' => 'mChat Rules',
|
||||
'MCHAT_HIDE_LIST' => 'Hide List',
|
||||
'MCHAT_HOUR' => 'hour',
|
||||
'MCHAT_HOURS' => 'hours',
|
||||
'MCHAT_IP' => 'IP whois for',
|
||||
'MCHAT_MINUTE' => 'minute',
|
||||
'MCHAT_MINUTES' => 'minutes',
|
||||
'MCHAT_MESS_LONG' => 'Your message is too long.\nPlease limit it to %s characters',
|
||||
'MCHAT_NO_CUSTOM_PAGE' => 'The mChat custom page is not activated at this time!',
|
||||
'MCHAT_NO_RULES' => 'The mChat rules page is not activated at this time!',
|
||||
'MCHAT_NOACCESS' => 'You don’t have permission to post in the mChat',
|
||||
'MCHAT_NOACCESS_ARCHIVE' => 'You don’t have permission to view the archive',
|
||||
'MCHAT_NOJAVASCRIPT' => 'Your browser does not support JavaScript or JavaScript is disabled',
|
||||
'MCHAT_NOMESSAGE' => 'No messages',
|
||||
'MCHAT_NOMESSAGEINPUT' => 'You have not entered a message',
|
||||
'MCHAT_NOSMILE' => 'Smilies not found',
|
||||
'MCHAT_NOTINSTALLED_USER' => 'mChat is not installed. Please notify the board founder.',
|
||||
'MCHAT_NOT_INSTALLED' => 'mChat database entries are missing.<br />Please run the %sinstaller%s to make the database changes for the modification.',
|
||||
'MCHAT_OK' => 'OK',
|
||||
'MCHAT_PAUSE' => 'Paused',
|
||||
'MCHAT_LOAD' => 'Loading',
|
||||
'MCHAT_PERMISSIONS' => 'Change user’s permissions',
|
||||
'MCHAT_REFRESHING' => 'Refreshing...',
|
||||
'MCHAT_REFRESH_NO' => 'Autoupdate is off',
|
||||
'MCHAT_REFRESH_YES' => 'Autoupdate every <strong>%d</strong> seconds',
|
||||
'MCHAT_RESPOND' => 'Respond to user',
|
||||
'MCHAT_RESET_QUESTION' => 'Clear the input area?',
|
||||
'MCHAT_SESSION_OUT' => 'Chat session has expired',
|
||||
'MCHAT_SHOW_LIST' => 'Show List',
|
||||
'MCHAT_SECOND' => 'second',
|
||||
'MCHAT_SECONDS' => 'seconds',
|
||||
'MCHAT_SESSION_ENDS' => 'Chat session ends in',
|
||||
'MCHAT_SMILES' => 'Smilies',
|
||||
'MCHAT_TOTALMESSAGES' => 'Total messages: <strong>%s</strong>',
|
||||
'MCHAT_USESOUND' => 'Use sound?',
|
||||
'MCHAT_ONLINE_USERS_TOTAL' => 'In total there are <strong>%d</strong> users chatting',
|
||||
'MCHAT_ONLINE_USER_TOTAL' => 'In total there is <strong>%d</strong> user chatting',
|
||||
'MCHAT_NO_CHATTERS' => 'No one is chatting',
|
||||
'MCHAT_ONLINE_EXPLAIN' => 'based on users active over the past %s',
|
||||
'WHO_IS_CHATTING' => 'Who is chatting',
|
||||
'WHO_IS_REFRESH_EXPLAIN' => 'Refreshes every <strong>%d</strong> seconds',
|
||||
'MCHAT_NEW_POST' => 'Made A New Topic',
|
||||
'MCHAT_NEW_REPLY' => 'Made A New Reply',
|
||||
'MCHAT_NEW_QUOTE' => 'Replied with a Quote',
|
||||
'MCHAT_NEW_EDIT' => 'Made A Edit',
|
||||
|
||||
// UCP
|
||||
'UCP_PROFILE_MCHAT' => 'mChat Preferences',
|
||||
'DISPLAY_MCHAT' => 'Display mChat on Index',
|
||||
'SOUND_MCHAT' => 'Enable mChat sound',
|
||||
'DISPLAY_STATS_INDEX' => 'Display Who is Chatting on Index',
|
||||
'DISPLAY_NEW_TOPICS' => 'Display new topics in the chat',
|
||||
'DISPLAY_AVATARS' => 'Display avatars in the chat',
|
||||
'CHAT_AREA' => 'Input type',
|
||||
'CHAT_AREA_EXPLAIN' => 'Choose which type of area to use to input a chat:<br />A text area or<br />an input area',
|
||||
'INPUT_AREA' => 'Input area',
|
||||
'TEXT_AREA' => 'Text area',
|
||||
'UCP_CAT_MCHAT' => 'mChat',
|
||||
'UCP_MCHAT_CONFIG' => 'mChat',
|
||||
|
||||
// Preferences
|
||||
'LOG_MCHAT_TABLE_PRUNED' => 'mChat Table was pruned',
|
||||
'ACP_USER_MCHAT' => 'mChat Settings',
|
||||
'LOG_DELETED_MCHAT' => '<strong>Deleted mChat message</strong><br />» %1$s',
|
||||
'LOG_EDITED_MCHAT' => '<strong>Edited mChat message</strong><br />» %1$s',
|
||||
'MCHAT_TOP_POSTERS' => 'Top Spammers',
|
||||
'MCHAT_NEW_CHAT' => 'New Chat Message!',
|
||||
'MCHAT_SEND_PM' => 'Send Private Message',
|
||||
|
||||
// Custom edits
|
||||
'REPLY_WITH_LIKE' => 'Like This Post',
|
||||
|
||||
|
||||
// board3.de portal lang
|
||||
'PORTAL_MCHAT_TITLE' => 'Mini-Chat',
|
||||
'PORTAL_MCHAT_TITLE_EXP' => 'Mini-Chat Settings for board3 portal block',
|
||||
'PORTAL_MCHAT' => 'Display on portal',
|
||||
'PORTAL_MCHAT_EXP' => 'Use this setting to display Mini-Chat on portal.',
|
||||
));
|
||||
173
language/en/info_acp_mchat.php
Normal file
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configuration',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
'ACP_MCHAT_TITLE' => 'Mini-Chat',
|
||||
'ACP_MCHAT_TITLE_EXPLAIN' => 'A mini chat (aka “shout box”) for your forum',
|
||||
'MCHAT_TABLE_DELETED' => 'The mChat table was successfully deleted',
|
||||
'MCHAT_TABLE_CREATED' => 'The mChat table was successfully created',
|
||||
'MCHAT_TABLE_UPDATED' => 'The mChat table was successfully updated',
|
||||
'MCHAT_NOTHING_TO_UPDATE' => 'Nothing to do....continuing',
|
||||
'UCP_CAT_MCHAT' => 'mChat Prefs',
|
||||
'UCP_MCHAT_CONFIG' => 'User mChat Prefs',
|
||||
|
||||
// ACP entries
|
||||
'ACP_MCHAT_RULES' => 'Rules',
|
||||
'ACP_MCHAT_RULES_EXPLAIN' => 'Enter the rules of the forum here. Each rule on a new line.<br />You are limited to 255 characters.<br /><strong>This message can be translated.</strong> (you must edit the mchat_lang.php file and read the instructions).',
|
||||
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>Updated mChat config </strong>',
|
||||
'MCHAT_CONFIG_SAVED' => 'Mini Chat configuration has been updated',
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_VERSION' => 'Version:',
|
||||
'MCHAT_AVATARS' => 'Display avatars',
|
||||
'MCHAT_AVATARS_EXPLAIN' => 'If set yes, resized user avatars will be displayed',
|
||||
'MCHAT_ON_INDEX' => 'mChat On Index',
|
||||
'MCHAT_ON_INDEX_EXPLAIN' => 'Allow the display of the mChat on the index page.',
|
||||
'MCHAT_INDEX_HEIGHT' => 'Index Page Height',
|
||||
'MCHAT_INDEX_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the index page of the forum.<br /><em>You are limited from 50 to 1000</em>.',
|
||||
'MCHAT_LOCATION' => 'Location on Forum',
|
||||
'MCHAT_LOCATION_EXPLAIN' => 'Choose the location of the mChat on the index page.',
|
||||
'MCHAT_TOP_OF_FORUM' => 'Top of Forum',
|
||||
'MCHAT_BOTTOM_OF_FORUM' => 'Bottom of Forum',
|
||||
'MCHAT_REFRESH' => 'Refresh',
|
||||
'MCHAT_REFRESH_EXPLAIN' => 'Number of seconds before chat automatically refreshes.<br /><em>You are limited from 5 to 60 seconds</em>.',
|
||||
'MCHAT_LIVE_UPDATES' => 'Live updates of edited and deleted messages',
|
||||
'MCHAT_LIVE_UPDATES_EXPLAIN' => 'When a user edits or deletes messages, the changes are updated live for all others, without them having to refresh the page. Disable this if you experience performance issues.',
|
||||
'MCHAT_PRUNE' => 'Enable Prune',
|
||||
'MCHAT_PRUNE_EXPLAIN' => 'Set to yes to enable the prune feature.<br /><em>Only occurs if a user views the custom or archive pages</em>.',
|
||||
'MCHAT_PRUNE_NUM' => 'Prune Number',
|
||||
'MCHAT_PRUNE_NUM_EXPLAIN' => 'The number of messages to retain in the chat.',
|
||||
'MCHAT_MESSAGE_LIMIT' => 'Message limit',
|
||||
'MCHAT_MESSAGE_LIMIT_EXPLAIN' => 'The maximum number of messages to show in the chat area.<br /><em>Recommended from 10 to 30</em>.',
|
||||
'MCHAT_MESSAGE_NUM' => 'Index page message limit',
|
||||
'MCHAT_MESSAGE_NUM_EXPLAIN' => 'The maximum number of messages to show in the chat area on the index page.<br /><em>Recommended from 10 to 50</em>.',
|
||||
'MCHAT_ARCHIVE_LIMIT' => 'Archive limit',
|
||||
'MCHAT_ARCHIVE_LIMIT_EXPLAIN' => 'The maximum number of messages to show per page on the archive page.<br /> <em>Recommended from 25 to 50</em>.',
|
||||
'MCHAT_FLOOD_TIME' => 'Flood time',
|
||||
'MCHAT_FLOOD_TIME_EXPLAIN' => 'The number of seconds a user must wait before posting another message in the chat.<br /><em>Recommended 5 to 30, set to 0 to disable</em>.',
|
||||
'MCHAT_EDIT_DELETE_LIMIT' => 'Time limit for editing and deleting messages',
|
||||
'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Messages older than the specified number of seconds cannot be edited or deleted by the author any more.<br />Users who have edit/delete permission as well as <em>moderator permission are exempt</em> from this time limit.<br />Set to 0 to allow unlimited editing and deleting.',
|
||||
'MCHAT_MAX_MESSAGE_LENGTH' => 'Max message length',
|
||||
'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Max number of characters allowed per message posted.<br /><em>Recommended from 100 to 500, set to 0 to disable</em>.',
|
||||
'MCHAT_CUSTOM_PAGE' => 'Custom Page',
|
||||
'MCHAT_CUSTOM_PAGE_EXPLAIN' => 'Allow the use of the custom page',
|
||||
'MCHAT_CUSTOM_HEIGHT' => 'Custom Page Height',
|
||||
'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'The height of the chat box in pixels on the separate mChat page.<br /><em>You are limited from 50 to 1000</em>.',
|
||||
'MCHAT_DATE_FORMAT' => 'Date format',
|
||||
'MCHAT_DATE_FORMAT_EXPLAIN' => 'The syntax used is identical to the PHP <a href="http://www.php.net/date">date()</a> function.',
|
||||
'MCHAT_CUSTOM_DATEFORMAT' => 'Custom…',
|
||||
'MCHAT_WHOIS' => 'Whois',
|
||||
'MCHAT_WHOIS_EXPLAIN' => 'Allow a display of users who are chatting',
|
||||
'MCHAT_WHOIS_REFRESH' => 'Whois refresh',
|
||||
'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Number of seconds before whois stats refreshes.<br /><em>You are limited from 30 to 300 seconds</em>.',
|
||||
'MCHAT_BBCODES_DISALLOWED' => 'Disallowed bbcodes',
|
||||
'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Here you can input the bbcodes that are <strong>not</strong> to be used in a message.<br />Separate bbcodes with a vertical bar, for example: <br />b|i|u|code|list|list=|flash|quote and/or a %scustom bbcode tag name%s',
|
||||
'MCHAT_STATIC_MESSAGE' => 'Static Message',
|
||||
'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Here you can define a static message to display to users of the chat. HTML code is allowed.<br />Set to empty to disable the display. You are limited to 255 characters.<br /><strong>This message can be translated.</strong> (you must edit the mchat_lang.php file and read the instructions).',
|
||||
'MCHAT_USER_TIMEOUT' => 'User Timeout',
|
||||
'MCHAT_USER_TIMEOUT_EXPLAIN' => 'Set the amount of time, in seconds, until a users session in the chat ends. Set to 0 for no timeout.<br /><em>You are limited to the %sforum config setting for sessions%s which is currently set to %s seconds</em>',
|
||||
'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Override smilie limit',
|
||||
'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Set to yes to override the forums smilie limit setting for chat messages',
|
||||
'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Override minimum characters limit',
|
||||
'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Set to yes to override the forums minimum characters setting for chat messages',
|
||||
'MCHAT_NEW_POSTS_TOPIC' => 'Display New Topic Posts',
|
||||
'MCHAT_NEW_POSTS_TOPIC_EXPLAIN' => 'Set to yes to allow new topic posts from the forum to be posted into the chat message area.',
|
||||
'MCHAT_NEW_POSTS_REPLY' => 'Display New Replied Posts',
|
||||
'MCHAT_NEW_POSTS_REPLY_EXPLAIN' => 'Set to yes to allow replied posts from the forum to be posted into the chat message area.',
|
||||
'MCHAT_NEW_POSTS_EDIT' => 'Display Edited Posts',
|
||||
'MCHAT_NEW_POSTS_EDIT_EXPLAIN' => 'Set to yes to allow edited posts from the forum to be posted into the chat message area.',
|
||||
'MCHAT_NEW_POSTS_QUOTE' => 'Display Quoted Posts',
|
||||
'MCHAT_NEW_POSTS_QUOTE_EXPLAIN' => 'Set to yes to allow quoted posts from the forum to be posted into the chat message area.',
|
||||
'MCHAT_MAIN' => 'Main Configuration',
|
||||
'MCHAT_STATS' => 'Whois Chatting',
|
||||
'MCHAT_STATS_INDEX' => 'Stats on Index',
|
||||
'MCHAT_STATS_INDEX_EXPLAIN' => 'Show who is chatting with in the stats section of the forum',
|
||||
'MCHAT_MESSAGE_TOP' => 'Keep message on Bottom / Top',
|
||||
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'This will post the message bottom or top in the chat message area.',
|
||||
'MCHAT_BOTTOM' => 'Bottom',
|
||||
'MCHAT_TOP' => 'Top',
|
||||
'MCHAT_MESSAGES' => 'Message Settings',
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pause on input',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'If set Yes, then the chat will not autoupdate upon a user entering a message in the input area',
|
||||
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'The date format you entered is too long.',
|
||||
'TOO_SHORT_DATE' => 'The date format you entered is too short.',
|
||||
'TOO_SMALL_REFRESH' => 'The refresh value is too small.',
|
||||
'TOO_LARGE_REFRESH' => 'The refresh value is too large.',
|
||||
'TOO_SMALL_MESSAGE_LIMIT' => 'The message limit value is too small.',
|
||||
'TOO_LARGE_MESSAGE_LIMIT' => 'The message limit value is too large.',
|
||||
'TOO_SMALL_ARCHIVE_LIMIT' => 'The archive limit value is too small.',
|
||||
'TOO_LARGE_ARCHIVE_LIMIT' => 'The archive limit value is too large.',
|
||||
'TOO_SMALL_FLOOD_TIME' => 'The flood time value is too small.',
|
||||
'TOO_LARGE_FLOOD_TIME' => 'The flood time value is too large.',
|
||||
'TOO_SMALL_MAX_MESSAGE_LNGTH' => 'The max message length value is too small.',
|
||||
'TOO_LARGE_MAX_MESSAGE_LNGTH' => 'The max message length value is too large.',
|
||||
'TOO_SMALL_MAX_WORDS_LNGTH' => 'The max words length value is too small.',
|
||||
'TOO_LARGE_MAX_WORDS_LNGTH' => 'The max words length value is too large.',
|
||||
'TOO_SMALL_WHOIS_REFRESH' => 'The whois refresh value is too small.',
|
||||
'TOO_LARGE_WHOIS_REFRESH' => 'The whois refresh value is too large.',
|
||||
'TOO_SMALL_INDEX_HEIGHT' => 'The index height value is too small.',
|
||||
'TOO_LARGE_INDEX_HEIGHT' => 'The index height value is too large.',
|
||||
'TOO_SMALL_CUSTOM_HEIGHT' => 'The custom height value is too small.',
|
||||
'TOO_LARGE_CUSTOM_HEIGHT' => 'The custom height value is too large.',
|
||||
'TOO_SHORT_STATIC_MESSAGE' => 'The static message value is too short.',
|
||||
'TOO_LONG_STATIC_MESSAGE' => 'The static message value is too long.',
|
||||
'TOO_SMALL_TIMEOUT' => 'The user timeout value is too small.',
|
||||
'TOO_LARGE_TIMEOUT' => 'The user timeout value is too large.',
|
||||
|
||||
// User perms
|
||||
'ACL_U_MCHAT_USE' => 'Can use mChat',
|
||||
'ACL_U_MCHAT_VIEW' => 'Can view mChat',
|
||||
'ACL_U_MCHAT_EDIT' => 'Can edit messages',
|
||||
'ACL_U_MCHAT_DELETE' => 'Can delete messages',
|
||||
'ACL_U_MCHAT_IP' => 'Can view IP addresses',
|
||||
'ACL_U_MCHAT_PM' => 'Can use private message',
|
||||
'ACL_U_MCHAT_LIKE' => 'Can use like message',
|
||||
'ACL_U_MCHAT_QUOTE' => 'Can use quote message',
|
||||
'ACL_U_MCHAT_FLOOD_IGNORE' => 'Can ignore flood',
|
||||
'ACL_U_MCHAT_ARCHIVE' => 'Can view the archive',
|
||||
'ACL_U_MCHAT_BBCODE' => 'Can use bbcode',
|
||||
'ACL_U_MCHAT_SMILIES' => 'Can use smilies',
|
||||
'ACL_U_MCHAT_URLS' => 'Can post urls',
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Can manage mChat settings',
|
||||
|
||||
//board3
|
||||
'MCHAT_ON_PORTAL' => 'mChat On Portal',
|
||||
'MCHAT_ON_PORTAL_EXPLAIN' => 'Allow the display of the mChat on the Board3 Portal page.',
|
||||
));
|
||||
132
language/es/common.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Enviar',
|
||||
'MCHAT_IN' => 'en',
|
||||
'MCHAT_IN_SECTION' => 'sección',
|
||||
'MCHAT_LIKES' => 'Me Gusta este mensaje',
|
||||
'MCHAT_ANNOUNCEMENT' => 'Anuncio',
|
||||
'MCHAT_ARCHIVE' => 'Archivo',
|
||||
'MCHAT_ARCHIVE_PAGE' => 'Archivo de Mini-Chat',
|
||||
'MCHAT_BBCODES' => 'BBCodes',
|
||||
'MCHAT_CLEAN' => 'Purge',
|
||||
'MCHAT_CLEANED' => 'Todos los mensajes han sido eliminados correctamente',
|
||||
'MCHAT_CLEAR_INPUT' => 'Reiniciar',
|
||||
'MCHAT_COPYRIGHT' => '<a href="http://rmcgirr83.org">RMcGirr83</a> © <a href="http://www.dmzx-web.net" title="www.dmzx-web.net">dmzx</a>',
|
||||
'MCHAT_CUSTOM_BBCODES' => 'BBCodes personalizados',
|
||||
'MCHAT_DELALLMESS' => '¿Eliminar todos los mensajes?',
|
||||
'MCHAT_DELCONFIRM' => '¿Quiere confirmar el borrado?',
|
||||
'MCHAT_DELITE' => 'Borrar',
|
||||
'MCHAT_EDIT' => 'Editar',
|
||||
'MCHAT_EDITINFO' => 'Editar el mensaje y haga clic en OK',
|
||||
'MCHAT_ERROR' => 'Error',
|
||||
'MCHAT_FLOOD' => 'No puede enviar otro mensaje tan pronto después de su último mensaje',
|
||||
'MCHAT_FOE' => 'Este mensaje fue creado por <strong>%1$s</strong> que se encuentra actualmente en su lista de ignorados.',
|
||||
'MCHAT_HELP' => 'Normas de mChat',
|
||||
'MCHAT_HIDE_LIST' => 'Ocultar Lista',
|
||||
'MCHAT_HOUR' => 'hora',
|
||||
'MCHAT_HOURS' => 'horas',
|
||||
'MCHAT_IP' => 'IP whois de',
|
||||
'MCHAT_MINUTE' => 'minuto',
|
||||
'MCHAT_MINUTES' => 'minutos',
|
||||
'MCHAT_MESS_LONG' => 'Su mensaje es demasiado largo.\nPor favor, debe limitarlo a %s caracteres',
|
||||
'MCHAT_NO_CUSTOM_PAGE' => '¡La página personalizada de mChat no está habilitada en este momento!',
|
||||
'MCHAT_NO_RULES' => '¡Las normas de mChat no están habilitadas en este momento!',
|
||||
'MCHAT_NOACCESS' => 'Usted no tiene permiso para publicar en el mChat',
|
||||
'MCHAT_NOACCESS_ARCHIVE' => 'Usted no tiene permiso para ver el archivo',
|
||||
'MCHAT_NOJAVASCRIPT' => 'Su navegador no soporta JavaScript, o JavaScript está desactivado',
|
||||
'MCHAT_NOMESSAGE' => 'No hay mensajes',
|
||||
'MCHAT_NOMESSAGEINPUT' => 'No ha escrito ningún mensaje',
|
||||
'MCHAT_NOSMILE' => 'No se encontraron los Emoticonos',
|
||||
'MCHAT_NOTINSTALLED_USER' => 'mChat no está instalado. Por favor, notifique al fundador del foro.',
|
||||
'MCHAT_NOT_INSTALLED' => 'Faltan las entradas de mChat en la base de datos.<br />Por favor, ejecute el %sinstalador%s para hacer los cambios en la base de datos para está modificación.',
|
||||
'MCHAT_OK' => 'OK',
|
||||
'MCHAT_PAUSE' => 'Pausado',
|
||||
'MCHAT_LOAD' => 'Cargando',
|
||||
'MCHAT_PERMISSIONS' => 'Change user’s permissions',
|
||||
'MCHAT_REFRESHING' => 'Refrescando...',
|
||||
'MCHAT_REFRESH_NO' => 'La actualización automática está desactivada',
|
||||
'MCHAT_REFRESH_YES' => 'Actualización automática cada <strong>%d</strong> segundos',
|
||||
'MCHAT_RESPOND' => 'Responder al usuario',
|
||||
'MCHAT_RESET_QUESTION' => '¿Limpiar el área de entrada?',
|
||||
'MCHAT_SESSION_OUT' => 'La sesión de Chat ha expirado',
|
||||
'MCHAT_SHOW_LIST' => 'Mostrar Lista',
|
||||
'MCHAT_SECOND' => 'segundo',
|
||||
'MCHAT_SECONDS' => 'segundos',
|
||||
'MCHAT_SESSION_ENDS' => 'La sesión del Chat finaliza en',
|
||||
'MCHAT_SMILES' => 'Emoticonos',
|
||||
'MCHAT_TOTALMESSAGES' => 'Mensajes Totales: <strong>%s</strong>',
|
||||
'MCHAT_USESOUND' => '¿Usar sonido?',
|
||||
'MCHAT_ONLINE_USERS_TOTAL' => 'En total hay <strong>%d</strong> usuarios chateando',
|
||||
'MCHAT_ONLINE_USER_TOTAL' => 'En total hay <strong>%d</strong> usuario chateando',
|
||||
'MCHAT_NO_CHATTERS' => 'Nadie está charlando',
|
||||
'MCHAT_ONLINE_EXPLAIN' => 'basado en usuarios activos en los últimos %s',
|
||||
'WHO_IS_CHATTING' => 'Quién está chateando',
|
||||
'WHO_IS_REFRESH_EXPLAIN' => 'Se refresca cada <strong>%d</strong> segundos',
|
||||
'MCHAT_NEW_POST' => 'Realizar un nuevo tema',
|
||||
'MCHAT_NEW_REPLY' => 'Realizar una nueva respuesta',
|
||||
'MCHAT_NEW_QUOTE' => 'Responder citando',
|
||||
'MCHAT_NEW_EDIT' => 'Realizar una edición',
|
||||
|
||||
// UCP
|
||||
'UCP_PROFILE_MCHAT' => 'Preferencias de mChat',
|
||||
'DISPLAY_MCHAT' => 'Mostrar mChat en el índice',
|
||||
'SOUND_MCHAT' => 'Habilitar sonido en mChat',
|
||||
'DISPLAY_STATS_INDEX' => 'Mostrar quién está chateando en el índice',
|
||||
'DISPLAY_NEW_TOPICS' => 'Mostrar nuevos temas en el chat',
|
||||
'DISPLAY_AVATARS' => 'Mostrar avatares en el chat',
|
||||
'CHAT_AREA' => 'Tipo de entrada',
|
||||
'CHAT_AREA_EXPLAIN' => 'Elija qué tipo de área va a utilizar para introducir en el chat:<br />Un área de texto o<br />un área de entrada',
|
||||
'INPUT_AREA' => 'Área de entrada (Input)',
|
||||
'TEXT_AREA' => 'Área de texto (Textarea)',
|
||||
'UCP_CAT_MCHAT' => 'mChat',
|
||||
'UCP_MCHAT_CONFIG' => 'mChat',
|
||||
|
||||
// Preferences
|
||||
'LOG_MCHAT_TABLE_PRUNED' => 'La tabla de mChat ha sido purgada',
|
||||
'ACP_USER_MCHAT' => 'Ajustes de mChat',
|
||||
'LOG_DELETED_MCHAT' => '<strong>Mensaje de mChat borrado</strong><br />» %1$s',
|
||||
'LOG_EDITED_MCHAT' => '<strong>Mensaje de mChat editado</strong><br />» %1$s',
|
||||
'MCHAT_TOP_POSTERS' => 'Top Spammers',
|
||||
'MCHAT_NEW_CHAT' => '¡Nuevo mensaje de Chat!',
|
||||
'MCHAT_SEND_PM' => 'Enviar mensaje privado',
|
||||
|
||||
// Custom edits
|
||||
'REPLY_WITH_LIKE' => 'Me Gusta este mensaje',
|
||||
|
||||
// board3.de portal lang
|
||||
'PORTAL_MCHAT_TITLE' => 'Mini-Chat',
|
||||
'PORTAL_MCHAT_TITLE_EXP' => 'Mini-Chat Settings for board3 portal block',
|
||||
'PORTAL_MCHAT' => 'Display on portal',
|
||||
'PORTAL_MCHAT_EXP' => 'Use this setting to display Mini-Chat on portal.',
|
||||
));
|
||||
173
language/es/info_acp_mchat.php
Normal file
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
if (empty($lang) || !is_array($lang))
|
||||
{
|
||||
$lang = array();
|
||||
}
|
||||
|
||||
// DEVELOPERS PLEASE NOTE
|
||||
//
|
||||
// All language files should use UTF-8 as their encoding and the files must not contain a BOM.
|
||||
//
|
||||
// Placeholders can now contain order information, e.g. instead of
|
||||
// 'Page %s of %s' you can (and should) write 'Page %1$s of %2$s', this allows
|
||||
// translators to re-order the output of data while ensuring it remains correct
|
||||
//
|
||||
// You do not need this where single placeholders are used, e.g. 'Message %d' is fine
|
||||
// equally where a string contains only two placeholders which are used to wrap text
|
||||
// in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configuración',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
'ACP_MCHAT_TITLE' => 'Mini-Chat',
|
||||
'ACP_MCHAT_TITLE_EXPLAIN' => 'Un mini chat (aquí “cuadro de charla”) para su foro',
|
||||
'MCHAT_TABLE_DELETED' => 'La tabla de mChat ha sido borrada correctamente',
|
||||
'MCHAT_TABLE_CREATED' => 'La tabla de mChat ha sido creada correctamente',
|
||||
'MCHAT_TABLE_UPDATED' => 'La tabla de mChat ha sido actualizada correctamente',
|
||||
'MCHAT_NOTHING_TO_UPDATE' => 'Nada que ver.... Continuar',
|
||||
'UCP_CAT_MCHAT' => 'Preferencias de mChat',
|
||||
'UCP_MCHAT_CONFIG' => 'Preferencias de Usuario de mChat',
|
||||
|
||||
// ACP entries
|
||||
'ACP_MCHAT_RULES' => 'Normas',
|
||||
'ACP_MCHAT_RULES_EXPLAIN' => 'Introduzca las normas del foro aquí. Cada norma en una nueva línea.<br />Está limitado a 255 caracteres.<br /><strong>Este mensaje puede ser traducido.</strong> (debe editar el archivo mchat_lang.php y leer las instrucciones).',
|
||||
'LOG_MCHAT_CONFIG_UPDATE' => '<strong>Updated mChat config </strong>',
|
||||
'MCHAT_CONFIG_SAVED' => 'La configuración de Mini Chat ha sido actualizada',
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_VERSION' => 'Versión:',
|
||||
'MCHAT_AVATARS' => 'Mostrar avatares',
|
||||
'MCHAT_AVATARS_EXPLAIN' => 'Si se establece en Si, se mostrarán los avatares redimensionados de los usuarios',
|
||||
'MCHAT_ON_INDEX' => 'mChat en el índice',
|
||||
'MCHAT_ON_INDEX_EXPLAIN' => 'Permite mostrar el mChat en la página índice.',
|
||||
'MCHAT_INDEX_HEIGHT' => 'Altura en la página índice',
|
||||
'MCHAT_INDEX_HEIGHT_EXPLAIN' => 'La altura de la ventana del chat en píxeles en la página índice del foro.<br /><em>Está limitado de 50 a 1000</em>.',
|
||||
'MCHAT_LOCATION' => 'Ubicación en el foro',
|
||||
'MCHAT_LOCATION_EXPLAIN' => 'Elija la ubicación del mChat en la página índice.',
|
||||
'MCHAT_TOP_OF_FORUM' => 'Encima del foro',
|
||||
'MCHAT_BOTTOM_OF_FORUM' => 'Debajo del foro',
|
||||
'MCHAT_REFRESH' => 'Refrescar',
|
||||
'MCHAT_REFRESH_EXPLAIN' => 'Número de segundos antes de que el chat se actualice automáticamente.<br /><em>Está limitado de 5 a 60 segundos</em>.',
|
||||
'MCHAT_LIVE_UPDATES' => 'Actualizar en tiempo real los mensajes editados y eliminados',
|
||||
'MCHAT_LIVE_UPDATES_EXPLAIN' => 'Cuando un usuario edita o elimina los mensajes, los cambios se actualizan en vivo para todos los demás, sin que tengan que actualizar la página. Desactive esta opción si experimenta problemas de rendimiento.',
|
||||
'MCHAT_PRUNE' => 'Habilitar la limpieza (purga)',
|
||||
'MCHAT_PRUNE_EXPLAIN' => 'Establezca esto en Si, para activar la función de limpieza (purga).<br /><em>Sólo se produce si un usuario visita páginas personalizadas o archivo</em>.',
|
||||
'MCHAT_PRUNE_NUM' => 'Número de limpieza (purga)',
|
||||
'MCHAT_PRUNE_NUM_EXPLAIN' => 'El número de mensajes a retener en el chat.',
|
||||
'MCHAT_MESSAGE_LIMIT' => 'Límite de mensajes',
|
||||
'MCHAT_MESSAGE_LIMIT_EXPLAIN' => 'El número máximo de mensajes que se muestran en el área de chat.<br /><em>Recomendado de 10 a 30</em>.',
|
||||
'MCHAT_MESSAGE_NUM' => 'Límite de mensajes en la página índice',
|
||||
'MCHAT_MESSAGE_NUM_EXPLAIN' => 'El número máximo de mensajes que se muestran en el área de chat en la página índice.<br /><em>Recomendado de 10 a 50</em>.',
|
||||
'MCHAT_ARCHIVE_LIMIT' => 'Límite del archivo',
|
||||
'MCHAT_ARCHIVE_LIMIT_EXPLAIN' => 'El número máximo de mensajes a mostrar por página en la página del archivo.<br /><em>Recomendado de 25 a 50</em>.',
|
||||
'MCHAT_FLOOD_TIME' => 'Tiempo de flujo',
|
||||
'MCHAT_FLOOD_TIME_EXPLAIN' => 'El número de segundos que un usuario debe esperar antes de poder enviar otro mensaje en el chat.<br /><em>Recomendado de 5 a 30, establezca esto en 0 para deshabilitar</em>.',
|
||||
'MCHAT_EDIT_DELETE_LIMIT' => 'Tiempo límite para la edición de mensajes y su borrado',
|
||||
'MCHAT_EDIT_DELETE_LIMIT_EXPLAIN' => 'Los mensajes que superen el número de segundos especificado, no podrán ser editados o borrados por el autor tras dicho tiempo.<br />Los usuarios que tienen el permiso de editar/borrar, así como <em>permiso de Moderador están exentos</em> de este tiempo límite.<br />Establezca en 0 para permitir la edición y el borrado sin límite.',
|
||||
'MCHAT_MAX_MESSAGE_LENGTH' => 'Longitud máxima del mensaje',
|
||||
'MCHAT_MAX_MESSAGE_LENGTH_EXPLAIN' => 'Número máximo de caracteres permitidos por cada mensaje publicado.<br /><em>Recomendado de 100 a 500, establezca esto en 0 para deshabilitar</em>.',
|
||||
'MCHAT_CUSTOM_PAGE' => 'Página personalizada',
|
||||
'MCHAT_CUSTOM_PAGE_EXPLAIN' => 'Permitir el uso de página personalizada',
|
||||
'MCHAT_CUSTOM_HEIGHT' => 'Altura de la página personalizado',
|
||||
'MCHAT_CUSTOM_HEIGHT_EXPLAIN' => 'La altura de la ventana del chat en píxeles en la página separada de mChat.<br /><em>Está límitado de 50 a 1000</em>.',
|
||||
'MCHAT_DATE_FORMAT' => 'Formato de fecha',
|
||||
'MCHAT_DATE_FORMAT_EXPLAIN' => 'La sintaxis utilizada es idéntica a la función de PHP <a href="http://www.php.net/date">date()</a>.',
|
||||
'MCHAT_CUSTOM_DATEFORMAT' => 'Personalizada…',
|
||||
'MCHAT_WHOIS' => 'Quién es',
|
||||
'MCHAT_WHOIS_EXPLAIN' => 'Allow a display of users who are chatting',
|
||||
'MCHAT_WHOIS_REFRESH' => 'Refrescar Quien es',
|
||||
'MCHAT_WHOIS_REFRESH_EXPLAIN' => 'Number of seconds before whois stats refreshes.<br /><em>Está límitado de 30 a 300 segundos</em>.',
|
||||
'MCHAT_BBCODES_DISALLOWED' => 'BBCodes deshabilitados',
|
||||
'MCHAT_BBCODES_DISALLOWED_EXPLAIN' => 'Aquí puede introducir los BBCodes que <strong>no</strong> se pueden usar en los mensajes.<br />Separar los BBCodes con una barra vertical, por ejemplo: <br />b|i|u|code|list|list=|flash|quote y/o un %snombre de etiqueta de BBCode personalizado%s',
|
||||
'MCHAT_STATIC_MESSAGE' => 'Mensaje estático',
|
||||
'MCHAT_STATIC_MESSAGE_EXPLAIN' => 'Aquí puede definir un mensaje estático para mostrar a los usuarios de la chat. Código HTML está permitido.<br />Deje esto en blanco para deshabilitar esto. Está límitado a 255 caracteres.<br /><strong>Este mensaje puede ser traducido.</strong> (debe editar el archivo mchat_lang.php y leer las instrucciones).',
|
||||
'MCHAT_USER_TIMEOUT' => 'Tiempo de espera del usuario',
|
||||
'MCHAT_USER_TIMEOUT_EXPLAIN' => 'Establezca la cantidad de tiempo, en segundos, hasta que una sesión de usuario en el chat termina. Se establece en 0 para que no haya tiempo de espera.<br /><em>Está límitado a %sconfiguración de sesiones del foro%s que está actualmente en %s segundos</em>',
|
||||
'MCHAT_OVERRIDE_SMILIE_LIMIT' => 'Anular límite de emoticonos',
|
||||
'MCHAT_OVERRIDE_SMILIE_LIMIT_EXPLAIN' => 'Establezca en Sí, para anular el ajustes del límite de emoticonos en los foros, para mensajes del chat',
|
||||
'MCHAT_OVERRIDE_MIN_POST_CHARS' => 'Anular límite mínimo caracteres',
|
||||
'MCHAT_OVERRIDE_MIN_POST_CHARS_EXPLAIN' => 'Establezca en Sí, para anular el ajustes del límite mínimo de caracteres en los foros, para mensajes del chat',
|
||||
'MCHAT_NEW_POSTS_TOPIC' => 'Mostrar mensaje de Nuevo Tema',
|
||||
'MCHAT_NEW_POSTS_TOPIC_EXPLAIN' => 'Establezca en Sí, para permitir que los nuevos temas del foro puedan ser publicados en el área de mensajes del chat.',
|
||||
'MCHAT_NEW_POSTS_REPLY' => 'Mostrar mensaje de Nueva Respuesta',
|
||||
'MCHAT_NEW_POSTS_REPLY_EXPLAIN' => 'Establezca en Sí, para permitir que las respuestas de mensajes del foro puedan ser publicadas en el área de mensajes del chat.',
|
||||
'MCHAT_NEW_POSTS_EDIT' => 'Mostrar mensajes editados',
|
||||
'MCHAT_NEW_POSTS_EDIT_EXPLAIN' => 'Establezca en Sí, para permitir que los mensajes editados desde el foro sean publicados en el área de mensajes del chat.',
|
||||
'MCHAT_NEW_POSTS_QUOTE' => 'Mostrar mensajes citados',
|
||||
'MCHAT_NEW_POSTS_QUOTE_EXPLAIN' => 'Establezca en Sí, para permitir que los mensajes citados del foro sean publicados en el área de mensajes del chat.',
|
||||
'MCHAT_MAIN' => 'Configuración principal',
|
||||
'MCHAT_STATS' => 'Quién está chateando',
|
||||
'MCHAT_STATS_INDEX' => 'Estadísticas en el Índice',
|
||||
'MCHAT_STATS_INDEX_EXPLAIN' => 'Mostrar quién está chateando en la sección de estadísticas del foro',
|
||||
'MCHAT_MESSAGE_TOP' => 'Mantener mensaje Debajo / Encima',
|
||||
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'Esta publicará el mensaje en la parte inferior o superior en el área de mensajes del chat',
|
||||
'MCHAT_BOTTOM' => 'Debajo',
|
||||
'MCHAT_TOP' => 'Encima',
|
||||
'MCHAT_MESSAGES' => 'Ajustes de mensaje',
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pausa en la entrada',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Si se establece en Si, el chat no actualizará automáticamente a un usuario al introducir un mensaje en el área de entrada',
|
||||
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'El formato de la fecha que ha escrito es demasiado largo.',
|
||||
'TOO_SHORT_DATE' => 'El formato de la fecha que ha escrito es demasiado corto.',
|
||||
'TOO_SMALL_REFRESH' => 'El valor de actualización es demasiado pequeño.',
|
||||
'TOO_LARGE_REFRESH' => 'El valor de actualización es demasiado grande.',
|
||||
'TOO_SMALL_MESSAGE_LIMIT' => 'El valor límite de mensajes es demasiado pequeño.',
|
||||
'TOO_LARGE_MESSAGE_LIMIT' => 'El valor límite de mensajes es demasiado grande.',
|
||||
'TOO_SMALL_ARCHIVE_LIMIT' => 'El valor límite de archivo es demasiado pequeño.',
|
||||
'TOO_LARGE_ARCHIVE_LIMIT' => 'El valor límite de archivo es demasiado grande.',
|
||||
'TOO_SMALL_FLOOD_TIME' => 'El valor de tiempo de flujo es demasiado pequeño.',
|
||||
'TOO_LARGE_FLOOD_TIME' => 'El valor de tiempo de flujo es demasiado grande.',
|
||||
'TOO_SMALL_MAX_MESSAGE_LNGTH' => 'El valor de longitud máxima de mensaje es demasiado pequeño.',
|
||||
'TOO_LARGE_MAX_MESSAGE_LNGTH' => 'El valor de longitud máxima de mensaje es demasiado grande.',
|
||||
'TOO_SMALL_MAX_WORDS_LNGTH' => 'El valor de la longitud de palabras máximas es demasiado pequeño.',
|
||||
'TOO_LARGE_MAX_WORDS_LNGTH' => 'El valor de la longitud de palabras máximas es demasiado grande.',
|
||||
'TOO_SMALL_WHOIS_REFRESH' => 'El valor de refresco whois es demasiado pequeño.',
|
||||
'TOO_LARGE_WHOIS_REFRESH' => 'El valor de refresco whois es demasiado grande.',
|
||||
'TOO_SMALL_INDEX_HEIGHT' => 'El valor de la altura de índice es demasiado pequeño.',
|
||||
'TOO_LARGE_INDEX_HEIGHT' => 'El valor de la altura de índice es demasiado grande.',
|
||||
'TOO_SMALL_CUSTOM_HEIGHT' => 'El valor de altura a medida es demasiado pequeña.',
|
||||
'TOO_LARGE_CUSTOM_HEIGHT' => 'El valor de altura a medida es demasiado grande.',
|
||||
'TOO_SHORT_STATIC_MESSAGE' => 'El valor de mensaje estático es demasiado corto.',
|
||||
'TOO_LONG_STATIC_MESSAGE' => 'El valor de mensaje estático es demasiado largo.',
|
||||
'TOO_SMALL_TIMEOUT' => 'El valor de tiempo de espera del usuario es demasiado pequeño.',
|
||||
'TOO_LARGE_TIMEOUT' => 'El valor de tiempo de espera del usuario es demasiado grande.',
|
||||
|
||||
// User perms
|
||||
'ACL_U_MCHAT_USE' => 'Puede usar mChat',
|
||||
'ACL_U_MCHAT_VIEW' => 'Puede ver mChat',
|
||||
'ACL_U_MCHAT_EDIT' => 'Puede editar mensajes',
|
||||
'ACL_U_MCHAT_DELETE' => 'Puede borrar mensajes',
|
||||
'ACL_U_MCHAT_IP' => 'Puede ver direcciones IP',
|
||||
'ACL_U_MCHAT_PM' => 'Puede usar mensajes privados',
|
||||
'ACL_U_MCHAT_LIKE' => 'Puede usar Me Gusta en los mensajes',
|
||||
'ACL_U_MCHAT_QUOTE' => 'Puede usar citar un mensajee',
|
||||
'ACL_U_MCHAT_FLOOD_IGNORE' => 'Puede ignorar el flujo',
|
||||
'ACL_U_MCHAT_ARCHIVE' => 'Puede ver el archivo',
|
||||
'ACL_U_MCHAT_BBCODE' => 'Puede usar BBCode',
|
||||
'ACL_U_MCHAT_SMILIES' => 'Puede usar emoticonos',
|
||||
'ACL_U_MCHAT_URLS' => 'Puede publicar URLs',
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Puede gestionar los ajustes de mChat',
|
||||
|
||||
//board3
|
||||
'MCHAT_ON_PORTAL' => 'mChat On Portal',
|
||||
'MCHAT_ON_PORTAL_EXPLAIN' => 'Allow the display of the mChat on the Board3 Portal page.',
|
||||
));
|
||||
339
license.txt
Normal file
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
25
migrations/0.3.4.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package mChat on Board3 Portal 0.3.4
|
||||
* @copyright (c) 2015 Board3 Group ( www.board3.de )
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
class 0.3.4 extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('\dmzx\mchat\migrations\install_mchat');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('config.add', array('mchat_on_portal', 1)),
|
||||
);
|
||||
}
|
||||
}
|
||||
236
migrations/install_mchat.php
Normal file
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
class install_mchat extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
return isset($this->config['mchat_version']) && version_compare($this->config['mchat_version'], '0.3.4', '>=');
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('\phpbb\db\migration\data\v31x\v311');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
// Add configs
|
||||
array('config.add', array('mchat_version', '0.3.4')),
|
||||
array('config.add', array('mchat_archive_limit', 25)),
|
||||
array('config.add', array('mchat_avatars', 1)),
|
||||
array('config.add', array('mchat_bbcode_disallowed', '')),
|
||||
array('config.add', array('mchat_custom_height', 350)),
|
||||
array('config.add', array('mchat_custom_page', 1)),
|
||||
array('config.add', array('mchat_date', 'D M d, Y g:i a')),
|
||||
array('config.add', array('mchat_edit_delete_limit', 0)),
|
||||
array('config.add', array('mchat_flood_time', 0)),
|
||||
array('config.add', array('mchat_index_height', 250)),
|
||||
array('config.add', array('mchat_live_updates', 1)),
|
||||
array('config.add', array('mchat_location', 0)),
|
||||
array('config.add', array('mchat_max_message_lngth', 500)),
|
||||
array('config.add', array('mchat_message_limit', 10)),
|
||||
array('config.add', array('mchat_message_num', 10)),
|
||||
array('config.add', array('mchat_message_top', 1)),
|
||||
array('config.add', array('mchat_new_posts_edit', 0)),
|
||||
array('config.add', array('mchat_new_posts_quote', 0)),
|
||||
array('config.add', array('mchat_new_posts_reply', 0)),
|
||||
array('config.add', array('mchat_new_posts_topic', 0)),
|
||||
array('config.add', array('mchat_on_index', 1)),
|
||||
array('config.add', array('mchat_override_min_post_chars', 0)),
|
||||
array('config.add', array('mchat_override_smilie_limit', 0)),
|
||||
array('config.add', array('mchat_pause_on_input', 0)),
|
||||
array('config.add', array('mchat_prune', 0)),
|
||||
array('config.add', array('mchat_prune_num', 0)),
|
||||
array('config.add', array('mchat_refresh', 10)),
|
||||
array('config.add', array('mchat_rules', '')),
|
||||
array('config.add', array('mchat_static_message', '')),
|
||||
array('config.add', array('mchat_stats_index', 0)),
|
||||
array('config.add', array('mchat_timeout', 0)),
|
||||
array('config.add', array('mchat_whois', 1)),
|
||||
array('config.add', array('mchat_whois_refresh', 60)),
|
||||
|
||||
// Add permissions
|
||||
array('permission.add', array('u_mchat_use', true)),
|
||||
array('permission.add', array('u_mchat_view', true)),
|
||||
array('permission.add', array('u_mchat_edit', true)),
|
||||
array('permission.add', array('u_mchat_delete', true)),
|
||||
array('permission.add', array('u_mchat_ip', true)),
|
||||
array('permission.add', array('u_mchat_pm', true)),
|
||||
array('permission.add', array('u_mchat_like', true)),
|
||||
array('permission.add', array('u_mchat_quote', true)),
|
||||
array('permission.add', array('u_mchat_flood_ignore', true)),
|
||||
array('permission.add', array('u_mchat_archive', true)),
|
||||
array('permission.add', array('u_mchat_bbcode', true)),
|
||||
array('permission.add', array('u_mchat_smilies', true)),
|
||||
array('permission.add', array('u_mchat_urls', true)),
|
||||
array('permission.add', array('a_mchat', true)),
|
||||
|
||||
// Set permissions
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_use', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_view', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_edit', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_delete', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_ip', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_pm', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_like', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_quote', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_flood_ignore', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_archive', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_bbcode', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_smilies', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'u_mchat_urls', 'group')),
|
||||
array('permission.permission_set', array('ADMINISTRATORS', 'a_mchat', 'group')),
|
||||
array('permission.permission_set', array('REGISTERED', 'u_mchat_use', 'group')),
|
||||
array('permission.permission_set', array('REGISTERED', 'u_mchat_view', 'group')),
|
||||
array('permission.permission_set', array('REGISTERED', 'u_mchat_pm', 'group')),
|
||||
array('permission.permission_set', array('REGISTERED', 'u_mchat_like', 'group')),
|
||||
array('permission.permission_set', array('REGISTERED', 'u_mchat_quote', 'group')),
|
||||
array('permission.permission_set', array('REGISTERED', 'u_mchat_archive', 'group')),
|
||||
array('permission.permission_set', array('REGISTERED', 'u_mchat_bbcode', 'group')),
|
||||
array('permission.permission_set', array('REGISTERED', 'u_mchat_smilies', 'group')),
|
||||
array('permission.permission_set', array('REGISTERED', 'u_mchat_urls', 'group')),
|
||||
|
||||
// Add ACP module
|
||||
array('module.add', array(
|
||||
'acp',
|
||||
'ACP_CAT_DOT_MODS',
|
||||
'ACP_CAT_MCHAT'
|
||||
)),
|
||||
|
||||
array('module.add', array(
|
||||
'acp',
|
||||
'ACP_CAT_MCHAT',
|
||||
array(
|
||||
'module_basename' => '\dmzx\mchat\acp\acp_mchat_module',
|
||||
'modes' => array('configuration'),
|
||||
'module_auth' => 'a_mchat',
|
||||
),
|
||||
)),
|
||||
|
||||
// Add ACP module
|
||||
array('module.add', array(
|
||||
'acp',
|
||||
'ACP_CAT_USERS',
|
||||
array(
|
||||
'module_basename' => 'users',
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 0,
|
||||
'module_langname' => 'ACP_USER_MCHAT',
|
||||
'module_mode' => 'mchat',
|
||||
'module_auth' => 'acl_a_user',
|
||||
),
|
||||
),
|
||||
|
||||
// First, lets add a new category named UCP_CAT_MCHAT
|
||||
array(
|
||||
'ucp',
|
||||
false,
|
||||
'UCP_CAT_MCHAT'
|
||||
),
|
||||
|
||||
// next let's add our module
|
||||
array(
|
||||
'ucp',
|
||||
'UCP_CAT_MCHAT',
|
||||
array(
|
||||
'module_basename' => 'mchat',
|
||||
'modes' => array('configuration'),
|
||||
'module_auth' => 'u_mchat_use',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// Add UCP module
|
||||
array('module.add', array(
|
||||
'ucp',
|
||||
false,
|
||||
'UCP_MCHAT_CONFIG'
|
||||
)),
|
||||
|
||||
array('module.add', array(
|
||||
'ucp',
|
||||
'UCP_MCHAT_CONFIG',
|
||||
array(
|
||||
'module_basename' => '\dmzx\mchat\ucp\ucp_mchat_module',
|
||||
'modes' => array('configuration'),
|
||||
'auth' => 'acl_u_mchat_use',
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
public function update_schema()
|
||||
{
|
||||
return array(
|
||||
'add_tables' => array(
|
||||
$this->table_prefix . 'mchat' => array(
|
||||
'COLUMNS' => array(
|
||||
'message_id' => array('UINT', null, 'auto_increment'),
|
||||
'user_id' => array('UINT', 0),
|
||||
'user_ip' => array('VCHAR:40', ''),
|
||||
'message' => array('MTEXT_UNI', ''),
|
||||
'bbcode_bitfield' => array('VCHAR', ''),
|
||||
'bbcode_uid' => array('VCHAR:8', ''),
|
||||
'bbcode_options' => array('BOOL', '7'),
|
||||
'message_time' => array('INT:11', 0),
|
||||
'edit_time' => array('INT:11', 0),
|
||||
'forum_id' => array('UINT', 0),
|
||||
'post_id' => array('UINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'message_id',
|
||||
),
|
||||
|
||||
$this->table_prefix . 'mchat_sessions' => array(
|
||||
'COLUMNS' => array(
|
||||
'user_id' => array('UINT', 0),
|
||||
'user_lastupdate' => array('TIMESTAMP', 0),
|
||||
'user_ip' => array('VCHAR:40', ''),
|
||||
),
|
||||
'PRIMARY_KEY' => 'user_id',
|
||||
),
|
||||
),
|
||||
|
||||
'add_columns' => array(
|
||||
$this->table_prefix . 'users' => array(
|
||||
'user_mchat_index' => array('BOOL', '1'),
|
||||
'user_mchat_sound' => array('BOOL', '1'),
|
||||
'user_mchat_stats_index' => array('BOOL', '1'),
|
||||
'user_mchat_topics' => array('BOOL', '1'),
|
||||
'user_mchat_avatars' => array('BOOL', '1'),
|
||||
'user_mchat_input_area' => array('BOOL', '1'),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function revert_schema()
|
||||
{
|
||||
return array(
|
||||
'drop_tables' => array(
|
||||
$this->table_prefix . 'mchat',
|
||||
$this->table_prefix . 'mchat_sessions',
|
||||
),
|
||||
|
||||
'drop_columns' => array(
|
||||
$this->table_prefix . 'users' => array(
|
||||
'user_mchat_index',
|
||||
'user_mchat_sound',
|
||||
'user_mchat_stats_index',
|
||||
'user_mchat_topics',
|
||||
'user_mchat_avatars',
|
||||
'user_mchat_input_area',
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
BIN
sounds/add.mp3
Normal file
BIN
sounds/del.mp3
Normal file
BIN
sounds/edit.mp3
Normal file
BIN
sounds/error.mp3
Normal file
@@ -0,0 +1,3 @@
|
||||
<!-- IF $INCLUDED_MCHATONPORTALBLOCK == true -->
|
||||
<!-- IF S_DISPLAY_MCHAT_PORTAL --><!-- INCLUDE mchat_portal_body.html --><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
@@ -0,0 +1,4 @@
|
||||
<!-- IF MCHAT_INDEX_STATS -->
|
||||
<h3><a href="<!-- IF S_MCHAT_CUSTOM_PAGE and not S_MCHAT_ON_INDEX -->{U_MCHAT}<!-- ENDIF -->#mChat">{L_WHO_IS_CHATTING}</a></h3>
|
||||
<p>{MCHAT_USERS_COUNT} {MCHAT_ONLINE_EXPLAIN}<br />{MCHAT_USERS_LIST}</p>
|
||||
<!-- ENDIF -->
|
||||
@@ -0,0 +1 @@
|
||||
<!-- IF S_MCHAT_ON_INDEX and not S_MCHAT_LOCATION --><!-- INCLUDE mchat_body.html --><!-- ENDIF -->
|
||||
@@ -0,0 +1,3 @@
|
||||
<!-- IF $INCLUDED_MCHATONINDEXBLOCK == true -->
|
||||
<!-- IF S_MCHAT_ON_INDEX and S_MCHAT_LOCATION --><!-- INCLUDE mchat_body.html --><!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
@@ -0,0 +1,9 @@
|
||||
<!-- IF U_MCHATLOC == "index.php" -->
|
||||
<!-- DEFINE $INCLUDED_MCHATONINDEXBLOCK = true -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF U_MCHATLOC == "app.php" -->
|
||||
<!-- DEFINE $INCLUDED_MCHATONPORTALBLOCK = true -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF U_MCHATLOC == "app.php/portal" -->
|
||||
<!-- DEFINE $INCLUDED_MCHATONPORTALBLOCK = true -->
|
||||
<!-- ENDIF -->
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
<!-- IF MCHAT_ALLOW_SMILES or MCHAT_ALLOW_BBCODES --><!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js --><!-- ENDIF -->
|
||||
@@ -0,0 +1 @@
|
||||
<!-- IF S_MCHAT_CUSTOM_PAGE and MCHAT_ALLOW_VIEW and U_MCHAT --><li class="small-icon icon-bump"><a href="{U_MCHAT}" title="{L_MCHAT_TITLE}">{L_MCHAT_TITLE}</a></li><!-- ENDIF -->
|
||||
17
styles/prosilver/template/jquery.titlealert.min.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!
|
||||
* Title Alert 0.7
|
||||
*
|
||||
* Copyright (c) 2009 ESN | http://esn.me
|
||||
* Jonatan Heyman | http://heyman.info
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
(function(a){a.titleAlert=function(e,c){if(a.titleAlert._running){a.titleAlert.stop()}a.titleAlert._settings=c=a.extend({},a.titleAlert.defaults,c);if(c.requireBlur&&a.titleAlert.hasFocus){return}c.originalTitleInterval=c.originalTitleInterval||c.interval;a.titleAlert._running=true;a.titleAlert._initialText=document.title;document.title=e;var b=true;var d=function(){if(!a.titleAlert._running){return}b=!b;document.title=(b?e:a.titleAlert._initialText);a.titleAlert._intervalToken=setTimeout(d,(b?c.interval:c.originalTitleInterval))};a.titleAlert._intervalToken=setTimeout(d,c.interval);if(c.stopOnMouseMove){a(document).mousemove(function(f){a(this).unbind(f);a.titleAlert.stop()})}if(c.duration>0){a.titleAlert._timeoutToken=setTimeout(function(){a.titleAlert.stop()},c.duration)}};a.titleAlert.defaults={interval:500,originalTitleInterval:null,duration:0,stopOnFocus:true,requireBlur:false,stopOnMouseMove:false};a.titleAlert.stop=function(){clearTimeout(a.titleAlert._intervalToken);clearTimeout(a.titleAlert._timeoutToken);document.title=a.titleAlert._initialText;a.titleAlert._timeoutToken=null;a.titleAlert._intervalToken=null;a.titleAlert._initialText=null;a.titleAlert._running=false;a.titleAlert._settings=null};a.titleAlert.hasFocus=true;a.titleAlert._running=false;a.titleAlert._intervalToken=null;a.titleAlert._timeoutToken=null;a.titleAlert._initialText=null;a.titleAlert._settings=null;a.titleAlert._focus=function(){a.titleAlert.hasFocus=true;if(a.titleAlert._running&&a.titleAlert._settings.stopOnFocus){var b=a.titleAlert._initialText;a.titleAlert.stop();setTimeout(function(){if(a.titleAlert._running){return}document.title=".";document.title=b},1000)}};a.titleAlert._blur=function(){a.titleAlert.hasFocus=false};a(window).bind("focus",a.titleAlert._focus);a(window).bind("blur",a.titleAlert._blur)})(jQuery);
|
||||
2
styles/prosilver/template/js.cookie-2.0.4.min.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/*! js-cookie v2.0.4 | MIT */
|
||||
!function(a){if("function"==typeof define&&define.amd)define(a);else if("object"==typeof exports)module.exports=a();else{var b=window.Cookies,c=window.Cookies=a();c.noConflict=function(){return window.Cookies=b,c}}}(function(){function a(){for(var a=0,b={};a<arguments.length;a++){var c=arguments[a];for(var d in c)b[d]=c[d]}return b}function b(c){function d(b,e,f){var g;if(arguments.length>1){if(f=a({path:"/"},d.defaults,f),"number"==typeof f.expires){var h=new Date;h.setMilliseconds(h.getMilliseconds()+864e5*f.expires),f.expires=h}try{g=JSON.stringify(e),/^[\{\[]/.test(g)&&(e=g)}catch(i){}return e=encodeURIComponent(String(e)),e=e.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),b=encodeURIComponent(String(b)),b=b.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),b=b.replace(/[\(\)]/g,escape),document.cookie=[b,"=",e,f.expires&&"; expires="+f.expires.toUTCString(),f.path&&"; path="+f.path,f.domain&&"; domain="+f.domain,f.secure?"; secure":""].join("")}b||(g={});for(var j=document.cookie?document.cookie.split("; "):[],k=/(%[0-9A-Z]{2})+/g,l=0;l<j.length;l++){var m=j[l].split("="),n=m[0].replace(k,decodeURIComponent),o=m.slice(1).join("=");'"'===o.charAt(0)&&(o=o.slice(1,-1));try{if(o=c&&c(o,n)||o.replace(k,decodeURIComponent),this.json)try{o=JSON.parse(o)}catch(i){}if(b===n){g=o;break}b||(g[n]=o)}catch(i){}}return g}return d.get=d.set=d,d.getJSON=function(){return d.apply({json:!0},[].slice.call(arguments))},d.defaults={},d.remove=function(b,c){d(b,"",a(c,{expires:-1}))},d.withConverter=b,d}return b()});
|
||||
483
styles/prosilver/template/mchat.js
Normal file
@@ -0,0 +1,483 @@
|
||||
/**
|
||||
*
|
||||
* @package mChat JavaScript Code mini
|
||||
* @version 1.5.1 of 2016-01-17
|
||||
* @copyright (c) 2009 By Shapoval Andrey Vladimirovich (AllCity) ~ http://allcity.net.ru/
|
||||
* @copyright (c) 2013 By Rich McGirr (RMcGirr83) http://rmcgirr83.org
|
||||
* @copyright (c) 2015 By dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2015 By kasimi
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
// Support Opera
|
||||
if (typeof document.hasFocus === 'undefined') {
|
||||
document.hasFocus = function() {
|
||||
return document.visibilityState == 'visible';
|
||||
};
|
||||
}
|
||||
|
||||
jQuery(function($) {
|
||||
var ajaxRequest = function(mode, sendHiddenFields, data) {
|
||||
var deferred = $.Deferred();
|
||||
var promise = deferred.promise();
|
||||
if (sendHiddenFields) {
|
||||
$.extend(data, mChat.hiddenFields);
|
||||
}
|
||||
$.ajax({
|
||||
url: mChat.file.replace('mchat', 'mchat-' + mode),
|
||||
timeout: 5000,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: data
|
||||
}).success(function(json, status, xhr) {
|
||||
if (json[mode]) {
|
||||
deferred.resolve(json, status, xhr);
|
||||
} else {
|
||||
deferred.reject(xhr, status, xhr.responseJSON ? 'session' : 'format');
|
||||
}
|
||||
}).error(function(xhr, status, error) {
|
||||
deferred.reject(xhr, status, error);
|
||||
});
|
||||
return promise.fail(function(xhr, textStatus, errorThrown) {
|
||||
mChat.sound('error');
|
||||
mChat.$$('refresh-load', 'refresh-ok', 'refresh-paused').hide();
|
||||
mChat.$$('refresh-error').show();
|
||||
if (errorThrown == 'format') {
|
||||
// Unexpected format
|
||||
} else if (errorThrown == 'session') {
|
||||
mChat.endSession();
|
||||
alert(mChat.sessOut);
|
||||
} else if (xhr.status == 400) {
|
||||
alert(mChat.flood);
|
||||
} else if (xhr.status == 403) {
|
||||
alert(mChat.noAccess);
|
||||
} else if (xhr.status == 413) {
|
||||
alert(mChat.mssgLngthLong);
|
||||
} else if (xhr.status == 501) {
|
||||
alert(mChat.noMessageInput);
|
||||
} else if (typeof console !== 'undefined' && console.log) {
|
||||
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.extend(mChat, {
|
||||
clear: function() {
|
||||
if (mChat.$$('input').val() !== '') {
|
||||
if (confirm(mChat.clearConfirm)) {
|
||||
mChat.resetSession(true);
|
||||
mChat.$$('input').val('');
|
||||
}
|
||||
mChat.$$('input').focus();
|
||||
}
|
||||
},
|
||||
sound: function(file) {
|
||||
if (!mChat.pageIsUnloading && !Cookies.get('mchat_no_sound')) {
|
||||
var audio = mChat.$$('sound-' + file).get(0);
|
||||
audio.pause();
|
||||
audio.currentTime = 0;
|
||||
audio.play();
|
||||
}
|
||||
},
|
||||
notice: function() {
|
||||
if (!document.hasFocus()) {
|
||||
$.titleAlert(mChat.newMessageAlert, {interval: 1000});
|
||||
}
|
||||
},
|
||||
toggle: function(name) {
|
||||
var $elem = mChat.$$(name);
|
||||
$elem.stop().slideToggle(function() {
|
||||
var cookieName = 'mchat_show_' + name;
|
||||
if ($elem.is(':visible')) {
|
||||
Cookies.set(cookieName, 'yes');
|
||||
} else {
|
||||
Cookies.remove(cookieName);
|
||||
}
|
||||
});
|
||||
},
|
||||
add: function() {
|
||||
if (mChat.$$('add').prop('disabled')) {
|
||||
return;
|
||||
}
|
||||
if ($.trim(mChat.$$('input').val()) === '') {
|
||||
return;
|
||||
}
|
||||
var messChars = mChat.$$('input').val().replace(/\s/g, '');
|
||||
if (messChars.length > mChat.mssgLngth) {
|
||||
alert(mChat.mssgLngthLong);
|
||||
return;
|
||||
}
|
||||
mChat.pauseSession();
|
||||
mChat.$$('add').prop('disabled', true);
|
||||
mChat.refresh(mChat.$$('input').val()).done(function() {
|
||||
mChat.$$('input').val('');
|
||||
}).always(function() {
|
||||
mChat.$$('input').focus();
|
||||
mChat.$$('add').prop('disabled', false);
|
||||
mChat.resetSession(false);
|
||||
});
|
||||
},
|
||||
edit: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var $message = mChat.$$('confirm').find('textarea').show().val($container.data('message'));
|
||||
mChat.$$('confirm').find('p').text(mChat.editInfo);
|
||||
phpbb.confirm(mChat.$$('confirm'), function() {
|
||||
ajaxRequest('edit', true, {
|
||||
message_id: $container.data('id'),
|
||||
message: $message.val()
|
||||
}).done(function(json) {
|
||||
mChat.sound('edit');
|
||||
$container.fadeOut('slow', function() {
|
||||
$container.replaceWith($(json.edit).hide().fadeIn('slow'));
|
||||
});
|
||||
mChat.resetSession(true);
|
||||
});
|
||||
});
|
||||
},
|
||||
del: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
mChat.$$('confirm').find('textarea').hide();
|
||||
mChat.$$('confirm').find('p').text(mChat.delConfirm);
|
||||
phpbb.confirm(mChat.$$('confirm'), function() {
|
||||
ajaxRequest('del', true, {
|
||||
message_id: $container.data('id')
|
||||
}).done(function() {
|
||||
mChat.sound('del');
|
||||
$container.fadeOut('slow', function() {
|
||||
$container.remove();
|
||||
});
|
||||
mChat.resetSession(true);
|
||||
});
|
||||
});
|
||||
},
|
||||
refresh: function(message) {
|
||||
var $messages = mChat.$$('messages').children();
|
||||
var data = {
|
||||
message_last_id: $messages.filter(mChat.messageTop ? ':first' : ':last').data('id')
|
||||
};
|
||||
if (message) {
|
||||
data.message = message;
|
||||
}
|
||||
if (mChat.liveUpdates) {
|
||||
data.message_first_id = $messages.filter(mChat.messageTop ? ':last' : ':first').data('id');
|
||||
data.message_edits = {};
|
||||
var now = Math.floor(Date.now() / 1000);
|
||||
$.each($messages, function() {
|
||||
var $message = $(this);
|
||||
var editTime = $message.data('edit-time');
|
||||
if (editTime && (!mChat.editDeleteLimit || $message.data('message-time') >= now - mChat.editDeleteLimit / 1000)) {
|
||||
data.message_edits[$message.data('id')] = editTime;
|
||||
}
|
||||
});
|
||||
}
|
||||
mChat.$$('refresh-ok', 'refresh-error', 'refresh-paused').hide();
|
||||
mChat.$$('refresh-load').show();
|
||||
return ajaxRequest(message ? 'add' : 'refresh', !!message, data).done(function(json) {
|
||||
var $html = $(json.add);
|
||||
if ($html.length) {
|
||||
mChat.sound('add');
|
||||
mChat.notice();
|
||||
mChat.$$('no-messages').remove();
|
||||
$html.hide().each(function(i) {
|
||||
var $message = $(this);
|
||||
setTimeout(function() {
|
||||
if (mChat.messageTop) {
|
||||
mChat.$$('messages').prepend($message);
|
||||
} else {
|
||||
mChat.$$('messages').append($message);
|
||||
}
|
||||
$message.css('opacity', 0).slideDown('slow').animate({opacity: 1}, {queue: false, duration: 'slow'});
|
||||
mChat.$$('main').animate({scrollTop: mChat.messageTop ? 0 : mChat.$$('main')[0].scrollHeight}, 'slow');
|
||||
}, i * 600);
|
||||
if (mChat.editDeleteLimit && $message.data('edit-delete-limit') && $message.find('[data-mchat-action="edit"], [data-mchat-action="del"]').length > 0) {
|
||||
var id = $message.attr('id');
|
||||
setTimeout(function() {
|
||||
$('#' + id).find('[data-mchat-action="edit"], [data-mchat-action="del"]').fadeOut('slow', function() {
|
||||
$(this).remove();
|
||||
});
|
||||
}, mChat.editDeleteLimit);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (json.edit) {
|
||||
var isFirstEdit = true;
|
||||
$.each(json.edit, function(id, content) {
|
||||
var $container = $('#mchat-message-' + id);
|
||||
if ($container.length) {
|
||||
if (isFirstEdit) {
|
||||
isFirstEdit = false;
|
||||
mChat.sound('edit');
|
||||
}
|
||||
$container.fadeOut('slow', function() {
|
||||
$container.replaceWith($(content).hide().fadeIn('slow'));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
if (json.del) {
|
||||
var isFirstDelete = true;
|
||||
$.each(json.del, function(i, id) {
|
||||
var $container = $('#mchat-message-' + id);
|
||||
if ($container.length) {
|
||||
if (isFirstDelete) {
|
||||
isFirstDelete = false;
|
||||
mChat.sound('del');
|
||||
}
|
||||
$container.fadeOut('slow', function() {
|
||||
$container.remove();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
setTimeout(function() {
|
||||
if (mChat.refreshInterval) {
|
||||
mChat.$$('refresh-load', 'refresh-error', 'refresh-paused').hide();
|
||||
mChat.$$('refresh-ok').show();
|
||||
}
|
||||
}, 250);
|
||||
});
|
||||
},
|
||||
whois: function() {
|
||||
if (mChat.customPage) {
|
||||
mChat.$$('refresh-pending').show();
|
||||
mChat.$$('refresh').hide();
|
||||
}
|
||||
ajaxRequest('whois', false, {}).done(function(json) {
|
||||
var $whois = $(json.whois);
|
||||
var $userlist = $whois.find('#mchat-userlist');
|
||||
if (Cookies.get('mchat_show_userlist')) {
|
||||
$userlist.show();
|
||||
}
|
||||
mChat.$$('whois').replaceWith($whois);
|
||||
mChat.cache.whois = $whois;
|
||||
mChat.cache.userlist = $userlist;
|
||||
if (mChat.customPage) {
|
||||
setTimeout(function() {
|
||||
mChat.$$('refresh-pending').hide();
|
||||
mChat.$$('refresh').show();
|
||||
}, 250);
|
||||
}
|
||||
});
|
||||
},
|
||||
clean: function() {
|
||||
mChat.$$('confirm').find('textarea').hide();
|
||||
mChat.$$('confirm').find('p').text(mChat.cleanConfirm);
|
||||
phpbb.confirm(mChat.$$('confirm'), function() {
|
||||
mChat.pauseSession();
|
||||
ajaxRequest('clean', true, {}).done(function() {
|
||||
phpbb.alert('mChat', mChat.cleanDone);
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
}, 2000);
|
||||
});
|
||||
});
|
||||
},
|
||||
timeLeft: function(sessionTime) {
|
||||
return (new Date(sessionTime * 1000)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0];
|
||||
},
|
||||
countDown: function() {
|
||||
mChat.sessionTime -= 1;
|
||||
mChat.$$('session').html(mChat.sessEnds + ' ' + mChat.timeLeft(mChat.sessionTime));
|
||||
if (mChat.sessionTime < 1) {
|
||||
mChat.endSession();
|
||||
}
|
||||
},
|
||||
pauseSession: function() {
|
||||
clearInterval(mChat.refreshInterval);
|
||||
if (mChat.userTimeout) {
|
||||
clearInterval(mChat.sessionCountdown);
|
||||
}
|
||||
if (mChat.whoisRefresh) {
|
||||
clearInterval(mChat.whoisInterval);
|
||||
}
|
||||
},
|
||||
resetSession: function(updateUi) {
|
||||
clearInterval(mChat.refreshInterval);
|
||||
mChat.refreshInterval = setInterval(mChat.refresh, mChat.refreshTime);
|
||||
if (mChat.userTimeout) {
|
||||
mChat.sessionTime = mChat.userTimeout / 1000;
|
||||
clearInterval(mChat.sessionCountdown);
|
||||
mChat.$$('session').html(mChat.sessEnds + ' ' + mChat.timeLeft(mChat.sessionTime));
|
||||
mChat.sessionCountdown = setInterval(mChat.countDown, 1000);
|
||||
}
|
||||
if (mChat.whoisRefresh) {
|
||||
clearInterval(mChat.whoisInterval);
|
||||
mChat.whoisInterval = setInterval(mChat.whois, mChat.whoisRefresh);
|
||||
}
|
||||
if (mChat.pause) {
|
||||
mChat.$$('input').one('keypress', mChat.endSession);
|
||||
}
|
||||
if (updateUi) {
|
||||
mChat.$$('refresh-ok').show();
|
||||
mChat.$$('refresh-load', 'refresh-error', 'refresh-paused').hide();
|
||||
mChat.$$('refresh-text').html(mChat.refreshYes);
|
||||
}
|
||||
},
|
||||
endSession: function() {
|
||||
clearInterval(mChat.refreshInterval);
|
||||
mChat.refreshInterval = false;
|
||||
if (mChat.userTimeout) {
|
||||
clearInterval(mChat.sessionCountdown);
|
||||
mChat.$$('session').html(mChat.sessOut);
|
||||
}
|
||||
if (mChat.whoisRefresh) {
|
||||
clearInterval(mChat.whoisInterval);
|
||||
mChat.whois();
|
||||
}
|
||||
mChat.$$('refresh-load', 'refresh-ok', 'refresh-error').hide();
|
||||
mChat.$$('refresh-paused').show();
|
||||
mChat.$$('refresh-text').html(mChat.refreshNo);
|
||||
},
|
||||
mention: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var username = mChat.entityDecode($container.data('username'));
|
||||
var usercolor = $container.data('usercolor');
|
||||
if (usercolor) {
|
||||
username = '[b][color=' + usercolor + ']' + username + '[/color][/b]';
|
||||
} else if (mChat.allowBBCodes) {
|
||||
username = '[b]' + username + '[/b]';
|
||||
}
|
||||
insert_text('@ ' + username + ', ');
|
||||
},
|
||||
quote: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var username = mChat.entityDecode($container.data('username'));
|
||||
var quote = mChat.entityDecode($container.data('message'));
|
||||
insert_text('[quote="' + username + '"] ' + quote + '[/quote]');
|
||||
},
|
||||
like: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var username = mChat.entityDecode($container.data('username'));
|
||||
var quote = mChat.entityDecode($container.data('message'));
|
||||
insert_text(mChat.likes + '[quote="' + username + '"] ' + quote + '[/quote]');
|
||||
},
|
||||
entityDecode: function(text) {
|
||||
var s = decodeURIComponent(text.toString().replace(/\+/g, ' '));
|
||||
s = s.replace(/</g, '<');
|
||||
s = s.replace(/>/g, '>');
|
||||
s = s.replace(/:/g, ':');
|
||||
s = s.replace(/./g, '.');
|
||||
s = s.replace(/&/g, '&');
|
||||
s = s.replace(/"/g, "'");
|
||||
return s;
|
||||
},
|
||||
$$: function() {
|
||||
return $($.map(arguments, function(name) {
|
||||
if (!mChat.cache[name]) {
|
||||
mChat.cache[name] = $('#mchat-' + name);
|
||||
}
|
||||
return mChat.cache[name];
|
||||
})).map(function() {
|
||||
return this.toArray();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
mChat.cache = {};
|
||||
mChat.$$('confirm').detach().show();
|
||||
|
||||
mChat.hiddenFields = {};
|
||||
$('#mchat-form').find('input[type=hidden]').each(function() {
|
||||
mChat.hiddenFields[this.name] = this.value;
|
||||
});
|
||||
|
||||
if (!mChat.archiveMode) {
|
||||
$.fn.autoGrowInput = function() {
|
||||
this.filter('input:text').each(function() {
|
||||
var comfortZone = 20;
|
||||
var minWidth = $(this).width();
|
||||
var val = '';
|
||||
var input = $(this);
|
||||
var testSubject = $('<div>').css({
|
||||
position: 'absolute',
|
||||
top: -9999,
|
||||
left: -9999,
|
||||
width: 'auto',
|
||||
fontSize: input.css('fontSize'),
|
||||
fontFamily: input.css('fontFamily'),
|
||||
fontWeight: input.css('fontWeight'),
|
||||
letterSpacing: input.css('letterSpacing'),
|
||||
whiteSpace: 'nowrap'
|
||||
});
|
||||
testSubject.insertAfter(input);
|
||||
$(this).on('keypress blur change submit focus', function() {
|
||||
if (val === (val = input.val())) {
|
||||
return;
|
||||
}
|
||||
var escaped = val.replace(/&/g, '&').replace(/\s/g, ' ').replace(/</g, '<').replace(/>/g, '>');
|
||||
var testerWidth = testSubject.html(escaped).width();
|
||||
var newWidth = (testerWidth + comfortZone) >= minWidth ? testerWidth + comfortZone : minWidth;
|
||||
if ((newWidth < input.width() && newWidth >= minWidth) || (newWidth > minWidth && newWidth < $('.mchat-panel').width() - comfortZone)) {
|
||||
input.width(newWidth);
|
||||
}
|
||||
});
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
mChat.resetSession(true);
|
||||
|
||||
if (!mChat.messageTop) {
|
||||
mChat.$$('main').animate({scrollTop: mChat.$$('main')[0].scrollHeight}, 'slow', 'swing');
|
||||
}
|
||||
|
||||
mChat.$$('user-sound').prop('checked', mChat.playSound && !Cookies.get('mchat_no_sound'));
|
||||
|
||||
if (Cookies.get('mchat_show_smilies')) {
|
||||
mChat.$$('smilies').slideToggle('slow');
|
||||
}
|
||||
|
||||
if (Cookies.get('mchat_show_bbcodes')) {
|
||||
mChat.$$('bbcodes').slideToggle('slow', function() {
|
||||
if (Cookies.get('mchat_show_colour')) {
|
||||
mChat.$$('colour').slideToggle('slow');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (Cookies.get('mchat_show_userlist')) {
|
||||
mChat.$$('userlist').slideToggle('slow');
|
||||
}
|
||||
|
||||
mChat.$$('colour').html(phpbb.colorPalette('h', 15, 10)).on('click', 'a', function(e) {
|
||||
var color = $(this).data('color');
|
||||
bbfontstyle('[color=#' + color + ']', '[/color]');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
if (!mChat.$$('user-sound').prop('checked')) {
|
||||
Cookies.set('mchat_no_sound', 'yes');
|
||||
}
|
||||
|
||||
mChat.$$('user-sound').change(function() {
|
||||
if (this.checked) {
|
||||
Cookies.remove('mchat_no_sound');
|
||||
} else {
|
||||
Cookies.set('mchat_no_sound', 'yes');
|
||||
}
|
||||
});
|
||||
|
||||
$('#mchat-form').on('keypress', function(e) {
|
||||
if (e.which == 13) {
|
||||
mChat.add();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
mChat.$$('input').autoGrowInput();
|
||||
}
|
||||
|
||||
$(window).on('beforeunload', function() {
|
||||
mChat.pageIsUnloading = true;
|
||||
});
|
||||
|
||||
$('#phpbb').on('click', '[data-mchat-action]', function(e) {
|
||||
var action = $(this).data('mchat-action');
|
||||
mChat[action].call(this);
|
||||
e.preventDefault();
|
||||
}).on('click', '[data-mchat-toggle]', function(e) {
|
||||
var elem = $(this).data('mchat-toggle');
|
||||
mChat.toggle(elem);
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
12
styles/prosilver/template/mchat.min.js
vendored
Normal file
93
styles/prosilver/template/mchat_bbcodes.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<div id="mchat-bbcodes">
|
||||
<fieldset class="fields1">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var form_name = 'postform';
|
||||
var text_name = 'message';
|
||||
|
||||
// Define the bbCode tags
|
||||
var bbcode = new Array();
|
||||
var bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
||||
// Helpline messages
|
||||
var help_line = {
|
||||
b: '{LA_BBCODE_B_HELP}',
|
||||
i: '{LA_BBCODE_I_HELP}',
|
||||
u: '{LA_BBCODE_U_HELP}',
|
||||
q: '{LA_BBCODE_Q_HELP}',
|
||||
c: '{LA_BBCODE_C_HELP}',
|
||||
l: '{LA_BBCODE_L_HELP}',
|
||||
o: '{LA_BBCODE_O_HELP}',
|
||||
p: '{LA_BBCODE_P_HELP}',
|
||||
w: '{LA_BBCODE_W_HELP}',
|
||||
a: '{LA_BBCODE_A_HELP}',
|
||||
s: '{LA_BBCODE_S_HELP}',
|
||||
f: '{LA_BBCODE_F_HELP}',
|
||||
e: '{LA_BBCODE_E_HELP}',
|
||||
d: '{LA_BBCODE_D_HELP}',
|
||||
tip: '{LA_STYLES_TIP}'
|
||||
<!-- BEGIN custom_tags -->
|
||||
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
|
||||
<!-- END custom_tags -->
|
||||
}
|
||||
// ]]>
|
||||
</script>
|
||||
<!-- IF S_MCHAT_BBCODE_B -->
|
||||
<input type="button" class="button2" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onclick="bbstyle(0)" title="{L_BBCODE_B_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_I -->
|
||||
<input type="button" class="button2" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onclick="bbstyle(2)" title="{L_BBCODE_I_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_U -->
|
||||
<input type="button" class="button2" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onclick="bbstyle(4)" title="{L_BBCODE_U_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_QUOTE -->
|
||||
<input type="button" class="button2" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onclick="bbstyle(6)" title="{L_BBCODE_Q_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_CODE -->
|
||||
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" title="{L_BBCODE_C_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_LIST -->
|
||||
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" title="{L_BBCODE_L_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_LIST -->
|
||||
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" title="{L_BBCODE_O_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_LIST or S_MCHAT_LIST -->
|
||||
<input type="button" class="button2" accesskey="t" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" title="{L_BBCODE_LISTITEM_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_IMG -->
|
||||
<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" title="{L_BBCODE_P_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_URL -->
|
||||
<input type="button" class="button2" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onclick="bbstyle(16)" title="{L_BBCODE_W_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_FLASH -->
|
||||
<input type="button" class="button2" accesskey="d" name="addbbcode18" value="Flash" onclick="bbstyle(18)" title="{L_BBCODE_D_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_SIZE -->
|
||||
<select name="addbbcode20" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]');this.form.addbbcode20.selectedIndex = 2;" title="{L_BBCODE_F_HELP}">
|
||||
<option value="50">{L_FONT_TINY}</option>
|
||||
<option value="85">{L_FONT_SMALL}</option>
|
||||
<option value="100" selected="selected">{L_FONT_NORMAL}</option>
|
||||
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 150 -->
|
||||
<option value="150">{L_FONT_LARGE}</option>
|
||||
<!-- IF not MAX_FONT_SIZE or MAX_FONT_SIZE >= 200 -->
|
||||
<option value="200">{L_FONT_HUGE}</option>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</select>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_COLOR -->
|
||||
<input type="button" class="button2" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" data-mchat-toggle="colour" title="{L_BBCODE_S_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF .custom_tags -->
|
||||
<select name="addbbcode_custom" onchange="bbstyle(this.form.addbbcode_custom.options[this.form.addbbcode_custom.selectedIndex].value*1);this.form.addbbcode_custom.selectedIndex = 0;">
|
||||
<option value="#" selected="selected">{L_MCHAT_CUSTOM_BBCODES}</option>
|
||||
<!-- BEGIN custom_tags -->
|
||||
<option value="{custom_tags.BBCODE_ID}" title="{custom_tags.BBCODE_HELPLINE}">{custom_tags.BBCODE_TAG}</option>
|
||||
<!-- END custom_tags -->
|
||||
</select>
|
||||
<!-- ENDIF -->
|
||||
<div id="mchat-colour" class="hidden"></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
200
styles/prosilver/template/mchat_body.html
Normal file
@@ -0,0 +1,200 @@
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE or MCHAT_CUSTOM_PAGE -->
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDEJS jquery.titlealert.min.js -->
|
||||
<!-- INCLUDEJS js.cookie-2.0.4.min.js -->
|
||||
<!-- INCLUDEJS mchat.js -->
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE and (.pagination or MCHAT_TOTAL_MESSAGES) -->
|
||||
<div class="action-bar top">
|
||||
<div class="pagination">
|
||||
{MCHAT_TOTAL_MESSAGES}
|
||||
<!-- IF .pagination -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
<!-- ELSE -->
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT dmzx_mchat_body_before -->
|
||||
<div class="forabg">
|
||||
<div class="inner"><a name="mChat"></a>
|
||||
<ul class="topiclist">
|
||||
<li class="header">
|
||||
<dl class="icon">
|
||||
<dt><!-- IF MCHAT_ARCHIVE_PAGE -->{L_MCHAT_ARCHIVE_PAGE}<!-- ELSEIF S_MCHAT_CUSTOM_PAGE --><a href="{MCHAT_FILE_NAME}" title="{L_MCHAT_TITLE}">{L_MCHAT_TITLE}</a><!-- ELSE -->{L_MCHAT_TITLE}<!-- ENDIF --></dt>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="mchat-body" class="postbody">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var form_name = 'postform';
|
||||
var text_name = 'message';
|
||||
var mChat = {
|
||||
// General settings
|
||||
file : '{MCHAT_FILE_NAME}',
|
||||
extUrl : '{EXT_URL}',
|
||||
customPage : <!-- IF MCHAT_CUSTOM_PAGE -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
pause : <!-- IF MCHAT_PAUSE_ON_INPUT -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
playSound : <!-- IF S_MCHAT_SOUND_YES -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
archiveMode : <!-- IF MCHAT_ARCHIVE_PAGE -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
messageTop : <!-- IF MCHAT_MESSAGE_TOP -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
liveUpdates : <!-- IF MCHAT_LIVE_UPDATES -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
|
||||
// Limits & timeouts
|
||||
refreshTime : {MCHAT_REFRESH_JS},
|
||||
whoisRefresh : {MCHAT_WHOIS_REFRESH},
|
||||
userTimeout : {MCHAT_USER_TIMEOUT},
|
||||
mssgLngth : {MCHAT_MESSAGE_LNGTH},
|
||||
editDeleteLimit : {MCHAT_EDIT_DELETE_LIMIT},
|
||||
|
||||
// Language
|
||||
newMessageAlert : '{LA_MCHAT_NEW_CHAT}',
|
||||
noMessageInput : '{LA_MCHAT_NOMESSAGEINPUT}',
|
||||
noMessages : '{LA_MCHAT_NOMESSAGE}',
|
||||
editInfo : '{LA_MCHAT_EDITINFO}',
|
||||
noAccess : '{LA_NO_AUTH_OPERATION}',
|
||||
flood : '{LA_MCHAT_FLOOD}',
|
||||
<!-- IF MCHAT_FOUNDER -->
|
||||
cleanConfirm : '{LA_MCHAT_DELALLMESS}',
|
||||
cleanDone : '{LA_MCHAT_CLEANED}',
|
||||
<!-- ENDIF -->
|
||||
delConfirm : '{LA_MCHAT_DELCONFIRM}',
|
||||
clearConfirm : '{LA_MCHAT_RESET_QUESTION}',
|
||||
sessOut : '{LA_MCHAT_SESSION_OUT}',
|
||||
sessEnds : '{LA_MCHAT_SESSION_ENDS}',
|
||||
refreshYes : '{MCHAT_REFRESH_YES}',
|
||||
refreshNo : '{LA_MCHAT_REFRESH_NO}',
|
||||
mssgLngthLong : '{MCHAT_MESS_LONG}',
|
||||
likes : '{LA_MCHAT_LIKES}',
|
||||
};
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<audio id="mchat-sound-add" class="hidden" src="{EXT_URL}sounds/add.mp3" preload="auto"></audio>
|
||||
<audio id="mchat-sound-edit" class="hidden" src="{EXT_URL}sounds/edit.mp3" preload="auto"></audio>
|
||||
<audio id="mchat-sound-del" class="hidden" src="{EXT_URL}sounds/del.mp3" preload="auto"></audio>
|
||||
<audio id="mchat-sound-error" class="hidden" src="{EXT_URL}sounds/error.mp3" preload="auto"></audio>
|
||||
|
||||
<div id="mchat-main" class="mchat-row-limit"<!-- IF not MCHAT_ARCHIVE_PAGE --> style="height:<!-- IF MCHAT_CUSTOM_PAGE -->{MCHAT_CUSTOM_HEIGHT}<!-- ELSE -->{MCHAT_INDEX_HEIGHT}<!-- ENDIF -->px"<!-- ENDIF -->>
|
||||
<div id="mchat-confirm" class="hidden">
|
||||
<h3>{L_CONFIRM}</h3>
|
||||
<p></p>
|
||||
<textarea></textarea>
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_MCHAT_OK}" class="button2" />
|
||||
<input type="button" name="cancel" value="{L_CANCEL}" class="button2" />
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="mchat-messages"><!-- INCLUDE mchat_messages.html --></div>
|
||||
<!-- IF not .mchatrow --><div id="mchat-no-messages">{L_MCHAT_NOMESSAGE}</div><!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
<!-- IF MCHAT_STATIC_MESS -->
|
||||
<div id="mchat-static"><strong>{L_MCHAT_ANNOUNCEMENT}{L_COLON}</strong> <span>{MCHAT_STATIC_MESS}</span></div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not MCHAT_ARCHIVE_PAGE and not MCHAT_CUSTOM_PAGE and MCHAT_WHOIS_REFRESH -->
|
||||
<!-- INCLUDE mchat_whois.html -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form name="postform" id="mchat-form" action="{MCHAT_FILE_NAME}" method="POST">
|
||||
{S_FORM_TOKEN}
|
||||
<!-- IF not MCHAT_ARCHIVE_PAGE -->
|
||||
<div class="mchat-panel">
|
||||
<noscript><div class="mchat-alert">{L_MCHAT_NOJAVASCRIPT}</div></noscript>
|
||||
<!-- IF MCHAT_ALLOW_USE -->
|
||||
<!-- IF MCHAT_INPUT_TYPE -->
|
||||
<input type="text" name="message" class="inputbox medium" id="mchat-input" />
|
||||
<!-- ELSE -->
|
||||
<textarea name="message" class="inputbox no-auto-resize" id="mchat-input" cols="32" rows="5"></textarea>
|
||||
<!-- ENDIF -->
|
||||
<br />
|
||||
<input id="mchat-add" type="button" class="button2" data-mchat-action="add" value="{L_MCHAT_ADD}" />
|
||||
<!-- IF MCHAT_USER_TIMEOUT or MCHAT_PAUSE_ON_INPUT -->
|
||||
<input id="mchat-clear" type="button" class="button2" data-mchat-action="clear" value="{L_MCHAT_CLEAR_INPUT}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_SMILES and .smiley -->
|
||||
<input type="button" class="button2" data-mchat-toggle="smilies" value="{L_MCHAT_SMILES}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_BBCODES -->
|
||||
<input type="button" class="button2" data-mchat-toggle="bbcodes" value="{L_MCHAT_BBCODES}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_buttons_mid -->
|
||||
<!-- IF MCHAT_READ_ARCHIVE_BUTTON -->
|
||||
<input type="button" class="button2" onclick="window.location.href = '{MCHAT_ARCHIVE_URL}';" value="{L_MCHAT_ARCHIVE}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_FOUNDER -->
|
||||
<input id="mchat-clean" type="button" class="button2" data-mchat-action="clean" value="{L_MCHAT_CLEAN}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_USE -->
|
||||
<!-- IF MCHAT_RULES -->
|
||||
<input type="button" class="button2" onclick="popup('{U_MCHAT_RULES}', 450, 275); return false;" value="{L_MCHAT_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_buttons_after -->
|
||||
<!-- IF MCHAT_ALLOW_BBCODES -->
|
||||
<!-- INCLUDE mchat_bbcodes.html -->
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_SMILES and .smiley -->
|
||||
<div id="mchat-smilies" class="hidden">
|
||||
<!-- BEGIN smiley -->
|
||||
<a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
|
||||
<!-- END smiley -->
|
||||
<a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_body_smiley_after -->
|
||||
<div id="mchat-status">
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/load.gif" alt="{L_MCHAT_LOAD}" title="{L_MCHAT_LOAD}" id="mchat-refresh-load" />
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/ok.gif" alt="{L_MCHAT_OK}" title="{L_MCHAT_OK}" id="mchat-refresh-ok" />
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/error.gif" alt="{L_MCHAT_ERROR}" title="{L_MCHAT_ERROR}" id="mchat-refresh-error" />
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/paused.gif" alt="{L_MCHAT_PAUSE}" title="{L_MCHAT_PAUSE}" id="mchat-refresh-paused" />
|
||||
<span id="mchat-refresh-text">{MCHAT_REFRESH_YES}</span>
|
||||
<!-- IF MCHAT_USER_TIMEOUT --> • <span id="mchat-session">{L_MCHAT_SESSION_ENDS} {MCHAT_USER_TIMEOUT_TIME}</span><!-- ENDIF --> • <label for="mchat-user-sound">{L_MCHAT_USESOUND} <input type="checkbox" id="mchat-user-sound"<!-- IF S_MCHAT_SOUND_YES --> checked="checked"<!-- ENDIF --> /></label>
|
||||
{L_MCHAT_COPYRIGHT}
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE and (.pagination or MCHAT_TOTAL_MESSAGES) -->
|
||||
<div class="action-bar bottom">
|
||||
<div class="pagination">
|
||||
{MCHAT_TOTAL_MESSAGES}
|
||||
<!-- IF .pagination -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
<!-- ELSE -->
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF MCHAT_CUSTOM_PAGE and not MCHAT_ARCHIVE_PAGE and MCHAT_WHOIS_REFRESH -->
|
||||
<h3>{L_WHO_IS_CHATTING}</h3>
|
||||
<!-- INCLUDE mchat_whois.html -->
|
||||
<div class="mchat-refresh">
|
||||
<span id="mchat-refresh">{MCHAT_WHOIS_REFRESH_EXPLAIN}</span>
|
||||
<span id="mchat-refresh-pending" class="hidden">{L_MCHAT_REFRESHING}</span>
|
||||
<!-- IF LEGEND --><br /><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ELSEIF MCHAT_ARCHIVE_PAGE and LEGEND -->
|
||||
<div class="mchat-refresh">
|
||||
<em>{L_LEGEND}{L_COLON} {LEGEND}</em>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE or MCHAT_CUSTOM_PAGE -->
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
<!-- ENDIF -->
|
||||
26
styles/prosilver/template/mchat_messages.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- BEGIN mchatrow -->
|
||||
<div id="mchat-message-{mchatrow.MCHAT_MESSAGE_ID}" class="mchat-message <!-- IF S_MCHAT_AVATARS -->mchat-message-avatar <!-- ENDIF -->mchat-bg-<!-- IF mchatrow.S_ROW_COUNT is even -->1<!-- ELSE -->2<!-- ENDIF -->" data-id="{mchatrow.MCHAT_MESSAGE_ID}" data-username="{mchatrow.MCHAT_USERNAME}"<!-- IF mchatrow.MCHAT_USERNAME_COLOR --> data-usercolor="{mchatrow.MCHAT_USERNAME_COLOR}"<!-- ENDIF --> data-message="{mchatrow.MCHAT_MESSAGE_EDIT}" data-message-time="{mchatrow.MCHAT_MESSAGE_TIME}" data-edit-time="{mchatrow.MCHAT_EDIT_TIME}"<!-- IF MCHAT_EDIT_DELETE_LIMIT and not MCHAT_EDIT_DELETE_IGNORE and (mchatrow.MCHAT_ALLOW_EDIT or mchatrow.MCHAT_ALLOW_DEL) --> data-edit-delete-limit="1"<!-- ENDIF -->>
|
||||
<!-- IF S_MCHAT_AVATARS -->
|
||||
<div class="mchat-avatar">
|
||||
<!-- IF mchatrow.U_VIEWPROFILE --><a href="{mchatrow.U_VIEWPROFILE}" title="{L_READ_PROFILE}"><!-- ENDIF -->
|
||||
<!-- IF mchatrow.MCHAT_USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR}<!-- ELSE --><img src="{STYLE_PATH}/theme/images/no_avatar.gif" width="40px;" height="40px;" alt="" /><!-- ENDIF -->
|
||||
<!-- IF mchatrow.U_VIEWPROFILE --></a><!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<div class="mchat-message-header">
|
||||
<!-- IF not MCHAT_ARCHIVE_PAGE --><span class="mchat-mention" data-mchat-action="mention" title="{L_MCHAT_RESPOND}" <!-- IF mchatrow.MCHAT_USERNAME_COLOR --> style="color:{mchatrow.MCHAT_USERNAME_COLOR}"<!-- ENDIF -->><strong>@</strong></span><!-- ENDIF -->
|
||||
{mchatrow.MCHAT_USERNAME_FULL} - {mchatrow.MCHAT_TIME}
|
||||
</div>
|
||||
<div class="mchat-message-icons">
|
||||
<!-- IF MCHAT_ALLOW_PM and mchatrow.MCHAT_PM and mchatrow.U_VIEWPROFILE --><a href="{mchatrow.MCHAT_PM}" title="{L_MCHAT_SEND_PM}"><img src="{EXT_URL}styles/prosilver/theme/images/message.gif" alt="{L_MCHAT_SEND_PM}" title="{L_MCHAT_SEND_PM}" /></a><!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_LIKE and not MCHAT_ARCHIVE_PAGE and not mchatrow.MCHAT_IS_POSTER --><img src="{EXT_URL}styles/prosilver/theme/images/like.png" alt="{L_REPLY_WITH_LIKE}" title="{L_REPLY_WITH_LIKE}" data-mchat-action="like" /></a><!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_QUOTE and not MCHAT_ARCHIVE_PAGE and not mchatrow.MCHAT_IS_POSTER --><img src="{EXT_URL}styles/prosilver/theme/images/quota.png" alt="{L_REPLY_WITH_QUOTE}" title="{L_REPLY_WITH_QUOTE}" data-mchat-action="quote" /><!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_IP --><a href="{mchatrow.MCHAT_U_IP}" onclick="popup(this.href, 750, 500); return false;"><img src="{EXT_URL}styles/prosilver/theme/images/ip.gif" alt="{L_MCHAT_IP} {mchatrow.MCHAT_USER_IP}" title="{L_MCHAT_IP} {mchatrow.MCHAT_USER_IP}" /></a><!-- ENDIF -->
|
||||
<!-- IF mchatrow.MCHAT_ALLOW_BAN --><a href="{mchatrow.MCHAT_U_BAN}"><img src="{EXT_URL}styles/prosilver/theme/images/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" /></a><!-- ENDIF -->
|
||||
<!-- IF mchatrow.MCHAT_ALLOW_EDIT --><img src="{EXT_URL}styles/prosilver/theme/images/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" data-mchat-action="edit" /><!-- ENDIF -->
|
||||
<!-- IF mchatrow.MCHAT_ALLOW_DEL --><img src="{EXT_URL}styles/prosilver/theme/images/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" data-mchat-action="del" /><!-- ENDIF -->
|
||||
</div>
|
||||
<br />
|
||||
<div class="mchat-text">{mchatrow.MCHAT_MESSAGE}</div>
|
||||
</div>
|
||||
<!-- END mchatrow -->
|
||||
11
styles/prosilver/template/mchat_portal.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- IF S_DISPLAY_MCHAT_PORTAL -->
|
||||
{$C_BLOCK_H_L}{$TITLE}{$C_BLOCK_H_R}
|
||||
<div class="panel bg1 portal-no-margin">
|
||||
<div class="inner">
|
||||
<div class="postbody portal-module-postbody">
|
||||
<!-- EVENT dmzx_mchat_portal_display -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{$C_BLOCK_F_L}{$C_BLOCK_F_R}
|
||||
<!-- ENDIF -->
|
||||
169
styles/prosilver/template/mchat_portal_body.html
Normal file
@@ -0,0 +1,169 @@
|
||||
<!-- INCLUDEJS jquery.titlealert.min.js -->
|
||||
<!-- INCLUDEJS js.cookie-2.0.4.min.js -->
|
||||
<!-- INCLUDEJS mchat.js -->
|
||||
|
||||
|
||||
<!-- EVENT dmzx_mchat_body_before -->
|
||||
|
||||
<div id="mchat-body" class="postbody">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var form_name = 'postform';
|
||||
var text_name = 'message';
|
||||
var mChat = {
|
||||
// General settings
|
||||
file : '{MCHAT_FILE_NAME}',
|
||||
extUrl : '{EXT_URL}',
|
||||
customPage : <!-- IF MCHAT_CUSTOM_PAGE -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
pause : <!-- IF MCHAT_PAUSE_ON_INPUT -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
playSound : <!-- IF S_MCHAT_SOUND_YES -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
archiveMode : <!-- IF MCHAT_ARCHIVE_PAGE -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
messageTop : <!-- IF MCHAT_MESSAGE_TOP -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
liveUpdates : <!-- IF MCHAT_LIVE_UPDATES -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
|
||||
// Limits & timeouts
|
||||
refreshTime : {MCHAT_REFRESH_JS},
|
||||
whoisRefresh : {MCHAT_WHOIS_REFRESH},
|
||||
userTimeout : {MCHAT_USER_TIMEOUT},
|
||||
mssgLngth : {MCHAT_MESSAGE_LNGTH},
|
||||
editDeleteLimit : {MCHAT_EDIT_DELETE_LIMIT},
|
||||
|
||||
// Language
|
||||
newMessageAlert : '{LA_MCHAT_NEW_CHAT}',
|
||||
noMessageInput : '{LA_MCHAT_NOMESSAGEINPUT}',
|
||||
noMessages : '{LA_MCHAT_NOMESSAGE}',
|
||||
editInfo : '{LA_MCHAT_EDITINFO}',
|
||||
noAccess : '{LA_NO_AUTH_OPERATION}',
|
||||
flood : '{LA_MCHAT_FLOOD}',
|
||||
<!-- IF MCHAT_FOUNDER -->
|
||||
cleanConfirm : '{LA_MCHAT_DELALLMESS}',
|
||||
cleanDone : '{LA_MCHAT_CLEANED}',
|
||||
<!-- ENDIF -->
|
||||
delConfirm : '{LA_MCHAT_DELCONFIRM}',
|
||||
clearConfirm : '{LA_MCHAT_RESET_QUESTION}',
|
||||
sessOut : '{LA_MCHAT_SESSION_OUT}',
|
||||
sessEnds : '{LA_MCHAT_SESSION_ENDS}',
|
||||
refreshYes : '{MCHAT_REFRESH_YES}',
|
||||
refreshNo : '{LA_MCHAT_REFRESH_NO}',
|
||||
mssgLngthLong : '{MCHAT_MESS_LONG}',
|
||||
likes : '{LA_MCHAT_LIKES}',
|
||||
};
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<audio id="mchat-sound-add" class="hidden" src="{EXT_URL}sounds/add.mp3" preload="auto"></audio>
|
||||
<audio id="mchat-sound-edit" class="hidden" src="{EXT_URL}sounds/edit.mp3" preload="auto"></audio>
|
||||
<audio id="mchat-sound-del" class="hidden" src="{EXT_URL}sounds/del.mp3" preload="auto"></audio>
|
||||
<audio id="mchat-sound-error" class="hidden" src="{EXT_URL}sounds/error.mp3" preload="auto"></audio>
|
||||
|
||||
<div id="mchat-main" class="mchat-row-limit"<!-- IF not MCHAT_ARCHIVE_PAGE --> style="height:<!-- IF MCHAT_CUSTOM_PAGE -->{MCHAT_CUSTOM_HEIGHT}<!-- ELSE -->{MCHAT_INDEX_HEIGHT}<!-- ENDIF -->px"<!-- ENDIF -->>
|
||||
<div id="mchat-confirm" class="hidden">
|
||||
<h3>{L_CONFIRM}</h3>
|
||||
<p></p>
|
||||
<textarea></textarea>
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_MCHAT_OK}" class="button2" />
|
||||
<input type="button" name="cancel" value="{L_CANCEL}" class="button2" />
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="mchat-messages"><!-- INCLUDE mchat_messages.html --></div>
|
||||
<!-- IF not .mchatrow --><div id="mchat-no-messages">{L_MCHAT_NOMESSAGE}</div><!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
<!-- IF MCHAT_STATIC_MESS -->
|
||||
<div id="mchat-static"><strong>{L_MCHAT_ANNOUNCEMENT}{L_COLON}</strong> <span>{MCHAT_STATIC_MESS}</span></div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not MCHAT_ARCHIVE_PAGE and not MCHAT_CUSTOM_PAGE and MCHAT_WHOIS_REFRESH -->
|
||||
<!-- INCLUDE mchat_whois.html -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form name="postform" id="mchat-form" action="{MCHAT_FILE_NAME}" method="POST">
|
||||
{S_FORM_TOKEN}
|
||||
<!-- IF not MCHAT_ARCHIVE_PAGE -->
|
||||
<div class="mchat-panel">
|
||||
<noscript><div class="mchat-alert">{L_MCHAT_NOJAVASCRIPT}</div></noscript>
|
||||
<!-- IF MCHAT_ALLOW_USE -->
|
||||
<!-- IF MCHAT_INPUT_TYPE -->
|
||||
<input type="text" name="message" class="inputbox medium" id="mchat-input" />
|
||||
<!-- ELSE -->
|
||||
<textarea name="message" class="inputbox no-auto-resize" id="mchat-input" cols="32" rows="5"></textarea>
|
||||
<!-- ENDIF -->
|
||||
<br />
|
||||
<input id="mchat-add" type="button" class="button2" data-mchat-action="add" value="{L_MCHAT_ADD}" />
|
||||
<!-- IF MCHAT_USER_TIMEOUT or MCHAT_PAUSE_ON_INPUT -->
|
||||
<input id="mchat-clear" type="button" class="button2" data-mchat-action="clear" value="{L_MCHAT_CLEAR_INPUT}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_SMILES and .smiley -->
|
||||
<input type="button" class="button2" data-mchat-toggle="smilies" value="{L_MCHAT_SMILES}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_BBCODES -->
|
||||
<input type="button" class="button2" data-mchat-toggle="bbcodes" value="{L_MCHAT_BBCODES}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_buttons_mid -->
|
||||
<!-- IF MCHAT_READ_ARCHIVE_BUTTON -->
|
||||
<input type="button" class="button2" onclick="window.location.href = '{MCHAT_ARCHIVE_URL}';" value="{L_MCHAT_ARCHIVE}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_FOUNDER -->
|
||||
<input id="mchat-clean" type="button" class="button2" data-mchat-action="clean" value="{L_MCHAT_CLEAN}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_USE -->
|
||||
<!-- IF MCHAT_RULES -->
|
||||
<input type="button" class="button2" onclick="popup('{U_MCHAT_RULES}', 450, 275); return false;" value="{L_MCHAT_HELP}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_buttons_after -->
|
||||
<!-- IF MCHAT_ALLOW_BBCODES -->
|
||||
<!-- INCLUDE mchat_bbcodes.html -->
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_SMILES and .smiley -->
|
||||
<div id="mchat-smilies" class="hidden">
|
||||
<!-- BEGIN smiley -->
|
||||
<a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
|
||||
<!-- END smiley -->
|
||||
<a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_body_smiley_after -->
|
||||
<div id="mchat-status">
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/load.gif" alt="{L_MCHAT_LOAD}" title="{L_MCHAT_LOAD}" id="mchat-refresh-load" />
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/ok.gif" alt="{L_MCHAT_OK}" title="{L_MCHAT_OK}" id="mchat-refresh-ok" />
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/error.gif" alt="{L_MCHAT_ERROR}" title="{L_MCHAT_ERROR}" id="mchat-refresh-error" />
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/paused.gif" alt="{L_MCHAT_PAUSE}" title="{L_MCHAT_PAUSE}" id="mchat-refresh-paused" />
|
||||
<span id="mchat-refresh-text">{MCHAT_REFRESH_YES}</span>
|
||||
<!-- IF MCHAT_USER_TIMEOUT --> • <span id="mchat-session">{L_MCHAT_SESSION_ENDS} {MCHAT_USER_TIMEOUT_TIME}</span><!-- ENDIF --> • <label for="mchat-user-sound">{L_MCHAT_USESOUND} <input type="checkbox" id="mchat-user-sound"<!-- IF S_MCHAT_SOUND_YES --> checked="checked"<!-- ENDIF --> /></label>
|
||||
{L_MCHAT_COPYRIGHT}
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE and (.pagination or MCHAT_TOTAL_MESSAGES) -->
|
||||
<div class="action-bar bottom">
|
||||
<div class="pagination">
|
||||
{MCHAT_TOTAL_MESSAGES}
|
||||
<!-- IF .pagination -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
<!-- ELSE -->
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF MCHAT_CUSTOM_PAGE and not MCHAT_ARCHIVE_PAGE and MCHAT_WHOIS_REFRESH -->
|
||||
<h3>{L_WHO_IS_CHATTING}</h3>
|
||||
<!-- INCLUDE mchat_whois.html -->
|
||||
<div class="mchat-refresh">
|
||||
<span id="mchat-refresh">{MCHAT_WHOIS_REFRESH_EXPLAIN}</span>
|
||||
<span id="mchat-refresh-pending" class="hidden">{L_MCHAT_REFRESHING}</span>
|
||||
<!-- IF LEGEND --><br /><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ELSEIF MCHAT_ARCHIVE_PAGE and LEGEND -->
|
||||
<div class="mchat-refresh">
|
||||
<em>{L_LEGEND}{L_COLON} {LEGEND}</em>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
11
styles/prosilver/template/mchat_rules.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- INCLUDE simple_header.html -->
|
||||
|
||||
<h2>{L_MCHAT_HELP}</h2>
|
||||
<div class="rules">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
{MCHAT_RULES}
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
|
||||
|
||||
<!-- INCLUDE simple_footer.html -->
|
||||
8
styles/prosilver/template/mchat_whois.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div id="mchat-whois">
|
||||
<!-- IF MCHAT_USERS_LIST -->
|
||||
<a href="#" data-mchat-toggle="userlist">{MCHAT_USERS_COUNT}</a>
|
||||
<!-- ELSE -->
|
||||
{MCHAT_USERS_COUNT}
|
||||
<!-- ENDIF -->
|
||||
{MCHAT_ONLINE_EXPLAIN}<br /><span id="mchat-userlist" class="hidden">{MCHAT_USERS_LIST}</span>
|
||||
</div>
|
||||
71
styles/prosilver/template/ucp_mchat.html
Normal file
@@ -0,0 +1,71 @@
|
||||
<!-- INCLUDE ucp_header.html -->
|
||||
|
||||
<form id="ucp" method="post" action="{S_UCP_ACTION}">
|
||||
|
||||
<h2>{L_TITLE}</h2>
|
||||
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<fieldset>
|
||||
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_INDEX -->
|
||||
<dl>
|
||||
<dt><label for="mchat_index">{L_DISPLAY_MCHAT}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_index" value="1"<!-- IF S_DISPLAY_MCHAT --> id="mchat_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_index" value="0"<!-- IF not S_DISPLAY_MCHAT --> id="mchat_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="mchat_sound">{L_SOUND_MCHAT}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_sound" value="1"<!-- IF S_SOUND_MCHAT --> id="mchat_sound" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_sound" value="0"<!-- IF not S_SOUND_MCHAT --> id="mchat_sound" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- IF S_MCHAT_INDEX_STATS -->
|
||||
<dl>
|
||||
<dt><label for="mchat_statsindex">{L_DISPLAY_STATS_INDEX}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="1"<!-- IF S_STATS_MCHAT --> id="mchat_statsindex" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="0"<!-- IF not S_STATS_MCHAT --> id="mchat_statsindex" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_TOPICS -->
|
||||
<dl>
|
||||
<dt><label for="mchat_topics">{L_DISPLAY_NEW_TOPICS}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_topics" value="1"<!-- IF S_TOPICS_MCHAT --> id="mchat_topics" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_topics" value="0"<!-- IF not S_TOPICS_MCHAT --> id="mchat_topics" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_AVATARS -->
|
||||
<dl>
|
||||
<dt><label for="mchat_avatars">{L_DISPLAY_AVATARS}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="1"<!-- IF S_AVATARS_MCHAT --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="0"<!-- IF not S_AVATARS_MCHAT --> id="mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="mchat_input_type">{L_CHAT_AREA}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_input_area" value="1"<!-- IF S_INPUT_MCHAT --> id="mchat_input_type" checked="checked"<!-- ENDIF --> /> {L_INPUT_AREA}</label>
|
||||
<label><input type="radio" name="user_mchat_input_area" value="0"<!-- IF not S_INPUT_MCHAT --> id=""mchat_input_type" checked="checked"<!-- ENDIF --> /> {L_TEXT_AREA}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="submit-buttons">
|
||||
{S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />
|
||||
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE ucp_footer.html -->
|
||||
BIN
styles/prosilver/theme/images/ban.gif
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
styles/prosilver/theme/images/bg_button.gif
Normal file
|
After Width: | Height: | Size: 182 B |
BIN
styles/prosilver/theme/images/del.gif
Normal file
|
After Width: | Height: | Size: 928 B |
BIN
styles/prosilver/theme/images/edit.gif
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
styles/prosilver/theme/images/error.gif
Normal file
|
After Width: | Height: | Size: 141 B |
BIN
styles/prosilver/theme/images/ip.gif
Normal file
|
After Width: | Height: | Size: 941 B |
BIN
styles/prosilver/theme/images/like.png
Normal file
|
After Width: | Height: | Size: 784 B |
BIN
styles/prosilver/theme/images/load.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
styles/prosilver/theme/images/message.gif
Normal file
|
After Width: | Height: | Size: 576 B |
BIN
styles/prosilver/theme/images/ok.gif
Normal file
|
After Width: | Height: | Size: 96 B |
BIN
styles/prosilver/theme/images/paused.gif
Normal file
|
After Width: | Height: | Size: 83 B |
BIN
styles/prosilver/theme/images/quota.png
Normal file
|
After Width: | Height: | Size: 306 B |
175
styles/prosilver/theme/mchat.css
Normal file
@@ -0,0 +1,175 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
.mchat-message {
|
||||
background: linear-gradient(#B6BFC4, #FFFFFF, #FFFFFF, #B6BFC4);
|
||||
border: 1px solid #999999;
|
||||
border-radius: 6px;
|
||||
padding: 5px;
|
||||
margin-right: 1px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mchat-message:hover {
|
||||
background-color: #F6F4D0;
|
||||
}
|
||||
|
||||
.mchat-bg-1 {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.mchat-bg-2 {
|
||||
color: #444444;
|
||||
}
|
||||
|
||||
.mchat-row-limit {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mchat-panel {
|
||||
text-align: center;
|
||||
padding: 3px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#mchat-input {
|
||||
cursor: text;
|
||||
width: 50%;
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #B4BAC0;
|
||||
color: #333333;
|
||||
font-size: 1.1em;
|
||||
padding: 5px 5px 3px 5px;
|
||||
margin: 3px 0px 3px 5px;
|
||||
}
|
||||
|
||||
#mchat-input:hover {
|
||||
border-color: #11A3EA;
|
||||
}
|
||||
|
||||
#mchat-body {
|
||||
width: 100% !important;
|
||||
background-color: #E9F0F5 !important;
|
||||
}
|
||||
|
||||
#mchat-static, #mchat-stats, #mchat-whois, .mchat-refresh {
|
||||
padding-left: 5px;
|
||||
text-align: left;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#mchat-static {
|
||||
color: #990000;
|
||||
}
|
||||
|
||||
#mchat-stats, #mchat-whois {
|
||||
margin-top: 2px;
|
||||
min-height: 1.3em;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.mchat-refresh {
|
||||
margin-top: 1.5em;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.mchat-text {
|
||||
padding: 3px;
|
||||
font-size: 1.1em;
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
.mchat-text ul {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.mchat-text blockquote {
|
||||
margin: 5px 0 0 10px
|
||||
}
|
||||
|
||||
.mchat-panel-image {
|
||||
margin-top: -4px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.mchat-message-header {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mchat-message-icons {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.mchat-mention, .mchat-message-icons > * {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#mchat-smilies {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#mchat-refresh-load {
|
||||
vertical-align: middle;
|
||||
cursor: wait;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mchat-refresh-ok {
|
||||
vertical-align: middle;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
#mchat-refresh-error, #mchat-refresh-paused {
|
||||
vertical-align: middle;
|
||||
cursor: help;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mchat-status {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.mchat-alert {
|
||||
color: #7E2217;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#mchat-userlist {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mchat-avatar {
|
||||
float: left;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.mchat-message-avatar .mchat-text {
|
||||
margin-left: 50px;
|
||||
width: 90%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#mchat-confirm textarea {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
#mchat-colour {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#mchat-colour table {
|
||||
margin: 0 auto;
|
||||
border-collapse: separate;
|
||||
border-spacing: 1px;
|
||||
}
|
||||
|
||||
#mchat-bbcodes {
|
||||
padding: 5px;
|
||||
display: none;
|
||||
}
|
||||
30
ucp/ucp_mchat_info.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\ucp;
|
||||
|
||||
class ucp_mchat_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
global $config;
|
||||
|
||||
return array(
|
||||
'filename' => '\dmzx\mchat\ucp\ucp_mchat_module',
|
||||
'title' => 'UCP_MCHAT_CONFIG',
|
||||
'version' => $config['mchat_version'],
|
||||
'modes' => array(
|
||||
'configuration' => array(
|
||||
'title' => 'UCP_MCHAT_CONFIG',
|
||||
'auth' => 'ext_dmzx/mchat && acl_u_mchat_use',
|
||||
'cat' => array('UCP_MCHAT_CONFIG')),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
107
ucp/ucp_mchat_module.php
Normal file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace dmzx\mchat\ucp;
|
||||
|
||||
class ucp_mchat_module
|
||||
{
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $cache, $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $request;
|
||||
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
$error = $data = array();
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'configuration':
|
||||
|
||||
$data = array(
|
||||
'user_mchat_index' => $request->variable('user_mchat_index', (bool) $user->data['user_mchat_index']),
|
||||
'user_mchat_sound' => $request->variable('user_mchat_sound', (bool) $user->data['user_mchat_sound']),
|
||||
'user_mchat_stats_index' => $request->variable('user_mchat_stats_index', (bool) $user->data['user_mchat_stats_index']),
|
||||
'user_mchat_topics' => $request->variable('user_mchat_topics', (bool) $user->data['user_mchat_topics']),
|
||||
'user_mchat_avatars' => $request->variable('user_mchat_avatars', (bool) $user->data['user_mchat_avatars']),
|
||||
'user_mchat_input_area' => $request->variable('user_mchat_input_area', (bool) $user->data['user_mchat_input_area']),
|
||||
);
|
||||
|
||||
add_form_key('ucp_mchat');
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if (!check_form_key('ucp_mchat'))
|
||||
{
|
||||
$error[] = 'FORM_INVALID';
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
$sql_ary = array(
|
||||
'user_mchat_index' => $data['user_mchat_index'],
|
||||
'user_mchat_sound' => $data['user_mchat_sound'],
|
||||
'user_mchat_stats_index' => $data['user_mchat_stats_index'],
|
||||
'user_mchat_topics' => $data['user_mchat_topics'],
|
||||
'user_mchat_avatars' => $data['user_mchat_avatars'],
|
||||
'user_mchat_input_area' => $data['user_mchat_input_area'],
|
||||
);
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_id = ' . (int) $user->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
meta_refresh(3, $this->u_action);
|
||||
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
// Replace "error" strings with their real, localised form
|
||||
// The /e modifier is deprecated since PHP 5.5.0
|
||||
//$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
|
||||
foreach ($error as $i => $err)
|
||||
{
|
||||
$lang = $this->user->lang($err);
|
||||
if (!empty($lang))
|
||||
{
|
||||
$error[$i] = $lang;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
'S_DISPLAY_MCHAT' => $data['user_mchat_index'],
|
||||
'S_SOUND_MCHAT' => $data['user_mchat_sound'],
|
||||
'S_STATS_MCHAT' => $data['user_mchat_stats_index'],
|
||||
'S_TOPICS_MCHAT' => $data['user_mchat_topics'],
|
||||
'S_AVATARS_MCHAT' => $data['user_mchat_avatars'],
|
||||
'S_INPUT_MCHAT' => $data['user_mchat_input_area'],
|
||||
'S_MCHAT_TOPICS' => $config['mchat_new_posts_edit'] || $config['mchat_new_posts_quote'] || $config['mchat_new_posts_reply'] || $config['mchat_new_posts_topic'],
|
||||
'S_MCHAT_INDEX' => $config['mchat_on_index'],
|
||||
'S_MCHAT_INDEX_STATS' => $config['mchat_stats_index'],
|
||||
'S_MCHAT_AVATARS' => $config['mchat_avatars'],
|
||||
));
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $user->lang['UCP_PROFILE_MCHAT'],
|
||||
'S_UCP_ACTION' => $this->u_action
|
||||
));
|
||||
|
||||
// Set desired template
|
||||
$this->tpl_name = 'ucp_mchat';
|
||||
$this->page_title = 'UCP_PROFILE_MCHAT';
|
||||
}
|
||||
}
|
||||