Version 1.0.0-RC2
@@ -0,0 +1,4 @@
|
||||
<!-- IF MCHAT_INDEX_STATS -->
|
||||
<h3><a href="<!-- IF S_MCHAT_CUSTOM_PAGE and not S_MCHAT_ON_INDEX -->{U_MCHAT}<!-- ENDIF -->#mChat">{L_MCHAT_WHO_IS_CHATTING}</a></h3>
|
||||
<p>{MCHAT_USERS_COUNT} {MCHAT_ONLINE_EXPLAIN}<br />{MCHAT_USERS_LIST}</p>
|
||||
<!-- ENDIF -->
|
||||
@@ -0,0 +1 @@
|
||||
<!-- IF S_MCHAT_ON_INDEX and not S_MCHAT_LOCATION --><!-- INCLUDE mchat_body.html --><!-- ENDIF -->
|
||||
@@ -0,0 +1 @@
|
||||
<!-- IF S_MCHAT_ON_INDEX and S_MCHAT_LOCATION --><!-- INCLUDE mchat_body.html --><!-- ENDIF -->
|
||||
@@ -0,0 +1,9 @@
|
||||
<!-- IF S_MCHAT_ON_INDEX or MCHAT_ARCHIVE_PAGE or MCHAT_CUSTOM_PAGE -->
|
||||
<br />
|
||||
{META_DISPLAY_NAME} © {L_POST_BY_AUTHOR}
|
||||
<ul id="mchat-copyright-footer">
|
||||
<!-- BEGIN meta_authors -->
|
||||
<li><a href="{meta_authors.AUTHOR_HOMEPAGE}" title="{meta_authors.AUTHOR_NAME}">{meta_authors.AUTHOR_NAME}</a></li>
|
||||
<!-- END meta_authors -->
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
@@ -0,0 +1 @@
|
||||
<!-- INCLUDECSS @dmzx_mchat/mchat.css -->
|
||||
@@ -0,0 +1,3 @@
|
||||
<!-- IF S_MCHAT_CUSTOM_PAGE and MCHAT_NAVBAR_LINK and MCHAT_ALLOW_VIEW -->
|
||||
<!-- INCLUDE mchat_navlink.html -->
|
||||
<!-- ENDIF -->
|
||||
47
styles/all/template/javascript/jquery.auto-grow-input.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
jQuery autoGrowInput v1.0.3
|
||||
Copyright (c) 2014 Simon Steinberger / Pixabay
|
||||
Based on stackoverflow.com/questions/931207 (James Padolsey)
|
||||
GitHub: https://github.com/Pixabay/jQuery-autoGrowInput
|
||||
License: http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
(function($){
|
||||
var event = 'oninput' in document.createElement('input') ? 'input' : 'keydown';
|
||||
|
||||
$.fn.autoGrowInput = function(options){
|
||||
var o = $.extend({ maxWidth: 500, minWidth: 20, comfortZone: 0 }, options);
|
||||
|
||||
this.each(function(){
|
||||
var input = $(this),
|
||||
val = ' ',
|
||||
comfortZone = (options && 'comfortZone' in options) ? o.comfortZone : parseInt(input.css('fontSize')),
|
||||
span = $('<span/>').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'),
|
||||
textTransform: input.css('textTransform'),
|
||||
whiteSpace: 'nowrap',
|
||||
ariaHidden: true
|
||||
}).appendTo('body'),
|
||||
check = function(e){
|
||||
if (val === (val = input.val()) && e.type !== 'autogrow') return;
|
||||
if (!val) val = input.attr('placeholder') || '';
|
||||
span.html(val.replace(/&/g, '&').replace(/\s/g, ' ').replace(/</g, '<').replace(/>/g, '>'));
|
||||
var newWidth = span.width() + comfortZone, mw = typeof(o.maxWidth) == "function" ? o.maxWidth() : o.maxWidth;
|
||||
if (newWidth > mw) newWidth = mw;
|
||||
else if (newWidth < o.minWidth) newWidth = o.minWidth;
|
||||
if (newWidth != input.width()) input.width(newWidth);
|
||||
};
|
||||
input.on(event+'.autogrow autogrow', check);
|
||||
// init on page load
|
||||
check();
|
||||
});
|
||||
return this;
|
||||
}
|
||||
}(jQuery));
|
||||
17
styles/all/template/javascript/jquery.titlealert.min.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*!
|
||||
* Title Alert 0.7
|
||||
*
|
||||
* Copyright (c) 2009 ESN | http://esn.me
|
||||
* Jonatan Heyman | http://heyman.info
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*/
|
||||
(function(a){a.titleAlert=function(e,c){if(a.titleAlert._running){a.titleAlert.stop()}a.titleAlert._settings=c=a.extend({},a.titleAlert.defaults,c);if(c.requireBlur&&a.titleAlert.hasFocus){return}c.originalTitleInterval=c.originalTitleInterval||c.interval;a.titleAlert._running=true;a.titleAlert._initialText=document.title;document.title=e;var b=true;var d=function(){if(!a.titleAlert._running){return}b=!b;document.title=(b?e:a.titleAlert._initialText);a.titleAlert._intervalToken=setTimeout(d,(b?c.interval:c.originalTitleInterval))};a.titleAlert._intervalToken=setTimeout(d,c.interval);if(c.stopOnMouseMove){a(document).mousemove(function(f){a(this).unbind(f);a.titleAlert.stop()})}if(c.duration>0){a.titleAlert._timeoutToken=setTimeout(function(){a.titleAlert.stop()},c.duration)}};a.titleAlert.defaults={interval:500,originalTitleInterval:null,duration:0,stopOnFocus:true,requireBlur:false,stopOnMouseMove:false};a.titleAlert.stop=function(){clearTimeout(a.titleAlert._intervalToken);clearTimeout(a.titleAlert._timeoutToken);document.title=a.titleAlert._initialText;a.titleAlert._timeoutToken=null;a.titleAlert._intervalToken=null;a.titleAlert._initialText=null;a.titleAlert._running=false;a.titleAlert._settings=null};a.titleAlert.hasFocus=true;a.titleAlert._running=false;a.titleAlert._intervalToken=null;a.titleAlert._timeoutToken=null;a.titleAlert._initialText=null;a.titleAlert._settings=null;a.titleAlert._focus=function(){a.titleAlert.hasFocus=true;if(a.titleAlert._running&&a.titleAlert._settings.stopOnFocus){var b=a.titleAlert._initialText;a.titleAlert.stop();setTimeout(function(){if(a.titleAlert._running){return}document.title=".";document.title=b},1000)}};a.titleAlert._blur=function(){a.titleAlert.hasFocus=false};a(window).bind("focus",a.titleAlert._focus);a(window).bind("blur",a.titleAlert._blur)})(jQuery);
|
||||
2
styles/all/template/javascript/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()});
|
||||
498
styles/all/template/javascript/mchat.js
Normal file
@@ -0,0 +1,498 @@
|
||||
/**
|
||||
*
|
||||
* @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
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
*
|
||||
*/
|
||||
|
||||
// Support Opera
|
||||
if (typeof document.hasFocus === 'undefined') {
|
||||
document.hasFocus = function() {
|
||||
return document.visibilityState == 'visible';
|
||||
};
|
||||
}
|
||||
|
||||
Array.prototype.max = function() {
|
||||
return Math.max.apply(null, this);
|
||||
};
|
||||
|
||||
Array.prototype.min = function() {
|
||||
return Math.min.apply(null, this);
|
||||
};
|
||||
|
||||
jQuery.fn.reverse = function(reverse) {
|
||||
reverse = typeof reverse === 'undefined' ? true : reverse;
|
||||
return reverse ? jQuery(this.toArray().reverse()) : this;
|
||||
};
|
||||
|
||||
jQuery(function($) {
|
||||
var ajaxRequest = function(mode, sendHiddenFields, data) {
|
||||
var deferred = $.Deferred();
|
||||
if (sendHiddenFields) {
|
||||
$.extend(data, mChat.hiddenFields);
|
||||
}
|
||||
$.ajax({
|
||||
url: mChat.actionUrls[mode],
|
||||
timeout: 5000,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: data
|
||||
}).done(function(json, status, xhr) {
|
||||
if (json[mode]) {
|
||||
deferred.resolve(json, status, xhr);
|
||||
} else {
|
||||
deferred.reject(xhr, status, xhr.responseJSON ? 'session' : 'format');
|
||||
}
|
||||
}).fail(function(xhr, status, error) {
|
||||
deferred.reject(xhr, status, error);
|
||||
});
|
||||
return deferred.promise().fail(function(xhr, textStatus, errorThrown) {
|
||||
mChat.sound('error');
|
||||
mChat.cached('refresh-load', 'refresh-ok', 'refresh-paused').hide();
|
||||
mChat.cached('refresh-error').show();
|
||||
if (errorThrown == 'format') {
|
||||
// Unexpected format
|
||||
} else if (errorThrown == 'session') {
|
||||
mChat.endSession(true);
|
||||
alert(mChat.sessOut);
|
||||
} else if (xhr.status == 400) {
|
||||
alert(mChat.flood);
|
||||
} else if (xhr.status == 403) {
|
||||
alert(mChat.noAccess);
|
||||
} else if (xhr.status == 413) {
|
||||
alert(mChat.mssgLngthLong);
|
||||
} else if (xhr.status == 501) {
|
||||
alert(mChat.noMessageInput);
|
||||
} else if (typeof console !== 'undefined' && console.log) {
|
||||
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.extend(mChat, {
|
||||
clear: function() {
|
||||
if (mChat.cached('input').val() !== '') {
|
||||
if (confirm(mChat.clearConfirm)) {
|
||||
mChat.resetSession();
|
||||
mChat.cached('input').val('');
|
||||
}
|
||||
setTimeout(function() {
|
||||
mChat.cached('input').focus();
|
||||
}, 1);
|
||||
}
|
||||
},
|
||||
sound: function(file) {
|
||||
if (!mChat.pageIsUnloading && !Cookies.get('mchat_no_sound')) {
|
||||
var audio = mChat.cached('sound-' + file).get(0);
|
||||
if (audio.duration) {
|
||||
audio.pause();
|
||||
audio.currentTime = 0;
|
||||
audio.play();
|
||||
}
|
||||
}
|
||||
},
|
||||
notice: function() {
|
||||
if (!document.hasFocus()) {
|
||||
$.titleAlert(mChat.newMessageAlert, {interval: 1000});
|
||||
}
|
||||
},
|
||||
toggle: function(name) {
|
||||
var $elem = mChat.cached(name);
|
||||
$elem.stop().slideToggle(function() {
|
||||
var cookieName = 'mchat_show_' + name;
|
||||
if ($elem.is(':visible')) {
|
||||
Cookies.set(cookieName, 'yes');
|
||||
} else {
|
||||
Cookies.remove(cookieName);
|
||||
}
|
||||
});
|
||||
},
|
||||
add: function() {
|
||||
if (mChat.cached('add').prop('disabled')) {
|
||||
return;
|
||||
}
|
||||
var message = mChat.cached('input').val();
|
||||
if ($.trim(message) === '') {
|
||||
return;
|
||||
}
|
||||
var messChars = message.replace(/\s/g, '');
|
||||
if (mChat.mssgLngth && messChars.length > mChat.mssgLngth) {
|
||||
alert(mChat.mssgLngthLong);
|
||||
return;
|
||||
}
|
||||
mChat.cached('add').prop('disabled', true);
|
||||
mChat.pauseSession();
|
||||
mChat.lastInputValue = message;
|
||||
mChat.cached('input').val('');
|
||||
mChat.refresh(message).done(function() {
|
||||
mChat.resetSession();
|
||||
}).fail(function() {
|
||||
mChat.cached('input').val(mChat.lastInputValue);
|
||||
}).always(function() {
|
||||
mChat.cached('add').prop('disabled', false);
|
||||
setTimeout(function() {
|
||||
mChat.cached('input').focus();
|
||||
}, 1);
|
||||
});
|
||||
},
|
||||
edit: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var $message = mChat.cached('confirm').find('textarea').show().val($container.data('mchat-message'));
|
||||
mChat.cached('confirm').find('p').text(mChat.editInfo);
|
||||
phpbb.confirm(mChat.cached('confirm'), function() {
|
||||
ajaxRequest('edit', true, {
|
||||
message_id: $container.data('mchat-id'),
|
||||
message: $message.val(),
|
||||
archive: mChat.archiveMode ? 1 : 0
|
||||
}).done(function(json) {
|
||||
mChat.updateMessages($(json.edit));
|
||||
mChat.resetSession();
|
||||
});
|
||||
});
|
||||
},
|
||||
del: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
mChat.cached('confirm').find('textarea').hide();
|
||||
mChat.cached('confirm').find('p').text(mChat.delConfirm);
|
||||
phpbb.confirm(mChat.cached('confirm'), function() {
|
||||
var delId = $container.data('mchat-id');
|
||||
ajaxRequest('del', true, {
|
||||
message_id: delId
|
||||
}).done(function() {
|
||||
mChat.removeMessages([delId]);
|
||||
mChat.resetSession();
|
||||
});
|
||||
});
|
||||
},
|
||||
refresh: function(message) {
|
||||
var $messages = mChat.cached('messages').children();
|
||||
var data = {
|
||||
message_last_id: mChat.messageIds.length ? mChat.messageIds.max() : 0
|
||||
};
|
||||
if (message) {
|
||||
data.message = message;
|
||||
}
|
||||
if (mChat.liveUpdates) {
|
||||
data.message_first_id = mChat.messageIds.length ? mChat.messageIds.min() : 0;
|
||||
data.message_edits = {};
|
||||
var now = Math.floor(Date.now() / 1000);
|
||||
$.each($messages, function() {
|
||||
var $message = $(this);
|
||||
var editTime = $message.data('mchat-edit-time');
|
||||
if (editTime && (!mChat.editDeleteLimit || $message.data('mchat-message-time') >= now - mChat.editDeleteLimit / 1000)) {
|
||||
data.message_edits[$message.data('mchat-id')] = editTime;
|
||||
}
|
||||
});
|
||||
}
|
||||
mChat.cached('refresh-ok', 'refresh-error', 'refresh-paused').hide();
|
||||
mChat.cached('refresh-load').show();
|
||||
return ajaxRequest(message ? 'add' : 'refresh', !!message, data).done(function(json) {
|
||||
if (json.add) {
|
||||
var $html = $(json.add);
|
||||
$('#mchat-no-messages').remove();
|
||||
$html.reverse(mChat.messageTop).hide().each(function(i) {
|
||||
var $message = $(this);
|
||||
mChat.messageIds.push($message.data('mchat-id'));
|
||||
setTimeout(function() {
|
||||
if (mChat.messageTop) {
|
||||
mChat.cached('messages').prepend($message);
|
||||
} else {
|
||||
mChat.cached('messages').append($message);
|
||||
}
|
||||
$message.css('opacity', 0).slideDown().animate({opacity: 1}, {queue: false});
|
||||
mChat.cached('messages').animate({scrollTop: mChat.messageTop ? 0 : mChat.cached('messages')[0].scrollHeight});
|
||||
}, i * 400);
|
||||
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() {
|
||||
$('#' + id).find('[data-mchat-action="edit"], [data-mchat-action="del"]').fadeOut(function() {
|
||||
$(this).remove();
|
||||
});
|
||||
}, mChat.editDeleteLimit);
|
||||
}
|
||||
mChat.startRelativeTimeUpdate($message);
|
||||
});
|
||||
mChat.sound('add');
|
||||
mChat.notice();
|
||||
}
|
||||
if (json.edit) {
|
||||
mChat.updateMessages($(json.edit));
|
||||
}
|
||||
if (json.del) {
|
||||
mChat.removeMessages(json.del);
|
||||
}
|
||||
if (json.whois) {
|
||||
mChat.whois();
|
||||
}
|
||||
if (mChat.refreshInterval) {
|
||||
mChat.cached('refresh-load', 'refresh-error', 'refresh-paused').hide();
|
||||
mChat.cached('refresh-ok').show();
|
||||
}
|
||||
});
|
||||
},
|
||||
whois: function() {
|
||||
if (mChat.customPage) {
|
||||
mChat.cached('refresh-pending').show();
|
||||
mChat.cached('refresh-explain').hide();
|
||||
}
|
||||
ajaxRequest('whois', false, {}).done(function(json) {
|
||||
var $whois = $(json.whois);
|
||||
var $userlist = $whois.find('#mchat-userlist');
|
||||
if (Cookies.get('mchat_show_userlist')) {
|
||||
$userlist.show();
|
||||
}
|
||||
mChat.cached('whois').replaceWith($whois);
|
||||
mChat.cache.whois = $whois;
|
||||
mChat.cache.userlist = $userlist;
|
||||
if (mChat.customPage) {
|
||||
mChat.cached('refresh-pending').hide();
|
||||
mChat.cached('refresh-explain').show();
|
||||
}
|
||||
});
|
||||
},
|
||||
updateMessages: function($messages) {
|
||||
var soundPlayed = false;
|
||||
$messages.each(function() {
|
||||
var $newMessage = $(this);
|
||||
var $oldMessage = $('#mchat-message-' + $newMessage.data('mchat-id'));
|
||||
mChat.stopRelativeTimeUpdate($oldMessage);
|
||||
mChat.startRelativeTimeUpdate($newMessage);
|
||||
$oldMessage.fadeOut(function() {
|
||||
$oldMessage.replaceWith($newMessage.hide().fadeIn());
|
||||
});
|
||||
if (!soundPlayed) {
|
||||
soundPlayed = true;
|
||||
mChat.sound('edit');
|
||||
}
|
||||
});
|
||||
},
|
||||
removeMessages: function(ids) {
|
||||
var soundPlayed = false;
|
||||
$.each(ids, function(i, id) {
|
||||
var index = 0;
|
||||
while ((index = $.inArray(id, mChat.messageIds, index)) !== -1) {
|
||||
mChat.messageIds.splice(index, 1);
|
||||
var $message = $('#mchat-message-' + id);
|
||||
mChat.stopRelativeTimeUpdate($message);
|
||||
$message.fadeOut(function() {
|
||||
$message.remove();
|
||||
});
|
||||
if (!soundPlayed) {
|
||||
soundPlayed = true;
|
||||
mChat.sound('del');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
startRelativeTimeUpdate: function($messages) {
|
||||
if (mChat.relativeTime) {
|
||||
$messages.find('.mchat-time[data-mchat-relative-update]').each(function() {
|
||||
var $time = $(this);
|
||||
setTimeout(function() {
|
||||
mChat.relativeTimeUpdate($time);
|
||||
$time.data('mchat-relative-interval', setInterval(function() {
|
||||
mChat.relativeTimeUpdate($time);
|
||||
}, 60 * 1000));
|
||||
}, $time.data('mchat-relative-update') * 1000);
|
||||
});
|
||||
}
|
||||
},
|
||||
relativeTimeUpdate: function($time) {
|
||||
var minutesAgo = $time.data('mchat-minutes-ago') + 1;
|
||||
var langMinutesAgo = mChat.minutesAgo[minutesAgo];
|
||||
if (langMinutesAgo) {
|
||||
$time.text(langMinutesAgo).data('mchat-minutes-ago', minutesAgo);
|
||||
} else {
|
||||
mChat.stopRelativeTimeUpdate($time);
|
||||
$time.text($time.attr('title')).removeAttr('data-mchat-relative-update data-mchat-minutes-ago data-mchat-relative-interval');
|
||||
}
|
||||
},
|
||||
stopRelativeTimeUpdate: function($message) {
|
||||
var selector = '.mchat-time[data-mchat-relative-update]';
|
||||
clearInterval($message.find(selector).addBack(selector).data('mchat-relative-interval'));
|
||||
},
|
||||
timeLeft: function(sessionTime) {
|
||||
return (new Date(sessionTime * 1000)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0];
|
||||
},
|
||||
countDown: function() {
|
||||
mChat.sessionTime -= 1;
|
||||
mChat.cached('session').html(mChat.sessEnds + ' ' + mChat.timeLeft(mChat.sessionTime));
|
||||
if (mChat.sessionTime < 1) {
|
||||
mChat.endSession();
|
||||
}
|
||||
},
|
||||
pauseSession: function() {
|
||||
clearInterval(mChat.refreshInterval);
|
||||
if (mChat.userTimeout) {
|
||||
clearInterval(mChat.sessionCountdown);
|
||||
}
|
||||
if (mChat.whoisRefresh) {
|
||||
clearInterval(mChat.whoisInterval);
|
||||
}
|
||||
},
|
||||
resetSession: function() {
|
||||
if (!mChat.archiveMode) {
|
||||
clearInterval(mChat.refreshInterval);
|
||||
mChat.refreshInterval = setInterval(mChat.refresh, mChat.refreshTime);
|
||||
if (mChat.userTimeout) {
|
||||
mChat.sessionTime = mChat.userTimeout / 1000;
|
||||
clearInterval(mChat.sessionCountdown);
|
||||
mChat.cached('session').html(mChat.sessEnds + ' ' + mChat.timeLeft(mChat.sessionTime));
|
||||
mChat.sessionCountdown = setInterval(mChat.countDown, 1000);
|
||||
}
|
||||
if (mChat.whoisRefresh) {
|
||||
clearInterval(mChat.whoisInterval);
|
||||
mChat.whoisInterval = setInterval(mChat.whois, mChat.whoisRefresh);
|
||||
}
|
||||
if (mChat.pause) {
|
||||
mChat.cached('input').one('keypress', mChat.endSession);
|
||||
}
|
||||
mChat.cached('refresh-ok').show();
|
||||
mChat.cached('refresh-load', 'refresh-error', 'refresh-paused').hide();
|
||||
mChat.cached('refresh-text').html(mChat.refreshYes);
|
||||
}
|
||||
},
|
||||
endSession: function(skipUpdateWhois) {
|
||||
clearInterval(mChat.refreshInterval);
|
||||
mChat.refreshInterval = false;
|
||||
if (mChat.userTimeout) {
|
||||
clearInterval(mChat.sessionCountdown);
|
||||
mChat.cached('session').html(mChat.sessOut);
|
||||
}
|
||||
if (mChat.whoisRefresh) {
|
||||
clearInterval(mChat.whoisInterval);
|
||||
if (!skipUpdateWhois) {
|
||||
mChat.whois();
|
||||
}
|
||||
}
|
||||
mChat.cached('refresh-load', 'refresh-ok', 'refresh-error').hide();
|
||||
mChat.cached('refresh-paused').show();
|
||||
mChat.cached('refresh-text').html(mChat.refreshNo);
|
||||
},
|
||||
mention: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var username = mChat.entityDecode($container.data('mchat-username'));
|
||||
var usercolor = $container.data('mchat-usercolor');
|
||||
if (usercolor) {
|
||||
username = '[b][color=' + usercolor + ']' + username + '[/color][/b]';
|
||||
} else if (mChat.allowBBCodes) {
|
||||
username = '[b]' + username + '[/b]';
|
||||
}
|
||||
insert_text('@ ' + username + ', ');
|
||||
},
|
||||
quote: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var username = mChat.entityDecode($container.data('mchat-username'));
|
||||
var quote = mChat.entityDecode($container.data('mchat-message'));
|
||||
insert_text('[quote="' + username + '"] ' + quote + '[/quote]');
|
||||
},
|
||||
like: function() {
|
||||
var $container = $(this).closest('.mchat-message');
|
||||
var username = mChat.entityDecode($container.data('mchat-username'));
|
||||
var quote = mChat.entityDecode($container.data('mchat-message'));
|
||||
insert_text(mChat.likes + '[quote="' + username + '"] ' + quote + '[/quote]');
|
||||
},
|
||||
entityDecode: function(text) {
|
||||
var s = decodeURIComponent(text.toString().replace(/\+/g, ' '));
|
||||
s = s.replace(/</g, '<');
|
||||
s = s.replace(/>/g, '>');
|
||||
s = s.replace(/:/g, ':');
|
||||
s = s.replace(/./g, '.');
|
||||
s = s.replace(/&/g, '&');
|
||||
s = s.replace(/"/g, "'");
|
||||
return s;
|
||||
},
|
||||
cached: function() {
|
||||
return $($.map(arguments, function(name) {
|
||||
if (!mChat.cache[name]) {
|
||||
mChat.cache[name] = $('#mchat-' + name);
|
||||
}
|
||||
return mChat.cache[name];
|
||||
})).map(function() {
|
||||
return this.toArray();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
mChat.cache = {};
|
||||
mChat.cached('confirm').detach().show();
|
||||
|
||||
mChat.messageIds = mChat.cached('messages').children().map(function() {
|
||||
return $(this).data('mchat-id');
|
||||
}).get();
|
||||
|
||||
mChat.hiddenFields = {};
|
||||
$('#mchat-form').find('input[type=hidden]').each(function() {
|
||||
mChat.hiddenFields[this.name] = this.value;
|
||||
});
|
||||
|
||||
if (!mChat.archiveMode) {
|
||||
mChat.resetSession();
|
||||
|
||||
if (!mChat.messageTop) {
|
||||
mChat.cached('messages').animate({scrollTop: mChat.cached('messages')[0].scrollHeight, easing: 'swing', duration: 'slow'});
|
||||
}
|
||||
|
||||
if (!mChat.cached('user-sound').prop('checked')) {
|
||||
Cookies.set('mchat_no_sound', 'yes');
|
||||
}
|
||||
|
||||
mChat.cached('user-sound').prop('checked', mChat.playSound && !Cookies.get('mchat_no_sound'));
|
||||
|
||||
mChat.cached('user-sound').change(function() {
|
||||
if (this.checked) {
|
||||
Cookies.remove('mchat_no_sound');
|
||||
} else {
|
||||
Cookies.set('mchat_no_sound', 'yes');
|
||||
}
|
||||
});
|
||||
|
||||
$.each(mChat.removeBBCodes.split('|'), function(i, bbcode) {
|
||||
$('#format-buttons .bbcode-' + bbcode).remove();
|
||||
});
|
||||
|
||||
var $colourPalette = $('#colour_palette');
|
||||
$colourPalette.appendTo($colourPalette.parent()).wrap('<div id="mchat-colour"></div>').show();
|
||||
$('#bbpalette,#abbc3_bbpalette').prop('onclick', null).attr('data-mchat-toggle', 'colour');
|
||||
|
||||
$.each(['userlist', 'smilies', 'bbcodes', 'colour'], function(i, elem) {
|
||||
if (Cookies.get('mchat_show_' + elem)) {
|
||||
mChat.cached(elem).toggle();
|
||||
}
|
||||
});
|
||||
|
||||
mChat.startRelativeTimeUpdate(mChat.cached('messages'));
|
||||
|
||||
if (mChat.cached('input').is('input')) {
|
||||
$('#mchat-form').on('keypress', function(e) {
|
||||
if (e.which == 13) {
|
||||
mChat.add();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
mChat.cached('input').autoGrowInput({
|
||||
minWidth: mChat.cached('input').width(),
|
||||
maxWidth: mChat.cached('form').width() - (mChat.cached('input').outerWidth(true) - mChat.cached('input').width())
|
||||
});
|
||||
}
|
||||
|
||||
$(window).on('beforeunload', function() {
|
||||
mChat.pageIsUnloading = true;
|
||||
});
|
||||
|
||||
$('#phpbb').on('click', '[data-mchat-action]', function(e) {
|
||||
var action = $(this).data('mchat-action');
|
||||
mChat[action].call(this);
|
||||
e.preventDefault();
|
||||
}).on('click', '[data-mchat-toggle]', function(e) {
|
||||
var elem = $(this).data('mchat-toggle');
|
||||
mChat.toggle(elem);
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
224
styles/all/template/mchat_body.html
Normal file
@@ -0,0 +1,224 @@
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE or MCHAT_CUSTOM_PAGE -->
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE or not (MCHAT_ALLOW_USE and S_BBCODE_ALLOWED) -->
|
||||
<!-- INCLUDEJS {T_ASSETS_PATH}/javascript/editor.js -->
|
||||
<!-- ENDIF -->
|
||||
<!-- INCLUDEJS javascript/jquery.auto-grow-input.js -->
|
||||
<!-- INCLUDEJS javascript/jquery.titlealert.min.js -->
|
||||
<!-- INCLUDEJS javascript/js.cookie-2.0.4.min.js -->
|
||||
<!-- INCLUDEJS javascript/mchat.js -->
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE and (.pagination or MCHAT_TOTAL_MESSAGES) -->
|
||||
<div class="action-bar top">
|
||||
<div class="pagination">
|
||||
{MCHAT_TOTAL_MESSAGES}
|
||||
<!-- IF .pagination -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
<!-- ELSE -->
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT dmzx_mchat_body_before -->
|
||||
<div class="forabg">
|
||||
<a id="mChat"></a>
|
||||
<div class="inner">
|
||||
<ul class="topiclist">
|
||||
<li class="header">
|
||||
<!-- INCLUDE mchat_header.html -->
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div id="mchat-body" class="postbody">
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var form_name = 'postform';
|
||||
var text_name = 'message';
|
||||
var mChat = {
|
||||
// General settings
|
||||
actionUrls : {
|
||||
<!-- BEGIN mchaturl -->
|
||||
{mchaturl.ACTION}: '{mchaturl.URL}'<!-- IF not mchaturl.IS_LAST -->,<!-- ENDIF -->
|
||||
<!-- END mchaturl -->
|
||||
},
|
||||
extUrl : '{EXT_URL}',
|
||||
customPage : <!-- IF MCHAT_CUSTOM_PAGE -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
pause : <!-- IF MCHAT_PAUSE_ON_INPUT -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
playSound : <!-- IF S_MCHAT_SOUND_YES -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
archiveMode : <!-- IF MCHAT_ARCHIVE_PAGE -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
messageTop : <!-- IF MCHAT_MESSAGE_TOP -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
allowBBCodes : <!-- IF S_BBCODE_ALLOWED -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
liveUpdates : <!-- IF MCHAT_LIVE_UPDATES -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
relativeTime : <!-- IF MCHAT_RELATIVE_TIME -->true<!-- ELSE -->false<!-- ENDIF -->,
|
||||
|
||||
// Limits & timeouts
|
||||
refreshTime : {MCHAT_REFRESH_JS},
|
||||
whoisRefresh : {MCHAT_WHOIS_REFRESH},
|
||||
userTimeout : {MCHAT_USER_TIMEOUT},
|
||||
mssgLngth : {MCHAT_MESSAGE_LNGTH},
|
||||
editDeleteLimit : {MCHAT_EDIT_DELETE_LIMIT},
|
||||
removeBBCodes : '{S_DISALLOWED_BBCODES}',
|
||||
|
||||
// Language
|
||||
minutesAgo : {
|
||||
<!-- BEGIN mchattime -->
|
||||
{mchattime.KEY}: '{mchattime.LANG}'<!-- IF not mchattime.IS_LAST -->,<!-- ENDIF -->
|
||||
<!-- END mchattime -->
|
||||
},
|
||||
newMessageAlert : '{LA_MCHAT_NEW_CHAT}',
|
||||
noMessageInput : '{LA_MCHAT_NOMESSAGEINPUT}',
|
||||
noMessages : '{LA_MCHAT_NOMESSAGE}',
|
||||
editInfo : '{LA_MCHAT_EDITINFO}',
|
||||
noAccess : '{LA_NO_AUTH_OPERATION}',
|
||||
flood : '{LA_MCHAT_FLOOD}',
|
||||
delConfirm : '{LA_MCHAT_DELCONFIRM}',
|
||||
clearConfirm : '{LA_MCHAT_RESET_QUESTION}',
|
||||
sessOut : '{LA_MCHAT_SESSION_OUT}',
|
||||
sessEnds : '{LA_MCHAT_SESSION_ENDS}',
|
||||
refreshYes : '{MCHAT_REFRESH_YES}',
|
||||
refreshNo : '{LA_MCHAT_REFRESH_NO}',
|
||||
mssgLngthLong : '{MCHAT_MESS_LONG}',
|
||||
likes : '{LA_MCHAT_LIKES}'
|
||||
};
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
<audio id="mchat-sound-add" class="hidden" src="{EXT_URL}sounds/add.mp3" preload="auto"></audio>
|
||||
<audio id="mchat-sound-edit" class="hidden" src="{EXT_URL}sounds/edit.mp3" preload="auto"></audio>
|
||||
<audio id="mchat-sound-del" class="hidden" src="{EXT_URL}sounds/del.mp3" preload="auto"></audio>
|
||||
<audio id="mchat-sound-error" class="hidden" src="{EXT_URL}sounds/error.mp3" preload="auto"></audio>
|
||||
|
||||
<div id="mchat-confirm" class="hidden">
|
||||
<h3>{L_CONFIRM}</h3>
|
||||
<p></p>
|
||||
<textarea></textarea>
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_MCHAT_OK}" class="button2" />
|
||||
<input type="button" name="cancel" value="{L_CANCEL}" class="button2" />
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="mchat-main">
|
||||
<!-- IF MCHAT_STATIC_MESS and not MCHAT_ARCHIVE_PAGE -->
|
||||
<ul class="topiclist forums">
|
||||
<li class="row mchat-static">{MCHAT_STATIC_MESS}</li>
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not .mchatrow -->
|
||||
<ul id="mchat-no-messages" class="topiclist forums">
|
||||
<li class="row mchat-static">{L_MCHAT_NOMESSAGE}</li>
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<ul id="mchat-messages" class="topiclist forums mchat-row-limit"<!-- IF not MCHAT_ARCHIVE_PAGE --> style="height:<!-- IF MCHAT_CUSTOM_PAGE -->{MCHAT_CUSTOM_HEIGHT}<!-- ELSE -->{MCHAT_INDEX_HEIGHT}<!-- ENDIF -->px"<!-- ENDIF -->>
|
||||
<!-- INCLUDE mchat_messages.html -->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="mchat-panel" class="panel cp-mini">
|
||||
<!-- IF not MCHAT_ARCHIVE_PAGE and not MCHAT_CUSTOM_PAGE and MCHAT_WHOIS_REFRESH -->
|
||||
<!-- INCLUDE mchat_whois.html -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="mchat-form" name="postform" action="{U_MCHAT_CUSTOM_PAGE}" method="POST">
|
||||
{S_FORM_TOKEN}
|
||||
<!-- IF not MCHAT_ARCHIVE_PAGE -->
|
||||
<noscript><div class="error">{L_MCHAT_NOJAVASCRIPT}</div></noscript>
|
||||
<!-- IF MCHAT_ALLOW_USE -->
|
||||
<!-- IF MCHAT_INPUT_TYPE -->
|
||||
<input id="mchat-input" type="text" name="message" class="inputbox medium" />
|
||||
<!-- ELSE -->
|
||||
<textarea id="mchat-input" name="message" class="inputbox no-auto-resize" cols="32" rows="5"></textarea>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_buttons_before -->
|
||||
<div id="mchat-buttons">
|
||||
<!-- IF MCHAT_ALLOW_USE -->
|
||||
<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_RESET}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_SMILES and .smiley -->
|
||||
<input type="button" class="button2" data-mchat-toggle="smilies" value="{L_MCHAT_SMILES}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_BBCODE_ALLOWED -->
|
||||
<input type="button" class="button2" data-mchat-toggle="bbcodes" value="{L_MCHAT_BBCODES}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_RULES -->
|
||||
<input type="button" class="button2" onclick="popup('{U_MCHAT_RULES}', 450, 275); return false;" value="{L_MCHAT_RULES}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_buttons_mid -->
|
||||
<!-- IF MCHAT_READ_ARCHIVE_BUTTON -->
|
||||
<input type="button" class="button2" onclick="window.location.href = '{MCHAT_ARCHIVE_URL}';" value="{L_MCHAT_ARCHIVE}" />
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_buttons_after -->
|
||||
</div>
|
||||
<!-- IF MCHAT_ALLOW_USE and S_BBCODE_ALLOWED -->
|
||||
<div id="mchat-bbcodes">
|
||||
<!-- INCLUDE posting_buttons.html -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_USE and MCHAT_ALLOW_SMILES and .smiley -->
|
||||
<div id="mchat-smilies" class="hidden">
|
||||
<!-- BEGIN smiley -->
|
||||
<a href="#" onclick="insert_text('{smiley.A_SMILEY_CODE}', true); return false;"><img src="{smiley.SMILEY_IMG}" width="{smiley.SMILEY_WIDTH}" height="{smiley.SMILEY_HEIGHT}" alt="{smiley.SMILEY_CODE}" title="{smiley.SMILEY_DESC}" /></a>
|
||||
<!-- END smiley -->
|
||||
<!-- IF S_SHOW_SMILEY_LINK -->
|
||||
<a href="{U_MORE_SMILIES}" onclick="popup(this.href, 300, 350, '_phpbbsmilies'); return false;">{L_MORE_SMILIES}</a>
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- EVENT dmzx_mchat_body_smiley_after -->
|
||||
<div id="mchat-status">
|
||||
<img src="{EXT_URL}styles/all/theme/images/load.gif" alt="{L_LOADING}" title="{L_LOADING}" id="mchat-refresh-load" />
|
||||
<img src="{EXT_URL}styles/all/theme/images/ok.gif" alt="{L_MCHAT_OK}" title="{L_MCHAT_OK}" id="mchat-refresh-ok" />
|
||||
<img src="{EXT_URL}styles/all/theme/images/paused.gif" alt="{L_MCHAT_PAUSE}" title="{L_MCHAT_PAUSE}" id="mchat-refresh-paused" />
|
||||
<img src="{EXT_URL}styles/all/theme/images/error.gif" alt="{L_ERROR}" title="{L_ERROR}" id="mchat-refresh-error" />
|
||||
<span id="mchat-refresh-text">{MCHAT_REFRESH_YES}</span>
|
||||
<!-- IF MCHAT_USER_TIMEOUT --> • <span id="mchat-session">{L_MCHAT_SESSION_ENDS} {MCHAT_USER_TIMEOUT_TIME}</span><!-- ENDIF --> • <label for="mchat-user-sound">{L_MCHAT_USESOUND} <input type="checkbox" id="mchat-user-sound"<!-- IF S_MCHAT_SOUND_YES --> checked="checked"<!-- ENDIF --> /></label>
|
||||
{L_MCHAT_COPYRIGHT}
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE -->
|
||||
<div class="action-bar bottom">
|
||||
<div class="pagination">
|
||||
{MCHAT_TOTAL_MESSAGES}
|
||||
<!-- IF .pagination -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
<!-- ELSE -->
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF MCHAT_CUSTOM_PAGE and MCHAT_WHOIS_REFRESH -->
|
||||
<h3>{L_MCHAT_WHO_IS_CHATTING}</h3>
|
||||
<!-- INCLUDE 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>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF (MCHAT_CUSTOM_PAGE or MCHAT_ARCHIVE_PAGE) and LEGEND -->
|
||||
<div id="mchat-legend">
|
||||
<em>{L_LEGEND}{L_COLON} {LEGEND}</em>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF MCHAT_ARCHIVE_PAGE or MCHAT_CUSTOM_PAGE -->
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
<!-- ENDIF -->
|
||||
4
styles/all/template/mchat_header.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<dl class="icon">
|
||||
<dt><!-- IF MCHAT_ARCHIVE_PAGE -->{L_MCHAT_ARCHIVE_PAGE}<!-- ELSEIF S_MCHAT_CUSTOM_PAGE --><a href="{U_MCHAT_CUSTOM_PAGE}" title="{L_MCHAT_TITLE}">{L_MCHAT_TITLE}</a><!-- ELSE -->{L_MCHAT_TITLE}<!-- ENDIF --></dt>
|
||||
<dd style="border:none"> </dd>
|
||||
</dl>
|
||||
27
styles/all/template/mchat_messages.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- BEGIN mchatrow -->
|
||||
<li id="mchat-message-{mchatrow.MCHAT_MESSAGE_ID}" class="row mchat-message <!-- IF S_MCHAT_AVATARS -->mchat-message-avatar<!-- ENDIF -->" data-mchat-id="{mchatrow.MCHAT_MESSAGE_ID}" data-mchat-username="{mchatrow.MCHAT_USERNAME}"<!-- IF mchatrow.MCHAT_USERNAME_COLOR --> data-mchat-usercolor="{mchatrow.MCHAT_USERNAME_COLOR}"<!-- ENDIF --> data-mchat-message="{mchatrow.MCHAT_MESSAGE_EDIT}" data-mchat-message-time="{mchatrow.MCHAT_MESSAGE_TIME}" data-mchat-edit-time="{mchatrow.MCHAT_EDIT_TIME}"<!-- IF MCHAT_EDIT_DELETE_LIMIT and not MCHAT_EDIT_DELETE_IGNORE and (mchatrow.MCHAT_ALLOW_EDIT or mchatrow.MCHAT_ALLOW_DEL) --> data-mchat-edit-delete-limit="1"<!-- ENDIF -->>
|
||||
<!-- IF S_MCHAT_AVATARS -->
|
||||
<div class="mchat-avatar">
|
||||
<!-- IF mchatrow.U_VIEWPROFILE --><a href="{mchatrow.U_VIEWPROFILE}" title="{L_READ_PROFILE}"><!-- ENDIF -->
|
||||
<!-- IF mchatrow.MCHAT_USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR}<!-- ELSE --><img src="{STYLE_PATH}/theme/images/no_avatar.gif" class="mchat-avatar" alt="{L_READ_PROFILE}" /><!-- ENDIF -->
|
||||
<!-- IF mchatrow.U_VIEWPROFILE --></a><!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<div class="mchat-message-wrapper">
|
||||
<div class="mchat-message-header">
|
||||
<!-- IF not MCHAT_ARCHIVE_PAGE --><span class="mchat-mention" data-mchat-action="mention" title="{L_MCHAT_RESPOND}" <!-- IF mchatrow.MCHAT_USERNAME_COLOR --> style="color:{mchatrow.MCHAT_USERNAME_COLOR}"<!-- ENDIF -->><strong>@</strong></span><!-- ENDIF -->
|
||||
{mchatrow.MCHAT_USERNAME_FULL} • <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-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/all/theme/images/message.gif" alt="{L_MCHAT_SEND_PM}" title="{L_MCHAT_SEND_PM}" /></a><!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_LIKE and not MCHAT_ARCHIVE_PAGE and not mchatrow.MCHAT_IS_POSTER --><img src="{EXT_URL}styles/all/theme/images/like.png" alt="{L_MCHAT_LIKE}" title="{L_MCHAT_LIKE}" data-mchat-action="like" /><!-- ENDIF -->
|
||||
<!-- IF MCHAT_ALLOW_QUOTE and not MCHAT_ARCHIVE_PAGE and not mchatrow.MCHAT_IS_POSTER --><img src="{EXT_URL}styles/all/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/all/theme/images/ip.gif" alt="{mchatrow.MCHAT_WHOIS_USER}" title="{mchatrow.MCHAT_WHOIS_USER}" /></a><!-- ENDIF -->
|
||||
<!-- IF mchatrow.MCHAT_ALLOW_BAN --><a href="{mchatrow.MCHAT_U_BAN}"><img src="{EXT_URL}styles/all/theme/images/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" /></a><!-- ENDIF -->
|
||||
<!-- IF mchatrow.MCHAT_ALLOW_EDIT --><img src="{EXT_URL}styles/all/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/all/theme/images/del.gif" alt="{L_DELETE}" title="{L_DELETE}" data-mchat-action="del" /><!-- ENDIF -->
|
||||
</div>
|
||||
<div class="mchat-text">{mchatrow.MCHAT_MESSAGE}</div>
|
||||
</div>
|
||||
</li>
|
||||
<!-- END mchatrow -->
|
||||
1
styles/all/template/mchat_navlink.html
Normal file
@@ -0,0 +1 @@
|
||||
<li class="small-icon icon-mchat"><a href="{U_MCHAT}" title="{L_MCHAT_TITLE}">{L_MCHAT_TITLE}</a></li>
|
||||
11
styles/all/template/mchat_rules.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- INCLUDE simple_header.html -->
|
||||
|
||||
<h2>{L_MCHAT_RULES}</h2>
|
||||
<div class="rules">
|
||||
<div class="inner">
|
||||
{MCHAT_RULES}
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a>
|
||||
|
||||
<!-- INCLUDE simple_footer.html -->
|
||||
10
styles/all/template/mchat_whois.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<div id="mchat-whois">
|
||||
<span title="{MCHAT_ONLINE_EXPLAIN}">
|
||||
<!-- IF MCHAT_USERS_LIST -->
|
||||
<a href="#" data-mchat-toggle="userlist">{MCHAT_USERS_COUNT}</a>
|
||||
<!-- ELSE -->
|
||||
{MCHAT_USERS_COUNT}
|
||||
<!-- ENDIF -->
|
||||
</span>
|
||||
<div id="mchat-userlist" class="hidden">{MCHAT_USERS_LIST}</div>
|
||||
</div>
|
||||
77
styles/all/template/ucp_mchat.html
Normal file
@@ -0,0 +1,77 @@
|
||||
<!-- INCLUDE ucp_header.html -->
|
||||
|
||||
<h2>{L_MCHAT_PREFERENCES}</h2>
|
||||
|
||||
<form id="ucp" method="post" action="{S_UCP_ACTION}">
|
||||
<div class="panel">
|
||||
<div class="inner">
|
||||
<fieldset>
|
||||
<!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_INDEX -->
|
||||
<dl>
|
||||
<dt><label for="user_mchat_index">{L_MCHAT_DISPLAY}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_index" value="1"<!-- IF USER_MCHAT_INDEX --> id="user_mchat_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_index" value="0"<!-- IF not USER_MCHAT_INDEX --> id="user_mchat_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="user_mchat_sound">{L_MCHAT_SOUND}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_sound" value="1"<!-- IF USER_MCHAT_SOUND --> id="user_mchat_sound" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_sound" value="0"<!-- IF not USER_MCHAT_SOUND --> id="user_mchat_sound" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- IF S_MCHAT_INDEX_STATS -->
|
||||
<dl>
|
||||
<dt><label for="user_mchat_stats_index">{L_MCHAT_DISPLAY_STATS_INDEX}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="1"<!-- IF USER_MCHAT_STATS_INDEX --> id="user_mchat_stats_index" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_stats_index" value="0"<!-- IF not USER_MCHAT_STATS_INDEX --> id="user_mchat_stats_index" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_TOPICS -->
|
||||
<dl>
|
||||
<dt><label for="user_mchat_topics">{L_MCHAT_DISPLAY_NEW_TOPICS}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_topics" value="1"<!-- IF USER_MCHAT_TOPICS --> id="user_mchat_topics" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_topics" value="0"<!-- IF not USER_MCHAT_TOPICS --> id="user_mchat_topics" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_AVATARS -->
|
||||
<dl>
|
||||
<dt><label for="user_mchat_avatars">{L_MCHAT_DISPLAY_AVATARS}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="1"<!-- IF USER_MCHAT_AVATARS --> id="user_mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_avatars" value="0"<!-- IF not USER_MCHAT_AVATARS --> id="user_mchat_avatars" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="user_mchat_capital_letter">{L_MCHAT_CAPITAL_LETTER}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_capital_letter" value="1"<!-- IF USER_MCHAT_CAPITAL_LETTER --> id="user_mchat_capital_letter" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input type="radio" name="user_mchat_capital_letter" value="0"<!-- IF not USER_MCHAT_CAPITAL_LETTER --> id="user_mchat_capital_letter" checked="checked"<!-- ENDIF --> /> {L_NO}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="user_mchat_input_area">{L_MCHAT_CHAT_AREA}{L_COLON}</label></dt>
|
||||
<dd>
|
||||
<label><input type="radio" name="user_mchat_input_area" value="1"<!-- IF USER_MCHAT_INPUT_AREA --> id="user_mchat_input_area" checked="checked"<!-- ENDIF --> /> {L_MCHAT_INPUT_AREA}</label>
|
||||
<label><input type="radio" name="user_mchat_input_area" value="0"<!-- IF not USER_MCHAT_INPUT_AREA --> id="user_mchat_input_area" checked="checked"<!-- ENDIF --> /> {L_MCHAT_TEXT_AREA}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<fieldset class="submit-buttons">
|
||||
{S_HIDDEN_FIELDS}<input type="reset" value="{L_RESET}" name="reset" class="button2" />
|
||||
<input type="submit" name="submit" value="{L_SUBMIT}" class="button1" />
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE ucp_footer.html -->
|
||||
BIN
styles/all/theme/images/ban.gif
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
styles/all/theme/images/bg_button.gif
Normal file
|
After Width: | Height: | Size: 182 B |
BIN
styles/all/theme/images/del.gif
Normal file
|
After Width: | Height: | Size: 928 B |
BIN
styles/all/theme/images/edit.gif
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
styles/all/theme/images/error.gif
Normal file
|
After Width: | Height: | Size: 141 B |
BIN
styles/all/theme/images/icon_mchat.png
Normal file
|
After Width: | Height: | Size: 651 B |
BIN
styles/all/theme/images/ip.gif
Normal file
|
After Width: | Height: | Size: 941 B |
BIN
styles/all/theme/images/like.png
Normal file
|
After Width: | Height: | Size: 784 B |
BIN
styles/all/theme/images/load.gif
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
styles/all/theme/images/message.gif
Normal file
|
After Width: | Height: | Size: 576 B |
BIN
styles/all/theme/images/ok.gif
Normal file
|
After Width: | Height: | Size: 96 B |
BIN
styles/all/theme/images/paused.gif
Normal file
|
After Width: | Height: | Size: 83 B |
BIN
styles/all/theme/images/quota.png
Normal file
|
After Width: | Height: | Size: 306 B |
239
styles/all/theme/mchat.css
Normal file
@@ -0,0 +1,239 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB Extension - mChat
|
||||
* @copyright (c) 2016 dmzx - http://www.dmzx-web.net
|
||||
* @copyright (c) 2016 kasimi
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
#mChat {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#mChat + .inner li.header dd {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.icon-mchat {
|
||||
background-image: url("./images/icon_mchat.png");
|
||||
}
|
||||
|
||||
#mchat-body {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#mchat-confirm textarea {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.mchat-row-limit {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mchat-message-wrapper {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mchat-message-header {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mchat-message-icons {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.mchat-message {
|
||||
padding: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.mchat-avatar {
|
||||
float: left;
|
||||
width: 40px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 700px), only screen and (max-device-width: 700px) {
|
||||
.mchat-avatar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.mchat-avatar a {
|
||||
unicode-bidi: normal;
|
||||
}
|
||||
|
||||
.mchat-avatar img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mchat-text {
|
||||
clear: both;
|
||||
padding: 0 5px 2px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.mchat-text li {
|
||||
display: list-item !important;
|
||||
list-style-type: inherit !important;
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
.mchat-text ul, .mchat-text ol {
|
||||
list-style-position: inside;
|
||||
}
|
||||
|
||||
.mchat-text ul {
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
||||
.mchat-text ol {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
.mchat-text ul ul {
|
||||
list-style-type: circle;
|
||||
}
|
||||
|
||||
.mchat-text blockquote {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.mchat-text blockquote, .mchat-text .codebox, .mchat-text ul, .mchat-text ol {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.mchat-mention strong {
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
.mchat-mention, .mchat-message-icons > * {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#mchat-no-message {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
#mchat-panel {
|
||||
text-align: center;
|
||||
max-height: initial;
|
||||
padding: 0 5px 5px 5px;
|
||||
margin: 0;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
#mchat-form {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#mchat-input {
|
||||
cursor: text;
|
||||
width: 50%;
|
||||
font-size: 1.1em;
|
||||
padding: 5px;
|
||||
margin: 5px 20px;
|
||||
}
|
||||
|
||||
#mchat-buttons {
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
#mchat-bbcodes {
|
||||
padding: 0 5px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mchat-bbcodes #format-buttons {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#mchat-bbcodes #format-buttons input, #mchat-bbcodes #format-buttons select {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#mchat-bbcodes #colour_palette label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mchat-bbcodes #colour_palette table {
|
||||
margin: 0 auto 5px;
|
||||
}
|
||||
|
||||
#mchat-smilies {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#mchat-refresh-ok, #mchat-refresh-load, #mchat-refresh-error, #mchat-refresh-paused {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#mchat-refresh-ok, #mchat-refresh-load, #mchat-refresh-error {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#mchat-refresh-load {
|
||||
cursor: wait;
|
||||
}
|
||||
|
||||
#mchat-refresh-ok, #mchat-refresh-error, #mchat-refresh-paused {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
#mchat-legend {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.mchat-static, #mchat-stats, #mchat-whois, #mchat-refresh, #mchat-legend {
|
||||
padding: 5px 0;
|
||||
text-align: left;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.mchat-copyright {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
#mchat-copyright-footer {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#mchat-copyright-footer li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#mchat-copyright-footer li:first-child:before{
|
||||
content: "";
|
||||
}
|
||||
|
||||
#mchat-copyright-footer li:before{
|
||||
content: "• ";
|
||||
}
|
||||
|
||||
.mchat-static {
|
||||
padding: 5px 5px 7px !important;
|
||||
}
|
||||
|
||||
#mchat-colour {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Compatibility with Advanced BBCode Box extension */
|
||||
|
||||
#abbc3_buttons {
|
||||
margin: 0 !important;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
#abbc3_buttons .abbc3_buttons_row {
|
||||
margin: 0 auto !important;
|
||||
}
|
||||