Version 2.0.0-RC7

This commit is contained in:
dmzx
2016-10-16 17:25:31 +02:00
parent 233dc89a8a
commit 159d1d25b8
59 changed files with 1096 additions and 493 deletions

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View File

@@ -1,10 +1,10 @@
/**
*
* @package phpBB Extension - mChat
* @copyright (c) 2009 By Shapoval Andrey Vladimirovich (AllCity) ~ http://allcity.net.ru/
* @copyright (c) 2013 By Rich McGirr (RMcGirr83) http://rmcgirr83.org
* @copyright (c) 2015 By dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 By kasimi
* @copyright (c) 2009 Shapoval Andrey Vladimirovich (AllCity) ~ http://allcity.net.ru/
* @copyright (c) 2013 Rich McGirr (RMcGirr83) http://rmcgirr83.org
* @copyright (c) 2015 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi - mail@kasimi.net
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
@@ -105,9 +105,7 @@ jQuery(function($) {
deferred.reject(data.xhr, data.status, mChat.lang.parserErr);
}
}
}).fail(function(xhr, status, error) {
deferred.reject(xhr, status, error);
});
}).fail(deferred.reject);
return deferred.promise().fail(function(xhr, textStatus, errorThrown) {
if (mChat.pageIsUnloading) {
return;
@@ -120,10 +118,10 @@ jQuery(function($) {
xhr: xhr,
textStatus: textStatus,
errorThrown: errorThrown,
updateSession: function(xhr) {
if (xhr.status == 403) {
updateSession: function() {
if (this.xhr.status == 403) {
mChat.endSession(true);
} else if (xhr.status == 400) {
} else if (this.xhr.status == 400) {
mChat.resetSession();
}
}
@@ -134,12 +132,14 @@ jQuery(function($) {
mChat.cached('status-error').show();
var responseText;
try {
responseText = xhr.responseJSON.message || errorThrown;
responseText = data.xhr.responseJSON.message || data.errorThrown;
} catch (e) {
responseText = errorThrown;
responseText = data.errorThrown;
}
phpbb.alert(mChat.lang.err, responseText);
data.updateSession(data.xhr);
if (responseText && responseText !== 'timeout') {
phpbb.alert(mChat.lang.err, responseText);
}
data.updateSession();
});
},
sound: function(file) {
@@ -169,7 +169,7 @@ jQuery(function($) {
},
toggle: function(name) {
var $elem = mChat.cached(name);
$elem.stop().slideToggle('fast', function() {
$elem.stop().slideToggle(200, function() {
if ($elem.is(':visible')) {
localStorage.setItem(mChat.cookie + 'mchat_show_' + name, 'yes');
} else {
@@ -218,17 +218,11 @@ jQuery(function($) {
if (color && inputValue.indexOf('[color=') === -1) {
inputValue = '[color=#' + color + '] ' + inputValue + ' [/color]';
}
mChat.cached('input').val('');
if (mChat.showCharCount) {
mChat.updateCharCount();
}
mChat.cached('input').val('').focus();
mChat.refresh(inputValue).done(function() {
mChat.resetSession();
}).fail(function() {
mChat.cached('input').val(originalInputValue);
if (mChat.showCharCount) {
mChat.updateCharCount();
}
}).always(function() {
mChat.cached('add').prop('disabled', false);
setTimeout(function() {
@@ -348,26 +342,25 @@ jQuery(function($) {
mChat.cached('messages').find('.mchat-no-messages').remove();
$messages.reverse(mChat.messageTop).hide().each(function(i) {
var $message = $(this);
var data = {
var dataAddMessageBefore = {
message: $message,
delay: mChat.refreshInterval ? 400 : 0,
abort: $.inArray($message.data('mchat-id'), mChat.messageIds) !== -1,
playSound: playSound
};
$(mChat).trigger('mchat_add_message_before', [data]);
if (data.abort) {
$(mChat).trigger('mchat_add_message_before', [dataAddMessageBefore]);
if (dataAddMessageBefore.abort) {
return;
}
if (data.playSound) {
if (dataAddMessageBefore.playSound) {
mChat.sound('add');
mChat.titleAlert();
playSound = false;
}
mChat.messageIds.push($message.data('mchat-id'));
setTimeout(function() {
var $container = mChat.cached('messages');
var data = {
container: $container,
var dataAddMessageAnimateBefore = {
container: mChat.cached('messages'),
message: $message,
add: function() {
if (mChat.messageTop) {
@@ -377,26 +370,38 @@ jQuery(function($) {
}
},
show: function() {
var scrollTop, scrollHeight = mChat.messageTop ? 0 : $container.get(0).scrollHeight;
if (mChat.messageTop && (scrollTop = this.container.scrollTop()) > 0) {
this.message.show();
this.container.scrollTop(scrollTop + this.message.outerHeight());
var container = this.container;
var scrollTop = container.scrollTop();
var scrollLeeway = 20;
if (mChat.messageTop && scrollTop <= scrollLeeway || !mChat.messageTop && scrollTop >= container.get(0).scrollHeight - container.height() - scrollLeeway) {
var animateOptions = {
duration: dataAddMessageBefore.delay - 10,
easing: 'swing'
};
this.message.slideDown(animateOptions);
if (mChat.messageTop) {
container.animate({scrollTop: 0}, animateOptions);
} else {
(animateOptions.complete = function() {
var scrollHeight = container.get(0).scrollHeight;
if (container.scrollTop() + container.height() < scrollHeight) {
container.animate({scrollTop: scrollHeight}, animateOptions);
}
})();
}
} else {
this.message.css('opacity', 0).slideDown('fast').animate({opacity: 1}, {duration: 'fast', queue: false});
}
if (!mChat.messageTop && this.container.scrollTop() >= scrollHeight - this.container.height()) {
this.container.animate({
scrollTop: scrollHeight,
easing: 'swing',
duration: 'slow'
});
this.message.show();
if (mChat.messageTop) {
this.container.scrollTop(scrollTop + this.message.outerHeight());
}
}
this.message.addClass('mchat-message-flash');
}
};
$(mChat).trigger('mchat_add_message_animate_before', [data]);
data.add();
data.show();
}, i * data.delay);
$(mChat).trigger('mchat_add_message_animate_before', [dataAddMessageAnimateBefore]);
dataAddMessageAnimateBefore.add();
dataAddMessageAnimateBefore.show();
}, i * dataAddMessageBefore.delay);
if (mChat.editDeleteLimit && $message.data('mchat-edit-delete-limit') && $message.find('[data-mchat-action="edit"], [data-mchat-action="del"]').length > 0) {
var id = $message.prop('id');
setTimeout(function() {
@@ -549,7 +554,7 @@ jQuery(function($) {
updateCharCount: function() {
var count = mChat.cached('input').val().length;
var charCount = mChat.lang.charCount.format({current: count, max: mChat.mssgLngth});
var $elem = mChat.cached('character-count').html(charCount).toggleClass('hidden', count === 0);
var $elem = mChat.cached('character-count').html(charCount).toggleClass('invisible', count === 0);
if (mChat.mssgLngth) {
$elem.toggleClass('error', count > mChat.mssgLngth);
}
@@ -608,7 +613,9 @@ jQuery(function($) {
mChat.resetSession();
if (!mChat.messageTop) {
mChat.cached('messages').animate({scrollTop: mChat.cached('messages')[0].scrollHeight, easing: 'swing', duration: 'slow'});
setTimeout(function() {
mChat.cached('messages').scrollTop(mChat.cached('messages')[0].scrollHeight);
}, 1);
}
mChat.cached('user-sound').prop('checked', mChat.playSound && !localStorage.getItem(mChat.cookie + 'mchat_no_sound')).change(function() {
@@ -661,6 +668,11 @@ jQuery(function($) {
if (mChat.showCharCount) {
mChat.cached('form').on('input', mChat.updateCharCount);
mChat.cached('input').on('focus', function() {
setTimeout(function() {
mChat.updateCharCount();
}, 1);
});
}
mChat.cached('input').autogrow({

View File

@@ -2,9 +2,9 @@
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
<!-- ENDIF -->
<!-- INCLUDEJS javascript/jquery.autogrow-textarea.js -->
<!-- INCLUDEJS javascript/jquery.titlealert.min.js -->
<!-- INCLUDEJS javascript/mchat.js -->
<!-- INCLUDEJS @dmzx_mchat/javascript/jquery.autogrow-textarea.js -->
<!-- INCLUDEJS @dmzx_mchat/javascript/jquery.titlealert.min.js -->
<!-- INCLUDEJS @dmzx_mchat/javascript/mchat.js -->
<script type="text/javascript">
// <![CDATA[

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View File

@@ -0,0 +1,3 @@
<!-- IF MCHAT_INDEX and MCHAT_LOCATION -->
<!-- INCLUDE @dmzx_mchat/mchat_body.html -->
<!-- ENDIF -->

View File

@@ -0,0 +1 @@
<!-- Leave empty -->

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -26,3 +26,7 @@ ul.mchat-buttons > li {
#mchat-panel #st_editor_buttons {
display: block !important;
}
.mchat-footer label {
padding-left: 3px;
}

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View File

@@ -1 +1,3 @@
<!-- IF MCHAT_INDEX and MCHAT_LOCATION --><!-- INCLUDE mchat_body.html --><!-- ENDIF -->
<!-- IF MCHAT_INDEX and MCHAT_LOCATION -->
<!-- INCLUDE @dmzx_mchat/mchat_body.html -->
<!-- ENDIF -->

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -19,3 +19,8 @@
#mChat + .forabg .collapse-box a:before {
content: '';
}
@keyframes flash-message {
0% { background-color: rgba(255, 155, 0, .5); }
100% { background-color: #D8D8D8; }
}

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

View File

@@ -1,3 +0,0 @@
<!-- IF MCHAT_CUSTOM_INCLUDE -->
<!-- INCLUDE mchat_body.html -->
<!-- ENDIF -->

View File

@@ -1 +1,3 @@
<!-- IF MCHAT_INDEX and not MCHAT_LOCATION --><!-- INCLUDE mchat_body.html --><!-- ENDIF -->
<!-- IF MCHAT_INDEX and not MCHAT_LOCATION -->
<!-- INCLUDE @dmzx_mchat/mchat_body.html -->
<!-- ENDIF -->

View File

@@ -1 +1,3 @@
<!-- IF MCHAT_INDEX and MCHAT_LOCATION --><!-- INCLUDE mchat_body.html --><!-- ENDIF -->
<!-- IF MCHAT_INDEX and MCHAT_LOCATION -->
<!-- INCLUDE @dmzx_mchat/mchat_body.html -->
<!-- ENDIF -->

View File

@@ -1,3 +1,3 @@
<!-- IF MCHAT_CUSTOM_PAGE and MCHAT_NAVBAR_LINK -->
<!-- INCLUDE mchat_navlink.html -->
<!-- INCLUDE @dmzx_mchat/mchat_navlink.html -->
<!-- ENDIF -->

View File

@@ -0,0 +1,7 @@
<!-- IF not MCHAT_IS_ARCHIVE_PAGE -->
<style>
#mchat-messages {
height: <!-- IF MCHAT_IS_CUSTOM_PAGE -->{MCHAT_CUSTOM_HEIGHT}<!-- ELSE -->{MCHAT_INDEX_HEIGHT}<!-- ENDIF -->px;
}
</style>
<!-- ENDIF -->

View File

@@ -2,7 +2,19 @@
<!-- INCLUDE overall_header.html -->
<!-- ENDIF -->
<!-- INCLUDE mchat_script_data.html -->
<!-- EVENT dmzx_mchat_overall_header_after -->
<!-- EVENT dmzx_mchat_header_before -->
<!-- IF MCHAT_IS_CUSTOM_PAGE -->
<h2>{L_MCHAT_CUSTOM_PAGE}</h2>
<!-- ELSEIF MCHAT_IS_ARCHIVE_PAGE -->
<h2>{L_MCHAT_ARCHIVE_PAGE}</h2>
<!-- ENDIF -->
<!-- EVENT dmzx_mchat_header_after -->
<!-- INCLUDE @dmzx_mchat/mchat_script_data.html -->
<!-- IF MCHAT_IS_ARCHIVE_PAGE and (.pagination or MCHAT_TOTAL_MESSAGES) -->
<div class="action-bar bar-top">
@@ -30,7 +42,7 @@
<div class="inner">
<ul class="topiclist">
<li class="header">
<!-- INCLUDE mchat_header.html -->
<!-- INCLUDE @dmzx_mchat/mchat_header.html -->
<!-- IF MCHAT_IS_COLLAPSIBLE -->
<a href="{U_MCHAT_COLLAPSE_URL}"
class="collapse-btn collapse-<!-- IF S_MCHAT_HIDDEN -->show<!-- ELSE -->hide<!-- ENDIF --> mchat-collapse"
@@ -73,9 +85,9 @@
<!-- EVENT dmzx_mchat_messages_container_before -->
<ul id="mchat-messages" class="topiclist forums"<!-- IF not MCHAT_IS_ARCHIVE_PAGE --> style="height:<!-- IF MCHAT_IS_CUSTOM_PAGE -->{MCHAT_CUSTOM_HEIGHT}<!-- ELSE -->{MCHAT_INDEX_HEIGHT}<!-- ENDIF -->px"<!-- ENDIF -->>
<ul id="mchat-messages" class="topiclist forums">
<!-- IF .mchatrow -->
<!-- INCLUDE mchat_messages.html -->
<!-- INCLUDE @dmzx_mchat/mchat_messages.html -->
<!-- ELSE -->
<li class="row mchat-static mchat-no-messages">{L_MCHAT_NOMESSAGE}</li>
<!-- ENDIF -->
@@ -84,7 +96,7 @@
<!-- EVENT dmzx_mchat_messages_container_after -->
</div>
<!-- INCLUDE mchat_panel.html -->
<!-- INCLUDE @dmzx_mchat/mchat_panel.html -->
</div>
<!-- EVENT dmzx_mchat_body_after -->
@@ -110,7 +122,7 @@
<!-- IF MCHAT_IS_CUSTOM_PAGE and MCHAT_WHOIS_REFRESH -->
<h3>{L_MCHAT_WHO_IS_CHATTING}</h3>
<!-- INCLUDE mchat_whois.html -->
<!-- INCLUDE @dmzx_mchat/mchat_whois.html -->
<div id="mchat-refresh">
<span id="mchat-refresh-explain">{MCHAT_WHOIS_REFRESH_EXPLAIN}</span>
<span id="mchat-refresh-pending" class="hidden">{L_MCHAT_REFRESHING}</span>
@@ -123,6 +135,8 @@
</div>
<!-- ENDIF -->
<!-- EVENT dmzx_mchat_overall_footer_before -->
<!-- IF MCHAT_IS_ARCHIVE_PAGE or MCHAT_IS_CUSTOM_PAGE -->
<!-- INCLUDE overall_footer.html -->
<!-- ENDIF -->

View File

@@ -11,7 +11,7 @@
</div>
<!-- ENDIF -->
<div class="mchat-message-wrapper">
<!-- INCLUDE mchat_messages_icons.html -->
<!-- INCLUDE @dmzx_mchat/mchat_messages_icons.html -->
<div class="mchat-message-header">{mchatrow.MCHAT_USERNAME_FULL} &bull; <span class="mchat-time" title="{mchatrow.MCHAT_DATETIME}"<!-- IF mchatrow.MCHAT_MINUTES_AGO != -1 --> data-mchat-minutes-ago="{mchatrow.MCHAT_MINUTES_AGO}" data-mchat-relative-update="{mchatrow.MCHAT_RELATIVE_UPDATE}"<!-- ENDIF -->>{mchatrow.MCHAT_TIME}</span></div>
<div class="mchat-text">{mchatrow.MCHAT_MESSAGE}</div>
</div>

View File

@@ -1,20 +1,25 @@
<!-- EVENT dmzx_mchat_messages_icons_before -->
<!-- IF not S_IS_BOT -->
<!-- DEFINE $MCHAT_ALLOW_MENTION = MCHAT_ALLOW_USE and not mchatrow.MCHAT_IS_POSTER and not MCHAT_IS_ARCHIVE_PAGE -->
<!-- DEFINE $MCHAT_ALLOW_QUOTE = MCHAT_ALLOW_USE and S_BBCODE_ALLOWED and MCHAT_ALLOW_QUOTE and not MCHAT_IS_ARCHIVE_PAGE -->
<!-- DEFINE $MCHAT_ALLOW_LIKE = MCHAT_ALLOW_USE and S_BBCODE_ALLOWED and MCHAT_ALLOW_LIKE and not MCHAT_IS_ARCHIVE_PAGE and not mchatrow.MCHAT_IS_POSTER -->
<!-- DEFINE $MCHAT_ALLOW_PM = MCHAT_ALLOW_PM and mchatrow.MCHAT_PM and mchatrow.U_VIEWPROFILE -->
<!-- DEFINE $MCHAT_ALLOW_IP = MCHAT_ALLOW_IP and TRUE -->
<!-- DEFINE $MCHAT_ALLOW_PERMISSIONS = MCHAT_ALLOW_PERMISSIONS and TRUE -->
<!-- DEFINE $MCHAT_ALLOW_EDIT = mchatrow.MCHAT_ALLOW_EDIT and not mchatrow.MCHAT_IS_NOTIFICATION -->
<!-- DEFINE $MCHAT_ALLOW_DEL = mchatrow.MCHAT_ALLOW_DEL -->
<!-- IF $MCHAT_ALLOW_MENTION or $MCHAT_ALLOW_QUOTE or $MCHAT_ALLOW_LIKE or $MCHAT_ALLOW_PM or MCHAT_ALLOW_IP or MCHAT_ALLOW_PERMISSIONS or $MCHAT_ALLOW_EDIT or $MCHAT_ALLOW_DEL -->
<!-- IF $MCHAT_ALLOW_MENTION or $MCHAT_ALLOW_QUOTE or $MCHAT_ALLOW_LIKE or $MCHAT_ALLOW_PM or MCHAT_ALLOW_IP or MCHAT_ALLOW_PERMISSIONS or $MCHAT_ALLOW_EDIT or $MCHAT_ALLOW_DEL or $MCHAT_ADD_CUSTOM_BUTTON -->
<ul class="mchat-buttons <!-- IF $MCHAT_USE_WHITE_MESSAGE_ICONS -->mchat-icons-white<!-- ELSE -->mchat-icons-black<!-- ENDIF -->">
<!-- EVENT dmzx_mchat_messages_icons_add_before -->
<!-- IF $MCHAT_ALLOW_MENTION --><li><a href="#" title="{L_MCHAT_RESPOND}" data-mchat-action="mention"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-mention<!-- ELSEIF IS_PHPBB32 -->fa fa-at<!-- ENDIF -->"><span>{L_MCHAT_RESPOND}</span></i></a></li><!-- ENDIF -->
<!-- IF $MCHAT_ALLOW_QUOTE --><li><a href="#" title="{L_REPLY_WITH_QUOTE}" data-mchat-action="quote"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-quote<!-- ELSEIF IS_PHPBB32 -->fa fa-quote-left<!-- ENDIF -->"><span>{L_REPLY_WITH_QUOTE}</span></i></a></li><!-- ENDIF -->
<!-- IF $MCHAT_ALLOW_LIKE --><li><a href="#" title="{L_MCHAT_LIKE}" data-mchat-action="like"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-like<!-- ELSEIF IS_PHPBB32 -->fa fa-thumbs-o-up<!-- ENDIF -->"><span>{L_MCHAT_LIKE}</span></i></a></li><!-- ENDIF -->
<!-- IF $MCHAT_ALLOW_PM --><li><a href="{mchatrow.MCHAT_PM}" title="{L_MCHAT_SEND_PM}"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-pm<!-- ELSEIF IS_PHPBB32 -->fa fa-envelope-o<!-- ENDIF -->"><span>{L_MCHAT_SEND_PM}</span></i></a></li><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_IP --><li><a href="{mchatrow.MCHAT_U_IP}" title="{mchatrow.MCHAT_WHOIS_USER}" data-mchat-action="ip"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-ip<!-- ELSEIF IS_PHPBB32 -->fa fa-wifi<!-- ENDIF -->"><span>{mchatrow.MCHAT_WHOIS_USER}</span></i></a></li><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_PERMISSIONS --><li><a href="{mchatrow.MCHAT_U_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-permissions<!-- ELSEIF IS_PHPBB32 -->fa fa-exclamation-triangle<!-- ENDIF -->"><span>{L_MCHAT_PERMISSIONS}</span></i></a></li><!-- ENDIF -->
<!-- IF $MCHAT_ALLOW_IP --><li><a href="{mchatrow.MCHAT_U_IP}" title="{mchatrow.MCHAT_WHOIS_USER}" data-mchat-action="ip"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-ip<!-- ELSEIF IS_PHPBB32 -->fa fa-wifi<!-- ENDIF -->"><span>{mchatrow.MCHAT_WHOIS_USER}</span></i></a></li><!-- ENDIF -->
<!-- IF $MCHAT_ALLOW_PERMISSIONS --><li><a href="{mchatrow.MCHAT_U_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-permissions<!-- ELSEIF IS_PHPBB32 -->fa fa-exclamation-triangle<!-- ENDIF -->"><span>{L_MCHAT_PERMISSIONS}</span></i></a></li><!-- ENDIF -->
<!-- IF $MCHAT_ALLOW_EDIT --><li><a href="#" title="{L_MCHAT_EDIT}" data-mchat-action="edit"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-edit<!-- ELSEIF IS_PHPBB32 -->fa fa-pencil<!-- ENDIF -->"><span>{L_MCHAT_EDIT}</span></i></a></li><!-- ENDIF -->
<!-- IF $MCHAT_ALLOW_DEL --><li><a href="#" title="{L_DELETE}" data-mchat-action="del"><i class="<!-- IF IS_PHPBB31 -->mchat-icon mchat-icon-delete<!-- ELSEIF IS_PHPBB32 -->fa fa-trash-o<!-- ENDIF -->"><span>{L_DELETE}</span></i></a></li><!-- ENDIF -->
<!-- EVENT dmzx_mchat_messages_icons_add_after -->
</ul>
<!-- ENDIF -->
<!-- ENDIF -->

View File

@@ -1,5 +1,6 @@
<li <!-- IF IS_PHPBB31 -->class="small-icon icon-mchat"<!-- ELSEIF IS_PHPBB32 -->data-last-responsive="true"<!-- ENDIF -->>
<li<!-- IF IS_PHPBB31 --> class="small-icon icon-mchat"<!-- ENDIF --> data-last-responsive="true">
<a href="{U_MCHAT}" title="{MCHAT_TITLE_HINT}" class="mchat-nav-link-title" role="menuitem">
<i<!-- IF IS_PHPBB32 --> class="icon fa fa-weixin"<!-- ENDIF --> aria-hidden="true"></i><span class="mchat-nav-link">{MCHAT_TITLE}</span>
<i<!-- IF IS_PHPBB32 --> class="icon fa fa-weixin"<!-- ENDIF --> aria-hidden="true"></i>
<span class="mchat-nav-link">{MCHAT_TITLE}</span>
</a>
</li>

View File

@@ -1,10 +1,10 @@
<div id="mchat-panel" class="panel cp-mini<!-- IF MCHAT_IS_ARCHIVE_PAGE --> hidden<!-- ENDIF -->">
<!-- IF MCHAT_IS_INDEX and MCHAT_WHOIS_REFRESH and MCHAT_WHOIS_INDEX -->
<!-- INCLUDE mchat_whois.html -->
<!-- INCLUDE @dmzx_mchat/mchat_whois.html -->
<!-- ENDIF -->
<!-- IF MCHAT_CHARACTER_COUNT and not MCHAT_IS_ARCHIVE_PAGE -->
<div id="mchat-character-count" class="hidden">{MCHAT_CHARACTER_COUNT}</div>
<div id="mchat-character-count" class="invisible">{MCHAT_CHARACTER_COUNT}</div>
<!-- ENDIF -->
<form id="mchat-form" name="postform" action="{U_MCHAT_CUSTOM_PAGE}" method="POST">
@@ -68,7 +68,7 @@
<span id="mchat-refresh-text">{MCHAT_REFRESH_YES}</span>
</li>
<!-- IF MCHAT_TIMEOUT --><li><span id="mchat-session">{MCHAT_SESSION_TIMELEFT}</span></li><!-- ENDIF -->
<!-- IF not MCHAT_SOUND_DISABLED --><li><label for="mchat-user-sound">{L_MCHAT_USESOUND} <input type="checkbox" id="mchat-user-sound"<!-- IF MCHAT_SOUND --> checked="checked"<!-- ENDIF --> /></label></li><!-- ENDIF -->
<!-- IF not MCHAT_SOUND_DISABLED --><li class="mchat-sound"><input type="checkbox" id="mchat-user-sound"<!-- IF MCHAT_SOUND --> checked="checked"<!-- ENDIF --> /><label for="mchat-user-sound">{L_MCHAT_USESOUND}</label></li><!-- ENDIF -->
<li><span class="mchat-copyright" title="{MCHAT_AUTHOR_NAMES}">&copy;</span></li>
</ul>
</div>

View File

@@ -15,6 +15,9 @@
<!-- IF MCHAT_AUTH_COUNT > 0 -->
<fieldset>
<!-- EVENT dmzx_mchat_ucp_index_before -->
<!-- IF MCHAT_INDEX_AUTH -->
<dl>
<dt><label for="user_mchat_index">{L_MCHAT_INDEX}{L_COLON}</label></dt>
@@ -51,7 +54,13 @@
</dd>
</dl>
<!-- ENDIF -->
<!-- EVENT dmzx_mchat_ucp_location_after -->
<hr />
<!-- EVENT dmzx_mchat_ucp_message_top_before -->
<!-- IF MCHAT_MESSAGE_TOP_AUTH -->
<dl>
<dt><label for="user_mchat_message_top">{L_MCHAT_MESSAGE_TOP}{L_COLON}</label><br /><span>{L_MCHAT_MESSAGE_TOP_EXPLAIN}</span></dt>
@@ -99,7 +108,7 @@
<!-- ENDIF -->
<!-- IF MCHAT_CHARACTER_COUNT_AUTH -->
<dl>
<dt><label for="user_mchat_character_count">{L_MCHAT_CHARACTER_COUNT}{L_COLON}</label></dt>
<dt><label for="user_mchat_character_count">{L_MCHAT_DISPLAY_CHARACTER_COUNT}{L_COLON}</label></dt>
<dd>
<label><input type="radio" name="user_mchat_character_count" value="1"<!-- IF MCHAT_CHARACTER_COUNT --> id="user_mchat_character_count" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" name="user_mchat_character_count" value="0"<!-- IF not MCHAT_CHARACTER_COUNT --> id="user_mchat_character_count" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
@@ -135,7 +144,13 @@
</dd>
</dl>
<!-- ENDIF -->
<!-- EVENT dmzx_mchat_ucp_relative_time_after -->
<hr />
<!-- EVENT dmzx_mchat_ucp_posts_before -->
<!-- IF MCHAT_POSTS_AUTH and MCHAT_POSTS_ENABLED_LANG -->
<dl>
<dt><label for="user_mchat_posts">{MCHAT_POSTS_ENABLED_LANG}{L_COLON}</label></dt>
@@ -145,6 +160,9 @@
</dd>
</dl>
<!-- ENDIF -->
<!-- EVENT dmzx_mchat_ucp_posts_after -->
</fieldset>
<!-- ENDIF -->
</div>

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -12,7 +12,7 @@
visibility: hidden;
}
#mChat + .inner li.header dd {
.mchat-wrapper li.header dd {
width: 0;
}
@@ -21,6 +21,10 @@
width: 100%;
}
#mchat-main {
position: relative;
}
.icon-mchat {
background-image: url("./images/icon_mchat.png");
}
@@ -51,27 +55,30 @@
overflow: hidden;
}
.mchat-message-flash {
animation-name: flash-message;
animation-duration: .4s;
animation-timing-function: ease-out;
}
@keyframes flash-message {
0% {
background-color: #FFD070;
opacity: 0;
}
100% {
background-color: transparent;
opacity: 1;
}
}
.mchat-avatar {
float: left;
width: 40px;
padding-right: 5px;
}
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) {
#mchat-body {
overflow: visible;
}
.mchat-buttons > li {
padding: 0 6px !important;
}
#mchat-input {
width: 95% !important;
margin: 5px 0 !important;
}
margin-right: 5px;
}
.mchat-avatar a, .mchat-avatar img {
@@ -154,6 +161,10 @@
font-weight: bold !important;
}
.mchat-text img {
max-width: 100%;
}
.mchat-text li {
display: list-item !important;
list-style-type: inherit !important;
@@ -197,17 +208,17 @@
#mchat-character-count {
float: right;
padding: 5px 0 0;
margin-top: 5px;
}
#mchat-character-count.hidden {
#mchat-character-count.invisible {
visibility: hidden;
}
#mchat-panel {
text-align: center;
max-height: initial;
overflow-y: auto;
overflow: hidden;
padding: 0 5px 5px 5px;
margin: 0;
border-radius: 0;
@@ -221,10 +232,10 @@
cursor: text;
width: 50%;
min-width: 50%;
max-width: 90%;
max-width: 95%;
font-size: 1.1em;
padding: 5px 5px 4px;
margin: 5px 20px;
margin: 5px auto;
}
textarea#mchat-input {
@@ -232,7 +243,7 @@ textarea#mchat-input {
}
#mchat-buttons {
padding-bottom: 5px;
margin-bottom: 5px;
}
#mchat-bbcodes {
@@ -315,7 +326,6 @@ textarea#mchat-input {
.mchat-footer li {
display: inline;
padding-left: .1em;
white-space: nowrap;
}
@@ -323,10 +333,14 @@ textarea#mchat-input {
content: '\2022\A';
}
.mchat-footer li:first-child:before, .mchat-footer li:last-child:before {
.mchat-footer li:first-child:before {
content: '';
}
.mchat-footer label {
padding-right: 0;
}
#mchat-legend {
clear: both;
}
@@ -357,6 +371,22 @@ textarea#mchat-input {
display: none;
}
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) {
#mchat-body {
overflow: visible;
}
.mchat-wrapper .mchat-buttons > li {
padding: 0 6px;
}
#mchat-input {
width: 95% !important;
}
}
/* Compatibility with Advanced BBCode Box extension */
#mchat-panel #abbc3_buttons {

View File

@@ -2,7 +2,7 @@
*
* @package phpBB Extension - mChat
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
* @copyright (c) 2016 kasimi
* @copyright (c) 2016 kasimi - https://kasimi.net
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
@@ -65,3 +65,8 @@
left: auto;
right: 8px;
}
@keyframes flash-message {
0% { background-color: #F6F4D0; }
100% { background-color: #F4F4F4; }
}