Improved template code for mChat messages

This commit is contained in:
kasimi
2015-12-17 12:59:11 +01:00
parent 0701ac10c1
commit c6f27407a8
8 changed files with 103 additions and 76 deletions

View File

@@ -347,9 +347,8 @@ class render_helper
'MCHAT_ALLOW_DEL' => $mchat_del,
'MCHAT_USER_AVATAR' => $mchat_avatar,
'U_VIEWPROFILE' => ($row['user_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->phpEx}", 'mode=viewprofile&u=' . $row['user_id']) : '',
'U_USER_IDS' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id']) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'BOT_USER_ID' => $row['user_id'] != '1',
'U_USER_ID' => ($row['user_id'] != ANONYMOUS && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && $this->user->data['user_id'] != $row['user_id'] && $row['user_id'] != '1' && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_'))) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'MCHAT_IS_POSTER' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] == $row['user_id']) ? true : false,
'MCHAT_PM' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id'] && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_'))) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'MCHAT_MESSAGE_EDIT' => $message_edit,
'MCHAT_MESSAGE_ID' => $row['message_id'],
'MCHAT_USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']),
@@ -432,7 +431,7 @@ class render_helper
$rows = array_reverse($rows);
}
foreach($rows as $row)
foreach($rows as $row_num => $row)
{
// auth check
if ($row['forum_id'] != 0 && !$this->auth->acl_get('f_read', $row['forum_id']))
@@ -471,9 +470,8 @@ class render_helper
'MCHAT_ALLOW_DEL' => $mchat_del,
'MCHAT_USER_AVATAR' => $mchat_avatar,
'U_VIEWPROFILE' => ($row['user_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->phpEx}", 'mode=viewprofile&u=' . $row['user_id']) : '',
'U_USER_IDS' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id']) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'BOT_USER_ID' => $row['user_id'] != '1',
'U_USER_ID' => ($row['user_id'] != ANONYMOUS && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && $this->user->data['user_id'] != $row['user_id'] && $row['user_id'] != '1' && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_'))) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'MCHAT_IS_POSTER' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] == $row['user_id']) ? true : false,
'MCHAT_PM' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id'] && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_'))) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'MCHAT_MESSAGE_EDIT' => $message_edit,
'MCHAT_MESSAGE_ID' => $row['message_id'],
'MCHAT_USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']),
@@ -783,9 +781,8 @@ class render_helper
'MCHAT_MESSAGE_EDIT' => $message_edit,
'MCHAT_USER_AVATAR' => $mchat_avatar,
'U_VIEWPROFILE' => ($row['user_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->phpEx}", 'mode=viewprofile&u=' . $row['user_id']) : '',
'U_USER_IDS' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id']) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'BOT_USER_ID' => $row['user_id'] != '1',
'U_USER_ID' => ($row['user_id'] != ANONYMOUS && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && $this->user->data['user_id'] != $row['user_id'] && $row['user_id'] != '1' && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_'))) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'MCHAT_IS_POSTER' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] == $row['user_id']) ? true : false,
'MCHAT_PM' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id'] && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_'))) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'MCHAT_MESSAGE_ID' => $row['message_id'],
'MCHAT_USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']),
'MCHAT_USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']),
@@ -1008,9 +1005,8 @@ class render_helper
'MCHAT_ALLOW_DEL' => $mchat_del,
'MCHAT_USER_AVATAR' => $mchat_avatar,
'U_VIEWPROFILE' => ($row['user_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->phpEx}", 'mode=viewprofile&u=' . $row['user_id']) : '',
'U_USER_IDS' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id']) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'BOT_USER_ID' => $row['user_id'] != '1',
'U_USER_ID' => ($row['user_id'] != ANONYMOUS && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && $this->user->data['user_id'] != $row['user_id'] && $row['user_id'] != '1' && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_'))) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'MCHAT_IS_POSTER' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] == $row['user_id']) ? true : false,
'MCHAT_PM' => ($row['user_id'] != ANONYMOUS && $this->user->data['user_id'] != $row['user_id'] && $this->config['allow_privmsg'] && $this->auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $this->auth->acl_gets('a_', 'm_') || $this->auth->acl_getf_global('m_'))) ? append_sid("{$this->phpbb_root_path}ucp.{$this->phpEx}", 'i=pm&mode=compose&u=' . $row['user_id']) : '',
'MCHAT_MESSAGE_EDIT' => $message_edit,
'MCHAT_MESSAGE_ID' => $row['message_id'],
'MCHAT_USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], $this->user->lang['GUEST']),
@@ -1146,6 +1142,7 @@ class render_helper
'U_MORE_SMILIES' => append_sid("{$this->phpbb_root_path}posting.{$this->phpEx}", 'mode=smilies'),
'U_MCHAT_RULES' => $this->helper->route('dmzx_mchat_controller', array('mode' => 'rules')),
'S_MCHAT_ON_INDEX' => ($this->config['mchat_on_index'] && !empty($this->user->data['user_mchat_index'])) ? true : false,
'EXT_URL' => generate_board_url() . '/ext/dmzx/mchat/',
));
// Return for: \$this->helper->render(filename, lang_title);

