-17 Removals
+17 Additions

Created by:phpboost

<script> <script>
<!-- <!--
function shoutbox_add_message() function shoutbox_add_message()
{ {
var pseudo = jQuery("#shout-pseudo").val(); var pseudo = jQuery("#shout-pseudo").val();
var contents = jQuery("#shout-contents").val(); var contents = jQuery("#shout-contents").val();
if (pseudo && contents) if (pseudo && contents)
{ {
jQuery.ajax({ jQuery.ajax({
url: '${relative_url(ShoutboxUrlBuilder::ajax_add())}', url: '${relative_url(ShoutboxUrlBuilder::ajax_add())}',
type: "post", type: "post",
dataType: "json", dataType: "json",
data: {'pseudo' : pseudo, 'contents' : contents, 'token' : '{TOKEN}'}, data: {'pseudo' : pseudo, 'contents' : contents, 'token' : '{TOKEN}'},
beforeSend: function(){ beforeSend: function(){
jQuery('#shoutbox-refresh').html('<i class="fa fa-spin fa-spinner"></i>'); jQuery('#shoutbox-refresh').html('<i class="fa fa-spin fa-spinner"></i>');
}, },
success: function(returnData){ success: function(returnData){
if(returnData.code > 0) { if(returnData.code > 0) {
shoutbox_refresh_messages_box(); shoutbox_refresh_messages_box();
jQuery('#shout-contents').val(''); jQuery('#shout-contents').val('');
} else { } else {
switch(returnData.code) switch(returnData.code)
{ {
case -1: case -1:
alert(${escapejs(LangLoader::get_message('e_flood', 'errors'))}); alert(${escapejs(LangLoader::get_message('e_flood', 'errors'))});
break; break;
case -2: case -2:
alert("{L_ALERT_LINK_FLOOD}"); alert("{L_ALERT_LINK_FLOOD}");
break; break;
case -3: case -3:
alert(${escapejs(LangLoader::get_message('e_incomplete', 'errors'))}); alert(${escapejs(LangLoader::get_message('e_incomplete', 'errors'))});
break; break;
case -4: case -4:
alert(${escapejs(LangLoader::get_message('error.auth', 'status-messages-common'))}); alert(${escapejs(LangLoader::get_message('error.auth', 'status-messages-common'))});
break; break;
} }
} }
jQuery('#shoutbox-refresh').html('<i class="fa fa-refresh"></i>'); jQuery('#shoutbox-refresh').html('<i class="fa fa-refresh"></i>');
}, },
error: function(e){ error: function(e){
alert(${escapejs(LangLoader::get_message('csrf_invalid_token', 'status-messages-common'))}); alert(${escapejs(LangLoader::get_message('csrf_invalid_token', 'status-messages-common'))});
} }
}); });
} else { } else {
alert("${LangLoader::get_message('require_text', 'main')}"); alert("${LangLoader::get_message('require_text', 'main')}");
return false; return false;
} }
} }
function shoutbox_delete_message(id_message) function shoutbox_delete_message(id_message)
{ {
if (confirm(${escapejs(LangLoader::get_message('confirm.delete', 'status-messages-common'))})) if (confirm(${escapejs(LangLoader::get_message('confirm.delete', 'status-messages-common'))}))
{ {
jQuery.ajax({ jQuery.ajax({
url: '${relative_url(ShoutboxUrlBuilder::ajax_delete())}', url: '${relative_url(ShoutboxUrlBuilder::ajax_delete())}',
type: "post", type: "post",
dataType: "json", dataType: "json",
data: {'id' : id_message, 'token' : '{TOKEN}'}, data: {'id' : id_message, 'token' : '{TOKEN}'},
beforeSend: function(){ beforeSend: function(){
jQuery('#shoutbox-refresh').html('<i class="fa fa-spin fa-spinner"></i>'); jQuery('#shoutbox-refresh').html('<i class="fa fa-spin fa-spinner"></i>');
}, },
success: function(returnData){ success: function(returnData){
var code = returnData.code; var code = returnData.code;
if(code > 0) { if(code > 0) {
jQuery('#shoutbox-message-' + code).remove(); jQuery('#shoutbox-message-' + code).remove();
} else { } else {
alert("{@error.message.delete}"); alert("{@error.message.delete}");
} }
jQuery('#shoutbox-refresh').html('<i class="fa fa-refresh"></i>'); jQuery('#shoutbox-refresh').html('<i class="fa fa-refresh"></i>');
}, },
error: function(e){ error: function(e){
alert(${escapejs(LangLoader::get_message('csrf_invalid_token', 'status-messages-common'))}); alert(${escapejs(LangLoader::get_message('csrf_invalid_token', 'status-messages-common'))});
} }
}); });
} }
} }
function shoutbox_refresh_messages_box() { function shoutbox_refresh_messages_box() {
jQuery.ajax({ jQuery.ajax({
url: '${relative_url(ShoutboxUrlBuilder::ajax_refresh())}', url: '${relative_url(ShoutboxUrlBuilder::ajax_refresh())}',
type: "post", type: "post",
dataType: "json", dataType: "json",
data: {'token' : '{TOKEN}'}, data: {'token' : '{TOKEN}'},
beforeSend: function(){ beforeSend: function(){
jQuery('#shoutbox-refresh').html('<i class="fa fa-spin fa-spinner"></i>'); jQuery('#shoutbox-refresh').html('<i class="fa fa-spin fa-spinner"></i>');
}, },
success: function(returnData){ success: function(returnData){
jQuery('#shoutbox-messages-container').html(returnData); jQuery('#shoutbox-messages-container').html(returnData);
jQuery('#shoutbox-refresh').html('<i class="fa fa-refresh"></i>'); jQuery('#shoutbox-refresh').html('<i class="fa fa-refresh"></i>');
}, },
error: function(e){ error: function(e){
jQuery('#shoutbox-messages-container').html(e.responseText); jQuery('#shoutbox-messages-container').html(e.responseText);
jQuery('#shoutbox-refresh').html('<i class="fa fa-refresh"></i>'); jQuery('#shoutbox-refresh').html('<i class="fa fa-refresh"></i>');
} }
}); });
} }
# IF C_AUTOMATIC_REFRESH_ENABLED #setInterval(shoutbox_refresh_messages_box, {SHOUT_REFRESH_DELAY});# ENDIF # # IF C_AUTOMATIC_REFRESH_ENABLED #setInterval(shoutbox_refresh_messages_box, {SHOUT_REFRESH_DELAY});# ENDIF #
--> -->
</script> </script>
# IF C_DISPLAY_SHOUT_BBCODE #<script src="{PATH_TO_ROOT}/BBCode/templates/js/bbcode.js"></script># ENDIF # # IF C_DISPLAY_SHOUT_BBCODE #<script src="{PATH_TO_ROOT}/BBCode/templates/js/bbcode.js"></script># ENDIF #
<div id="shoutbox-messages-container"# IF C_HORIZONTAL # class="shout-horizontal" # ENDIF #># INCLUDE SHOUTBOX_MESSAGES #</div> <div id="shoutbox-messages-container"# IF C_HORIZONTAL # class="shout-horizontal" # ENDIF #># INCLUDE SHOUTBOX_MESSAGES #</div>
# IF C_DISPLAY_FORM # # IF C_DISPLAY_FORM #
<form action="#" method="post"> <form action="#" method="post">
<div class="shout-form-container shout-pseudo-container"> <div class="shout-form-container shout-pseudo-container">
# IF NOT C_MEMBER # # IF NOT C_MEMBER #
<label for="shout-pseudo"><span class="small">${LangLoader::get_message('form.name', 'common')}</span></label> <label for="shout-pseudo"><span class="small">${LangLoader::get_message('form.name', 'common')}</span></label>
<input maxlength="25" type="text" name="shout-pseudo" id="shout-pseudo" class="shout-pseudo not-connected" value=" ${LangLoader::get_message('visitor', 'user-common')}"> <input maxlength="25" type="text" name="shout-pseudo" id="shout-pseudo" class="shout-pseudo not-connected" value=" ${LangLoader::get_message('visitor', 'user-common')}">
# ELSE # # ELSE #
<input type="hidden" name="shout-pseudo" id="shout-pseudo" class="shout-pseudo connected" value="{SHOUTBOX_PSEUDO}"> <input type="hidden" name="shout-pseudo" id="shout-pseudo" class="shout-pseudo connected" value="{SHOUTBOX_PSEUDO}">
# ENDIF # # ENDIF #
</div> </div>
<div class="shout-form-container shout-contents-container"> <div class="shout-form-container shout-contents-container">
<label for="shout-contents"><span class="small">${LangLoader::get_message('message', 'main')}</span></label> <label for="shout-contents"><span class="small">${LangLoader::get_message('message', 'main')}</span></label>
<textarea id="shout-contents" name="shout-contents"# IF C_VALIDATE_ONKEYPRESS_ENTER # onkeypress="if(event.keyCode==13){shoutbox_add_message();}"# ENDIF # rows="2" cols="16"></textarea> <textarea id="shout-contents" name="shout-contents"# IF C_VALIDATE_ONKEYPRESS_ENTER # onkeypress="if(event.keyCode==13){shoutbox_add_message();}"# ENDIF # rows="2" cols="16"></textarea>
</div> </div>
<div id="shoutbox-bbcode-container" class="shout-spacing"> <div id="shoutbox-bbcode-container" class="shout-spacing">
# IF C_DISPLAY_SHOUT_BBCODE # # IF C_DISPLAY_SHOUT_BBCODE #
<ul> <ul>
<li class="bbcode-elements"> <li class="bbcode-elements">
<a href="javascript:bb_display_block('1', 'shout-contents');" onmouseover="bb_hide_block('1', 'shout-contents', 1);" onmouseout="bb_hide_block('1', 'shout-contents', 0);" class="fa bbcode-icon-smileys" title="${LangLoader::get_message('bb_smileys', 'common', 'BBCode')}"></a> <a href="javascript:bb_display_block('1', 'shout-contents');" onmouseover="bb_hide_block('1', 'shout-contents', 1);" onmouseout="bb_hide_block('1', 'shout-contents', 0);"> <i class="fa fa-fw bbcode-icon-smileys" aria-hidden="true"></i><span class="sr-only">${LangLoader::get_message('bb_smileys', 'common', 'BBCode')}</span></a>
<div class="bbcode-block-container" style="display: none;" id="bb-block1shout-contents"> <div class="bbcode-block-container" style="display: none;" id="bb-block1shout-contents">
<ul class="bbcode-block block-smileys" onmouseover="bb_hide_block('1', 'shout-contents', 1);" onmouseout="bb_hide_block('1', 'shout-contents', 0);"> <ul class="bbcode-block block-smileys" onmouseover="bb_hide_block('1', 'shout-contents', 1);" onmouseout="bb_hide_block('1', 'shout-contents', 0);">
# START smileys # # START smileys #
<li> <li>
<a href="" onclick="insertbbcode('{smileys.CODE}', 'smile', 'shout-contents');return false;" class="bbcode-hover" title="{smileys.CODE}"><img src="{smileys.URL}" alt="{smileys.CODE}"></a> <a href="" onclick="insertbbcode('{smileys.CODE}', 'smile', 'shout-contents');return false;" class="bbcode-hover" title="{smileys.CODE}"><img src="{smileys.URL}" alt="{smileys.CODE}" /></a>
</li> </li>
# END smileys # # END smileys #
</ul> </ul>
</div> </div>
</li> </li>
<li class="bbcode-elements"> <li class="bbcode-elements">
<a href="" class="fa bbcode-icon-bold# IF C_BOLD_DISABLED # icon-disabled# ENDIF #" onclick="# IF NOT C_BOLD_DISABLED #insertbbcode('[b]', '[/b]', 'shout-contents');# ENDIF #return false;" title="${LangLoader::get_message('bb_bold', 'common', 'BBCode')}"></a> <a href="" onclick="# IF NOT C_BOLD_DISABLED #insertbbcode('[b]', '[/b]', 'shout-contents');# ENDIF #return false;" aria-label="${LangLoader::get_message('bb_bold', 'common', 'BBCode')}"><i class="fa fa-fw bbcode-icon-bold# IF C_BOLD_DISABLED # icon-disabled# ENDIF #" aria-hidden="true" title="${LangLoader::get_message('bb_bold', 'common', 'BBCode')}"></i></a>
</li> </li>
<li class="bbcode-elements"> <li class="bbcode-elements">
<a href="" class="fa bbcode-icon-italic# IF C_ITALIC_DISABLED # icon-disabled# ENDIF #" onclick="# IF NOT C_ITALIC_DISABLED #insertbbcode('[i]', '[/i]', 'shout-contents');# ENDIF #return false;" title="${LangLoader::get_message('bb_italic', 'common', 'BBCode')}"></a> <a href="" onclick="# IF NOT C_ITALIC_DISABLED #insertbbcode('[i]', '[/i]', 'shout-contents');# ENDIF #return false;" aria-label="${LangLoader::get_message('bb_italic', 'common', 'BBCode')}"><i class="fa fa-fw bbcode-icon-italic# IF C_ITALIC_DISABLED # icon-disabled# ENDIF #" aria-hidden="true" title="${LangLoader::get_message('bb_italic', 'common', 'BBCode')}"></i></a>
</li> </li>
<li class="bbcode-elements"> <li class="bbcode-elements">
<a href="" class="fa bbcode-icon-underline# IF C_UNDERLINE_DISABLED # icon-disabled# ENDIF #" onclick="# IF NOT C_UNDERLINE_DISABLED #insertbbcode('[u]', '[/u]', 'shout-contents');# ENDIF #return false;" title="${LangLoader::get_message('bb_underline', 'common', 'BBCode')}"></a> <a href="" onclick="# IF NOT C_UNDERLINE_DISABLED #insertbbcode('[u]', '[/u]', 'shout-contents');# ENDIF #return false;" aria-label="${LangLoader::get_message('bb_underline', 'common', 'BBCode')}"><i class="fa fa-fw bbcode-icon-underline# IF C_UNDERLINE_DISABLED # icon-disabled# ENDIF #" aria-hidden="true" title="${LangLoader::get_message('bb_underline', 'common', 'BBCode')}"></i></a>
</li> </li>
<li class="bbcode-elements"> <li class="bbcode-elements">
<a href="" class="fa bbcode-icon-strike# IF C_STRIKE_DISABLED # icon-disabled# ENDIF #" onclick="# IF NOT C_STRIKE_DISABLED #insertbbcode('[s]', '[/s]', 'shout-contents');# ENDIF #return false;" title="${LangLoader::get_message('bb_strike', 'common', 'BBCode')}"></a> <a href="" onclick="# IF NOT C_STRIKE_DISABLED #insertbbcode('[s]', '[/s]', 'shout-contents');# ENDIF #return false;" aria-label="${LangLoader::get_message('bb_strike', 'common', 'BBCode')}"><i class="fa fa-fw bbcode-icon-strike# IF C_STRIKE_DISABLED # icon-disabled# ENDIF #" aria-hidden="true" title="${LangLoader::get_message('bb_strike', 'common', 'BBCode')}"></i></a>
</li> </li>
</ul> </ul>
# ENDIF # # ENDIF #
</div> </div>
<p class="shout-spacing"> <p class="shout-spacing">
<button onclick="shoutbox_add_message();" type="button">${LangLoader::get_message('submit', 'main')}</button> <button onclick="shoutbox_add_message();" type="button">${LangLoader::get_message('submit', 'main')}</button>
<input type="hidden" name="token" value="{TOKEN}"> <input type="hidden" name="token" value="{TOKEN}">
<a href="" onclick="shoutbox_refresh_messages_box();return false;" id="shoutbox-refresh" title="${LangLoader::get_message('refresh', 'main')}"><i class="fa fa-refresh"></i></a> <a href="" onclick="shoutbox_refresh_messages_box();return false;" id="shoutbox-refresh" aria-label="${LangLoader::get_message('refresh', 'main')}"><i class="fa fa-refresh" aria-hidden="true" title="${LangLoader::get_message('refresh', 'main')}"></i></a>
</p> </p>
</form> </form>
# ELSE # # ELSE #
# IF C_DISPLAY_NO_WRITE_AUTHORIZATION_MESSAGE # # IF C_DISPLAY_NO_WRITE_AUTHORIZATION_MESSAGE #
<div class="spacer"></div> <div class="spacer"></div>
<span class="warning">{@error.post.unauthorized}</span> <span class="message-helper warning">{@error.post.unauthorized}</span>
<p class="shout-spacing"> <p class="shout-spacing">
<a href="" onclick="shoutbox_refresh_messages_box();return false;" id="shoutbox-refresh" title="${LangLoader::get_message('refresh', 'main')}"><i class="fa fa-refresh"></i></a> <a href="" onclick="shoutbox_refresh_messages_box();return false;" id="shoutbox-refresh" aria-label="${LangLoader::get_message('refresh', 'main')}"><i class="fa fa-refresh" aria-hidden="true" title="${LangLoader::get_message('refresh', 'main')}"></i></a>
</p> </p>
# ENDIF # # ENDIF #
# ENDIF # # ENDIF #
<a class="small" href="${relative_url(ShoutboxUrlBuilder::home())}" title="{@archives.link}">{@archives}</a> <a class="small" href="${relative_url(ShoutboxUrlBuilder::home())}" title="{@archives.link}">{@archives}</a>
Editor
Original Text
Changed Text