Version 0.3.2
This commit is contained in:
@@ -27,7 +27,7 @@ class acp_mchat_module
|
||||
$action = 'add';
|
||||
}
|
||||
|
||||
// Add the wpm ACP lang file
|
||||
// Add the ACP lang file
|
||||
$user->add_lang_ext('dmzx/mchat', 'info_acp_mchat');
|
||||
|
||||
// Load the display settings handle in the admin controller
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"type": "phpbb-extension",
|
||||
"description": "mChat Extension for phpbb 3.1.x",
|
||||
"homepage": "http://www.dmzx-web.net",
|
||||
"version": "0.2.0",
|
||||
"version": "0.3.2",
|
||||
"time": "2015-03-10",
|
||||
"keywords": ["phpbb", "extension", "mchat"],
|
||||
"license": "GPL-2.0",
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
dmzx_mchat_controller:
|
||||
path: /chat
|
||||
path: /mchat
|
||||
defaults: { _controller: dmzx.mchat.controller:handle }
|
||||
|
||||
@@ -5,64 +5,64 @@ services:
|
||||
dmzx.mchat.admin.controller:
|
||||
class: dmzx\mchat\controller\admin_controller
|
||||
arguments:
|
||||
- @dmzx.mchat.functions_mchat
|
||||
- @config
|
||||
- @template
|
||||
- @log
|
||||
- @user
|
||||
- @dbal.conn
|
||||
- @cache
|
||||
- @request
|
||||
- @ext.manager
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- %dmzx.mchat.table.mchat_config%
|
||||
- '@dmzx.mchat.functions_mchat'
|
||||
- '@config'
|
||||
- '@template'
|
||||
- '@log'
|
||||
- '@user'
|
||||
- '@dbal.conn'
|
||||
- '@cache'
|
||||
- '@request'
|
||||
- '@ext.manager'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '%dmzx.mchat.table.mchat_config%'
|
||||
dmzx.mchat.controller:
|
||||
class: dmzx\mchat\controller\mchat
|
||||
arguments:
|
||||
- @dmzx.mchat.render_helper
|
||||
- @controller.helper
|
||||
- @request
|
||||
- '@dmzx.mchat.render_helper'
|
||||
- '@request'
|
||||
dmzx.mchat.render_helper:
|
||||
class: dmzx\mchat\core\render_helper
|
||||
arguments:
|
||||
- @dmzx.mchat.functions_mchat
|
||||
- @config
|
||||
- @controller.helper
|
||||
- @template
|
||||
- @log
|
||||
- @user
|
||||
- @auth
|
||||
- @dbal.conn
|
||||
- @pagination
|
||||
- @request
|
||||
- @dispatcher
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- %dmzx.mchat.table.mchat%
|
||||
- '@dmzx.mchat.functions_mchat'
|
||||
- '@config'
|
||||
- '@controller.helper'
|
||||
- '@template'
|
||||
- '@log'
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@dbal.conn'
|
||||
- '@pagination'
|
||||
- '@request'
|
||||
- '@dispatcher'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '%dmzx.mchat.table.mchat%'
|
||||
dmzx.mchat.functions_mchat:
|
||||
class: dmzx\mchat\core\functions_mchat
|
||||
arguments:
|
||||
- @template
|
||||
- @user
|
||||
- @auth
|
||||
- @log
|
||||
- @dbal.conn
|
||||
- @cache
|
||||
- %dmzx.mchat.table.mchat%
|
||||
- %dmzx.mchat.table.mchat_config%
|
||||
- %dmzx.mchat.table.mchat_sessions%
|
||||
- '@config'
|
||||
- '@template'
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@log'
|
||||
- '@dbal.conn'
|
||||
- '@cache'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '%dmzx.mchat.table.mchat%'
|
||||
- '%dmzx.mchat.table.mchat_config%'
|
||||
- '%dmzx.mchat.table.mchat_sessions%'
|
||||
dmzx.mchat.listener:
|
||||
class: dmzx\mchat\event\listener
|
||||
arguments:
|
||||
- @dmzx.mchat.render_helper
|
||||
- @auth
|
||||
- @config
|
||||
- @controller.helper
|
||||
- @template
|
||||
- @user
|
||||
- @dbal.conn
|
||||
- %core.php_ext%
|
||||
- %dmzx.mchat.table.mchat%
|
||||
- '@dmzx.mchat.functions_mchat'
|
||||
- '@dmzx.mchat.render_helper'
|
||||
- '@auth'
|
||||
- '@controller.helper'
|
||||
- '@template'
|
||||
- '@user'
|
||||
- '%core.php_ext%'
|
||||
tags:
|
||||
- { name: event.listener }
|
||||
@@ -149,7 +149,7 @@ class admin_controller
|
||||
}
|
||||
|
||||
// Replace "error" strings with their real, localised form
|
||||
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$this->user->lang['\\1'])) ? \$this->user->lang['\\1'] : '\\1'", $error);
|
||||
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$this->user->lang('\\1'))) ? \$this->user->lang('\\1') : '\\1'", $error);
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
@@ -173,7 +173,7 @@ class admin_controller
|
||||
// rebuild the cache
|
||||
$this->functions_mchat->mchat_cache();
|
||||
|
||||
trigger_error($this->user->lang['MCHAT_CONFIG_SAVED'] . adm_back_link($this->u_action));
|
||||
trigger_error($this->user->lang('MCHAT_CONFIG_SAVED') . adm_back_link($this->u_action));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ class admin_controller
|
||||
foreach ($this->user->lang['dateformats'] as $format => $null)
|
||||
{
|
||||
$dateformat_options .= '<option value="' . $format . '"' . (($format == $mchat_config['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 .= $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>';
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ class admin_controller
|
||||
$dateformat_options .= ' selected="selected"';
|
||||
$s_custom = true;
|
||||
}
|
||||
$dateformat_options .= '>' . $this->user->lang['MCHAT_CUSTOM_DATEFORMAT'] . '</option>';
|
||||
$dateformat_options .= '>' . $this->user->lang('MCHAT_CUSTOM_DATEFORMAT') . '</option>';
|
||||
|
||||
$this->template->assign_vars(array(
|
||||
'MCHAT_ERROR' => isset($error) ? ((sizeof($error)) ? implode('<br />', $error) : '') : '',
|
||||
@@ -252,8 +252,8 @@ class admin_controller
|
||||
'MCHAT_NEW_POSTS_EDIT' => ($mchat_new_posts_edit) ? true : false,
|
||||
'MCHAT_NEW_POSTS_QUOTE' => ($mchat_new_posts_quote) ? true : false,
|
||||
'MCHAT_PAUSE_ON_INPUT' => !empty($mchat_row['pause_on_input']) ? $mchat_row['pause_on_input'] : $mchat_config['pause_on_input'],
|
||||
'L_MCHAT_BBCODES_DISALLOWED_EXPLAIN' => sprintf($this->user->lang['MCHAT_BBCODES_DISALLOWED_EXPLAIN'], '<a href="' . append_sid("{$this->phpbb_root_path}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}index.$this->php_ext", 'i=board&mode=load', true, $this->user->session_id) . '">', '</a>', $this->config['session_length']),
|
||||
'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,
|
||||
|
||||
|
||||
@@ -9,14 +9,13 @@
|
||||
|
||||
namespace dmzx\mchat\controller;
|
||||
|
||||
use \Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
class mchat
|
||||
{
|
||||
/** @var \dmzx\mchat\core\render_helper*/
|
||||
protected $render_helper;
|
||||
|
||||
/** @var \phpbb\controller\helper*/
|
||||
protected $helper;
|
||||
|
||||
/** @var \phpbb\request\request*/
|
||||
protected $request;
|
||||
|
||||
@@ -24,13 +23,11 @@ class mchat
|
||||
* Constructor
|
||||
*
|
||||
* @param \dmzx\mchat\core\render_helper $render_helper
|
||||
* @param \phpbb\controller\helper $helper
|
||||
* @param \phpbb\request\request $request
|
||||
*/
|
||||
public function __construct(\dmzx\mchat\core\render_helper $render_helper, \phpbb\controller\helper $helper, \phpbb\request\request $request)
|
||||
public function __construct(\dmzx\mchat\core\render_helper $render_helper, \phpbb\request\request $request)
|
||||
{
|
||||
$this->render_helper = $render_helper;
|
||||
$this->helper = $helper;
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
@@ -41,22 +38,7 @@ class mchat
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$ret = $this->render_helper->render_data_for_page(false);
|
||||
|
||||
// If this was an ajax request, we just create an json_response and return that. It's not ours to handle here.
|
||||
if ($this->request->is_ajax() && is_array($ret) && isset($ret['json']) && $ret['json'] === true)
|
||||
{
|
||||
return new \Symfony\Component\HttpFoundation\JsonResponse(
|
||||
$ret
|
||||
);
|
||||
}
|
||||
|
||||
// If error occured, render it
|
||||
if (isset($ret['error']) && $ret['error'] == true)
|
||||
{
|
||||
return $this->helper->error($ret['error_text'], $ret['error_type']);
|
||||
}
|
||||
|
||||
return $this->helper->render($ret['filename'], $ret['lang_title']);
|
||||
$content = $this->render_helper->render_data_for_page(false);
|
||||
return $this->request->is_ajax() ? new JsonResponse($content) : $content;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,9 @@ namespace dmzx\mchat\core;
|
||||
|
||||
class functions_mchat
|
||||
{
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
@@ -29,6 +32,12 @@ class functions_mchat
|
||||
/** @var \phpbb\cache\service */
|
||||
protected $cache;
|
||||
|
||||
/** @var string */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
/** @var string */
|
||||
protected $phpEx;
|
||||
|
||||
/** @var string */
|
||||
protected $mchat_table;
|
||||
|
||||
@@ -41,24 +50,30 @@ class functions_mchat
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\template\template $template
|
||||
* @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\service $cache
|
||||
* @param string $phpbb_root_path
|
||||
* @param string $phpEx
|
||||
* @param string $mchat_table
|
||||
* @param string $mchat_config_table
|
||||
* @param string $mchat_sessions_table
|
||||
*/
|
||||
function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\log\log_interface $log, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, $mchat_table, $mchat_config_table, $mchat_sessions_table)
|
||||
function __construct(\phpbb\config\config $config, \phpbb\template\template $template, \phpbb\user $user, \phpbb\auth\auth $auth, \phpbb\log\log_interface $log, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, $phpbb_root_path, $phpEx, $mchat_table, $mchat_config_table, $mchat_sessions_table)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
$this->auth = $auth;
|
||||
$this->log = $log;
|
||||
$this->db = $db;
|
||||
$this->cache = $cache;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->phpEx = $phpEx;
|
||||
$this->mchat_table = $mchat_table;
|
||||
$this->mchat_config_table = $mchat_config_table;
|
||||
$this->mchat_sessions_table = $mchat_sessions_table;
|
||||
@@ -106,13 +121,13 @@ class functions_mchat
|
||||
{
|
||||
$hours = floor($chat_timeout / 3600);
|
||||
$chat_timeout = $chat_timeout - ($hours * 3600);
|
||||
$chat_session .= $hours > 1 ? ($hours . ' ' . $this->user->lang['MCHAT_HOURS']) : ($hours . ' ' . $this->user->lang['MCHAT_HOUR']);
|
||||
$chat_session .= $hours > 1 ? ($hours . ' ' . $this->user->lang('MCHAT_HOURS')) : ($hours . ' ' . $this->user->lang('MCHAT_HOUR'));
|
||||
}
|
||||
|
||||
$minutes = floor($chat_timeout / 60);
|
||||
if ($minutes)
|
||||
{
|
||||
$minutes = $minutes > 1 ? ($minutes . ' ' . $this->user->lang['MCHAT_MINUTES']) : ($minutes . ' ' . $this->user->lang['MCHAT_MINUTE']);
|
||||
$minutes = $minutes > 1 ? ($minutes . ' ' . $this->user->lang('MCHAT_MINUTES')) : ($minutes . ' ' . $this->user->lang('MCHAT_MINUTE'));
|
||||
$chat_timeout = $chat_timeout - ($minutes * 60);
|
||||
$chat_session .= $minutes;
|
||||
}
|
||||
@@ -120,17 +135,17 @@ class functions_mchat
|
||||
$seconds = ceil($chat_timeout);
|
||||
if ($seconds)
|
||||
{
|
||||
$seconds = $seconds > 1 ? ($seconds . ' ' . $this->user->lang['MCHAT_SECONDS']) : ($seconds . ' ' . $this->user->lang['MCHAT_SECOND']);
|
||||
$seconds = $seconds > 1 ? ($seconds . ' ' . $this->user->lang('MCHAT_SECONDS')) : ($seconds . ' ' . $this->user->lang('MCHAT_SECOND'));
|
||||
$chat_session .= $seconds;
|
||||
}
|
||||
|
||||
return sprintf($this->user->lang['MCHAT_ONLINE_EXPLAIN'], $chat_session);
|
||||
return sprintf($this->user->lang('MCHAT_ONLINE_EXPLAIN'), $chat_session);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $session_time amount of time before a users session times out
|
||||
*/
|
||||
function mchat_users($session_time, $on_page)
|
||||
function mchat_users($session_time)
|
||||
{
|
||||
$check_time = time() - (int) $session_time;
|
||||
|
||||
@@ -138,12 +153,6 @@ class functions_mchat
|
||||
WHERE user_lastupdate < ' . $check_time;
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
// Add the user into the sessions upon first visit
|
||||
if ($on_page && ($this->user->data['user_id'] != ANONYMOUS && !$this->user->data['is_bot']))
|
||||
{
|
||||
$this->mchat_sessions($session_time);
|
||||
}
|
||||
|
||||
$mchat_user_count = 0;
|
||||
$mchat_user_list = '';
|
||||
|
||||
@@ -172,8 +181,8 @@ class functions_mchat
|
||||
}
|
||||
|
||||
$mchat_user_count++;
|
||||
$mchat_user_online_link = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']);
|
||||
$mchat_user_list .= ($mchat_user_list != '') ? $this->user->lang['COMMA_SEPARATOR'] . $mchat_user_online_link : $mchat_user_online_link;
|
||||
$mchat_user_online_link = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang('GUEST'));
|
||||
$mchat_user_list .= ($mchat_user_list != '') ? $this->user->lang('COMMA_SEPARATOR') . $mchat_user_online_link : $mchat_user_online_link;
|
||||
}
|
||||
|
||||
$refresh_message = $this->mchat_session_time($session_time);
|
||||
@@ -182,7 +191,7 @@ class functions_mchat
|
||||
{
|
||||
return array(
|
||||
'online_userlist' => '',
|
||||
'mchat_users_count' => $this->user->lang['MCHAT_NO_CHATTERS'],
|
||||
'mchat_users_count' => $this->user->lang('MCHAT_NO_CHATTERS'),
|
||||
'refresh_message' => $refresh_message,
|
||||
);
|
||||
}
|
||||
@@ -190,7 +199,7 @@ class functions_mchat
|
||||
{
|
||||
return array(
|
||||
'online_userlist' => $mchat_user_list,
|
||||
'mchat_users_count' => $mchat_user_count > 1 ? sprintf($this->user->lang['MCHAT_ONLINE_USERS_TOTAL'], $mchat_user_count) : sprintf($this->user->lang['MCHAT_ONLINE_USER_TOTAL'], $mchat_user_count),
|
||||
'mchat_users_count' => sprintf($this->user->lang($mchat_user_count > 1 ? 'MCHAT_ONLINE_USERS_TOTAL' : 'MCHAT_ONLINE_USER_TOTAL'), $mchat_user_count),
|
||||
'refresh_message' => $refresh_message,
|
||||
);
|
||||
}
|
||||
@@ -207,7 +216,7 @@ class functions_mchat
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
// Insert user into the mChat sessions table
|
||||
if ($this->user->data['user_type'] == USER_FOUNDER || $this->user->data['user_type'] == USER_NORMAL)
|
||||
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 . '
|
||||
@@ -216,18 +225,21 @@ class functions_mchat
|
||||
$row = $this->db->sql_fetchrow($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$sql_ary = array('user_lastupdate' => time());
|
||||
$user_lastupdate = time();
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$sql = 'UPDATE ' . $this->mchat_sessions_table . '
|
||||
SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
SET user_lastupdate = ' . $user_lastupdate . '
|
||||
WHERE user_id = ' . (int) $this->user->data['user_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_ary['user_id'] = $this->user->data['user_id'];
|
||||
$sql = 'INSERT INTO ' . $this->mchat_sessions_table . ' ' . $this->db->sql_build_array('INSERT', $sql_ary);
|
||||
$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' => $user_lastupdate,
|
||||
));
|
||||
}
|
||||
|
||||
$this->db->sql_query($sql);
|
||||
@@ -307,7 +319,6 @@ class functions_mchat
|
||||
}
|
||||
}
|
||||
|
||||
// From /includes/functions_display.php
|
||||
display_custom_bbcodes();
|
||||
}
|
||||
|
||||
@@ -328,4 +339,144 @@ class functions_mchat
|
||||
'avatar_height' => $row['user_avatar_height'] > $row['user_avatar_width'] ? 40 : (40 / $row['user_avatar_width']) * $row['user_avatar_height'],
|
||||
));
|
||||
}
|
||||
|
||||
function mchat_messages($sql_where, $total, $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;
|
||||
}
|
||||
|
||||
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->phpEx}", 'mode=group&g='.$row['group_id']) . '">' . $group_name . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
return $legend;
|
||||
}
|
||||
|
||||
function mchat_truncate_messages()
|
||||
{
|
||||
$sql = 'TRUNCATE TABLE ' . $this->mchat_table;
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_MCHAT_TABLE_PRUNED');
|
||||
}
|
||||
|
||||
function mchat_foes()
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ZEBRA_TABLE . '
|
||||
WHERE user_id = ' . (int) $this->user->data['user_id'] . '
|
||||
AND foe = 1';
|
||||
$result = $this->db->sql_query($sql);
|
||||
$rows = $this->db->sql_fetchrowset($result);
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$foes = array();
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
$foes[] = $row['zebra_id'];
|
||||
}
|
||||
|
||||
return $foes;
|
||||
}
|
||||
|
||||
function mchat_insert_posting($mode, $data)
|
||||
{
|
||||
if (empty($this->config['mchat_enable']) || empty($this->config['mchat_new_posts']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($mode == 'post' && !empty($this->config['mchat_new_posts_topic']))
|
||||
{
|
||||
$mchat_new_data = $this->user->lang('MCHAT_NEW_TOPIC');
|
||||
}
|
||||
else if ($mode == 'quote' && !empty($this->config['mchat_new_posts_quote']))
|
||||
{
|
||||
$mchat_new_data = $this->user->lang('MCHAT_NEW_QUOTE');
|
||||
}
|
||||
else if ($mode == 'edit' && !empty($this->config['mchat_new_posts_edit']))
|
||||
{
|
||||
$mchat_new_data = $this->user->lang('MCHAT_NEW_EDIT');
|
||||
}
|
||||
else if ($mode == 'reply' && !empty($this->config['mchat_new_posts_reply']))
|
||||
{
|
||||
$mchat_new_data = $this->user->lang('MCHAT_NEW_REPLY');
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$message = utf8_normalize_nfc($mchat_new_data . ': [url=' . generate_board_url() . '/viewtopic.' . $this->phpEx . '?p=' . $data['post_id'] . '#p' . $data['post_id'] . ']' . $data['post_subject'] . '[/url] '. $this->user->lang('MCHAT_IN') . ' [url=' . generate_board_url() . '/viewforum.' . $this->phpEx . '?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);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,15 +13,15 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class listener implements EventSubscriberInterface
|
||||
{
|
||||
/** @var \dmzx\mchat\core\functions_mchat */
|
||||
protected $functions_mchat;
|
||||
|
||||
/** @var \dmzx\mchat\core\render_helper */
|
||||
protected $render_helper;
|
||||
|
||||
/** @var \phpbb\auth\auth */
|
||||
protected $auth;
|
||||
|
||||
/** @var \phpbb\config\config */
|
||||
protected $config;
|
||||
|
||||
/** @var \phpbb\controller\helper */
|
||||
protected $controller_helper;
|
||||
|
||||
@@ -31,40 +31,29 @@ class listener implements EventSubscriberInterface
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var \phpbb\db\driver\driver_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var string */
|
||||
protected $phpEx;
|
||||
|
||||
/** @var string */
|
||||
protected $mchat_table;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \dmzx\mchat\core\functions_mchat $functions_mchat
|
||||
* @param \dmzx\mchat\core\render_helper $render_helper
|
||||
* @param \phpbb\auth\auth $auth
|
||||
* @param \phpbb\config\config $config
|
||||
* @param \phpbb\controller\helper $controller_helper
|
||||
* @param \phpbb\template\template $template
|
||||
* @param \phpbb\user $user
|
||||
* @param \phpbb\db\driver\driver_interface $db
|
||||
* @param string $phpEx
|
||||
* @param string $mchat_table
|
||||
*
|
||||
*/
|
||||
public function __construct(\dmzx\mchat\core\render_helper $render_helper, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\controller\helper $controller_helper, \phpbb\template\template $template, \phpbb\user $user, \phpbb\db\driver\driver_interface $db, $phpEx, $mchat_table)
|
||||
public function __construct(\dmzx\mchat\core\functions_mchat $functions_mchat, \dmzx\mchat\core\render_helper $render_helper, \phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \phpbb\template\template $template, \phpbb\user $user, $phpEx)
|
||||
{
|
||||
$this->functions_mchat = $functions_mchat;
|
||||
$this->render_helper = $render_helper;
|
||||
$this->auth = $auth;
|
||||
$this->config = $config;
|
||||
$this->template = $template;
|
||||
$this->controller_helper = $controller_helper;
|
||||
$this->template = $template;
|
||||
$this->user = $user;
|
||||
$this->db = $db;
|
||||
$this->phpEx = $phpEx;
|
||||
$this->mchat_table = $mchat_table;
|
||||
}
|
||||
|
||||
static public function getSubscribedEvents()
|
||||
@@ -82,7 +71,7 @@ class listener implements EventSubscriberInterface
|
||||
|
||||
public function add_page_viewonline($event)
|
||||
{
|
||||
if (strrpos($event['row']['session_page'], 'app.' . $this->phpEx . '/chat') === 0)
|
||||
if (strrpos($event['row']['session_page'], 'app.' . $this->phpEx . '/mchat') === 0)
|
||||
{
|
||||
$event['location'] = $this->user->lang('MCHAT_TITLE');
|
||||
$event['location_url'] = $this->controller_helper->route('dmzx_mchat_controller');
|
||||
@@ -108,7 +97,11 @@ class listener implements EventSubscriberInterface
|
||||
*/
|
||||
public function add_page_header_link($event)
|
||||
{
|
||||
$allow_view = $this->auth->acl_get('u_mchat_view');
|
||||
$config_mchat = $allow_view ? $this->functions_mchat->mchat_cache() : array();
|
||||
$this->template->assign_vars(array(
|
||||
'MCHAT_ALLOW_VIEW' => $this->auth->acl_get('u_mchat_view'),
|
||||
'S_MCHAT_CUSTOM_PAGE' => !empty($config_mchat['custom_page']),
|
||||
'U_MCHAT' => $this->controller_helper->route('dmzx_mchat_controller'),
|
||||
));
|
||||
}
|
||||
@@ -122,64 +115,18 @@ class listener implements EventSubscriberInterface
|
||||
*/
|
||||
public function display_mchat_on_index($event)
|
||||
{
|
||||
$mchat_on_index = $this->config['mchat_on_index'];
|
||||
$mchat_view = ($this->auth->acl_get('u_mchat_view')) ? true : false;
|
||||
|
||||
if ($mchat_on_index && $mchat_view)
|
||||
{
|
||||
$this->template->assign_var('S_MCHAT_ON_INDEX', true);
|
||||
|
||||
$this->render_helper->render_data_for_page(true);
|
||||
}
|
||||
$this->render_helper->assign_whois();
|
||||
}
|
||||
|
||||
public function posting_modify_submit_post_after($event)
|
||||
{
|
||||
// only trigger if mode is post
|
||||
$mchat_forums_allowed = array();
|
||||
if ($event['mode'] == 'post' || $event['mode'] == 'reply' || $event['mode'] == 'quote'|| $event['mode'] == 'edit' && (isset($this->config['mchat_enable']) && $this->config['mchat_enable']) && (isset($this->config['mchat_new_posts']) && $this->config['mchat_new_posts']))
|
||||
{
|
||||
|
||||
if ($event['mode'] == 'post' && (isset($this->config['mchat_new_posts_topic']) && $this->config['mchat_new_posts_topic']))
|
||||
{
|
||||
$mchat_new_data = $this->user->lang['MCHAT_NEW_TOPIC'];
|
||||
}
|
||||
else if ($event['mode'] == 'quote' && (isset($this->config['mchat_new_posts_quote']) && $this->config['mchat_new_posts_quote']))
|
||||
{
|
||||
$mchat_new_data = $this->user->lang['MCHAT_NEW_QUOTE'];
|
||||
}
|
||||
else if ($event['mode'] == 'edit' && (isset($this->config['mchat_new_posts_edit']) && $this->config['mchat_new_posts_edit']))
|
||||
{
|
||||
$mchat_new_data = $this->user->lang['MCHAT_NEW_EDIT'];
|
||||
}
|
||||
else if ($event['mode'] == 'reply' && (isset($this->config['mchat_new_posts_reply']) && $this->config['mchat_new_posts_reply']))
|
||||
{
|
||||
$mchat_new_data = $this->user->lang['MCHAT_NEW_REPLY'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Data...
|
||||
$message = utf8_normalize_nfc($mchat_new_data . ': [url=' . generate_board_url() . '/viewtopic.' . $this->phpEx . '?p=' . $event['data']['post_id'] . '#p' . $event['data']['post_id'] . ']' . $event['post_data']['post_subject'] . '[/url] '. $this->user->lang['MCHAT_IN'] .' [url=' . generate_board_url() . '/viewforum.' . $this->phpEx . '?f=' . $event['forum_id'] . ']' . $event['post_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(
|
||||
$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'],
|
||||
'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);
|
||||
}
|
||||
'post_subject' => $event['post_data']['post_subject'],
|
||||
));
|
||||
}
|
||||
|
||||
public function permissions($event)
|
||||
@@ -250,10 +197,10 @@ class listener implements EventSubscriberInterface
|
||||
|
||||
public function display_custom_bbcodes_modify_sql($event)
|
||||
{
|
||||
// Prevent disallowed BBCodes from being added to the template only if we're rendering for mChat
|
||||
if ($this->render_helper->initialized)
|
||||
// Add disallowed BBCodes to the template only if we're rendering for mChat
|
||||
if ($this->render_helper->is_mchat_rendered)
|
||||
{
|
||||
$disallowed_bbcode_array = $this->render_helper->get_disallowed_bbcodes();
|
||||
$disallowed_bbcode_array = $this->functions_mchat->get_disallowed_bbcodes();
|
||||
|
||||
if (!empty($disallowed_bbcode_array))
|
||||
{
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,9 +29,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Senden',
|
||||
'MCHAT_IN' => 'in',
|
||||
|
||||
@@ -33,7 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Konfiguration',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -124,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'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
|
||||
// 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.',
|
||||
@@ -167,5 +166,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Kann mChat Einstellung managen',
|
||||
|
||||
));
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,9 +29,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Send',
|
||||
'MCHAT_IN' => 'in',
|
||||
@@ -79,7 +74,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_OK' => 'OK',
|
||||
'MCHAT_PAUSE' => 'Paused',
|
||||
'MCHAT_LOAD' => 'Loading',
|
||||
'MCHAT_PERMISSIONS' => 'Change users permissions',
|
||||
'MCHAT_PERMISSIONS' => 'Change user’s permissions',
|
||||
'MCHAT_REFRESHING' => 'Refreshing...',
|
||||
'MCHAT_REFRESH_NO' => 'Autoupdate is off',
|
||||
'MCHAT_REFRESH_YES' => 'Autoupdate every <strong>%d</strong> seconds',
|
||||
@@ -108,7 +103,7 @@ $lang = array_merge($lang, array(
|
||||
'UCP_PROFILE_MCHAT' => 'mChat Preferences',
|
||||
'DISPLAY_MCHAT' => 'Display mChat on Index',
|
||||
'SOUND_MCHAT' => 'Enable mChat sound',
|
||||
'DISPLAY_STATS_INDEX' => 'Display the Who is Chatting stats on index page',
|
||||
'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',
|
||||
|
||||
@@ -33,7 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configuration',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -124,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'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
|
||||
// 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.',
|
||||
@@ -167,5 +166,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Can manage mChat settings',
|
||||
|
||||
));
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,9 +29,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Enviar',
|
||||
'MCHAT_IN' => 'en',
|
||||
|
||||
@@ -33,7 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configuración',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -124,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pausa en la entrada',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Si pone Si, el chat no se actualizara automaticamente hasta que el usuario introduzca un mensaje',
|
||||
|
||||
// error reporting
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'El formato de fecha que ha entrado es demasiado largo.',
|
||||
'TOO_SHORT_DATE' => 'El formato de fecha que ha introducido es demasiado corto.',
|
||||
'TOO_SMALL_REFRESH' => 'El valor de refresco es demasiado corto.',
|
||||
@@ -167,5 +166,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Puede gestionar los ajustes de mChat',
|
||||
|
||||
));
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,7 +29,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
'MCHAT_TITLE' => 'Mini Jututuba',
|
||||
'MCHAT_ADD' => 'Saada',
|
||||
|
||||
@@ -31,6 +31,7 @@ if (empty($lang) || !is_array($lang))
|
||||
//
|
||||
// Some characters for use
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Seadistus',
|
||||
@@ -43,6 +44,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_NOTHING_TO_UPDATE' => 'Pole midagi teha....jätkan',
|
||||
'UCP_CAT_MCHAT' => 'mChat seaded',
|
||||
'UCP_MCHAT_CONFIG' => 'Liikme mChat seaded',
|
||||
|
||||
// ACP entries => AJP lehekülg
|
||||
'ACP_MCHAT_RULES' => 'Reeglid',
|
||||
'ACP_MCHAT_RULES_EXPLAIN' => 'Sisesta siia oma foorumi jututoa reeglid.<br />Oled piiratud kirjutama kuni 255 sümbolit.<br />Kui soovid keelata selle funktsiooni, siis jäta see väli tühjaks.<br /><strong>Seda sõnumit on võimalik tõlkida.</strong> (Pead muutma faili mchat_lang.php ja loe juhendit).',
|
||||
@@ -121,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Sõnumi sisestamisel paus',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Valik jah määrab, kas jututoa sõnumeid värskendatakse ajal, mil kasutaja sisestab uut sõnumit tekstiväljal',
|
||||
|
||||
// error reporting => Vigade teavitus
|
||||
// Error reporting => Vigade teavitus
|
||||
'TOO_LONG_DATE' => 'Kuupäeva formaat mille oled sisestanud on liiga pikk.',
|
||||
'TOO_SHORT_DATE' => 'Kuupäeva formaat mille oled sisestanud on liiga lühike.',
|
||||
'TOO_SMALL_REFRESH' => 'Värskendamise väärtus on liiga väike.',
|
||||
@@ -164,5 +166,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms => Administraatori õigused
|
||||
'ACL_A_MCHAT' => 'Saab hallata mChat seadeid',
|
||||
|
||||
));
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,9 +29,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Mini-TChat',
|
||||
'MCHAT_ADD' => 'Envoyer',
|
||||
'MCHAT_IN' => 'dans',
|
||||
|
||||
@@ -33,7 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configuration',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -124,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pause sur la saisie',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Si activée, le mini-chat ne sera pas mis à jour automatiquement lorsque l’utilisateur rédige un message dans la zone de saisie.',
|
||||
|
||||
// error reporting
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'Le format de la date saisi est trop long.',
|
||||
'TOO_SHORT_DATE' => 'Le format de la date saisi est trop court.',
|
||||
'TOO_SMALL_REFRESH' => 'La valeur de l’actualisation est trop petite.',
|
||||
@@ -167,5 +166,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Peut gérer les paramètres de mChat',
|
||||
|
||||
));
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,9 +29,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Mini Chat',
|
||||
'MCHAT_ADD' => 'Invia',
|
||||
'MCHAT_IN' => 'in',
|
||||
@@ -47,7 +42,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_CLEAN' => 'Cancella',
|
||||
'MCHAT_CLEANED' => 'Tutti i messaggi sono stati rimossi',
|
||||
'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> - traduzione <a href="http://brunino.altervista.org">BruninoIt</a>',
|
||||
'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' => 'Modifica BBCode',
|
||||
'MCHAT_DELALLMESS' => 'Rimuovere tutti i messaggi?',
|
||||
'MCHAT_DELCONFIRM' => 'Confermi la rimozione?',
|
||||
|
||||
@@ -33,7 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configurazione',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -124,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pausa durante scrittura messaggi',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Se impostato sì, allora la chat non verrà aggiornata automaticamente mentre un utente inserisce un messaggio nella chat',
|
||||
|
||||
// error reporting
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'Il formato della data immessa è troppo lunga.',
|
||||
'TOO_SHORT_DATE' => 'Il formato della data immessa è troppo corta.',
|
||||
'TOO_SMALL_REFRESH' => 'Il valore di auto-aggiornamento è troppo piccolo.',
|
||||
@@ -164,5 +163,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Può modificare impostazioni mChat',
|
||||
|
||||
));
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,9 +29,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Versturen',
|
||||
'MCHAT_IN' => 'in',
|
||||
|
||||
@@ -33,7 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configuratie',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -124,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pauze op eventuele inactiviteit van mChat',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Stel je ja in, dan wordt mChat niet automatisch vernieuwd, todat een gebruiker een bericht plaatst in mChat',
|
||||
|
||||
// error reporting
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'De datum weergave die je hebt ingegeven is te lang.',
|
||||
'TOO_SHORT_DATE' => 'De datum weergave die je hebt ingegeven is te kort.',
|
||||
'TOO_SMALL_REFRESH' => 'De waarde voor het vernieuwen van de pagina is te klein.',
|
||||
@@ -167,5 +166,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Kan mChat instellingen beheren',
|
||||
|
||||
));
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,9 +29,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Wyślij',
|
||||
'MCHAT_IN' => 'in',
|
||||
|
||||
@@ -33,7 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Ustawienia',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -124,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Auto-aktuaizacja podczas pisania wiadomości',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Zaznacz TAK aby nie auto-aktualizować mChatu gdy użytkownik pisze wiadomość',
|
||||
|
||||
// error reporting
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'Format day który wpisałeś jest za długi.',
|
||||
'TOO_SHORT_DATE' => 'Format day który wpisałeś jest za krótki.',
|
||||
'TOO_SMALL_REFRESH' => 'Ustawiona wartość odświeżania jest za mała.',
|
||||
@@ -164,5 +163,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Może zarządzać ustawieniami Mchat',
|
||||
|
||||
));
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,9 +29,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Chat',
|
||||
'MCHAT_ADD' => 'Enviar',
|
||||
'MCHAT_IN' => 'na seção',
|
||||
|
||||
@@ -33,7 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configuração',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -124,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pausar durante a digitação',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Se SIM, o mChat não atualiza durante a digitação de uma mensagem.',
|
||||
|
||||
// error reporting
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'O formato da data é muito grande.',
|
||||
'TOO_SHORT_DATE' => 'O formato da data é muito pequeno.',
|
||||
'TOO_SMALL_REFRESH' => 'O valor da atualização é muito pequeno.',
|
||||
@@ -167,5 +166,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Pode gerenciar as configurações do mChat',
|
||||
|
||||
));
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -32,9 +29,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Enviar',
|
||||
'MCHAT_IN' => 'em',
|
||||
@@ -130,5 +125,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Custom edits
|
||||
'REPLY_WITH_LIKE' => 'Eu gosto desta mensagem',
|
||||
|
||||
));
|
||||
|
||||
@@ -33,7 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configuração',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -124,7 +123,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pausa de entrada',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Se colocar Sim, o Chat nao se actualizara automaticamente, mediante um utilizador introduza uma mensagem na área de entrada',
|
||||
|
||||
// error reporting
|
||||
// Error reporting
|
||||
'TOO_LONG_DATE' => 'O formato da data que você inseriu é muito longa.',
|
||||
'TOO_SHORT_DATE' => 'O formato da data que você inseriu é muito curto.',
|
||||
'TOO_SMALL_REFRESH' => 'O valor de atualização é muito pequeno.',
|
||||
@@ -167,5 +166,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => 'Pode gerir os ajustes do mChat',
|
||||
|
||||
));
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* DO NOT CHANGE!
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
@@ -35,12 +32,7 @@ if (empty($lang) || !is_array($lang))
|
||||
// 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
|
||||
|
||||
// Adding new category
|
||||
$lang['permission_cat']['mchat'] = 'mChat';
|
||||
|
||||
// Adding the permissions
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
'MCHAT_TITLE' => 'Mini-Chat',
|
||||
'MCHAT_ADD' => 'Trimite',
|
||||
'MCHAT_IN' => 'în',
|
||||
@@ -109,6 +101,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_NEW_REPLY' => 'A publicat un mesaj',
|
||||
'MCHAT_NEW_QUOTE' => 'A răspuns cu citat',
|
||||
'MCHAT_NEW_EDIT' => 'A făcut o modificare',
|
||||
|
||||
// UCP
|
||||
'UCP_PROFILE_MCHAT' => 'Preferințe mChat',
|
||||
'DISPLAY_MCHAT' => 'Afișează mChat pe Index',
|
||||
@@ -122,6 +115,7 @@ $lang = array_merge($lang, array(
|
||||
'TEXT_AREA' => 'suprafață de text',
|
||||
'UCP_CAT_MCHAT' => 'mChat',
|
||||
'UCP_MCHAT_CONFIG' => 'mChat',
|
||||
|
||||
// Preferences
|
||||
'LOG_MCHAT_TABLE_PRUNED' => 'Tabla mChat s-a curățat',
|
||||
'ACP_USER_MCHAT' => 'Setări mChat',
|
||||
|
||||
@@ -36,7 +36,6 @@ if (empty($lang) || !is_array($lang))
|
||||
// ’ » “ ” …
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
|
||||
// UMIL stuff
|
||||
'ACP_MCHAT_CONFIG' => 'Configurație',
|
||||
'ACP_CAT_MCHAT' => 'mChat',
|
||||
@@ -127,7 +126,7 @@ $lang = array_merge($lang, array(
|
||||
'MCHAT_PAUSE_ON_INPUT' => 'Pauză pe intrare',
|
||||
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Dacă este setat -DA-, atunci chatul nu se va actualiza automat până când un utilizator nu va începe să scrie pe zona de intrare.',
|
||||
|
||||
// error reporting
|
||||
// Error reporting
|
||||
'MCHAT_NEEDS_UPDATING' => 'Extensia mChat trebuie actualizată. Anunță fundatorul forumului să viziteze această secție pentru a executa instalarea.',
|
||||
'MCHAT_WRONG_VERSION' => 'Versiunea greșită a extensiei este instalată. Te rog, execută %sinstaller%s pentru o nouă versiune a extensiei.',
|
||||
'WARNING' => 'Atenție',
|
||||
@@ -173,5 +172,4 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Admin perms
|
||||
'ACL_A_MCHAT' => array('lang' => 'Pot gestiona setările din mChat', 'cat' => 'permissions'), // Using a phpBB category here
|
||||
|
||||
));
|
||||
|
||||
@@ -9,9 +9,17 @@
|
||||
|
||||
namespace dmzx\mchat\migrations;
|
||||
|
||||
class mchat_schema extends \phpbb\db\migration\migration
|
||||
class install_mchat extends \phpbb\db\migration\migration
|
||||
{
|
||||
var $ext_version = '0.2.0';
|
||||
public function effectively_installed()
|
||||
{
|
||||
return isset($this->config['mchat_version']) && version_compare($this->config['mchat_version'], '0.3.2', '>=');
|
||||
}
|
||||
|
||||
static public function depends_on()
|
||||
{
|
||||
return array('\phpbb\db\migration\data\v31x\v311');
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
@@ -26,7 +34,7 @@ class mchat_schema extends \phpbb\db\migration\migration
|
||||
array('config.add', array('mchat_new_posts_quote', false)),
|
||||
array('config.add', array('mchat_message_top', true)),
|
||||
array('config.add', array('mchat_stats_index', false)),
|
||||
array('config.add', array('mchat_version', $this->ext_version)),
|
||||
array('config.add', array('mchat_version', '0.3.2')),
|
||||
|
||||
// Add permissions
|
||||
array('permission.add', array('u_mchat_use', true)),
|
||||
@@ -68,6 +76,78 @@ class mchat_schema extends \phpbb\db\migration\migration
|
||||
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',
|
||||
),
|
||||
)),
|
||||
|
||||
// Insert sample data
|
||||
array('custom', array(
|
||||
array(&$this, 'insert_sample_data')
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -143,4 +223,108 @@ class mchat_schema extends \phpbb\db\migration\migration
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function insert_sample_data()
|
||||
{
|
||||
if ($this->db_tools->sql_table_exists($this->table_prefix . 'mchat_config'))
|
||||
{
|
||||
$sql_ary = array(
|
||||
array(
|
||||
'config_name' => 'refresh',
|
||||
'config_value' => '10',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'message_limit',
|
||||
'config_value' => '10',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'archive_limit',
|
||||
'config_value' => '25',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'flood_time',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'max_message_lngth',
|
||||
'config_value' => '500',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'custom_page',
|
||||
'config_value' => '1',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'date',
|
||||
'config_value' => 'D M d, Y g:i a',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'whois',
|
||||
'config_value' => '1',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'bbcode_disallowed',
|
||||
'config_value' => '',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'prune_enable',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'prune_num',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'location',
|
||||
'config_value' => '1',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'whois_refresh',
|
||||
'config_value' => '30',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'static_message',
|
||||
'config_value' => '',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'index_height',
|
||||
'config_value' => '250',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'custom_height',
|
||||
'config_value' => '350',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'override_min_post_chars',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'timeout',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'override_smilie_limit',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'pause_on_input',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'rules',
|
||||
'config_value' => '',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'avatars',
|
||||
'config_value' => '1',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'message_num',
|
||||
'config_value' => '10',
|
||||
),
|
||||
);
|
||||
|
||||
// Insert sample data
|
||||
$this->db->sql_multi_insert($this->table_prefix . 'mchat_config', $sql_ary);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
<?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 mchat_module_acp extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
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',
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?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 mchat_module_cat extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\dmzx\mchat\migrations\mchat_schema',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
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',
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
<?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 mchat_module_ucp extends \phpbb\db\migration\migration
|
||||
{
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
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',
|
||||
))),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
<?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 mchat_schema_sample_data extends \phpbb\db\migration\migration
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\dmzx\mchat\migrations\mchat_schema',
|
||||
);
|
||||
}
|
||||
|
||||
public function update_data()
|
||||
{
|
||||
return array(
|
||||
array('custom', array(array($this, 'insert_sample_data'))),
|
||||
);
|
||||
}
|
||||
|
||||
public function insert_sample_data()
|
||||
{
|
||||
global $user;
|
||||
|
||||
// Define sample rule data
|
||||
$sample_data = array(
|
||||
array(
|
||||
'config_name' => 'refresh',
|
||||
'config_value' => '10',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'message_limit',
|
||||
'config_value' => '10',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'archive_limit',
|
||||
'config_value' => '25',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'flood_time',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'max_message_lngth',
|
||||
'config_value' => '500',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'custom_page',
|
||||
'config_value' => '1',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'date',
|
||||
'config_value' => 'D M d, Y g:i a',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'whois',
|
||||
'config_value' => '1',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'bbcode_disallowed',
|
||||
'config_value' => '',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'prune_enable',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'prune_num',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'location',
|
||||
'config_value' => '1',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'whois_refresh',
|
||||
'config_value' => '30',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'static_message',
|
||||
'config_value' => '',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'index_height',
|
||||
'config_value' => '250',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'custom_height',
|
||||
'config_value' => '350',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'override_min_post_chars',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'timeout',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'override_smilie_limit',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'pause_on_input',
|
||||
'config_value' => '0',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'rules',
|
||||
'config_value' => '',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'avatars',
|
||||
'config_value' => '1',
|
||||
),
|
||||
array(
|
||||
'config_name' => 'message_num',
|
||||
'config_value' => '10',
|
||||
),
|
||||
);
|
||||
|
||||
// Insert sample PM data
|
||||
$this->db->sql_multi_insert($this->table_prefix . 'mchat_config', $sample_data);
|
||||
}
|
||||
}
|
||||
@@ -1 +1,4 @@
|
||||
<!-- INCLUDE mchat_stats.html -->
|
||||
<!-- IF MCHAT_INDEX_STATS -->
|
||||
<h3><a href="<!-- IF S_MCHAT_CUSTOM_PAGE and U_MCHAT -->{U_MCHAT}<!-- ENDIF -->#mChat">{L_WHO_IS_CHATTING}</a></h3>
|
||||
<p>{MCHAT_USERS_COUNT} {MCHAT_ONLINE_EXPLAIN}<br />{MCHAT_USERS_LIST}</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
@@ -1,7 +1 @@
|
||||
<!-- IF S_MCHAT_DISABLED -->
|
||||
<div id="information_mchat" class="rules">
|
||||
<div class="inner">
|
||||
<strong>{L_INFORMATION}{L_COLON}</strong> {L_MCHAT_ENABLE}
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_DISABLE --><!-- INCLUDE @dmzx_mchat/mchat_disabled.html --><!-- ENDIF -->
|
||||
|
||||
@@ -1 +1 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
<!-- IF MCHAT_ENABLE --><!-- INCLUDECSS @dmzx_mchat/mchat.css --><!-- ENDIF -->
|
||||
|
||||
@@ -1 +1 @@
|
||||
<!-- IF S_USER_LOGGED_IN and U_MCHAT --><li class="small-icon icon-bump"><a href="{U_MCHAT}" title="{L_MCHAT_TITLE}">{L_MCHAT_TITLE}</a></li><!-- ENDIF -->
|
||||
<!-- 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 -->
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/*!
|
||||
* jQuery Cookie Plugin v1.4.0
|
||||
* https://github.com/carhartl/jquery-cookie
|
||||
*
|
||||
* Copyright 2013 Klaus Hartl
|
||||
* Released under the MIT license
|
||||
*/
|
||||
(function(factory){if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else{factory(jQuery)}}(function($){var pluses=/\+/g;function encode(s){return config.raw?s:encodeURIComponent(s)}function decode(s){return config.raw?s:decodeURIComponent(s)}function stringifyCookieValue(value){return encode(config.json?JSON.stringify(value):String(value))}function parseCookieValue(s){if(s.indexOf('"')===0){s=s.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,'\\')}try{s=decodeURIComponent(s.replace(pluses,' '))}catch(e){return}try{return config.json?JSON.parse(s):s}catch(e){}}function read(s,converter){var value=config.raw?s:parseCookieValue(s);return $.isFunction(converter)?converter(value):value}var config=$.cookie=function(key,value,options){if(value!==undefined&&!$.isFunction(value)){options=$.extend({},config.defaults,options);if(typeof options.expires==='number'){var days=options.expires,t=options.expires=new Date();t.setDate(t.getDate()+days)}return(document.cookie=[encode(key),'=',stringifyCookieValue(value),options.expires?'; expires='+options.expires.toUTCString():'',options.path?'; path='+options.path:'',options.domain?'; domain='+options.domain:'',options.secure?'; secure':''].join(''))}var result=key?undefined:{};var cookies=document.cookie?document.cookie.split('; '):[];for(var i=0,l=cookies.length;i<l;i++){var parts=cookies[i].split('=');var name=decode(parts.shift());var cookie=parts.join('=');if(key&&key===name){result=read(cookie,value);break}if(!key&&(cookie=read(cookie))!==undefined){result[name]=cookie}}return result};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)!==undefined){$.cookie(key,'',$.extend({},options,{expires:-1}));return true}return false}}));
|
||||
2
styles/prosilver/template/js.cookie-2.0.4.min.js
vendored
Normal file
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()});
|
||||
@@ -8,493 +8,432 @@
|
||||
* @copyright (c) 2015 By kasimi
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
Code uses the titlealert jQuery plugin, options are below
|
||||
interva 500 The flashing interval in milliseconds.
|
||||
originalTitleInterval null Time in milliseconds that the original title is diplayed for. If null the time is the same as interval.
|
||||
duration 0 The total lenght of the flashing before it is automatically stopped. Zero means infinite.
|
||||
stopOnFocus true If true, the flashing will stop when the window gets focus.
|
||||
stopOnMouseMove false If true, the flashing will stop when the document recieves a mousemove event (i.e. when the user moves the mouse over the document area, regardless of what window is active).
|
||||
To use find titlealert in the code and make as so
|
||||
$.titleAlert(mChatNewMessageAlert, {
|
||||
requireBlur:false,
|
||||
stopOnFocus:false,
|
||||
duration:4000,
|
||||
interval:700
|
||||
});
|
||||
**/
|
||||
jQuery(function($) {
|
||||
var hasFocus = true;
|
||||
if (!mChat.archiveMode) {
|
||||
if (!mChat.messageTop) {
|
||||
$("#mChatmain").animate({
|
||||
scrollTop: $("#mChatmain")[0].scrollHeight
|
||||
}, 1000, "swing");
|
||||
}
|
||||
if (!mChat.archiveMode && mChat.pause) {
|
||||
$("#mChatMessage").on("keypress", function() {
|
||||
clearInterval(mChat.interval);
|
||||
$("#mChatLoadIMG,#mChatOkIMG,#mChatErrorIMG").hide();
|
||||
$("#mChatRefreshText").html(mChat.refreshNo).addClass("mchat-alert");
|
||||
$("#mChatPauseIMG").show();
|
||||
});
|
||||
}
|
||||
$([window, document]).blur(function() {
|
||||
hasFocus = false;
|
||||
}).focus(function() {
|
||||
hasFocus = true;
|
||||
});
|
||||
$.fn.preventDoubleSubmit = function() {
|
||||
var alreadySubmitted = false;
|
||||
return $(this).submit(function() {
|
||||
if (alreadySubmitted) {
|
||||
return false;
|
||||
} else {
|
||||
alreadySubmitted = true;
|
||||
}
|
||||
});
|
||||
*/
|
||||
if (!String.prototype.startsWith) {
|
||||
String.prototype.startsWith = function(searchString, position) {
|
||||
position = position || 0;
|
||||
return this.indexOf(searchString, position) === position;
|
||||
};
|
||||
$.fn.autoGrowInput = function(o) {
|
||||
var width = $(".mChatPanel").width();
|
||||
o = $.extend({
|
||||
maxWidth: width - 20,
|
||||
minWidth: 0,
|
||||
comfortZone: 20
|
||||
}, o);
|
||||
this.filter("input:text").each(function() {
|
||||
var minWidth = o.minWidth || $(this).width(),
|
||||
val = "",
|
||||
input = $(this),
|
||||
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"
|
||||
}),
|
||||
check = function() {
|
||||
if (val === (val = input.val())) {
|
||||
return;
|
||||
}
|
||||
var escaped = val.replace(/&/g, "&").replace(/\s/g, " ").replace(/</g, "<").replace(/>/g, ">");
|
||||
testSubject.html(escaped);
|
||||
var testerWidth = testSubject.width(),
|
||||
newWidth = (testerWidth + o.comfortZone) >= minWidth ? testerWidth + o.comfortZone : minWidth,
|
||||
currentWidth = input.width(),
|
||||
isValidWidthChange = (newWidth < currentWidth && newWidth >= minWidth) || (newWidth > minWidth && newWidth < o.maxWidth);
|
||||
if (isValidWidthChange) {
|
||||
input.width(newWidth);
|
||||
}
|
||||
};
|
||||
testSubject.insertAfter(input);
|
||||
$(this).on("keypress blur change submit focus", check);
|
||||
});
|
||||
return this;
|
||||
};
|
||||
$("input.mChatText").autoGrowInput();
|
||||
$("#postform").preventDoubleSubmit();
|
||||
if (mChat.playSound && $.cookie("mChatNoSound") != "yes") {
|
||||
$.cookie("mChatNoSound", null);
|
||||
$("#mChatUseSound").attr("checked", "checked");
|
||||
} else {
|
||||
$.cookie("mChatNoSound", "yes");
|
||||
$("#mChatUseSound").removeAttr("checked");
|
||||
}
|
||||
if ($("#mChatUserList").length && ($.cookie("mChatShowUserList") == "yes" || mChat.customPage)) {
|
||||
$("#mChatUserList").show();
|
||||
}
|
||||
}
|
||||
|
||||
if (!String.prototype.capitalize) {
|
||||
String.prototype.capitalize = function() {
|
||||
return this.charAt(0).toUpperCase() + this.slice(1);
|
||||
};
|
||||
}
|
||||
|
||||
// Support Opera
|
||||
if (typeof document.hasFocus === 'undefined') {
|
||||
document.hasFocus = function() {
|
||||
return document.visibilityState == 'visible';
|
||||
};
|
||||
}
|
||||
|
||||
jQuery(function($) {
|
||||
var ajaxOptions = {
|
||||
url: mChat.file,
|
||||
timeout: 10000,
|
||||
type: 'POST',
|
||||
error: function(xhr, textStatus, errorThrown) {
|
||||
if (xhr.status == 400) {
|
||||
alert(mChat.flood);
|
||||
} else if (xhr.status == 403) {
|
||||
alert(mChat.noAccess);
|
||||
} else if (xhr.status == 501) {
|
||||
alert(mChat.noMessageInput);
|
||||
} else if (typeof console !== 'undefined' && console.log) {
|
||||
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var formatRemainingSessionTime = function(time) {
|
||||
return (new Date(time * 1000)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0];
|
||||
};
|
||||
|
||||
$.extend(mChat, {
|
||||
countDown: function() {
|
||||
$("#mChatSessMess").removeClass("mchat-alert");
|
||||
mChat.sessionTime = mChat.sessionTime - 1;
|
||||
var sec = Math.floor(mChat.sessionTime);
|
||||
var min = Math.floor(sec / 60);
|
||||
var hrs = Math.floor(min / 60);
|
||||
sec = (sec % 60);
|
||||
if (sec <= 9) {
|
||||
sec = "0" + sec;
|
||||
}
|
||||
min = (min % 60);
|
||||
if (min <= 9) {
|
||||
min = "0" + min;
|
||||
}
|
||||
hrs = (hrs % 60);
|
||||
if (hrs <= 9) {
|
||||
hrs = "0" + hrs;
|
||||
}
|
||||
var time_left = hrs + ":" + min + ":" + sec;
|
||||
$("#mChatSessMess").html(mChat.sessEnds + " " + time_left);
|
||||
if (mChat.sessionTime <= 0) {
|
||||
clearInterval(mChat.counter);
|
||||
$("#mChatSessMess").html(mChat.sessOut).addClass("mchat-alert");
|
||||
}
|
||||
},
|
||||
clear: function() {
|
||||
if ($("#mChatMessage").val() === "") {
|
||||
return false;
|
||||
if (mChat.$$('input').val() !== '') {
|
||||
if (confirm(mChat.clearConfirm)) {
|
||||
mChat.resetSession();
|
||||
mChat.$$('input').val('');
|
||||
}
|
||||
var answer = confirm(mChat.reset);
|
||||
if (answer) {
|
||||
$("#mChatRefreshText").removeClass("mchat-alert");
|
||||
if (!mChat.archiveMode && mChat.pause) {
|
||||
mChat.interval = setInterval(mChat.refresh, mChat.refreshTime);
|
||||
}
|
||||
$("#mChatOkIMG").show();
|
||||
$("#mChatLoadIMG,#mChatErrorIMG,#mChatPauseIMG").hide();
|
||||
$("#mChatRefreshText").html(mChat.refreshYes);
|
||||
$("#mChatMessage").val("").focus();
|
||||
} else {
|
||||
$("#mChatMessage").focus();
|
||||
mChat.$$('input').focus();
|
||||
}
|
||||
},
|
||||
sound: function(file) {
|
||||
if ($.cookie("mChatNoSound") == "yes") {
|
||||
if (Cookies.get('mChatNoSound')) {
|
||||
return;
|
||||
}
|
||||
file = mChat.extUrl + "sounds/" + file + ".swf";
|
||||
file = mChat.extUrl + 'sounds/' + file + '.swf';
|
||||
if (navigator.userAgent.match(/MSIE ([0-9]+)\./) || navigator.userAgent.match(/Trident\/7.0; rv 11.0/)) {
|
||||
$("#mChatSound").html('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="0" width="0" type="application/x-shockwave-flash"><param name="movie" value="' + file + '"></object>');
|
||||
mChat.$$('sound').html('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="0" width="0" type="application/x-shockwave-flash"><param name="movie" value="' + file + '"></object>');
|
||||
} else {
|
||||
$("#mChatSound").html('<embed src="' + file + '" width="0" height="0" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>');
|
||||
mChat.$$('sound').html('<embed src="' + file + '" width="0" height="0" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>');
|
||||
}
|
||||
},
|
||||
notice: function() {
|
||||
if (!hasFocus || !document.hasFocus()) {
|
||||
if (!document.hasFocus()) {
|
||||
$.titleAlert(mChat.newMessageAlert, {interval: 1000});
|
||||
}
|
||||
},
|
||||
toggle: function(id) {
|
||||
$("#mChat" + id).slideToggle("normal", function() {
|
||||
if ($("#mChat" + id).is(":visible")) {
|
||||
$.cookie("mChatShow" + id, "yes");
|
||||
} else if ($("#mChat" + id).is(":hidden")) {
|
||||
$.cookie("mChatShow" + id, null);
|
||||
toggle: function(name) {
|
||||
var $elem = mChat.$$(name);
|
||||
$elem.stop().slideToggle(function() {
|
||||
var cookieName = 'mChatShow' + name.capitalize();
|
||||
if ($elem.is(':visible')) {
|
||||
Cookies.set(cookieName, 'yes');
|
||||
} else {
|
||||
Cookies.remove(cookieName);
|
||||
}
|
||||
});
|
||||
},
|
||||
add: function() {
|
||||
if ($("#mChatMessage").val() === "") {
|
||||
return false;
|
||||
if (mChat.submitting) {
|
||||
return;
|
||||
}
|
||||
var messChars = $("#mChatMessage").val().replace(/ /g, "");
|
||||
if (mChat.$$('input').val() === '') {
|
||||
return;
|
||||
}
|
||||
var messChars = mChat.$$('input').val().replace(/ /g, '');
|
||||
if (mChat.mssgLngth && messChars.length > mChat.mssgLngth) {
|
||||
alert(mChat.mssgLngthLong);
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url: mChat.file,
|
||||
timeout: 10000,
|
||||
type: "POST",
|
||||
data: $("#postform").serialize(),
|
||||
dataType: "text",
|
||||
var $formElems = $('#' + form_name + ' :input[name]').filter(function(i, elem) {
|
||||
return !elem.name.startsWith('addbbcode');
|
||||
});
|
||||
$.ajax($.extend({}, ajaxOptions, {
|
||||
data: $formElems.serialize(),
|
||||
beforeSend: function() {
|
||||
$("#submit_button").attr("disabled", "disabled");
|
||||
if (mChat.userTimeout) {
|
||||
clearInterval(mChat.activeInterval);
|
||||
clearInterval(mChat.counter);
|
||||
}
|
||||
clearInterval(mChat.interval);
|
||||
mChat.$$('add').attr('disabled', 'disabled');
|
||||
mChat.pauseSession();
|
||||
},
|
||||
success: function() {
|
||||
success: function(json) {
|
||||
if (json.add) {
|
||||
mChat.$$('input').val('');
|
||||
mChat.refresh();
|
||||
},
|
||||
error: function(e) {
|
||||
if (e.status == 400) {
|
||||
alert(mChat.flood);
|
||||
} else if (e.status == 403) {
|
||||
alert(mChat.noAccess);
|
||||
} else if (e.status == 501) {
|
||||
alert(mChat.noMessageInput);
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$("#mChatNoMessage").remove();
|
||||
$("#submit_button").removeAttr("disabled");
|
||||
mChat.interval = setInterval(mChat.refresh, mChat.refreshTime);
|
||||
if (mChat.userTimeout) {
|
||||
mChat.sessionTime = mChat.userTimeout / 1000;
|
||||
mChat.counter = setInterval(mChat.countDown, 1000);
|
||||
mChat.activeInterval = setInterval(mChat.active, mChat.userTimeout);
|
||||
mChat.resetSession();
|
||||
mChat.$$('input').focus();
|
||||
mChat.$$('add').removeAttr('disabled');
|
||||
}
|
||||
$("#mChatMessage").val("").focus();
|
||||
}
|
||||
});
|
||||
}));
|
||||
},
|
||||
edit: function() {
|
||||
var id = $(this).closest(".mChatHover").data("id");
|
||||
var $message = mChat.confirmContainer.find("textarea").show().val($("#mess" + id).data("edit"));
|
||||
mChat.confirmContainer.find("p").text(mChat.editInfo);
|
||||
phpbb.confirm(mChat.confirmContainer, function() {
|
||||
$.ajax({
|
||||
url: mChat.file,
|
||||
timeout: 10000,
|
||||
type: "POST",
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var $message = mChat.$$('confirm').find('textarea').show().val($container.data('edit'));
|
||||
mChat.$$('confirm').find('p').text(mChat.editInfo);
|
||||
phpbb.confirm(mChat.$$('confirm'), function() {
|
||||
$.ajax($.extend({}, ajaxOptions, {
|
||||
data: {
|
||||
mode: "edit",
|
||||
message_id: id,
|
||||
mode: 'edit',
|
||||
message_id: $container.data('id'),
|
||||
message: $message.val()
|
||||
},
|
||||
dataType: "text",
|
||||
beforeSend: function() {
|
||||
clearInterval(mChat.interval);
|
||||
if (mChat.userTimeout) {
|
||||
clearInterval(mChat.activeInterval);
|
||||
clearInterval(mChat.counter);
|
||||
$("#mChatSessTimer").html(mChat.refreshing);
|
||||
}
|
||||
},
|
||||
success: function(html) {
|
||||
$("#mess" + id).fadeOut("slow", function() {
|
||||
$(this).replaceWith(html);
|
||||
$("#mess" + id).css("display", "none").fadeIn("slow");
|
||||
success: function(json) {
|
||||
$container.fadeOut('slow', function() {
|
||||
$container.replaceWith($(json.edit).hide().fadeIn('slow'));
|
||||
});
|
||||
},
|
||||
error: function(resp) {
|
||||
if (resp.status == 403) {
|
||||
alert(mChat.noAccess);
|
||||
} else if (resp.status == 501) {
|
||||
alert(mChat.noMessageInput);
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
mChat.interval = setInterval(mChat.refresh, mChat.refreshTime);
|
||||
if (mChat.userTimeout) {
|
||||
mChat.sessionTime = mChat.userTimeout ? mChat.userTimeout / 1000 : false;
|
||||
mChat.counter = setInterval(mChat.countDown, 1000);
|
||||
mChat.activeInterval = setInterval(mChat.active, mChat.userTimeout);
|
||||
}
|
||||
$message.val('');
|
||||
mChat.resetSession();
|
||||
if (!mChat.archiveMode && !mChat.messageTop) {
|
||||
setTimeout(function() {
|
||||
$("#mChatmain").animate({scrollTop: $("#mChatmain")[0].scrollHeight}, 1000, "swing");
|
||||
}, 1500);
|
||||
mChat.$$('main').animate({scrollTop: mChat.$$('main')[0].scrollHeight}, 'slow', 'swing');
|
||||
}, 250);
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
});
|
||||
},
|
||||
del: function() {
|
||||
var id = $(this).closest(".mChatHover").data("id");
|
||||
mChat.confirmContainer.find("textarea").hide();
|
||||
mChat.confirmContainer.find("p").text(mChat.delConfirm);
|
||||
phpbb.confirm(mChat.confirmContainer, function() {
|
||||
$.ajax({
|
||||
url: mChat.file,
|
||||
timeout: 10000,
|
||||
type: "POST",
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
mChat.$$('confirm').find('textarea').hide();
|
||||
mChat.$$('confirm').find('p').text(mChat.delConfirm);
|
||||
phpbb.confirm(mChat.$$('confirm'), function() {
|
||||
$.ajax($.extend({}, ajaxOptions, {
|
||||
data: {
|
||||
mode: "delete",
|
||||
message_id: id
|
||||
mode: 'del',
|
||||
message_id: $container.data('id')
|
||||
},
|
||||
beforeSend: function() {
|
||||
clearInterval(mChat.interval);
|
||||
if (mChat.userTimeout) {
|
||||
clearInterval(mChat.activeInterval);
|
||||
clearInterval(mChat.counter);
|
||||
$("#mChatSessTimer").html(mChat.refreshing);
|
||||
}
|
||||
},
|
||||
success: function() {
|
||||
$("#mess" + id).fadeOut("slow", function() {
|
||||
$(this).remove();
|
||||
success: function(json) {
|
||||
if (json.del) {
|
||||
mChat.sound('del');
|
||||
$container.fadeOut('slow', function() {
|
||||
$container.remove();
|
||||
});
|
||||
mChat.sound("del");
|
||||
},
|
||||
error: function() {
|
||||
alert(mChat.noAccess);
|
||||
},
|
||||
complete: function() {
|
||||
mChat.interval = setInterval(mChat.refresh, mChat.refreshTime);
|
||||
if (mChat.userTimeout) {
|
||||
mChat.sessionTime = mChat.userTimeout ? mChat.userTimeout / 1000 : false;
|
||||
mChat.counter = setInterval(mChat.countDown, 1000);
|
||||
mChat.activeInterval = setInterval(mChat.active, mChat.userTimeout);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
complete: mChat.resetSession
|
||||
}));
|
||||
});
|
||||
},
|
||||
refresh: function() {
|
||||
if (mChat.archiveMode) {
|
||||
return;
|
||||
}
|
||||
var firstLastSelector = mChat.messageTop ? ":first" : ":last";
|
||||
var messId = 0;
|
||||
if ($("#mChatData").children().not("#mChatNoMessage").length) {
|
||||
$("#mChatNoMessage").remove();
|
||||
var attr = $("#mChatData").children(firstLastSelector).not("#mChatNoMessage").attr("id");
|
||||
if (attr) {
|
||||
messId = attr.replace("mess", "");
|
||||
}
|
||||
}
|
||||
$.ajax({
|
||||
url: mChat.file,
|
||||
timeout: 10000,
|
||||
type: "POST",
|
||||
var firstLastSelector = mChat.messageTop ? ':first' : ':last';
|
||||
var id = mChat.$$('messages').children(firstLastSelector).data('id');
|
||||
$.ajax($.extend({}, ajaxOptions, {
|
||||
data: {
|
||||
mode: "read",
|
||||
message_last_id: messId
|
||||
mode: 'refresh',
|
||||
message_last_id: id
|
||||
},
|
||||
dataType: "html",
|
||||
beforeSend: function() {
|
||||
$("#mChatOkIMG,#mChatErrorIMG,#mChatPauseIMG").hide();
|
||||
$("#mChatLoadIMG").show();
|
||||
mChat.$$('refresh-ok', 'refresh-error', 'refresh-paused').hide();
|
||||
mChat.$$('refresh-load').show();
|
||||
},
|
||||
success: function(html) {
|
||||
var $html = $($.trim(html));
|
||||
success: function(json) {
|
||||
var $html = $(json.refresh);
|
||||
if ($html.length) {
|
||||
$("#mChatRefreshText").removeClass("mchat-alert");
|
||||
$html.hide();
|
||||
if (mChat.messageTop) {
|
||||
$("#mChatData").prepend($html);
|
||||
} else {
|
||||
$("#mChatData").append($html);
|
||||
}
|
||||
$html.fadeIn("slow");
|
||||
$("#mChatmain").stop().animate({scrollTop: mChat.messageTop ? 0 : $("#mChatmain")[0].scrollHeight}, 2000);
|
||||
mChat.sound("add");
|
||||
mChat.$$('no-messages').remove();
|
||||
mChat.$$('messages')[mChat.messageTop ? 'prepend' : 'append']($html.hide());
|
||||
$html.css('opacity', 0).slideDown('slow').animate({opacity: 1}, {queue: false, duration: 'slow'});
|
||||
mChat.$$('main').animate({scrollTop: mChat.messageTop ? 0 : mChat.$$('main')[0].scrollHeight}, 'slow');
|
||||
mChat.sound('add');
|
||||
mChat.notice();
|
||||
}
|
||||
setTimeout(function() {
|
||||
$("#mChatLoadIMG,#mChatErrorIMG,#mChatPauseIMG").hide();
|
||||
$("#mChatOkIMG").show();
|
||||
$("#mChatRefreshText").html(mChat.refreshYes);
|
||||
}, 500);
|
||||
mChat.$$('refresh-load', 'refresh-error', 'refresh-paused').hide();
|
||||
mChat.$$('refresh-ok').show();
|
||||
mChat.$$('refresh-text').html(mChat.refreshYes);
|
||||
}, 250);
|
||||
},
|
||||
error: function() {
|
||||
$("#mChatLoadIMG,#mChatOkIMG,#mChatPauseIMG,#mChatRefreshTextNo").hide();
|
||||
$("#mChatErrorIMG").show();
|
||||
mChat.sound("error");
|
||||
},
|
||||
complete: function() {
|
||||
if (!$("#mChatData").children(firstLastSelector).length) {
|
||||
$("#mChatData").append('<div id="mChatNoMessage">' + mChat.noMessages + "</div>").show("slow");
|
||||
mChat.$$('refresh-load', 'refresh-ok', 'refresh-paused').hide();
|
||||
mChat.$$('refresh-error').show();
|
||||
mChat.sound('error');
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
},
|
||||
stats: function() {
|
||||
$.ajax({
|
||||
url: mChat.file,
|
||||
timeout: 10000,
|
||||
type: "POST",
|
||||
whois: function() {
|
||||
$.ajax($.extend({}, ajaxOptions, {
|
||||
data: {
|
||||
mode: "stats"
|
||||
mode: 'whois'
|
||||
},
|
||||
dataType: "html",
|
||||
beforeSend: function() {
|
||||
if (mChat.customPage) {
|
||||
$("#mChatRefreshN").show();
|
||||
$("#mChatRefresh").hide();
|
||||
mChat.$$('refresh-pending').show();
|
||||
mChat.$$('refresh').hide();
|
||||
}
|
||||
},
|
||||
success: function(data) {
|
||||
var json = $.parseJSON(data);
|
||||
$("#mChatStats").replaceWith(json.message);
|
||||
success: function(json) {
|
||||
var $whois = $(json.whois);
|
||||
var $userlist = $whois.find('#mchat-userlist');
|
||||
if (Cookies.get('mChatShowUserlist')) {
|
||||
$userlist.show();
|
||||
}
|
||||
mChat.$$('whois').replaceWith($whois);
|
||||
mChat.cache['whois'] = $whois;
|
||||
mChat.cache['userlist'] = $userlist;
|
||||
if (mChat.customPage) {
|
||||
setTimeout(function() {
|
||||
$("#mChatRefreshN").hide();
|
||||
$("#mChatRefresh").show();
|
||||
}, 500);
|
||||
mChat.$$('refresh-pending').hide();
|
||||
mChat.$$('refresh').show();
|
||||
}, 250);
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
mChat.sound("error");
|
||||
},
|
||||
complete: function() {
|
||||
if ($("#mChatUserList").length && ($.cookie("mChatShowUserList") == "yes" || mChat.customPage)) {
|
||||
$("#mChatUserList").css("display", "block");
|
||||
mChat.sound('error');
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
},
|
||||
active: function() {
|
||||
if (mChat.archiveMode || !mChat.userTimeout) {
|
||||
return;
|
||||
countDown: function() {
|
||||
mChat.sessionTime -= 1;
|
||||
var timeLeft = formatRemainingSessionTime(mChat.sessionTime);
|
||||
mChat.$$('session').html(mChat.sessEnds + ' ' + timeLeft);
|
||||
if (mChat.sessionTime <= 0) {
|
||||
mChat.endSession();
|
||||
}
|
||||
clearInterval(mChat.interval);
|
||||
$("#mChatLoadIMG,#mChatOkIMG,#mChatErrorIMG").hide();
|
||||
$("#mChatPauseIMG").show();
|
||||
$("#mChatRefreshText").html(mChat.refreshNo).addClass("mchat-alert");
|
||||
$("#mChatSessMess").html(mChat.sessOut).addClass("mchat-alert");
|
||||
},
|
||||
insertMention: function() {
|
||||
var $msg = $(this).closest(".mChatHover");
|
||||
var username = mChat.entityDecode($msg.data("username"));
|
||||
var usercolor = $msg.data("usercolor");
|
||||
pauseSession: function() {
|
||||
mChat.submitting = true;
|
||||
clearInterval(mChat.refreshInterval);
|
||||
if (mChat.userTimeout) {
|
||||
clearInterval(mChat.sessionCountdown);
|
||||
}
|
||||
if (mChat.whoisRefresh) {
|
||||
clearInterval(mChat.whoisInterval);
|
||||
}
|
||||
},
|
||||
resetSession: function() {
|
||||
clearInterval(mChat.refreshInterval);
|
||||
mChat.refreshInterval = setInterval(mChat.refresh, mChat.refreshTime);
|
||||
if (mChat.userTimeout) {
|
||||
mChat.sessionTime = mChat.userTimeout / 1000;
|
||||
clearInterval(mChat.sessionCountdown);
|
||||
mChat.sessionCountdown = setInterval(mChat.countDown, 1000);
|
||||
mChat.$$('session').html(mChat.sessEnds + ' ' + formatRemainingSessionTime(mChat.sessionTime));
|
||||
}
|
||||
if (mChat.whoisRefresh) {
|
||||
clearInterval(mChat.whoisInterval);
|
||||
mChat.whoisInterval = setInterval(mChat.whois, mChat.whoisRefresh);
|
||||
}
|
||||
if (mChat.pause) {
|
||||
mChat.$$('input').one('keypress', mChat.endSession);
|
||||
}
|
||||
mChat.$$('refresh-ok').show();
|
||||
mChat.$$('refresh-load', 'refresh-error', 'refresh-paused').hide();
|
||||
mChat.$$('refresh-text').html(mChat.refreshYes);
|
||||
mChat.submitting = false;
|
||||
},
|
||||
endSession: function() {
|
||||
clearInterval(mChat.refreshInterval);
|
||||
if (mChat.userTimeout) {
|
||||
clearInterval(mChat.sessionCountdown);
|
||||
mChat.$$('session').html(mChat.sessOut);
|
||||
}
|
||||
if (mChat.whoisRefresh) {
|
||||
clearInterval(mChat.whoisInterval);
|
||||
}
|
||||
mChat.$$('refresh-load', 'refresh-ok', 'refresh-error').hide();
|
||||
mChat.$$('refresh-paused').show();
|
||||
mChat.$$('refresh-text').html(mChat.refreshNo);
|
||||
mChat.whois();
|
||||
},
|
||||
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]";
|
||||
username = '[b][color=' + usercolor + ']' + username + '[/color][/b]';
|
||||
} else if (mChat.allowBBCodes) {
|
||||
username = "[b]" + username + "[/b]";
|
||||
username = '[b]' + username + '[/b]';
|
||||
}
|
||||
insert_text("@ " + username + ", ");
|
||||
insert_text('@ ' + username + ', ');
|
||||
},
|
||||
insertQuote: function() {
|
||||
var $msg = $(this).closest(".mChatHover");
|
||||
var username = mChat.entityDecode($msg.data("username"));
|
||||
var id = $msg.data("id");
|
||||
var quote = mChat.entityDecode($("#mess" + id).data("edit"));
|
||||
quote: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var username = mChat.entityDecode($container.data('username'));
|
||||
var quote = mChat.entityDecode($container.data('edit'));
|
||||
insert_text('[quote="' + username + '"] ' + quote + '[/quote]');
|
||||
},
|
||||
insertLike: function() {
|
||||
var $msg = $(this).closest(".mChatHover");
|
||||
var username = mChat.entityDecode($msg.data("username"));
|
||||
var quote = mChat.entityDecode($msg.data("edit"));
|
||||
insert_text(mChat.likes + '[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('edit'));
|
||||
insert_text(mChat.likes + '[quote="' + username + '"] ' + quote + '[/quote]');
|
||||
},
|
||||
entityDecode: function(text) {
|
||||
var s = decodeURIComponent(text.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, '"');
|
||||
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.interval = setInterval(mChat.refresh, mChat.refreshTime);
|
||||
mChat.activeInterval = setInterval(mChat.active, mChat.userTimeout);
|
||||
mChat.sessionTime = mChat.userTimeout ? mChat.userTimeout / 1000 : false;
|
||||
mChat.confirmContainer = $("#mChatConfirm").detach().show();
|
||||
mChat.cache = {};
|
||||
mChat.$$('confirm').detach().show();
|
||||
|
||||
if (mChat.userTimeout) {
|
||||
mChat.counter = setInterval(mChat.countDown, 1000);
|
||||
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();
|
||||
|
||||
if (!mChat.messageTop) {
|
||||
mChat.$$('main').animate({scrollTop: mChat.$$('main')[0].scrollHeight}, 'slow', 'swing');
|
||||
}
|
||||
|
||||
if (mChat.whois) {
|
||||
mChat.statsInterval = setInterval(mChat.stats, mChat.whoisRefresh);
|
||||
if (mChat.playSound && Cookies.get('mChatNoSound')) {
|
||||
mChat.$$('user-sound').removeAttr('checked');
|
||||
} else {
|
||||
mChat.$$('user-sound').attr('checked', 'checked');
|
||||
Cookies.remove('mChatNoSound');
|
||||
}
|
||||
|
||||
if ($.cookie("mChatShowSmiles") == "yes" && $("#mChatSmiles").css("display", "none")) {
|
||||
$("#mChatSmiles").slideToggle("slow");
|
||||
if (Cookies.get('mChatShowSmilies')) {
|
||||
mChat.$$('smilies').slideToggle('slow');
|
||||
}
|
||||
|
||||
if ($.cookie("mChatShowBBCodes") == "yes" && $("#mChatBBCodes").css("display", "none")) {
|
||||
$("#mChatBBCodes").slideToggle("slow");
|
||||
if (Cookies.get('mChatShowBbcodes')) {
|
||||
mChat.$$('bbcodes').slideToggle('slow', function() {
|
||||
if (Cookies.get('mChatShowColour')) {
|
||||
mChat.$$('colour').slideToggle('slow');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ($.cookie("mChatShowUserList") == "yes" && $("#mChatUserList").length) {
|
||||
$("#mChatUserList").slideToggle("slow");
|
||||
if (Cookies.get('mChatShowUserlist')) {
|
||||
mChat.$$('userlist').slideToggle('slow');
|
||||
}
|
||||
|
||||
if ($.cookie("mChatShowColour") == "yes" && $("#mChatColour").css("display", "none")) {
|
||||
$("#mChatColour").slideToggle("slow");
|
||||
}
|
||||
|
||||
$("#mChatUseSound").change(function() {
|
||||
$.cookie("mChatNoSound", $(this).is(":checked") ? null : "yes");
|
||||
mChat.$$('colour').html(phpbb.colorPalette('h', 15, 10)).on('click', 'a', function(e) {
|
||||
var color = $(this).data('color');
|
||||
bbfontstyle('[color=#' + color + ']', '[/color]');
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("#mChatData")
|
||||
.on("click", "span.mChatInsertMention", mChat.insertMention)
|
||||
.on("click", "img.mChatInsertQuote", mChat.insertQuote)
|
||||
.on("click", "img.mChatInsertLike", mChat.insertLike)
|
||||
.on("click", "img.mChatEdit", mChat.edit)
|
||||
.on("click", "img.mChatDelete", mChat.del);
|
||||
mChat.$$('user-sound').change(function() {
|
||||
if (this.checked) {
|
||||
Cookies.remove('mChatNoSound');
|
||||
} else {
|
||||
Cookies.set('mChatNoSound', 'yes');
|
||||
}
|
||||
});
|
||||
|
||||
$('#postform').on('keypress', function(e) {
|
||||
if (e.which == 13) {
|
||||
mChat.add();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
mChat.$$('input').autoGrowInput();
|
||||
}
|
||||
|
||||
$('#page-body').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();
|
||||
});
|
||||
});
|
||||
|
||||
19
styles/prosilver/template/mchat.min.js
vendored
19
styles/prosilver/template/mchat.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
<div id="mChatBBCodes" style="padding: 5px; display: none;">
|
||||
<div id="mchat-bbcodes">
|
||||
<fieldset class="fields1">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
@@ -29,11 +29,9 @@
|
||||
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
|
||||
<!-- END custom_tags -->
|
||||
}
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
|
||||
<!-- INCLUDE mchat_color.html -->
|
||||
<!-- 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 -->
|
||||
@@ -81,7 +79,7 @@
|
||||
</select>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_BBCODE_COLOR -->
|
||||
<input type="button" class="button2" name="bbpalette" id="bbpalette" value="{L_FONT_COLOR}" onclick="mChat.toggle('Colour');" title="{L_BBCODE_S_HELP}" />
|
||||
<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;">
|
||||
@@ -91,5 +89,6 @@
|
||||
<!-- END custom_tags -->
|
||||
</select>
|
||||
<!-- ENDIF -->
|
||||
<div id="mchat-colour" class="hidden"></div>
|
||||
</fieldset>
|
||||
</div>
|
||||
@@ -1,20 +1,14 @@
|
||||
<!-- IF MCHAT_ARCHIVE_MODE or MCHAT_CUSTOM_PAGE -->
|
||||
<!-- IF MCHAT_ARCHIVE_MODE or MCHAT_CUSTOM_PAGE or MCHAT_DISABLE -->
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF MCHAT_ENABLE -->
|
||||
|
||||
<!-- INCLUDEJS jquery.titlealert.min.js -->
|
||||
<!-- INCLUDEJS jquery_cookie_mini.js -->
|
||||
<!-- INCLUDEJS js.cookie-2.0.4.min.js -->
|
||||
<!-- INCLUDEJS mchat.min.js -->
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_MODE -->
|
||||
<!--**
|
||||
*
|
||||
* @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 .pagination or MCHAT_TOTAL_MESSAGES -->
|
||||
<!-- IF MCHAT_ARCHIVE_MODE and (.pagination or MCHAT_TOTAL_MESSAGES) -->
|
||||
<div class="action-bar top">
|
||||
<div class="pagination">
|
||||
{MCHAT_TOTAL_MESSAGES}
|
||||
@@ -24,36 +18,40 @@
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not MCHAT_READ_MODE -->
|
||||
|
||||
<!-- 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_MODE -->{L_MCHAT_ARCHIVE_PAGE}<!-- ELSE -->{L_MCHAT_TITLE}<!-- ENDIF --></dt>
|
||||
<dt><!-- IF MCHAT_ARCHIVE_MODE -->{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 class="postbody mChatBodyFix">
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ENABLE -->
|
||||
<!-- IF not MCHAT_READ_MODE -->
|
||||
|
||||
<div id="mchat-body" class="postbody">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
// Define mChat setting
|
||||
window.mChat = {
|
||||
messageTop : <!-- IF MCHAT_MESSAGE_TOP -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
noMessage : '{MCHAT_NOMESSAGE_MODE}',
|
||||
// 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_MODE -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
messageTop : <!-- IF MCHAT_MESSAGE_TOP -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
|
||||
// Limits & timeouts
|
||||
refreshTime : {MCHAT_REFRESH_JS},
|
||||
whoisRefresh : {MCHAT_WHOIS_REFRESH},
|
||||
userTimeout : {MCHAT_USER_TIMEOUT},
|
||||
mssgLngth : {MCHAT_MESSAGE_LNGTH},
|
||||
|
||||
// Language
|
||||
newMessageAlert : '{LA_MCHAT_NEW_CHAT}',
|
||||
noMessageInput : '{LA_MCHAT_NOMESSAGEINPUT}',
|
||||
noMessages : '{LA_MCHAT_NOMESSAGE}',
|
||||
@@ -61,28 +59,22 @@
|
||||
noAccess : '{LA_MCHAT_NOACCESS}',
|
||||
flood : '{LA_MCHAT_FLOOD}',
|
||||
delConfirm : '{LA_MCHAT_DELCONFIRM}',
|
||||
reset : '{LA_MCHAT_RESET_QUESTION}',
|
||||
refreshing : '{LA_MCHAT_REFRESHING}',
|
||||
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}',
|
||||
mssgLngth : {MCHAT_MESSAGE_LNGTH},
|
||||
playSound : <!-- IF S_MCHAT_SOUND_YES -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
whois : <!-- IF MCHAT_WHOIS -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
whoisRefresh : {MCHAT_WHOIS_REFRESH},
|
||||
archiveMode : <!-- IF MCHAT_ARCHIVE_MODE -->true<!-- ELSE -->false<!-- ENDIF -->
|
||||
};
|
||||
// ]]>
|
||||
</script>
|
||||
<!-- IF not MCHAT_ARCHIVE_MODE -->
|
||||
|
||||
<div id="mChatmain" <!-- IF MCHAT_CUSTOM_PAGE -->class="mChatRowLimitCustom" style="height: {MCHAT_CUSTOM_HEIGHT}px;"<!-- ELSE -->class="mChatRowLimit" style="height: {MCHAT_INDEX_HEIGHT}px;"<!-- ENDIF -->>
|
||||
<!-- IF not MCHAT_ARCHIVE_MODE -->
|
||||
<div id="mchat-main" class="mchat-row-limit" style="height:<!-- IF MCHAT_CUSTOM_PAGE -->{MCHAT_CUSTOM_HEIGHT}<!-- ELSE -->{MCHAT_INDEX_HEIGHT}<!-- ENDIF -->px">
|
||||
<!-- ENDIF -->
|
||||
<div id="mChatData">
|
||||
<div id="mChatConfirm" class="hidden">
|
||||
|
||||
<div id="mchat-confirm" class="hidden">
|
||||
<h3>{L_CONFIRM}</h3>
|
||||
<p></p>
|
||||
<textarea></textarea>
|
||||
@@ -91,29 +83,42 @@
|
||||
<input type="button" name="cancel" value="{L_CANCEL}" class="button2" />
|
||||
</fieldset>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- INCLUDE mchat_messages.html -->
|
||||
<!-- IF not MCHAT_READ_MODE -->
|
||||
<!-- IF MCHAT_NOMESSAGE_MODE --><div id="mChatNoMessage">{L_MCHAT_NOMESSAGE}</div><!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
<div id="mchat-messages"><!-- INCLUDE mchat_messages.html --></div>
|
||||
<!-- IF not .mchatrow --><div id="mchat-no-messages">{L_MCHAT_NOMESSAGE}</div><!-- ENDIF -->
|
||||
|
||||
<!-- IF not MCHAT_ARCHIVE_MODE -->
|
||||
</div>
|
||||
<!-- IF MCHAT_STATIC_MESS --><div class="mChatStatic"><strong>{L_MCHAT_ANNOUNCEMENT}{L_COLON}</strong> <span style="color:#990000;">{MCHAT_STATIC_MESS}</span></div><!-- ENDIF -->
|
||||
<!-- IF not (MCHAT_ARCHIVE_MODE or MCHAT_CUSTOM_PAGE) and MCHAT_WHOIS and S_MCHAT_INDEX_STATS --><div class="mChatStats" id="mChatStats"><!-- IF MCHAT_USERS_LIST --><a href="#" onclick="mChat.toggle('UserList'); return false;">{MCHAT_USERS_COUNT}</a><!-- ELSE -->{MCHAT_USERS_COUNT}<!-- ENDIF --> {L_MCHAT_ONLINE_EXPLAIN}<br /><span id="mChatUserList">{MCHAT_USERS_LIST}</span></div><!-- ENDIF -->
|
||||
<form method="post" action="javascript://" onsubmit="mChat.add();" id="postform">
|
||||
<div class="mChatPanel">
|
||||
<noscript><div class="mchat_alert">{L_MCHAT_NOJAVASCRIPT}</div></noscript>
|
||||
<!-- IF MCHAT_ADD_MESSAGE -->
|
||||
|
||||
<!-- 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_MODE and not MCHAT_CUSTOM_PAGE and MCHAT_WHOIS_REFRESH -->
|
||||
<!-- INCLUDE mchat_whois.html -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="postform" action="{MCHAT_FILE_NAME}" method="POST">
|
||||
<div class="mchat-panel">
|
||||
<noscript><div class="mchat-alert">{L_MCHAT_NOJAVASCRIPT}</div></noscript>
|
||||
<!-- IF MCHAT_ALLOW_USE -->
|
||||
{S_FORM_TOKEN}
|
||||
<input type="hidden" name="mode" value="add" />
|
||||
<!-- IF MCHAT_INPUT_TYPE --><input type="text" name="message" class="inputbox medium mChatText" id="mChatMessage" /><!-- ELSE -->
|
||||
<textarea name="message" class="inputbox mChatText" id="mChatMessage" onkeypress="mChat.key(event);" cols="32" rows="5" style="width: 50em;height: 6em;"></textarea><!-- ENDIF --><br />
|
||||
<input id="submit_button" type="button" class="button2" onclick="mChat.add();" value="{L_MCHAT_ADD}" />
|
||||
<input id="mChatClear" type="button" class="button2" onclick="mChat.clear();" value="{L_MCHAT_CLEAR_INPUT}" />
|
||||
<!-- 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" onclick="mChat.toggle('Smiles');" value="{L_MCHAT_SMILES}" />
|
||||
<input type="button" class="button2" data-mchat-toggle="smilies" value="{L_MCHAT_SMILES}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_BBCODES -->
|
||||
<input type="button" class="button2" onclick="mChat.toggle('BBCodes');" value="{L_MCHAT_BBCODES}" />
|
||||
<input type="button" class="button2" data-mchat-toggle="bbcodes" value="{L_MCHAT_BBCODES}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_buttons_mid -->
|
||||
@@ -123,7 +128,7 @@
|
||||
<!-- IF MCHAT_FOUNDER -->
|
||||
<input type="button" class="button2" onclick="window.location.href = '{MCHAT_CLEAN_URL}';" value="{L_MCHAT_CLEAN}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ADD_MESSAGE -->
|
||||
<!-- 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 -->
|
||||
@@ -132,9 +137,8 @@
|
||||
<!-- INCLUDE mchat_bbcodes.html -->
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
{S_FORM_TOKEN}
|
||||
<!-- IF MCHAT_ALLOW_SMILES and .smiley -->
|
||||
<div id="mChatSmiles" style="padding: 5px; display: none;">
|
||||
<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 -->
|
||||
@@ -142,31 +146,25 @@
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_body_smiley_after -->
|
||||
<div style="padding: 3px;">
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/load.gif" alt="{L_MCHAT_LOAD}" title="{L_MCHAT_LOAD}" id="mChatLoadIMG" class="mChatImageLoad" />
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/ok.gif" alt="{L_MCHAT_OK}" title="{L_MCHAT_OK}" id="mChatOkIMG" class="mChatImageOk" />
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/error.gif" alt="{L_MCHAT_ERROR}" title="{L_MCHAT_ERROR}" id="mChatErrorIMG" class="mChatImageHideImg" />
|
||||
<img src="{EXT_URL}styles/prosilver/theme/images/paused.gif" alt="{L_MCHAT_PAUSE}" title="{L_MCHAT_PAUSE}" id="mChatPauseIMG" class="mChatImageHideImg" />
|
||||
<span id="mChatRefreshText">{MCHAT_REFRESH_YES}</span><!-- IF MCHAT_USER_TIMEOUT --> • <span id="mChatSessMess"> </span><!-- ENDIF --> • <label for="mChatUseSound">{L_MCHAT_USESOUND} <input type="checkbox" id="mChatUseSound" <!-- IF S_MCHAT_SOUND_YES -->checked="checked"<!-- ENDIF --> /></label>
|
||||
<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"></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>
|
||||
</form>
|
||||
<!-- ENDIF -->
|
||||
<div id="mChatSound" class="mChatSound"></div>
|
||||
<div id="mchat-sound"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ENDIF -->
|
||||
<!-- ELSE -->
|
||||
<div class="mchat_alert">{L_MCHAT_ENABLE}</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not MCHAT_READ_MODE -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ARCHIVE_MODE -->
|
||||
<!-- IF MCHAT_ARCHIVE_MODE and (.pagination or MCHAT_TOTAL_MESSAGES) -->
|
||||
<div class="action-bar bottom">
|
||||
<!-- IF .pagination or MCHAT_TOTAL_MESSAGES -->
|
||||
<div class="pagination">
|
||||
{MCHAT_TOTAL_MESSAGES}
|
||||
<!-- IF .pagination -->
|
||||
@@ -175,15 +173,25 @@
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not S_MCHAT_DISABLED and MCHAT_CUSTOM_PAGE and MCHAT_WHOIS -->
|
||||
|
||||
<!-- IF MCHAT_CUSTOM_PAGE and not MCHAT_ARCHIVE_MODE and MCHAT_WHOIS_REFRESH -->
|
||||
<h3>{L_WHO_IS_CHATTING}</h3>
|
||||
<div class="mChatStats" id="mChatStats"><!-- IF MCHAT_USERS_LIST --><a href="#" onclick="mChat.toggle('UserList'); return false;">{MCHAT_USERS_COUNT}</a><!-- ELSE -->{MCHAT_USERS_COUNT}<!-- ENDIF --> {L_MCHAT_ONLINE_EXPLAIN}<br /><span id="mChatUserList">{MCHAT_USERS_LIST}</span></div>
|
||||
<div class="mChatRefresh"><span id="mChatRefresh">{L_MCHAT_WHOIS_REFRESH_EXPLAIN}</span><span id="mChatRefreshN" style="display: none;">{L_MCHAT_REFRESHING}</span>
|
||||
<!-- IF LEGEND --><br /><em>{L_LEGEND}{L_COLON} {LEGEND}</em><!-- ENDIF --></div>
|
||||
<!-- 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_MODE and LEGEND -->
|
||||
<div class="mchat-refresh">
|
||||
<em>{L_LEGEND}{L_COLON} {LEGEND}</em>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ARCHIVE_MODE or MCHAT_CUSTOM_PAGE -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_MODE or MCHAT_CUSTOM_PAGE or MCHAT_DISABLE -->
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
<div id="mChatColour" style="display: none; text-align: center">
|
||||
<table width="50%" style="margin-left: auto; margin-right: auto;">
|
||||
<tr align="center">
|
||||
<td valign="top">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
/**
|
||||
* Color pallette
|
||||
*/
|
||||
function colorPalette(dir, width, height)
|
||||
{
|
||||
var r = 0, g = 0, b = 0;
|
||||
var numberList = new Array(6);
|
||||
var color = '';
|
||||
|
||||
numberList[0] = '00';
|
||||
numberList[1] = '40';
|
||||
numberList[2] = '80';
|
||||
numberList[3] = 'BF';
|
||||
numberList[4] = 'FF';
|
||||
|
||||
document.writeln('<table cellspacing="1" cellpadding="0" border="0">');
|
||||
|
||||
for (r = 0; r < 5; r++)
|
||||
{
|
||||
if (dir == 'h')
|
||||
{
|
||||
document.writeln('<tr>');
|
||||
}
|
||||
|
||||
for (g = 0; g < 5; g++)
|
||||
{
|
||||
if (dir == 'v')
|
||||
{
|
||||
document.writeln('<tr>');
|
||||
}
|
||||
|
||||
for (b = 0; b < 5; b++)
|
||||
{
|
||||
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
|
||||
document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
|
||||
document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="{ROOT_PATH}images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
|
||||
document.writeln('</td>');
|
||||
}
|
||||
|
||||
if (dir == 'v')
|
||||
{
|
||||
document.writeln('</tr>');
|
||||
}
|
||||
}
|
||||
|
||||
if (dir == 'h')
|
||||
{
|
||||
document.writeln('</tr>');
|
||||
}
|
||||
}
|
||||
document.writeln('</table>');
|
||||
}
|
||||
|
||||
colorPalette('h', 15, 10);
|
||||
// ]]>
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
5
styles/prosilver/template/mchat_disabled.html
Normal file
5
styles/prosilver/template/mchat_disabled.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="rules">
|
||||
<div class="inner">
|
||||
<strong>{L_INFORMATION}{L_COLON}</strong> {L_MCHAT_ENABLE}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,26 +1,26 @@
|
||||
<!-- BEGIN mchatrow -->
|
||||
<div id="mess{mchatrow.MCHAT_MESSAGE_ID}" class="mChatBG{mchatrow.MCHAT_CLASS} mChatHover" data-id="{mchatrow.MCHAT_MESSAGE_ID}" data-username="{mchatrow.MCHAT_USERNAME}"<!-- IF mchatrow.MCHAT_USERNAME_COLOR --> data-usercolor="{mchatrow.MCHAT_USERNAME_COLOR}"<!-- ENDIF --> data-edit="{mchatrow.MCHAT_MESSAGE_EDIT}">
|
||||
<div 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-edit="{mchatrow.MCHAT_MESSAGE_EDIT}">
|
||||
<!-- IF S_MCHAT_AVATARS -->
|
||||
<div class="mChatAvatars">
|
||||
<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="{T_THEME_PATH}/images/no_avatar.gif" width="40px;" height="40px;" alt="" /><!-- 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="mChatMessageHeader">
|
||||
<!-- IF not MCHAT_ARCHIVE_MODE --><span class="mChatInsertMention" title="{L_MCHAT_RESPOND}" <!-- IF mchatrow.MCHAT_USERNAME_COLOR --> style="color:{mchatrow.MCHAT_USERNAME_COLOR}"<!-- ENDIF -->><strong>@</strong></span><!-- ENDIF -->
|
||||
<div class="mchat-message-header">
|
||||
<!-- IF not MCHAT_ARCHIVE_MODE --><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="mChatMessageIcons">
|
||||
<!-- IF MCHAT_ALLOW_PM and mchatrow.MCHAT_PM and mchatrow.U_VIEWPROFILE --><a href="{mchatrow.MCHAT_PM}" title="{L_MCHAT_SEND_PM}"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/message.gif" alt="{L_MCHAT_SEND_PM}" title="{L_MCHAT_SEND_PM}" class="mChatImage" /></a><!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_LIKE and not MCHAT_ARCHIVE_MODE 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}" class="mChatImage mChatInsertLike" /></a><!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_QUOTE and not MCHAT_ARCHIVE_MODE 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}" class="mChatImage mChatInsertQuote" /><!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_IP --><a href="{mchatrow.MCHAT_U_WHOIS}" 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}" class="mChatImage" /></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}" class="mChatImage" /></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}" class="mChatImage mChatEdit" /><!-- ENDIF -->
|
||||
<!-- IF mchatrow.MCHAT_ALLOW_DEL --><img src="{EXT_URL}styles/prosilver/theme/images/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" class="mChatImage mChatDelete" /><!-- ENDIF -->
|
||||
<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_MODE 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_MODE 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="mChatMessage<!-- IF S_MCHAT_AVATARS --> avatarMessage<!-- ENDIF -->">{mchatrow.MCHAT_MESSAGE}</div>
|
||||
<div class="mchat-text">{mchatrow.MCHAT_MESSAGE}</div>
|
||||
</div>
|
||||
<!-- END mchatrow -->
|
||||
|
||||
@@ -1,20 +1,9 @@
|
||||
<!--**
|
||||
*
|
||||
* @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
|
||||
*
|
||||
*/-->
|
||||
<!-- INCLUDE simple_header.html -->
|
||||
|
||||
<h2>{L_MCHAT_HELP}</h2>
|
||||
<div class="rules">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<!-- IF MCHAT_RULES and not .rule -->
|
||||
{MCHAT_RULES}
|
||||
<!-- ENDIF -->
|
||||
<!-- BEGIN rule -->
|
||||
{rule.MCHAT_RULE}<!-- IF !rule.S_LAST_ROW --><br /><!-- ENDIF -->
|
||||
<!-- END rule -->
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
<!-- IF MCHAT_ENABLE and MCHAT_INDEX_STATS and U_MCHAT -->
|
||||
<h3><a href="{U_MCHAT}#mChat">{L_WHO_IS_CHATTING}</a></h3>
|
||||
<p>{MCHAT_INDEX_USERS_COUNT} {L_MCHAT_ONLINE_EXPLAIN}<br />{MCHAT_INDEX_USERS_LIST}</p>
|
||||
<!-- ENDIF -->
|
||||
8
styles/prosilver/template/mchat_whois.html
Normal file
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>
|
||||
@@ -5,180 +5,178 @@
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
div.mChatBG1 {
|
||||
.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;
|
||||
margin-right: 1px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.mChatBG2 {
|
||||
background: linear-gradient(#B6BFC4, #FFFFFF, #FFFFFF, #B6BFC4);
|
||||
border: 1px solid #999999;
|
||||
border-radius: 6px;
|
||||
padding: 5px;
|
||||
.mchat-bg-2 {
|
||||
color: #444444;
|
||||
margin-right: 1px;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
}
|
||||
div.mChatRowLimit {
|
||||
|
||||
.mchat-row-limit {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.mChatRowLimitCustom {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.mChatPanel {
|
||||
.mchat-panel {
|
||||
text-align: center;
|
||||
padding: 3px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
input.mChatText {
|
||||
#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;
|
||||
}
|
||||
|
||||
input.mChatText:hover {
|
||||
#mchat-input:hover {
|
||||
border-color: #11A3EA;
|
||||
}
|
||||
|
||||
div.mChatHover:hover {
|
||||
background-color: #F6F4D0;
|
||||
}
|
||||
|
||||
div.mChatBodyFix {
|
||||
#mchat-body {
|
||||
width: 100% !important;
|
||||
background-color: #E9F0F5 !important;
|
||||
}
|
||||
|
||||
div.mChatStatic {
|
||||
|
||||
#mchat-static, #mchat-stats, #mchat-whois, .mchat-refresh {
|
||||
padding-left: 5px;
|
||||
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
|
||||
text-align: left;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
div.mChatStats {
|
||||
padding-left: 5px;
|
||||
#mchat-static {
|
||||
color: #990000;
|
||||
}
|
||||
|
||||
#mchat-stats, #mchat-whois {
|
||||
margin-top: 2px;
|
||||
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
|
||||
text-align: left;
|
||||
min-height: 1.3em;
|
||||
font-size: 1.1em;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
div.mChatRefresh {
|
||||
padding-left: 5px;
|
||||
font-family: "Lucida Grande", Verdana, Helvetica, Arial, sans-serif;
|
||||
text-align: left;
|
||||
font-size: 1.1em;
|
||||
.mchat-refresh {
|
||||
margin-top: 1.5em;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
input.mChatColor {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
background-color: #DEE3E7;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
div.mChatMessage {
|
||||
.mchat-text {
|
||||
padding: 3px;
|
||||
font-size: 1.1em;
|
||||
width: 98%;
|
||||
|
||||
}
|
||||
|
||||
div.mChatMessage li {
|
||||
margin-left: 30px;
|
||||
.mchat-text ul {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
div.mChatMessage blockquote {
|
||||
margin: 2px 0;
|
||||
.mchat-text blockquote {
|
||||
margin: 5px 0 0 10px
|
||||
}
|
||||
|
||||
a.mChatScriptLink {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
img.mChatImage {
|
||||
.mchat-panel-image {
|
||||
margin-top: -4px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.mChatMessageHeader {
|
||||
.mchat-message-header {
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.mChatMessageIcons {
|
||||
.mchat-message-icons {
|
||||
float: right;
|
||||
}
|
||||
|
||||
img.mChatImage, span.mChatInsertMention {
|
||||
.mchat-mention, .mchat-message-icons > * {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
img.mChatImageLoad {
|
||||
#mchat-smilies {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#mchat-refresh-load {
|
||||
vertical-align: middle;
|
||||
cursor: wait;
|
||||
display: none;
|
||||
}
|
||||
|
||||
img.mChatImageOk {
|
||||
#mchat-refresh-ok {
|
||||
vertical-align: middle;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
img.mChatImageHideImg {
|
||||
#mchat-refresh-error, #mchat-refresh-paused {
|
||||
vertical-align: middle;
|
||||
cursor: help;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.mChatSound {
|
||||
#mchat-sound {
|
||||
position: absolute;
|
||||
left: -1000px;
|
||||
top: -1000px;
|
||||
}
|
||||
|
||||
.mchat_alert {
|
||||
#mchat-status {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.mchat-alert {
|
||||
color: #7E2217;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#mChatUserList {
|
||||
display: none;
|
||||
#mchat-userlist {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mChatAvatars {
|
||||
.mchat-avatar {
|
||||
float: left;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
div.avatarMessage {
|
||||
.mchat-message-avatar .mchat-text {
|
||||
margin-left: 50px;
|
||||
width: 90%;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#mChatConfirm textarea {
|
||||
#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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user