Principala » fisiere » Scripturi » Ucoz [ Adauga un material nou ]

Быстрые опции модератора для форума

2010-11-09, 3:40 PM


Хороший полезный скрипт для форума. Скрипт закрытия темы. И скрипт отправки темы в Корзину ( с добавлением сообщения тему о причине переноса темы в корзину ).

Вставляете код в общий вид страниц форума:

Code
'4') and $PAGE_ID$='threadpage')?>
<script type="text/javascript">
_nfid = 21;// id форума корзины.  
_username = '$USERNAME$'; _user_id = '$USER_ID$'; _home_link = '$HOME_PAGE_LINK$';
</script>  

<script type="text/javascript">
/*

  *
  * By Bogggdan
  *
  */


function OpenOptTheme () {new _uWnd('optTheme', 'Опции модератора', 198, 180, {align: 'left', autosize: true, fadespeed: 510, fadeclosespeed: 250, icon: IconWnd("no")}, '<br><input type="button" value="Закрыть тему" onclick="OptTheme(1)"> <input type="button" value="В корзину" onclick="OptTheme(2)">');}; function FidTid () {return location.href.split('/')[4].split('-')[0]+'-'+location.href.split('/')[4].split('-')[1];}; function IconWnd (s) {return 'http://javascript.ucoz.net/i/1/'+s+'.png';}; function OptTheme (a) { if ( a == 1 ) {_uWnd.reload('optTheme','<br><center>Закрываем тему...</center>'); _uWnd.setTitle('optTheme','Закрываем тему'); $.get('/forum/' + FidTid() + '-0-22-1', function(){_uWnd.reload('optTheme','<br><center>Тема закрыта</center>'); _uWnd.setTitle('optTheme','Тема закрыта'); setTimeout(function(){ _uWnd.close("optTheme"); } , 1200);});}; if ( a == 2 ) {_uWnd.close("optTheme"); new _uWnd('moveTheme', 'В корзину', 280, 280, {align: 'left', autosize: true, fadespeed: 500, fadeclosespeed: 250, icon: IconWnd("move"), oncontent:function(){$("#reasonMoveThm").focus()}}, '<fieldset><legend>Причина перемещения темы в корзину</legend><textarea rows="3" style="width:100%" id="reasonMoveThm"></textarea></fieldset><center><input type="button" value="Переместить в корзину" id="clickMoveThm" onclick="moveTheme()"></center>'); }}; function moveTheme () {$("#clickMoveThm").attr({value: "Подождите...", disabled: 1 }); $("#reasonMoveThm").attr("disabled", 1); var thisForum = $(".forumNamesBar .forumBar:eq(2)").html(); var thisFhref = $(".forumNamesBar .forumBar:eq(2)").attr("href"); var a = $("#reasonMoveThm").val() ? $("#reasonMoveThm").val() : "Причина не указана"; var m = "Данная тема была перемещена из раздела [url=" + thisFhref + "]" + thisForum + "[/url].\nПричина перемещения: " + a + "\n\nПереместил: [url=" + _home_link + "index/8-" + _user_id + "]" + _username + "[/url]."; $.post("/forum/", {p: 0, a: 7, jkd428: 1, jkd498: 1, message: m, ahtml: 0, frmt: 1, smiles_on: 1, signature_on: 1, subscribe: 0, fid: location.href.split('/')[4].split('-')[0], tid: location.href.split('/')[4].split('-')[1], ssid: $("input[name='ssid']").val()}, function () {$.get("/forum/" + FidTid() + "-0-20-1", function (e) {$.post("/forum/", {name: $('input[name="name"]', $('cmd[p="content"]', e).text()).val(), description: $('input[name="description"]', $('cmd[p="content"]', e).text()).val(), nfid: _nfid, a: 20, fid: location.href.split('/')[4].split('-')[0], tt: 1, t: 1, tid: location.href.split('/')[4].split('-')[1]}, function(){ setTimeout(function(){ _uWnd.close("moveTheme"); } , 1200);_uWnd.reload('moveTheme','<br><center>Тема перемещена</center>').checksize(); _uWnd.setTitle('moveTheme','Тема перемещена'); });});});}

$(document).ready(function(){
$("select[name='modopt']").before("<input type='button' value='Закрыть/В корзину' onclick='OpenOptTheme()'> ");
});
</script>

Меняем id корзины на свой. Чтобы его узнать, зайдите в раздел Корзина (например: /forum/21 ). 21 - id этого форума.

Причину перемещения темы вводить не обязательно. Если она не введена, то будет написано что причина не указана.




Categorie: Ucoz | Adaugat de: kopceak
Vizualizari: 974 | Downloads: | Raging: 0.0/0
Total comentarii : 0
Doar utilizatorii inregistrati pot comenta
[ Inregistrare | Login ]
Schimbul de fişiere este realizat de către utilizatorii site-ului, administraţia nu poartă nici o răspundere pentru conţinutul acestora sau pentru prejudiciile provocate. INTERFILM.MD nu dispune de conţinutul pus la schimb de către utilizatori, ci doar este un catalog al resurselor. Vă atenţionăm să nu încărcaţi pe site fişiere protejate de drepturile autorului sau fişiere cu conţinut ilegal. În cazul în care sunteţi deţinătorul drepturilor de autor al unui torrent şi doriţi să fie şters vă rugăm să ne scrieţi la adresa abuse@interfilm.md şi imediat se vor lua măsuri. Întregul text privind regulile şi condiţiile de utilizare a siteului poate fi găsit aici.