View File

@@ -31,7 +31,7 @@ jQuery(function($) {
}, 1000, "swing");
}
if (mChat.pause) {
$("#mChatMessage").bind("keypress", function() {
$("#mChatMessage").on("keypress", function() {
clearInterval(mChat.interval);
$("#mChatLoadIMG,#mChatOkIMG,#mChatErrorIMG").hide();
$("#mChatRefreshText").html(mChat.refreshNo).addClass("mchat-alert");
@@ -90,7 +90,7 @@ jQuery(function($) {
}
};
testSubject.insertAfter(input);
$(this).bind("keypress blur change submit focus", check);
$(this).on("keypress blur change submit focus", check);
});
return this;
};
@@ -181,7 +181,7 @@ jQuery(function($) {
return false;
}
var messChars = $("#mChatMessage").val().replace(/ /g, "");
if (messChars.length > mChat.mssgLngth && mChat.mssgLngth) {
if (mChat.mssgLngth && messChars.length > mChat.mssgLngth) {
alert(mChat.mssgLngthLong);
return;
}
@@ -225,7 +225,7 @@ jQuery(function($) {
});
},
edit: function(id) {
var message = $("#edit" + id).val();
var message = $("#mess" + id).data("edit");
apprise(mChat.editInfo, {
"textarea": message,
"animate": true,
@@ -433,6 +433,16 @@ jQuery(function($) {
$("#mChatPauseIMG").show();
$("#mChatRefreshText").html(mChat.refreshNo).addClass("mchat-alert");
$("#mChatSessMess").html(mChat.sessOut).addClass("mchat-alert");
},
entityDecode: function(text) {
var s = decodeURIComponent(text.replace(/\+/g, " "));
s = s.replace(/&lt;/g, "<");
s = s.replace(/&gt;/g, ">");
s = s.replace(/&#58;/g, ':');
s = s.replace(/&#46;/g, '.');
s = s.replace(/&amp;/g, '&');
s = s.replace(/&quot;/g, '"');
return s;
}
});
@@ -465,6 +475,43 @@ jQuery(function($) {
$.cookie("mChatNoSound", $(this).is(":checked") ? null : "yes");
});
$("#mChatmain").on("click", "span.mChatInsertMention", function() {
var $msg = $(this).closest('.mChatHover');
var username = mChat.entityDecode($msg.data("username"));
var usercolor = $msg.data("usercolor");
if (usercolor) {
username = "[b][color=" + usercolor + "]" + username + "[/color][/b]";
} else if (mChat.allowBBCodes) {
username = "[b]" + username + "[/b]";
}
insert_text("@ " + username + ", ");
});
$("#mChatData").on("click", "img.mChatInsertQuote", function() {
var $msg = $(this).closest('.mChatHover');
var username = mChat.entityDecode($msg.data("username"));
var id = $msg.data("id");
var quote = mChat.entityDecode($("#mess" + id).data("edit"));
insert_text('[quote="' + username + '"]' + quote + '[/quote]');
});
$("#mChatData").on("click", "img.mChatInsertLike", function() {
var $msg = $(this).closest('.mChatHover');
var username = mChat.entityDecode($msg.data("username"));
var quote = mChat.entityDecode($msg.data("edit"));
insert_text(mChat.likes + '[quote="' + username + '"]' + quote + "[/quote]");
});
$("#mChatData").on("click", "img.mChatEdit", function() {
var $msg = $(this).closest('.mChatHover');
mChat.edit($msg.data("id"));
});
$("#mChatData").on("click", "img.mChatDelete", function() {
var $msg = $(this).closest('.mChatHover');
mChat.del($msg.data("id"));
});
// Apprise 1.5 by Daniel Raftery
// http://thrivingkings.com/apprise
//
@@ -567,14 +614,14 @@ jQuery(function($) {
if (!n) {
n = false;
}
$(".aTextbox").bind("keydown blur", function() {
$(".aTextbox").on("keydown blur", function() {
n = $(this).val();
});
var o = $(".aEdit").val();
if (!o) {
o = false;
}
$(".aEdit").bind("keydown blur", function() {
$(".aEdit").on("keydown blur", function() {
o = $(this).val();
});
$(".aButtons > button").click(function() {

File diff suppressed because one or more lines are too long

View File

@@ -1,10 +0,0 @@
<!-- BEGIN mchatrow -->
<div id="mess{mchatrow.MCHAT_MESSAGE_ID}" class="mChatBG{mchatrow.MCHAT_CLASS} mChatHover">
<div class="mChatAvatars"><!-- IF mchatrow.U_VIEWPROFILE --><a href="{mchatrow.U_VIEWPROFILE}" title="{L_READ_PROFILE}"><!-- ENDIF --><!-- IF mchatrow.MCHAT_USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" width="40px;" height="40px;" alt="" /><!-- ENDIF --><!-- IF mchatrow.U_VIEWPROFILE --></a><!-- ENDIF -->
</div>
<div>
<span style="float:left;"><!-- IF not MCHAT_ARCHIVE_MODE and MCHAT_ADD_MESSAGE --><!-- IF MCHAT_ALLOW_BBCODES --><!-- IF mchatrow.MCHAT_USERNAME_COLOR --><a class="mChatScriptLink" href="#" onclick="insert_text('&#64;&nbsp;[b][color={mchatrow.MCHAT_USERNAME_COLOR}]{mchatrow.MCHAT_USERNAME}[/color][/b], ', false);return false;" title="{L_MCHAT_RESPOND}"><span style="color: {mchatrow.MCHAT_USERNAME_COLOR}"><strong>&#64;</strong></span></a><!-- ELSE --> <a href="#" class="mChatScriptLink" onclick="insert_text('&#64;&nbsp;[b]{mchatrow.MCHAT_USERNAME}[/b], ', false);return false;" title="{L_MCHAT_RESPOND}"><strong>&#64;</strong></a><!-- ENDIF --><!-- ELSE --> <a href="#" class="mChatScriptLink" onclick="insert_text('&#64;&nbsp;{mchatrow.MCHAT_USERNAME}, ', false);return false;" title="{L_MCHAT_RESPOND}">&#64;</a><!-- ENDIF -->&nbsp;<!-- ENDIF -->{mchatrow.MCHAT_USERNAME_FULL} - {mchatrow.MCHAT_TIME}</span>
<span style="float:right;"><!-- IF mchatrow.U_USER_ID and mchatrow.BOT_USER_ID and MCHAT_ALLOW_PM and not MCHAT_ARCHIVE_MODE --><a href="{mchatrow.U_USER_ID}" title="{L_MCHAT_SEND_PM}" return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/message.gif" alt="{L_MCHAT_SEND_PM}" title="{L_MCHAT_SEND_PM}" class="mChatImage" /></a>&nbsp;<!-- ENDIF --><!-- IF mchatrow.U_USER_IDS and MCHAT_ALLOW_LIKE and not MCHAT_ARCHIVE_MODE --><a href="#" onclick="insert_like('{mchatrow.MCHAT_USERNAME}','{mchatrow.MCHAT_MESSAGE_EDIT}'); return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/like.png" alt="{L_REPLY_WITH_LIKE}" title="{L_REPLY_WITH_LIKE}" class="mChatImage" /></a><!-- ENDIF --> &nbsp;<!-- IF mchatrow.U_USER_IDS and MCHAT_ALLOW_QUOTE and not MCHAT_ARCHIVE_MODE --><a href="#" onclick="insert_quote('{mchatrow.MCHAT_USERNAME}','{mchatrow.MCHAT_MESSAGE_EDIT}'); return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/quota.png" alt="{L_REPLY_WITH_QUOTE}" title="{L_REPLY_WITH_QUOTE}" class="mChatImage" /></a><!-- ENDIF -->&nbsp;<!-- IF MCHAT_ALLOW_IP --><a href="{mchatrow.MCHAT_U_WHOIS}" onclick="popup(this.href, 750, 500); return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/ip.gif" alt="{L_MCHAT_IP} {mchatrow.MCHAT_USER_IP}" title="{L_MCHAT_IP} {mchatrow.MCHAT_USER_IP}" class="mChatImage" /></a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_BAN --> <a href="{mchatrow.MCHAT_U_BAN}"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" class="mChatImage" /></a><!-- ENDIF --><!-- IF mchatrow.MCHAT_ALLOW_EDIT --> <a href="#" onclick="mChat.edit('{mchatrow.MCHAT_MESSAGE_ID}');return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" class="mChatImage" /></a><!-- ENDIF --><input type="hidden" id="edit{mchatrow.MCHAT_MESSAGE_ID}" value="{mchatrow.MCHAT_MESSAGE_EDIT}" /><!-- IF mchatrow.MCHAT_ALLOW_DEL --> <a href="#" onclick="mChat.del('{mchatrow.MCHAT_MESSAGE_ID}');return false;"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" class="mChatImage" /></a><!-- ENDIF --></span><br /><div class="avatarMessage mChatMessage">{mchatrow.MCHAT_MESSAGE}</div>
</div>
</div>
<!-- END mchatrow -->

View File

@@ -76,42 +76,6 @@
focusFix : <!-- IF MCHAT_ARCHIVE_MODE -->false<!-- ELSE -->true<!-- ENDIF -->,
archiveMode : <!-- IF MCHAT_ARCHIVE_MODE -->true<!-- ELSE -->false<!-- ENDIF -->
};
function insert_quote(user, text) {
var quote = decodeURIComponent(text.replace(/\+/g, " "));
quote = quote.replace(/&lt;/g, "<");
quote = quote.replace(/&gt;/g, ">");
quote = quote.replace(/&#58;/g, ':');
quote = quote.replace(/&#46;/g, '.');
quote = quote.replace(/&amp;/g, '&');
quote = quote.replace(/&quot;/g, '"');
var username = decodeURIComponent(user.replace(/\+/g, " "));
username = username.replace(/&lt;/g, "<");
username = username.replace(/&gt;/g, ">");
username = username.replace(/&#58;/g, ':');
username = username.replace(/&#46;/g, '.');
username = username.replace(/&amp;/g, '&');
username = username.replace(/&quot;/g, '"');
document.getElementById('mChatMessage').value += '[quote="' + username + '"]' + quote + '[/quote]';
document.getElementById('mChatMessage').focus();
}
function insert_like(user, text) {
var quote = decodeURIComponent(text.replace(/\+/g, " "));
quote = quote.replace(/&lt;/g, "<");
quote = quote.replace(/&gt;/g, ">");
quote = quote.replace(/&#58;/g, ':');
quote = quote.replace(/&#46;/g, '.');
quote = quote.replace(/&amp;/g, '&');
quote = quote.replace(/&quot;/g, '"');
var username = decodeURIComponent(user.replace(/\+/g, " "));
username = username.replace(/&lt;/g, "<");
username = username.replace(/&gt;/g, ">");
username = username.replace(/&#58;/g, ':');
username = username.replace(/&#46;/g, '.');
username = username.replace(/&amp;/g, '&');
username = username.replace(/&quot;/g, '"');
document.getElementById('mChatMessage').value += '' + mChat.likes + '[quote="' + username + '"]' + quote + '[/quote]';
document.getElementById('mChatMessage').focus();
}
// ]]>
</script>
<!-- IF not MCHAT_ARCHIVE_MODE -->
@@ -120,11 +84,7 @@
<!-- ENDIF -->
<div id="mChatData">
<!-- ENDIF -->
<!-- IF S_MCHAT_AVATARS -->
<!-- INCLUDE mchat_avatars.html -->
<!-- ELSE -->
<!-- INCLUDE mchat_no_avatars.html -->
<!-- ENDIF -->
<!-- INCLUDE mchat_messages.html -->
<!-- IF not MCHAT_READ_MODE -->
<!-- IF MCHAT_NOMESSAGE_MODE --><div id="mChatNoMessage">{L_MCHAT_NOMESSAGE}</div><!-- ENDIF -->
</div>

View File

@@ -0,0 +1,26 @@
<!-- BEGIN mchatrow -->
<div id="mess{mchatrow.MCHAT_MESSAGE_ID}" class="mChatBG{mchatrow.MCHAT_CLASS} mChatHover" data-id="{mchatrow.MCHAT_MESSAGE_ID}" data-username="{mchatrow.MCHAT_USERNAME}"<!-- IF mchatrow.MCHAT_USERNAME_COLOR --> data-usercolor="{mchatrow.MCHAT_USERNAME_COLOR}"<!-- ENDIF --> data-edit="{mchatrow.MCHAT_MESSAGE_EDIT}">
<!-- IF S_MCHAT_AVATARS -->
<div class="mChatAvatars">
<!-- IF mchatrow.U_VIEWPROFILE --><a href="{mchatrow.U_VIEWPROFILE}" title="{L_READ_PROFILE}"><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_USER_AVATAR -->{mchatrow.MCHAT_USER_AVATAR}<!-- ELSE --><img src="{T_THEME_PATH}/images/no_avatar.gif" width="40px;" height="40px;" alt="" /><!-- ENDIF -->
<!-- IF mchatrow.U_VIEWPROFILE --></a><!-- ENDIF -->
</div>
<!-- ENDIF -->
<div class="mChatMessageHeader">
<!-- IF not MCHAT_ARCHIVE_MODE --><span class="mChatInsertMention" title="{L_MCHAT_RESPOND}" <!-- IF mchatrow.MCHAT_USERNAME_COLOR --> style="color:{mchatrow.MCHAT_USERNAME_COLOR}"<!-- ENDIF -->><strong>&#64;</strong></span><!-- ENDIF -->
{mchatrow.MCHAT_USERNAME_FULL} - {mchatrow.MCHAT_TIME}
</div>
<div class="mChatMessageIcons">
<!-- IF MCHAT_ALLOW_PM and mchatrow.MCHAT_PM and mchatrow.U_VIEWPROFILE --><a href="{mchatrow.MCHAT_PM}" title="{L_MCHAT_SEND_PM}"><img src="{BOARD_URL}ext/dmzx/mchat/styles/prosilver/theme/images/message.gif" alt="{L_MCHAT_SEND_PM}" title="{L_MCHAT_SEND_PM}" class="mChatImage" /></a><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_LIKE and not MCHAT_ARCHIVE_MODE and not mchatrow.MCHAT_IS_POSTER --><img src="{EXT_URL}styles/prosilver/theme/images/like.png" alt="{L_REPLY_WITH_LIKE}" title="{L_REPLY_WITH_LIKE}" class="mChatImage mChatInsertLike" /></a><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_QUOTE and not MCHAT_ARCHIVE_MODE and not mchatrow.MCHAT_IS_POSTER --><img src="{EXT_URL}styles/prosilver/theme/images/quota.png" alt="{L_REPLY_WITH_QUOTE}" title="{L_REPLY_WITH_QUOTE}" class="mChatImage mChatInsertQuote" /><!-- ENDIF -->
<!-- IF MCHAT_ALLOW_IP --><a href="{mchatrow.MCHAT_U_WHOIS}" onclick="popup(this.href, 750, 500); return false;"><img src="{EXT_URL}styles/prosilver/theme/images/ip.gif" alt="{L_MCHAT_IP} {mchatrow.MCHAT_USER_IP}" title="{L_MCHAT_IP} {mchatrow.MCHAT_USER_IP}" class="mChatImage" /></a><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_ALLOW_BAN --><a href="{mchatrow.MCHAT_U_BAN}"><img src="{EXT_URL}styles/prosilver/theme/images/ban.gif" alt="{L_MCHAT_PERMISSIONS}" title="{L_MCHAT_PERMISSIONS}" class="mChatImage" /></a><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_ALLOW_EDIT --><img src="{EXT_URL}styles/prosilver/theme/images/edit.gif" alt="{L_MCHAT_EDIT}" title="{L_MCHAT_EDIT}" class="mChatImage mChatEdit" /><!-- ENDIF -->
<!-- IF mchatrow.MCHAT_ALLOW_DEL --><img src="{EXT_URL}styles/prosilver/theme/images/del.gif" alt="{L_MCHAT_DELITE}" title="{L_MCHAT_DELITE}" class="mChatImage mChatDelete" /><!-- ENDIF -->
</div>
<br />
<div class="mChatMessage<!-- IF S_MCHAT_AVATARS --> avatarMessage<!-- ENDIF -->">{mchatrow.MCHAT_MESSAGE}</div>
</div>
<!-- END mchatrow -->

View File

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

View File

@@ -135,6 +135,18 @@ img.mChatImage{
vertical-align: middle;
}
div.mChatMessageHeader {
float: left;
}
div.mChatMessageIcons {
float: right;
}
img.mChatImage, span.mChatInsertMention {
cursor: pointer;
}
img.mChatImageLoad {
vertical-align: middle;
cursor: wait;