Время:
Новых сообщений: Нет
Вы на форуме дней
Ваша группа: Гость
Ваш IP: 3.147.71.94
Logical-Portal — молодежный портал со своей изюминкой, каждый сможет найти что-то интересное и полезное для себя, например наш форум общения с которым вам обязательно нужно ознакомиться.
  • Страница 1 из 1
  • 1
Архив - только для чтения
Быстрые опции модератора для форума
Сообщение оставлено 12.07.2011 в 00:06:03 | Сообщение #1

Неплохой нужный скрипт для форума. Скрипт закрытия темы. И скрипт отправки темы в Корзину(с прибавлением известия тему о фактору переноса темы в корзину).

Вставляете код в совместный вид страничек форума:
Code
<?if(($GROUP_ID$='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">/*    
    * Script by http://forucoz.com/    
    * and http://javascript.ucoz.net/    
    *    
    * 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><?endif?>
 
 
   
Сообщение оставлено 12.07.2011 в 00:11:18 | Сообщение #2
foreest, на лп такой стоит smile
 
 
   
Сообщение оставлено 12.07.2011 в 08:25:04 | Сообщение #3
Ashot, они отсюда и спёрли его <_<
 
 
   
Сообщение оставлено 13.07.2011 в 02:57:37 | Сообщение #4
foreest, http://logical-portal.ru/forum/110-25382-1 такая тема уже есть.
 
 
   
Сообщение оставлено 13.07.2011 в 05:54:40 | Сообщение #5
Quote (Максончик)
foreest, http://logical-portal.ru/forum/110-25382-1 такая тема уже есть.


Закрыто.
 
 
   
  • Страница 1 из 1
  • 1
Поиск:
 
Графика от: Megas, GraFOS | Дизайн сверстал E.A.
Хостинг от uCoz
Яндекс.Метрика