Instalare:
CP ---> Design ---> Design management (templates) ---> Forum ---> General Appearance of forum pages ---> dupa $BODY$ adaugati :
Code
<?if($PAGE_ID$='threadpage')?><script type="text/javascript">function haveFiles(){var f = false;$("input.uplFileFl").each(function(){if ($(this).val()) f=true;});return f}document.addform.onsubmit = function(){var namewnd = "w" + Math.floor(Math.random()*999); _uWnd.alert('<img src="/.s/img/wd/3/ajax.gif" border="0" alt="download">','download',{name: namewnd, w: 250, h: 80, tm: 0}); $("#frF16").attr("disabled", true); if (haveFiles()) {_uPostForm($("form[name='addform']"), {success: function(dt){ parseResult(dt, namewnd);}})} else {$.post("/forum", $("form[name='addform']").serialize(), function(dt) {parseResult(dt, namewnd)})};return false;};function parseResult(dt, namewnd){var err = $("#frM2", dt).text(), thmurl = $("a:first", dt).attr("href"); if (err) {_uWnd.content(namewnd, '<center>'+err+'</center>'); _uWnd.setTitle(namewnd, 'Ошибка'); $("#frF16").attr("disabled", false); setTimeout(function(){ _uWnd.close(namewnd) },2000);} else if ($(dt).text().indexOf("Message Added.") > -1) { $("textarea#message").val(""); $("form[name='addform'] input:file").val(""); _uWnd.content(namewnd, '<center>Added</center>'); _uWnd.setTitle(namewnd, 'Message Added.'); $("#frF16").attr("disabled", false); setTimeout(function(){ _uWnd.close(namewnd) },2000); setTimeout(function(){ <?if $PAGE_ID$='threadpage'?>$(".gDivRight:first").load(thmurl + "?" + Math.floor(Math.random()*9999) + " .gDivRight:first"); setPnt(thmurl);<?endif?><?if $PAGE_ID$='addthread' or $PAGE_ID$='addpoll'?>setPnt($("td.forumNamesBar:first a.forumBarA:last", dt).attr("href"), true);<?endif?>}, 50);} else { _uWnd.content(namewnd, 'Mesajul dumneavoastra a fost adaugat cu succes.'); _uWnd.setTitle(namewnd, 'Message Added.'); $("#frF16").attr("disabled", false); setTimeout(function(){ _uWnd.close(namewnd) },2000); }};</script><?endif?>
Sursa: Link
Rezultat :