...
Скрипты
Сообщений 1 страница 6 из 6
Поделиться22016-10-04 15:42:04
HTML В ПОСТАХ (с) Deff или преобразование контента в тегах code
Скрипт делает работающими коды внутри тегов code в избранных сообщениях.
Поделиться32016-10-04 16:04:52
Профилактика на форуме
<div id="resplash" style="display: none;">
<div class='formal' style='height:200px; width:200px; margin:auto; margin-top:200px; font-family:tahoma; font-size:10px;'> <form id='login' class='container' method='post' action='login.php?action=in' onsubmit='return my_form(this)'><fieldset><span>Форум на профилактике</span><div class='fs-box inline'> <input type='hidden' name='form_sent' value='1' /><input type='hidden' name='redirect_url' value='/' /><p class='inputfield required'> <label for='fld1'>Имя <em>(Обязательно)</em></label><br /> <span class='input'> <input type='text' id='fld1' name='req_username' size='25' maxlength='25'/></span></p> <p class='inputfield required'> <label for='fld2'>Пароль <em>(Обязательно)</em></label><br /> <span class='input'> <input type='password' id='fld2' name='req_password' size='25' maxlength='25' /></span></p></div></fieldset> <center><p class='formsubmit'> <input type='submit' class='button' id='customebutton' name='login' value='Войти как Администратор' /></p></center></form></div></div>
<script type="text/javascript">
var active = 1;
if(GroupID != 1 && active == 1){
e10 = document.createElement('div')
e10.innerHTML = document.getElementById("resplash").innerHTML;
document.getElementsByTagName('body')[0].insertBefore(e10,document.getElementById('pun_wrap'))
document.write("<style type=\"text/css\">html, body {background: #fff;} #customebutton {margin: auto;} #pun {display: none;}</style>");
document.title= 'Форум на профилактике - '+document.title;
}
</script>
Как работает:
Скрывает форум ото всех кроме администраторов. На случай если администратор разлогинится - добавлена форма входа, актуальная только для администраторов, так как если пользователь даже и залогинится, ничего не увидет. Администратор же будет наблюдать форум в штатном режиме.
Примечания:
Не обязательно убирать скрипт после окончания профилактики, достаточно просто поменять 1 на 0 в строке var active = 1; и профилактика будет отключена. При необходимости можно возобновить профилактику произведя обратные действия, то есть поменяв 0 на 1 =)
Куда ставить:
В хтмл-верх (можно и вниз, но вверху будет быстрее срабатывать)
Поделиться42016-10-04 16:14:34
Исправление проблем с репутацией
<script type="text/javascript">
if(FORUM.PartnerVote.toString().replace(/function\s*\(post_id,vote\)\s*/,"")==="{return true;}")
FORUM.PartnerVote = function(post_id,vote){return false}
</script>
Поделиться52016-10-04 16:18:48
Скрытие IP и провайдера на странице «Активные пользователи»
Скрытие IP и провайдера на странице «Активные пользователи»
(если флаги включены в настройках, скрываются и они)
В HTML-верх:
<!-- Скрытие IP и провайдера от модераторов © Alex_63 --> <style id="NoDsp">.gid2 #pun-online tcl:first-child{visibility:hidden}</style><script type="text/javascript">if($('#pun-online').length && GroupID==2){$(function(){$('.main .tcl:first-child a[href*="profile.php"]').each(function(){var OnUserN = $(this).clone();$(this).parents('.tcl').html(OnUserN);});$('style#NoDsp').remove();});}</script>
Скрытие информации об IP в теме, на странице «Активные пользователи» и на странице поиска по IP
В HTML-верх:
<!-- Скрываем информацию об IP от модераторов © Alex_63 --> <style id="HideIPMod1">.gid2 #pun-online tcl:first-child{visibility:hidden!important}</style> <style id="HideIPMod2">.gid2 #pun-message .main{display:none!important}</style> <style>.gid2 .pa-ip,.gid2 .pa-author>img{display:none!important;}</style><script type="text/javascript"> if(GroupID==2)$(document).ready(function() { if(document.URL.indexOf('moderate.php?get_host=')!=-1){ $('.main .info .container').html('Вы не имеете прав для просмотра этой страницы.'); $('#HideIPMod2').remove(); }else if($('#pun-online').length){ $('.main .tcl:first-child a[href*="profile.php"]').each(function(){ var OnUserN = $(this).clone();$(this).parents('.tcl').html(OnUserN); });$('#HideIPMod1').remove(); }else if($('#pun-viewtopic').length)$('.pa-ip,.pa-author>.acchide+img[src*="flags"]').remove(); }); else $('#HideIPMod1,#HideIPMod2').remove(); </script>
Дополнительно:
Скрытие поиска пользователей в Админке от модераторов
В конец style.css:
/* Скрываем Страницу поиска пользователей в Админке от модераторов*/ .gid2 #pun-admin_users #pun-admain1.adformal{display:none!important;}
Поделиться62016-10-04 16:46:39
Перенос колонок "тем:" и "сообщений:" под описание форума
В HTML верх
Выделить код
<style type="text/css"> #pun-index .category .tc2, #pun-index .category .tc3{ display:none!important; } .Tems_And_messages { display:inline-block; width:116px; } .Add{ display:inline-block; background-color:#CEE3BF; border-radius:6px; padding: 1px 7px; box-shadow:inset 0 0 1.4em rgba(49,113,3,.8) } .Tems_And_messages .right{ float:right } </style>
В Начало HTML низ
<script type="text/javascript"> $('#pun-index .category td.tcl .tclcon').each(function() { var str='<br><div class="Add"><div class="Tems_And_messages">Teм: <span class="right">'+$(this).parents('tr:first').find('td.tc2').text()+'</span></div><div style="margin-left:12px;" class="Tems_And_messages">Cообщений: <span class="right">'+$(this).parents('tr:first').find('td.tc3').text()+'</span></div></div>'; $(str).appendTo(this) }); </script>