Update version 0.0.12

Update version 0.0.12
This commit is contained in:
dmzx
2015-03-28 12:37:08 +01:00
parent 088308248b
commit 6987d9ed55
22 changed files with 135 additions and 27 deletions

View File

@@ -172,6 +172,9 @@ class acp_mchat_module
$config->set('mchat_new_posts_quote', $request->variable('mchat_new_posts_quote', 0)); $config->set('mchat_new_posts_quote', $request->variable('mchat_new_posts_quote', 0));
// update setting in config table for stats on index // update setting in config table for stats on index
$config->set('mchat_stats_index', $request->variable('mchat_stats_index', 0)); $config->set('mchat_stats_index', $request->variable('mchat_stats_index', 0));
// update setting in config table for message om top
$config->set('mchat_message_top', $request->variable('mchat_message_top', 0));
// and an entry into the log table // and an entry into the log table
add_log('admin', 'LOG_MCHAT_CONFIG_UPDATE'); add_log('admin', 'LOG_MCHAT_CONFIG_UPDATE');
@@ -206,6 +209,8 @@ class acp_mchat_module
$mchat_stats_index = isset($config['mchat_stats_index']) ? $config['mchat_stats_index'] : 0; $mchat_stats_index = isset($config['mchat_stats_index']) ? $config['mchat_stats_index'] : 0;
$mchat_message_top = isset($config['mchat_message_top']) ? $config['mchat_message_top'] : 0;
$dateformat_options = ''; $dateformat_options = '';
foreach ($user->lang['dateformats'] as $format => $null) foreach ($user->lang['dateformats'] as $format => $null)
{ {
@@ -230,6 +235,7 @@ class acp_mchat_module
'MCHAT_PRUNE_NUM' => !empty($mchat_row['prune_num']) ? $mchat_row['prune_num'] : $mchat_config['prune_num'], 'MCHAT_PRUNE_NUM' => !empty($mchat_row['prune_num']) ? $mchat_row['prune_num'] : $mchat_config['prune_num'],
'MCHAT_ENABLE' => ($mchat_enable) ? true : false, 'MCHAT_ENABLE' => ($mchat_enable) ? true : false,
'MCHAT_ON_INDEX' => ($mchat_on_index) ? true : false, 'MCHAT_ON_INDEX' => ($mchat_on_index) ? true : false,
'MCHAT_MESSAGE_TOP' => ($mchat_message_top) ? true : false,
'MCHAT_LOCATION' => !empty($mchat_row['location']) ? $mchat_row['location'] : $mchat_config['location'], 'MCHAT_LOCATION' => !empty($mchat_row['location']) ? $mchat_row['location'] : $mchat_config['location'],
'MCHAT_REFRESH' => !empty($mchat_row['refresh']) ? $mchat_row['refresh'] : $mchat_config['refresh'], 'MCHAT_REFRESH' => !empty($mchat_row['refresh']) ? $mchat_row['refresh'] : $mchat_config['refresh'],
'MCHAT_WHOIS_REFRESH' => !empty($mchat_row['whois_refresh']) ? $mchat_row['whois_refresh'] : $mchat_config['whois_refresh'], 'MCHAT_WHOIS_REFRESH' => !empty($mchat_row['whois_refresh']) ? $mchat_row['whois_refresh'] : $mchat_config['whois_refresh'],

View File

@@ -17,6 +17,12 @@
<dd><label><input type="radio" class="radio" name="mchat_enable" value="1"<!-- IF MCHAT_ENABLE --> id="mchat_enable" checked="checked"<!-- ENDIF --> /> {L_YES}</label> <dd><label><input type="radio" class="radio" name="mchat_enable" value="1"<!-- IF MCHAT_ENABLE --> id="mchat_enable" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="mchat_enable" value="0"<!-- IF not MCHAT_ENABLE --> id="mchat_enable" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd> <label><input type="radio" class="radio" name="mchat_enable" value="0"<!-- IF not MCHAT_ENABLE --> id="mchat_enable" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl> </dl>
<dl>
<dt><label for="mchat_message_top">{L_MCHAT_MESSAGE_TOP}{L_COLON}</label><br />
<span>{L_MCHAT_MESSAGE_TOP_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="mchat_message_top" value="1"<!-- IF MCHAT_MESSAGE_TOP --> id="mchat_message_top" checked="checked"<!-- ENDIF --> /> {L_MCHAT_BOTTOM}</label>
<label><input type="radio" class="radio" name="mchat_message_top" value="0"<!-- IF not MCHAT_MESSAGE_TOP --> id="mchat_message_top" checked="checked"<!-- ENDIF --> /> {L_MCHAT_TOP}</label></dd>
</dl>
<dl> <dl>
<dt><label for="mchat_new_posts">{L_MCHAT_NEW_POSTS}{L_COLON}</label><br /> <dt><label for="mchat_new_posts">{L_MCHAT_NEW_POSTS}{L_COLON}</label><br />
<span>{L_MCHAT_NEW_POSTS_EXPLAIN}</span></dt> <span>{L_MCHAT_NEW_POSTS_EXPLAIN}</span></dt>

View File

@@ -3,7 +3,7 @@
"type": "phpbb-extension", "type": "phpbb-extension",
"description": "mChat Extension for phpbb 3.1.x", "description": "mChat Extension for phpbb 3.1.x",
"homepage": "http://www.dmzx-web.net", "homepage": "http://www.dmzx-web.net",
"version": "0.0.11", "version": "0.0.12",
"time": "2015-03-10", "time": "2015-03-10",
"keywords": ["phpbb", "extension", "mchat"], "keywords": ["phpbb", "extension", "mchat"],
"license": "GPL-2.0", "license": "GPL-2.0",

View File

@@ -69,7 +69,6 @@ class render_helper
$this->db = $db; $this->db = $db;
$this->cache = $cache; $this->cache = $cache;
$this->request = $request; $this->request = $request;
$this->phpbb_root_path = $phpbb_root_path; $this->phpbb_root_path = $phpbb_root_path;
$this->phpEx = $phpEx; $this->phpEx = $phpEx;
$this->table_prefix = $table_prefix; $this->table_prefix = $table_prefix;
@@ -417,7 +416,10 @@ class render_helper
$rows = $this->db->sql_fetchrowset($result); $rows = $this->db->sql_fetchrowset($result);
$this->db->sql_freeresult($result); $this->db->sql_freeresult($result);
// Reverse the array wanting messages appear in reverse // Reverse the array wanting messages appear in reverse
if($this->config['mchat_message_top'])
{
$rows = array_reverse($rows); $rows = array_reverse($rows);
}
foreach($rows as $row) foreach($rows as $row)
{ {
@@ -534,7 +536,7 @@ class render_helper
} }
// Reguest... // Reguest...
$message = utf8_normalize_nfc(request_var('message', '', true)); $message = utf8_ucfirst(utf8_normalize_nfc(request_var('message', '', true)));
// must have something other than bbcode in the message // must have something other than bbcode in the message
if (empty($mchatregex)) if (empty($mchatregex))
@@ -956,7 +958,10 @@ class render_helper
$rows = $this->db->sql_fetchrowset($result); $rows = $this->db->sql_fetchrowset($result);
$this->db->sql_freeresult($result); $this->db->sql_freeresult($result);
if($this->config['mchat_message_top'])
{
$rows = array_reverse($rows, true); $rows = array_reverse($rows, true);
}
foreach($rows as $row) foreach($rows as $row)
{ {
@@ -1098,6 +1103,7 @@ class render_helper
'MCHAT_ALLOW_IP' => $mchat_ip, 'MCHAT_ALLOW_IP' => $mchat_ip,
'MCHAT_NOMESSAGE_MODE' => $mchat_no_message, 'MCHAT_NOMESSAGE_MODE' => $mchat_no_message,
'MCHAT_ALLOW_BBCODES' => ($mchat_allow_bbcode && $this->config['allow_bbcode']) ? true : false, 'MCHAT_ALLOW_BBCODES' => ($mchat_allow_bbcode && $this->config['allow_bbcode']) ? true : false,
'MCHAT_MESSAGE_TOP' => $this->config['mchat_message_top'] ? true : false,
'MCHAT_ENABLE' => $this->config['mchat_enable'], 'MCHAT_ENABLE' => $this->config['mchat_enable'],
'MCHAT_ARCHIVE_URL' => $this->helper->route('dmzx_mchat_controller', array('mode' => 'archive')), 'MCHAT_ARCHIVE_URL' => $this->helper->route('dmzx_mchat_controller', array('mode' => 'archive')),
'MCHAT_CUSTOM_PAGE' => $mchat_custom_page, 'MCHAT_CUSTOM_PAGE' => $mchat_custom_page,

View File

@@ -151,7 +151,7 @@ class listener implements EventSubscriberInterface
} }
// Data... // 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] in [url=' . generate_board_url() . '/viewforum.' . $this->phpEx . '?f=' . $event['forum_id'] . ']' . $event['post_data']['forum_name'] . ' Section[/url] '); $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'] . ' Section[/url] ');
$uid = $bitfield = $options = ''; // will be modified by generate_text_for_storage $uid = $bitfield = $options = ''; // will be modified by generate_text_for_storage
generate_text_for_storage($message, $uid, $bitfield, $options, true, false, false); generate_text_for_storage($message, $uid, $bitfield, $options, true, false, false);

View File

@@ -40,6 +40,7 @@ $lang = array_merge($lang, array(
'MCHAT_TITLE' => 'Mini-Chat', 'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_ADD' => 'Senden', 'MCHAT_ADD' => 'Senden',
'MCHAT_IN' => 'In',
'MCHAT_ANNOUNCEMENT' => 'Ankündigen', 'MCHAT_ANNOUNCEMENT' => 'Ankündigen',
'MCHAT_ARCHIVE' => 'Archiv', 'MCHAT_ARCHIVE' => 'Archiv',
'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archiv', 'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archiv',

View File

@@ -115,6 +115,10 @@ $lang = array_merge($lang, array(
'MCHAT_STATS' => 'Wer ist im mChat?', 'MCHAT_STATS' => 'Wer ist im mChat?',
'MCHAT_STATS_INDEX' => 'Anzeige auf dem Index', 'MCHAT_STATS_INDEX' => 'Anzeige auf dem Index',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Zeigt auf dem Index an wer im Mini-Chat ist.', 'MCHAT_STATS_INDEX_EXPLAIN' => 'Zeigt auf dem Index an wer im Mini-Chat ist.',
'MCHAT_MESSAGE_TOP' => 'Keep message on Bottom / Top',
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'This will post the message bottom or top in the chat message area.',
'MCHAT_BOTTOM' => 'Bottom',
'MCHAT_TOP' => 'Top',
'MCHAT_MESSAGES' => 'Nachrichten-Einstellungen', 'MCHAT_MESSAGES' => 'Nachrichten-Einstellungen',
'MCHAT_PAUSE_ON_INPUT' => 'Den Chat während einer Nachrichteneingabe nicht aktualisieren', '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.', 'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Falls JA eingestellt ist, ist das automatische Aktualisieren während der Eingabe einer Nachricht deaktiviert.',

View File

@@ -40,6 +40,7 @@ $lang = array_merge($lang, array(
'MCHAT_TITLE' => 'Mini-Chat', 'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_ADD' => 'Send', 'MCHAT_ADD' => 'Send',
'MCHAT_IN' => 'In',
'MCHAT_ANNOUNCEMENT' => 'Announcement', 'MCHAT_ANNOUNCEMENT' => 'Announcement',
'MCHAT_ARCHIVE' => 'Archive', 'MCHAT_ARCHIVE' => 'Archive',
'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archive', 'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archive',
@@ -134,4 +135,7 @@ $lang = array_merge($lang, array(
'MCHAT_SEND_PM' => 'Send Private Message', 'MCHAT_SEND_PM' => 'Send Private Message',
'MCHAT_PM' => '(PM)', 'MCHAT_PM' => '(PM)',
'MORE_SMILIES' => 'More Smilies', 'MORE_SMILIES' => 'More Smilies',
));
//Cusome edits
'REPLY_WITH_LIKE' =>'Like This Post',
));

View File

@@ -115,6 +115,10 @@ $lang = array_merge($lang, array(
'MCHAT_STATS' => 'Whois Chatting', 'MCHAT_STATS' => 'Whois Chatting',
'MCHAT_STATS_INDEX' => 'Stats on Index', 'MCHAT_STATS_INDEX' => 'Stats on Index',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Show who is chatting with in the stats section of the forum', 'MCHAT_STATS_INDEX_EXPLAIN' => 'Show who is chatting with in the stats section of the forum',
'MCHAT_MESSAGE_TOP' => 'Keep message on Bottom / Top',
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'This will post the message bottom or top in the chat message area.',
'MCHAT_BOTTOM' => 'Bottom',
'MCHAT_TOP' => 'Top',
'MCHAT_MESSAGES' => 'Message Settings', 'MCHAT_MESSAGES' => 'Message Settings',
'MCHAT_PAUSE_ON_INPUT' => 'Pause on input', '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', 'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'If set Yes, then the chat will not autoupdate upon a user entering a message in the input area',

View File

@@ -40,6 +40,7 @@ $lang = array_merge($lang, array(
'MCHAT_TITLE' => 'Mini-Chat', 'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_ADD' => 'Envoyer', 'MCHAT_ADD' => 'Envoyer',
'MCHAT_IN' => 'In',
'MCHAT_ANNOUNCEMENT' => 'Annonce', 'MCHAT_ANNOUNCEMENT' => 'Annonce',
'MCHAT_ARCHIVE' => 'Archives', 'MCHAT_ARCHIVE' => 'Archives',
'MCHAT_ARCHIVE_PAGE' => 'Archives du mini-chat', 'MCHAT_ARCHIVE_PAGE' => 'Archives du mini-chat',

View File

@@ -115,6 +115,10 @@ $lang = array_merge($lang, array(
'MCHAT_STATS' => 'Qui discute ?', 'MCHAT_STATS' => 'Qui discute ?',
'MCHAT_STATS_INDEX' => 'Statistiques sur lindex', 'MCHAT_STATS_INDEX' => 'Statistiques sur lindex',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Affiche les membres qui discutent dans les statistiques du forum.', 'MCHAT_STATS_INDEX_EXPLAIN' => 'Affiche les membres qui discutent dans les statistiques du forum.',
'MCHAT_MESSAGE_TOP' => 'Keep message on Bottom / Top',
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'This will post the message bottom or top in the chat message area.',
'MCHAT_BOTTOM' => 'Bottom',
'MCHAT_TOP' => 'Top',
'MCHAT_MESSAGES' => 'Paramètres des messages', 'MCHAT_MESSAGES' => 'Paramètres des messages',
'MCHAT_PAUSE_ON_INPUT' => 'Pause sur la saisie', '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 lutilisateur rédige un message dans la zone de saisie.', 'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Si activée, le mini-chat ne sera pas mis à jour automatiquement lorsque lutilisateur rédige un message dans la zone de saisie.',

View File

@@ -40,6 +40,7 @@ $lang = array_merge($lang, array(
'MCHAT_TITLE' => 'Mini-Chat', 'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_ADD' => 'Invia', 'MCHAT_ADD' => 'Invia',
'MCHAT_IN' => 'In',
'MCHAT_ANNOUNCEMENT' => 'Announcio', 'MCHAT_ANNOUNCEMENT' => 'Announcio',
'MCHAT_ARCHIVE' => 'Archivio', 'MCHAT_ARCHIVE' => 'Archivio',
'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archivio', 'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archivio',

View File

@@ -115,6 +115,10 @@ $lang = array_merge($lang, array(
'MCHAT_STATS' => 'Chat Whois', 'MCHAT_STATS' => 'Chat Whois',
'MCHAT_STATS_INDEX' => 'Statistiche Index', 'MCHAT_STATS_INDEX' => 'Statistiche Index',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Mostra chi sta chattando nella sezione statistiche del forum', 'MCHAT_STATS_INDEX_EXPLAIN' => 'Mostra chi sta chattando nella sezione statistiche del forum',
'MCHAT_MESSAGE_TOP' => 'Keep message on Bottom / Top',
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'This will post the message bottom or top in the chat message area.',
'MCHAT_BOTTOM' => 'Bottom',
'MCHAT_TOP' => 'Top',
'MCHAT_MESSAGES' => 'Opzioni Messaggi', 'MCHAT_MESSAGES' => 'Opzioni Messaggi',
'MCHAT_PAUSE_ON_INPUT' => 'Pausa in ingresso', 'MCHAT_PAUSE_ON_INPUT' => 'Pausa in ingresso',
'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Se impostato Sì, allora la chat non verrà aggiornata automaticamente se un utente inserisce un messaggio in area di immissione', 'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Se impostato Sì, allora la chat non verrà aggiornata automaticamente se un utente inserisce un messaggio in area di immissione',

View File

@@ -40,6 +40,7 @@ $lang = array_merge($lang, array(
'MCHAT_TITLE' => 'Mini-Chat', 'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_ADD' => 'Versturen', 'MCHAT_ADD' => 'Versturen',
'MCHAT_IN' => 'In',
'MCHAT_ANNOUNCEMENT' => 'Aankondiging', 'MCHAT_ANNOUNCEMENT' => 'Aankondiging',
'MCHAT_ARCHIVE' => 'Archief', 'MCHAT_ARCHIVE' => 'Archief',
'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archief', 'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archief',

View File

@@ -115,6 +115,10 @@ $lang = array_merge($lang, array(
'MCHAT_STATS' => 'Wie is aan het chatten', 'MCHAT_STATS' => 'Wie is aan het chatten',
'MCHAT_STATS_INDEX' => 'Statistieken op de Index pagina', 'MCHAT_STATS_INDEX' => 'Statistieken op de Index pagina',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Laat zien wie aan het chatten is in de statistieken sectie op het forum', 'MCHAT_STATS_INDEX_EXPLAIN' => 'Laat zien wie aan het chatten is in de statistieken sectie op het forum',
'MCHAT_MESSAGE_TOP' => 'Keep message on Bottom / Top',
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'This will post the message bottom or top in the chat message area.',
'MCHAT_BOTTOM' => 'Bottom',
'MCHAT_TOP' => 'Top',
'MCHAT_MESSAGES' => 'Berichten instellingen', 'MCHAT_MESSAGES' => 'Berichten instellingen',
'MCHAT_PAUSE_ON_INPUT' => 'Pauze op eventuele inactiviteit van mChat', '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', 'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Stel je ja in, dan wordt mChat niet automatisch vernieuwd, todat een gebruiker een bericht plaatst in mChat',

View File

@@ -40,6 +40,7 @@ $lang = array_merge($lang, array(
'MCHAT_TITLE' => 'Mini-Chat', 'MCHAT_TITLE' => 'Mini-Chat',
'MCHAT_ADD' => 'Wyślij', 'MCHAT_ADD' => 'Wyślij',
'MCHAT_IN' => 'In',
'MCHAT_ANNOUNCEMENT' => 'Ogłoszenie', 'MCHAT_ANNOUNCEMENT' => 'Ogłoszenie',
'MCHAT_ARCHIVE' => 'Archiwum', 'MCHAT_ARCHIVE' => 'Archiwum',
'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archiwum', 'MCHAT_ARCHIVE_PAGE' => 'Mini-Chat Archiwum',

View File

@@ -115,6 +115,10 @@ $lang = array_merge($lang, array(
'MCHAT_STATS' => 'Kto czatuje ?', 'MCHAT_STATS' => 'Kto czatuje ?',
'MCHAT_STATS_INDEX' => 'Statystyki na stronie głównej', 'MCHAT_STATS_INDEX' => 'Statystyki na stronie głównej',
'MCHAT_STATS_INDEX_EXPLAIN' => 'Pokaż kto korzysta z mChat w dziale statystyki na stronie głównej', 'MCHAT_STATS_INDEX_EXPLAIN' => 'Pokaż kto korzysta z mChat w dziale statystyki na stronie głównej',
'MCHAT_MESSAGE_TOP' => 'Keep message on Bottom / Top',
'MCHAT_MESSAGE_TOP_EXPLAIN' => 'This will post the message bottom or top in the chat message area.',
'MCHAT_BOTTOM' => 'Bottom',
'MCHAT_TOP' => 'Top',
'MCHAT_MESSAGES' => 'Ustawienia wiadomości', 'MCHAT_MESSAGES' => 'Ustawienia wiadomości',
'MCHAT_PAUSE_ON_INPUT' => 'Auto-aktuaizacja podczas pisania wiadomości', '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ść', 'MCHAT_PAUSE_ON_INPUT_EXPLAIN' => 'Zaznacz TAK aby nie auto-aktualizować mChatu gdy użytkownik pisze wiadomość',

View File

@@ -23,8 +23,9 @@ class mchat_schema extends \phpbb\db\migration\migration
array('config.add', array('mchat_new_posts_reply', false)), array('config.add', array('mchat_new_posts_reply', false)),
array('config.add', array('mchat_new_posts_edit', false)), array('config.add', array('mchat_new_posts_edit', false)),
array('config.add', array('mchat_new_posts_quote', false)), 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_stats_index', false)),
array('config.add', array('mchat_version','0.0.11')), array('config.add', array('mchat_version','0.0.12')),
array('permission.add', array('u_mchat_use')), array('permission.add', array('u_mchat_use')),
array('permission.add', array('u_mchat_view')), array('permission.add', array('u_mchat_view')),

View File

@@ -235,7 +235,7 @@ var mChat={
}, },
edit:function(id){ edit:function(id){
var message=$jQ('#edit'+id).val(); var message=$jQ('#edit'+id).val();
apprise(mChatEditInfo + ' (Shift and Enter for new line)',{ apprise(mChatEditInfo,{
'textarea':message, 'textarea':message,
'animate':true, 'animate':true,
'position':200, 'position':200,

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@
</div> </div>
<div> <div>
<span style="float:left;"><!-- IF not MCHAT_ARCHIVE_MODE and MCHAT_ADD_MESSAGE --><!-- IF MCHAT_ALLOW_BBCODES --><!-- IF mchatrow.MCHAT_USERNAME_COLOR --><a class="mChatScriptLink" href="#" onclick="insert_text('&#64;&nbsp;[b][color={mchatrow.MCHAT_USERNAME_COLOR}]{mchatrow.MCHAT_USERNAME}[/color][/b], ', false);return false;" title="{L_MCHAT_RESPOND}"><span style="color: {mchatrow.MCHAT_USERNAME_COLOR}"><strong>&#64;</strong></span></a><!-- ELSE --> <a href="#" class="mChatScriptLink" onclick="insert_text('&#64;&nbsp;[b]{mchatrow.MCHAT_USERNAME}[/b], ', false);return false;" title="{L_MCHAT_RESPOND}"><strong>&#64;</strong></a><!-- ENDIF --><!-- ELSE --> <a href="#" class="mChatScriptLink" onclick="insert_text('&#64;&nbsp;{mchatrow.MCHAT_USERNAME}, ', false);return false;" title="{L_MCHAT_RESPOND}">&#64;</a><!-- ENDIF -->&nbsp;<!-- ENDIF -->{mchatrow.MCHAT_USERNAME_FULL}&nbsp;<!-- IF mchatrow.U_USER_ID and mchatrow.BOT_USER_ID --><a href="{mchatrow.U_USER_ID}" title="{L_MCHAT_SEND_PM}">{L_MCHAT_PM}</a><!-- ENDIF --> - {mchatrow.MCHAT_TIME}</span> <span style="float:left;"><!-- IF not MCHAT_ARCHIVE_MODE and MCHAT_ADD_MESSAGE --><!-- IF MCHAT_ALLOW_BBCODES --><!-- IF mchatrow.MCHAT_USERNAME_COLOR --><a class="mChatScriptLink" href="#" onclick="insert_text('&#64;&nbsp;[b][color={mchatrow.MCHAT_USERNAME_COLOR}]{mchatrow.MCHAT_USERNAME}[/color][/b], ', false);return false;" title="{L_MCHAT_RESPOND}"><span style="color: {mchatrow.MCHAT_USERNAME_COLOR}"><strong>&#64;</strong></span></a><!-- ELSE --> <a href="#" class="mChatScriptLink" onclick="insert_text('&#64;&nbsp;[b]{mchatrow.MCHAT_USERNAME}[/b], ', false);return false;" title="{L_MCHAT_RESPOND}"><strong>&#64;</strong></a><!-- ENDIF --><!-- ELSE --> <a href="#" class="mChatScriptLink" onclick="insert_text('&#64;&nbsp;{mchatrow.MCHAT_USERNAME}, ', false);return false;" title="{L_MCHAT_RESPOND}">&#64;</a><!-- ENDIF -->&nbsp;<!-- ENDIF -->{mchatrow.MCHAT_USERNAME_FULL}&nbsp;<!-- IF mchatrow.U_USER_ID and mchatrow.BOT_USER_ID --><a href="{mchatrow.U_USER_ID}" title="{L_MCHAT_SEND_PM}">{L_MCHAT_PM}</a><!-- ENDIF --> - {mchatrow.MCHAT_TIME}</span>
<span style="float:right;"><!-- IF mchatrow.U_USER_ID and mchatrow.BOT_USER_ID --><a href="#" onclick="insert_quote('{mchatrow.MCHAT_USERNAME}','{mchatrow.MCHAT_MESSAGE_EDIT}'); return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/quota.png" alt="{L_REPLY_WITH_QUOTE}" title="{L_REPLY_WITH_QUOTE}" class="mChatImage" /></a><!-- ENDIF -->&nbsp;<!-- IF MCHAT_ALLOW_IP --><a href="{mchatrow.MCHAT_U_WHOIS}" onclick="popup(this.href, 750, 500); return false;"><img src="{BOARD_URL}ext/dmzx/mchat/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="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" class="mChatImage" /></a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_EDIT --> <a href="#" onclick="mChat.edit('{mchatrow.MCHAT_MESSAGE_ID}');return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" class="mChatImage" /></a><!-- ENDIF --><input type="hidden" id="edit{mchatrow.MCHAT_MESSAGE_ID}" value="{mchatrow.MCHAT_MESSAGE_EDIT}" /><!-- IF mchatrow.MCHAT_ALLOW_DEL --> <a href="#" onclick="mChat.del('{mchatrow.MCHAT_MESSAGE_ID}');return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" class="mChatImage" /></a><!-- ENDIF --></span><br /><div class="avatarMessage mChatMessage">{mchatrow.MCHAT_MESSAGE}</div> <span style="float:right;"><!-- IF mchatrow.U_USER_ID and mchatrow.BOT_USER_ID --><a href="#" onclick="insert_like('{mchatrow.MCHAT_USERNAME}','{mchatrow.MCHAT_MESSAGE_EDIT}'); return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/like.png" alt="{L_REPLY_WITH_LIKE}" title="{L_REPLY_WITH_LIKE}" class="mChatImage" /></a><!-- ENDIF --> &nbsp;<!-- IF mchatrow.U_USER_ID and mchatrow.BOT_USER_ID --><a href="#" onclick="insert_quote('{mchatrow.MCHAT_USERNAME}','{mchatrow.MCHAT_MESSAGE_EDIT}'); return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/quota.png" alt="{L_REPLY_WITH_QUOTE}" title="{L_REPLY_WITH_QUOTE}" class="mChatImage" /></a><!-- ENDIF -->&nbsp;<!-- IF MCHAT_ALLOW_IP --><a href="{mchatrow.MCHAT_U_WHOIS}" onclick="popup(this.href, 750, 500); return false;"><img src="{BOARD_URL}ext/dmzx/mchat/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="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" class="mChatImage" /></a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_EDIT --> <a href="#" onclick="mChat.edit('{mchatrow.MCHAT_MESSAGE_ID}');return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" class="mChatImage" /></a><!-- ENDIF --><input type="hidden" id="edit{mchatrow.MCHAT_MESSAGE_ID}" value="{mchatrow.MCHAT_MESSAGE_EDIT}" /><!-- IF mchatrow.MCHAT_ALLOW_DEL --> <a href="#" onclick="mChat.del('{mchatrow.MCHAT_MESSAGE_ID}');return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" class="mChatImage" /></a><!-- ENDIF --></span><br /><div class="avatarMessage mChatMessage">{mchatrow.MCHAT_MESSAGE}</div>
</div> </div>
</div> </div>
<!-- END mchatrow --> <!-- END mchatrow -->

View File

@@ -5,7 +5,11 @@
<!-- INCLUDEJS editor.js --> <!-- INCLUDEJS editor.js -->
<!-- INCLUDEJS jquery.titlealert.min.js --> <!-- INCLUDEJS jquery.titlealert.min.js -->
<!-- INCLUDEJS jquery_cookie_mini.js --> <!-- INCLUDEJS jquery_cookie_mini.js -->
<!-- IF MCHAT_MESSAGE_TOP -->
<!-- INCLUDEJS mchat_ajax_mini.js --> <!-- INCLUDEJS mchat_ajax_mini.js -->
<!-- ELSE -->
<!-- INCLUDEJS mchat_ajax_mini_top.js -->
<!-- ENDIF -->
<!-- INCLUDEJS jquery-1.8.3.min.js --> <!-- INCLUDEJS jquery-1.8.3.min.js -->
<!-- INCLUDEJS jquery.maxlength.min.js --> <!-- INCLUDEJS jquery.maxlength.min.js -->
@@ -112,6 +116,26 @@
document.getElementById('mChatMessage').value += '[quote="' + username + '"]' + ' ' + quote + '[/quote]'; document.getElementById('mChatMessage').value += '[quote="' + username + '"]' + ' ' + quote + '[/quote]';
document.getElementById('mChatMessage').focus(); document.getElementById('mChatMessage').focus();
} }
function insert_like(user,text)
{
var quote = decodeURIComponent(text.replace(/\+/g, " "));
quote = quote.replace(/&lt;/g, "<");
quote = quote.replace(/&gt;/g, ">");
quote = quote.replace(/&#58;/g, ':');
quote = quote.replace(/&#46;/g, '.');
quote = quote.replace(/&amp;/g, '&');
quote = quote.replace(/&quot;/g, '"');
var username = decodeURIComponent(user.replace(/\+/g, " "));
username = username.replace(/&lt;/g, "<");
username = username.replace(/&gt;/g, ">");
username = username.replace(/&#58;/g, ':');
username = username.replace(/&#46;/g, '.');
username = username.replace(/&amp;/g, '&');
username = username.replace(/&quot;/g, '"');
document.getElementById('mChatMessage').value += 'Like\'s this post.[quote="' + username + '"]' + ' ' + quote + '[/quote]';
document.getElementById('mChatMessage').focus();
}
// ]]> // ]]>
</script> </script>
<!-- IF not MCHAT_ARCHIVE_MODE --> <!-- IF not MCHAT_ARCHIVE_MODE -->