').css({
+ position: 'absolute',
+ top: -9999,
+ left: -9999,
+ width: 'auto',
+ fontSize: input.css('fontSize'),
+ fontFamily: input.css('fontFamily'),
+ fontWeight: input.css('fontWeight'),
+ letterSpacing: input.css('letterSpacing'),
+ whiteSpace: 'nowrap'
+ });
+ testSubject.insertAfter(input);
+ $(this).on('keypress blur change submit focus', function() {
+ if (val === (val = input.val())) {
+ return;
+ }
+ var escaped = val.replace(/&/g, '&').replace(/\s/g, ' ').replace(//g, '>');
+ var testerWidth = testSubject.html(escaped).width();
+ var newWidth = (testerWidth + comfortZone) >= minWidth ? testerWidth + comfortZone : minWidth;
+ if ((newWidth < input.width() && newWidth >= minWidth) || (newWidth > minWidth && newWidth < $('.mchat-panel').width() - comfortZone)) {
+ input.width(newWidth);
+ }
+ });
+ });
+ return this;
+ };
+
+ mChat.resetSession(true);
+
+ if (!mChat.messageTop) {
+ mChat.$$('main').animate({scrollTop: mChat.$$('main')[0].scrollHeight}, 'slow', 'swing');
+ }
+
+ mChat.$$('user-sound').prop('checked', mChat.playSound && !Cookies.get('mchat_no_sound'));
+
+ if (Cookies.get('mchat_show_smilies')) {
+ mChat.$$('smilies').slideToggle('slow');
+ }
+
+ if (Cookies.get('mchat_show_bbcodes')) {
+ mChat.$$('bbcodes').slideToggle('slow', function() {
+ if (Cookies.get('mchat_show_colour')) {
+ mChat.$$('colour').slideToggle('slow');
+ }
+ });
+ }
+
+ if (Cookies.get('mchat_show_userlist')) {
+ mChat.$$('userlist').slideToggle('slow');
+ }
+
+ mChat.$$('colour').html(phpbb.colorPalette('h', 15, 10)).on('click', 'a', function(e) {
+ var color = $(this).data('color');
+ bbfontstyle('[color=#' + color + ']', '[/color]');
+ e.preventDefault();
+ });
+
+ if (!mChat.$$('user-sound').prop('checked')) {
+ Cookies.set('mchat_no_sound', 'yes');
+ }
+
+ mChat.$$('user-sound').change(function() {
+ if (this.checked) {
+ Cookies.remove('mchat_no_sound');
+ } else {
+ Cookies.set('mchat_no_sound', 'yes');
+ }
+ });
+
+ $('#mchat-form').on('keypress', function(e) {
+ if (e.which == 13) {
+ mChat.add();
+ e.preventDefault();
+ }
+ });
+
+ mChat.$$('input').autoGrowInput();
+ }
+
+ $(window).on('beforeunload', function() {
+ mChat.pageIsUnloading = true;
+ });
+
+ $('#phpbb').on('click', '[data-mchat-action]', function(e) {
+ var action = $(this).data('mchat-action');
+ mChat[action].call(this);
+ e.preventDefault();
+ }).on('click', '[data-mchat-toggle]', function(e) {
+ var elem = $(this).data('mchat-toggle');
+ mChat.toggle(elem);
+ e.preventDefault();
+ });
+});
diff --git a/styles/prosilver/template/mchat.min.js b/styles/prosilver/template/mchat.min.js
new file mode 100644
index 0000000..fe07130
--- /dev/null
+++ b/styles/prosilver/template/mchat.min.js
@@ -0,0 +1,12 @@
+/**
+ *
+ * @package mChat JavaScript Code mini
+ * @version 1.5.1 of 2016-01-17
+ * @copyright (c) 2009 By Shapoval Andrey Vladimirovich (AllCity) ~ http://allcity.net.ru/
+ * @copyright (c) 2013 By Rich McGirr (RMcGirr83) http://rmcgirr83.org
+ * @copyright (c) 2015 By dmzx - http://www.dmzx-web.net
+ * @copyright (c) 2015 By kasimi
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ *
+ */
+"undefined"==typeof document.hasFocus&&(document.hasFocus=function(){return"visible"==document.visibilityState}),jQuery(function(e){var t=function(t,a,s){var o=e.Deferred(),n=o.promise();return a&&e.extend(s,mChat.hiddenFields),e.ajax({url:mChat.file.replace("mchat","mchat-"+t),timeout:5e3,type:"POST",dataType:"json",data:s}).success(function(e,a,s){e.hasOwnProperty(t)?o.resolve(e,a,s):o.reject(s,a,s.responseJSON?"session":"format")}).error(function(e,t,a){o.reject(e,t,a)}),n.fail(function(e,t,a){mChat.sound("error"),mChat.$$("refresh-load","refresh-ok","refresh-paused").hide(),mChat.$$("refresh-error").show(),"format"==a||("session"==a?(mChat.endSession(),alert(mChat.sessOut)):400==e.status?alert(mChat.flood):403==e.status?alert(mChat.noAccess):413==e.status?alert(mChat.mssgLngthLong):501==e.status?alert(mChat.noMessageInput):"undefined"!=typeof console&&console.log&&console.log("AJAX error. status: "+t+", message: "+a))})};e.extend(mChat,{clear:function(){""!==mChat.$$("input").val()&&(confirm(mChat.clearConfirm)&&(mChat.resetSession(!0),mChat.$$("input").val("")),mChat.$$("input").focus())},sound:function(e){if(!Cookies.get("mchat_no_sound")){var t=mChat.$$("sound-"+e).get(0);t.pause(),t.currentTime=0,t.play()}},notice:function(){document.hasFocus()||e.titleAlert(mChat.newMessageAlert,{interval:1e3})},toggle:function(e){var t=mChat.$$(e);t.stop().slideToggle(function(){var a="mchat_show_"+e;t.is(":visible")?Cookies.set(a,"yes"):Cookies.remove(a)})},add:function(){if(!mChat.$$("add").prop("disabled")&&""!==e.trim(mChat.$$("input").val())){var a=mChat.$$("input").val().replace(/\s/g,"");if(a.length>mChat.mssgLngth)return void alert(mChat.mssgLngthLong);mChat.pauseSession(),mChat.$$("add").prop("disabled",!0),t("add",!0,{message:mChat.$$("input").val()}).done(function(e){mChat.$$("input").val(""),mChat.refresh()}).always(function(){mChat.$$("input").focus(),mChat.$$("add").prop("disabled",!1),mChat.resetSession(!1)})}},edit:function(){var a=e(this).closest(".mchat-message"),s=mChat.$$("confirm").find("textarea").show().val(a.data("message"));mChat.$$("confirm").find("p").text(mChat.editInfo),phpbb.confirm(mChat.$$("confirm"),function(){t("edit",!0,{message_id:a.data("id"),message:s.val()}).done(function(t){mChat.sound("edit"),a.fadeOut("slow",function(){a.replaceWith(e(t.edit).hide().fadeIn("slow"))}),mChat.resetSession(!0)})})},del:function(){var a=e(this).closest(".mchat-message");mChat.$$("confirm").find("textarea").hide(),mChat.$$("confirm").find("p").text(mChat.delConfirm),phpbb.confirm(mChat.$$("confirm"),function(){t("del",!0,{message_id:a.data("id")}).done(function(e){mChat.sound("del"),a.fadeOut("slow",function(){a.remove()}),mChat.resetSession(!0)})})},refresh:function(){var a=mChat.$$("messages").children(),s={message_last_id:a.filter(mChat.messageTop?":first":":last").data("id")};if(mChat.liveUpdates){s.message_first_id=a.filter(mChat.messageTop?":last":":first").data("id"),s.message_edits={};var o=Math.floor(Date.now()/1e3);e.each(a,function(){var t=e(this),a=t.data("edit-time");a&&(!mChat.editDeleteLimit||t.data("message-time")>=o-mChat.editDeleteLimit/1e3)&&(s.message_edits[t.data("id")]=a)})}mChat.$$("refresh-ok","refresh-error","refresh-paused").hide(),mChat.$$("refresh-load").show(),t("refresh",!1,s).done(function(t){var a=e(t.refresh);if(a.length&&(mChat.sound("add"),mChat.notice(),mChat.$$("no-messages").remove(),a.hide().each(function(t){var a=e(this);if(setTimeout(function(){mChat.messageTop?mChat.$$("messages").prepend(a):mChat.$$("messages").append(a),a.css("opacity",0).slideDown("slow").animate({opacity:1},{queue:!1,duration:"slow"}),mChat.$$("main").animate({scrollTop:mChat.messageTop?0:mChat.$$("main")[0].scrollHeight},"slow")},600*t),mChat.editDeleteLimit&&a.data("edit-delete-limit")&&a.find('[data-mchat-action="edit"], [data-mchat-action="del"]').length>0){var s=a.attr("id");setTimeout(function(){e("#"+s).find('[data-mchat-action="edit"], [data-mchat-action="del"]').fadeOut("slow",function(){e(this).remove()})},mChat.editDeleteLimit)}})),t.hasOwnProperty("edit")){var s=!0;e.each(t.edit,function(t,a){var o=e("#mchat-message-"+t);o.length&&(s&&(s=!1,mChat.sound("edit")),o.fadeOut("slow",function(){o.replaceWith(e(a).hide().fadeIn("slow"))}))})}if(t.hasOwnProperty("del")){var o=!0;e.each(t.del,function(t,a){var s=e("#mchat-message-"+a);s.length&&(o&&(o=!1,mChat.sound("del")),s.fadeOut("slow",function(){s.remove()}))})}setTimeout(function(){mChat.refreshInterval&&(mChat.$$("refresh-load","refresh-error","refresh-paused").hide(),mChat.$$("refresh-ok").show())},250)})},whois:function(){mChat.customPage&&(mChat.$$("refresh-pending").show(),mChat.$$("refresh").hide()),t("whois",!1,{}).done(function(t){var a=e(t.whois),s=a.find("#mchat-userlist");Cookies.get("mchat_show_userlist")&&s.show(),mChat.$$("whois").replaceWith(a),mChat.cache.whois=a,mChat.cache.userlist=s,mChat.customPage&&setTimeout(function(){mChat.$$("refresh-pending").hide(),mChat.$$("refresh").show()},250)})},clean:function(){mChat.$$("confirm").find("textarea").hide(),mChat.$$("confirm").find("p").text(mChat.cleanConfirm),phpbb.confirm(mChat.$$("confirm"),function(){t("clean",!0,{}).done(function(){phpbb.alert("mChat",mChat.cleanDone),setTimeout(function(){location.reload()},2e3)})})},timeLeft:function(e){return new Date(1e3*e).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0]},countDown:function(){mChat.sessionTime-=1,mChat.$$("session").html(mChat.sessEnds+" "+mChat.timeLeft(mChat.sessionTime)),mChat.sessionTime<1&&mChat.endSession()},pauseSession:function(){clearInterval(mChat.refreshInterval),mChat.userTimeout&&clearInterval(mChat.sessionCountdown),mChat.whoisRefresh&&clearInterval(mChat.whoisInterval)},resetSession:function(e){clearInterval(mChat.refreshInterval),mChat.refreshInterval=setInterval(mChat.refresh,mChat.refreshTime),mChat.userTimeout&&(mChat.sessionTime=mChat.userTimeout/1e3,clearInterval(mChat.sessionCountdown),mChat.$$("session").html(mChat.sessEnds+" "+mChat.timeLeft(mChat.sessionTime)),mChat.sessionCountdown=setInterval(mChat.countDown,1e3)),mChat.whoisRefresh&&(clearInterval(mChat.whoisInterval),mChat.whoisInterval=setInterval(mChat.whois,mChat.whoisRefresh)),mChat.pause&&mChat.$$("input").one("keypress",mChat.endSession),e&&(mChat.$$("refresh-ok").show(),mChat.$$("refresh-load","refresh-error","refresh-paused").hide(),mChat.$$("refresh-text").html(mChat.refreshYes))},endSession:function(){clearInterval(mChat.refreshInterval),mChat.refreshInterval=!1,mChat.userTimeout&&(clearInterval(mChat.sessionCountdown),mChat.$$("session").html(mChat.sessOut)),mChat.whoisRefresh&&(clearInterval(mChat.whoisInterval),mChat.whois()),mChat.$$("refresh-load","refresh-ok","refresh-error").hide(),mChat.$$("refresh-paused").show(),mChat.$$("refresh-text").html(mChat.refreshNo)},mention:function(){var t=e(this).closest(".mchat-message"),a=mChat.entityDecode(t.data("username")),s=t.data("usercolor");s?a="[b][color="+s+"]"+a+"[/color][/b]":mChat.allowBBCodes&&(a="[b]"+a+"[/b]"),insert_text("@ "+a+", ")},quote:function(){var t=e(this).closest(".mchat-message"),a=mChat.entityDecode(t.data("username")),s=mChat.entityDecode(t.data("message"));insert_text('[quote="'+a+'"] '+s+"[/quote]")},like:function(){var t=e(this).closest(".mchat-message"),a=mChat.entityDecode(t.data("username")),s=mChat.entityDecode(t.data("message"));insert_text(mChat.likes+'[quote="'+a+'"] '+s+"[/quote]")},entityDecode:function(e){var t=decodeURIComponent(e.toString().replace(/\+/g," "));return t=t.replace(/</g,"<"),t=t.replace(/>/g,">"),t=t.replace(/:/g,":"),t=t.replace(/./g,"."),t=t.replace(/&/g,"&"),t=t.replace(/"/g,"'")},$$:function(){return e(e.map(arguments,function(t){return mChat.cache[t]||(mChat.cache[t]=e("#mchat-"+t)),mChat.cache[t]})).map(function(){return this.toArray()})}}),mChat.cache={},mChat.$$("confirm").detach().show(),mChat.hiddenFields={},e("#"+form_name).find("input[type=hidden]").each(function(){mChat.hiddenFields[this.name]=this.value}),mChat.archiveMode||(e.fn.autoGrowInput=function(){return this.filter("input:text").each(function(){var t=20,a=e(this).width(),s="",o=e(this),n=e("
").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:o.css("fontSize"),fontFamily:o.css("fontFamily"),fontWeight:o.css("fontWeight"),letterSpacing:o.css("letterSpacing"),whiteSpace:"nowrap"});n.insertAfter(o),e(this).on("keypress blur change submit focus",function(){if(s!==(s=o.val())){var h=s.replace(/&/g,"&").replace(/\s/g," ").replace(//g,">"),i=n.html(h).width(),r=i+t>=a?i+t:a;(r
=a||r>a&&r
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {L_FONT_TINY}
+ {L_FONT_SMALL}
+ {L_FONT_NORMAL}
+
+ {L_FONT_LARGE}
+
+ {L_FONT_HUGE}
+
+
+
+
+
+
+
+
+
+ {L_MCHAT_CUSTOM_BBCODES}
+
+ {custom_tags.BBCODE_TAG}
+
+
+
+
+
+
diff --git a/styles/prosilver/template/mchat_body.html b/styles/prosilver/template/mchat_body.html
new file mode 100644
index 0000000..c53c5d0
--- /dev/null
+++ b/styles/prosilver/template/mchat_body.html
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
style="height:{MCHAT_CUSTOM_HEIGHT}{MCHAT_INDEX_HEIGHT}px">
+
+
{L_CONFIRM}
+
+
+
+
+
+
+
+
+
+
{L_MCHAT_NOMESSAGE}
+
+
+
+
{L_MCHAT_ANNOUNCEMENT}{L_COLON} {MCHAT_STATIC_MESS}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{L_WHO_IS_CHATTING}
+
+
+ {MCHAT_WHOIS_REFRESH_EXPLAIN}
+ {L_MCHAT_REFRESHING}
+ {L_LEGEND}{L_COLON} {LEGEND}
+
+
+
+ {L_LEGEND}{L_COLON} {LEGEND}
+
+
+
+
+
+
diff --git a/styles/prosilver/template/mchat_messages.html b/styles/prosilver/template/mchat_messages.html
new file mode 100644
index 0000000..ab510cb
--- /dev/null
+++ b/styles/prosilver/template/mchat_messages.html
@@ -0,0 +1,26 @@
+
+
data-usercolor="{mchatrow.MCHAT_USERNAME_COLOR}" data-message="{mchatrow.MCHAT_MESSAGE_EDIT}" data-message-time="{mchatrow.MCHAT_MESSAGE_TIME}" data-edit-time="{mchatrow.MCHAT_EDIT_TIME}" data-edit-delete-limit="1">
+
+
+
+
+
+
+
{mchatrow.MCHAT_MESSAGE}
+
+
diff --git a/styles/prosilver/template/mchat_portal.html b/styles/prosilver/template/mchat_portal.html
new file mode 100644
index 0000000..5f63523
--- /dev/null
+++ b/styles/prosilver/template/mchat_portal.html
@@ -0,0 +1,11 @@
+
+{$C_BLOCK_H_L}{$TITLE}{$C_BLOCK_H_R}
+
+{$C_BLOCK_F_L}{$C_BLOCK_F_R}
+
\ No newline at end of file
diff --git a/styles/prosilver/template/mchat_portal_body.html b/styles/prosilver/template/mchat_portal_body.html
new file mode 100644
index 0000000..62e447b
--- /dev/null
+++ b/styles/prosilver/template/mchat_portal_body.html
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
style="height:{MCHAT_CUSTOM_HEIGHT}{MCHAT_INDEX_HEIGHT}px">
+
+
{L_CONFIRM}
+
+
+
+
+
+
+
+
+
+
{L_MCHAT_NOMESSAGE}
+
+
+
+
{L_MCHAT_ANNOUNCEMENT}{L_COLON} {MCHAT_STATIC_MESS}
+
+
+
+
+
+
+
+ {S_FORM_TOKEN}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{L_WHO_IS_CHATTING}
+
+
+ {MCHAT_WHOIS_REFRESH_EXPLAIN}
+ {L_MCHAT_REFRESHING}
+ {L_LEGEND}{L_COLON} {LEGEND}
+
+
+
+ {L_LEGEND}{L_COLON} {LEGEND}
+
+
\ No newline at end of file
diff --git a/styles/prosilver/template/mchat_rules.html b/styles/prosilver/template/mchat_rules.html
new file mode 100644
index 0000000..71c0c44
--- /dev/null
+++ b/styles/prosilver/template/mchat_rules.html
@@ -0,0 +1,11 @@
+
+
+
{L_MCHAT_HELP}
+
+
{L_CLOSE_WINDOW}
+
+
diff --git a/styles/prosilver/template/mchat_whois.html b/styles/prosilver/template/mchat_whois.html
new file mode 100644
index 0000000..652d385
--- /dev/null
+++ b/styles/prosilver/template/mchat_whois.html
@@ -0,0 +1,8 @@
+
diff --git a/styles/prosilver/template/ucp_mchat.html b/styles/prosilver/template/ucp_mchat.html
new file mode 100644
index 0000000..917f641
--- /dev/null
+++ b/styles/prosilver/template/ucp_mchat.html
@@ -0,0 +1,71 @@
+
+
+
+
+{L_TITLE}
+
+
+
+ {S_HIDDEN_FIELDS}
+
+ {S_FORM_TOKEN}
+
+
+
+
diff --git a/styles/prosilver/theme/images/ban.gif b/styles/prosilver/theme/images/ban.gif
new file mode 100644
index 0000000..4fcba90
Binary files /dev/null and b/styles/prosilver/theme/images/ban.gif differ
diff --git a/styles/prosilver/theme/images/bg_button.gif b/styles/prosilver/theme/images/bg_button.gif
new file mode 100644
index 0000000..03172ff
Binary files /dev/null and b/styles/prosilver/theme/images/bg_button.gif differ
diff --git a/styles/prosilver/theme/images/del.gif b/styles/prosilver/theme/images/del.gif
new file mode 100644
index 0000000..03e3170
Binary files /dev/null and b/styles/prosilver/theme/images/del.gif differ
diff --git a/styles/prosilver/theme/images/edit.gif b/styles/prosilver/theme/images/edit.gif
new file mode 100644
index 0000000..2b0962e
Binary files /dev/null and b/styles/prosilver/theme/images/edit.gif differ
diff --git a/styles/prosilver/theme/images/error.gif b/styles/prosilver/theme/images/error.gif
new file mode 100644
index 0000000..42f9c13
Binary files /dev/null and b/styles/prosilver/theme/images/error.gif differ
diff --git a/styles/prosilver/theme/images/ip.gif b/styles/prosilver/theme/images/ip.gif
new file mode 100644
index 0000000..9e83fa5
Binary files /dev/null and b/styles/prosilver/theme/images/ip.gif differ
diff --git a/styles/prosilver/theme/images/like.png b/styles/prosilver/theme/images/like.png
new file mode 100644
index 0000000..85349a2
Binary files /dev/null and b/styles/prosilver/theme/images/like.png differ
diff --git a/styles/prosilver/theme/images/load.gif b/styles/prosilver/theme/images/load.gif
new file mode 100644
index 0000000..085ccae
Binary files /dev/null and b/styles/prosilver/theme/images/load.gif differ
diff --git a/styles/prosilver/theme/images/message.gif b/styles/prosilver/theme/images/message.gif
new file mode 100644
index 0000000..103421a
Binary files /dev/null and b/styles/prosilver/theme/images/message.gif differ
diff --git a/styles/prosilver/theme/images/ok.gif b/styles/prosilver/theme/images/ok.gif
new file mode 100644
index 0000000..d17dd3e
Binary files /dev/null and b/styles/prosilver/theme/images/ok.gif differ
diff --git a/styles/prosilver/theme/images/paused.gif b/styles/prosilver/theme/images/paused.gif
new file mode 100644
index 0000000..bfc1085
Binary files /dev/null and b/styles/prosilver/theme/images/paused.gif differ
diff --git a/styles/prosilver/theme/images/quota.png b/styles/prosilver/theme/images/quota.png
new file mode 100644
index 0000000..a7cba57
Binary files /dev/null and b/styles/prosilver/theme/images/quota.png differ
diff --git a/styles/prosilver/theme/mchat.css b/styles/prosilver/theme/mchat.css
new file mode 100644
index 0000000..3326ccb
--- /dev/null
+++ b/styles/prosilver/theme/mchat.css
@@ -0,0 +1,175 @@
+/**
+ *
+ * @package phpBB Extension - mChat
+ * @copyright (c) 2015 dmzx - http://www.dmzx-web.net
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+ *
+ */
+.mchat-message {
+ background: linear-gradient(#B6BFC4, #FFFFFF, #FFFFFF, #B6BFC4);
+ border: 1px solid #999999;
+ border-radius: 6px;
+ padding: 5px;
+ margin-right: 1px;
+ overflow: hidden;
+}
+
+.mchat-message:hover {
+ background-color: #F6F4D0;
+}
+
+.mchat-bg-1 {
+ color: #333333;
+}
+
+.mchat-bg-2 {
+ color: #444444;
+}
+
+.mchat-row-limit {
+ overflow: auto;
+ width: 100%;
+}
+
+.mchat-panel {
+ text-align: center;
+ padding: 3px;
+ clear: both;
+}
+
+#mchat-input {
+ cursor: text;
+ width: 50%;
+ background-color: #FFFFFF;
+ border: 1px solid #B4BAC0;
+ color: #333333;
+ font-size: 1.1em;
+ padding: 5px 5px 3px 5px;
+ margin: 3px 0px 3px 5px;
+}
+
+#mchat-input:hover {
+ border-color: #11A3EA;
+}
+
+#mchat-body {
+ width: 100% !important;
+ background-color: #E9F0F5 !important;
+}
+
+#mchat-static, #mchat-stats, #mchat-whois, .mchat-refresh {
+ padding-left: 5px;
+ text-align: left;
+ font-size: 1.1em;
+}
+
+#mchat-static {
+ color: #990000;
+}
+
+#mchat-stats, #mchat-whois {
+ margin-top: 2px;
+ min-height: 1.3em;
+ height: auto !important;
+}
+
+.mchat-refresh {
+ margin-top: 1.5em;
+ clear: both;
+}
+
+.mchat-text {
+ padding: 3px;
+ font-size: 1.1em;
+ width: 98%;
+}
+
+.mchat-text ul {
+ margin-left: 10px;
+}
+
+.mchat-text blockquote {
+ margin: 5px 0 0 10px
+}
+
+.mchat-panel-image {
+ margin-top: -4px;
+ vertical-align: middle;
+}
+
+.mchat-message-header {
+ float: left;
+}
+
+.mchat-message-icons {
+ float: right;
+}
+
+.mchat-mention, .mchat-message-icons > * {
+ cursor: pointer;
+}
+
+#mchat-smilies {
+ padding: 5px;
+}
+
+#mchat-refresh-load {
+ vertical-align: middle;
+ cursor: wait;
+ display: none;
+}
+
+#mchat-refresh-ok {
+ vertical-align: middle;
+ cursor: help;
+}
+
+#mchat-refresh-error, #mchat-refresh-paused {
+ vertical-align: middle;
+ cursor: help;
+ display: none;
+}
+
+#mchat-status {
+ padding: 5px;
+}
+
+.mchat-alert {
+ color: #7E2217;
+ padding: 10px;
+}
+
+#mchat-userlist {
+ float: left;
+}
+
+.mchat-avatar {
+ float: left;
+ padding-right: 5px;
+}
+
+.mchat-message-avatar .mchat-text {
+ margin-left: 50px;
+ width: 90%;
+ margin-right: 5px;
+}
+
+#mchat-confirm textarea {
+ width: 100%;
+ height: 100px;
+}
+
+#mchat-colour {
+ margin-top: 5px;
+}
+
+#mchat-colour table {
+ margin: 0 auto;
+ border-collapse: separate;
+ border-spacing: 1px;
+}
+
+#mchat-bbcodes {
+ padding: 5px;
+ display: none;
+}
diff --git a/ucp/ucp_mchat_info.php b/ucp/ucp_mchat_info.php
new file mode 100644
index 0000000..566e6a1
--- /dev/null
+++ b/ucp/ucp_mchat_info.php
@@ -0,0 +1,30 @@
+ '\dmzx\mchat\ucp\ucp_mchat_module',
+ 'title' => 'UCP_MCHAT_CONFIG',
+ 'version' => $config['mchat_version'],
+ 'modes' => array(
+ 'configuration' => array(
+ 'title' => 'UCP_MCHAT_CONFIG',
+ 'auth' => 'ext_dmzx/mchat && acl_u_mchat_use',
+ 'cat' => array('UCP_MCHAT_CONFIG')),
+ ),
+ );
+ }
+}
diff --git a/ucp/ucp_mchat_module.php b/ucp/ucp_mchat_module.php
new file mode 100644
index 0000000..18d3ad0
--- /dev/null
+++ b/ucp/ucp_mchat_module.php
@@ -0,0 +1,107 @@
+ $request->variable('user_mchat_index', (bool) $user->data['user_mchat_index']),
+ 'user_mchat_sound' => $request->variable('user_mchat_sound', (bool) $user->data['user_mchat_sound']),
+ 'user_mchat_stats_index' => $request->variable('user_mchat_stats_index', (bool) $user->data['user_mchat_stats_index']),
+ 'user_mchat_topics' => $request->variable('user_mchat_topics', (bool) $user->data['user_mchat_topics']),
+ 'user_mchat_avatars' => $request->variable('user_mchat_avatars', (bool) $user->data['user_mchat_avatars']),
+ 'user_mchat_input_area' => $request->variable('user_mchat_input_area', (bool) $user->data['user_mchat_input_area']),
+ );
+
+ add_form_key('ucp_mchat');
+
+ if ($submit)
+ {
+ if (!check_form_key('ucp_mchat'))
+ {
+ $error[] = 'FORM_INVALID';
+ }
+
+ if (!sizeof($error))
+ {
+ $sql_ary = array(
+ 'user_mchat_index' => $data['user_mchat_index'],
+ 'user_mchat_sound' => $data['user_mchat_sound'],
+ 'user_mchat_stats_index' => $data['user_mchat_stats_index'],
+ 'user_mchat_topics' => $data['user_mchat_topics'],
+ 'user_mchat_avatars' => $data['user_mchat_avatars'],
+ 'user_mchat_input_area' => $data['user_mchat_input_area'],
+ );
+
+ if (sizeof($sql_ary))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . (int) $user->data['user_id'];
+ $db->sql_query($sql);
+ }
+
+ meta_refresh(3, $this->u_action);
+ $message = $user->lang['PROFILE_UPDATED'] . '
' . sprintf($user->lang['RETURN_UCP'], '
', ' ');
+ trigger_error($message);
+ }
+
+ // Replace "error" strings with their real, localised form
+ // The /e modifier is deprecated since PHP 5.5.0
+ //$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
+ foreach ($error as $i => $err)
+ {
+ $lang = $this->user->lang($err);
+ if (!empty($lang))
+ {
+ $error[$i] = $lang;
+ }
+ }
+ }
+
+ $template->assign_vars(array(
+ 'ERROR' => (sizeof($error)) ? implode('
', $error) : '',
+
+ 'S_DISPLAY_MCHAT' => $data['user_mchat_index'],
+ 'S_SOUND_MCHAT' => $data['user_mchat_sound'],
+ 'S_STATS_MCHAT' => $data['user_mchat_stats_index'],
+ 'S_TOPICS_MCHAT' => $data['user_mchat_topics'],
+ 'S_AVATARS_MCHAT' => $data['user_mchat_avatars'],
+ 'S_INPUT_MCHAT' => $data['user_mchat_input_area'],
+ 'S_MCHAT_TOPICS' => $config['mchat_new_posts_edit'] || $config['mchat_new_posts_quote'] || $config['mchat_new_posts_reply'] || $config['mchat_new_posts_topic'],
+ 'S_MCHAT_INDEX' => $config['mchat_on_index'],
+ 'S_MCHAT_INDEX_STATS' => $config['mchat_stats_index'],
+ 'S_MCHAT_AVATARS' => $config['mchat_avatars'],
+ ));
+ break;
+
+ }
+
+ $template->assign_vars(array(
+ 'L_TITLE' => $user->lang['UCP_PROFILE_MCHAT'],
+ 'S_UCP_ACTION' => $this->u_action
+ ));
+
+ // Set desired template
+ $this->tpl_name = 'ucp_mchat';
+ $this->page_title = 'UCP_PROFILE_MCHAT';
+ }
+}