Тестовик aka пробник

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » Тестовик aka пробник » Тестовый форум » Скрипты


Скрипты

Сообщений 1 страница 9 из 9

1

Сюда помещу всю нужные скрипты

0

2

Убрать рекламу

Код:
<style> #pun-title table tbody tr .title-logo-tdr {position: absolute; z-index: 1; left: 1500px; top: 190px
}
</style>

0

3

Убрать слово "Объявление"

Код:
<style type="text/css">
#pun-announcement h2 {display: none}
#pun-announcement .container {padding-top: 1em}
</style>

0

4

Новые символы

Код:
<div class="main" id="spo_all"><div class="category" id="spo_top" onclick="obj=this.parentNode.childNodes[1].style; tmp=(obj.display!='block') ? 'block' : 'none'; obj.display=tmp; return false;"><h2><center>>>>Новые символы <<<</center></h2></div><div id="spoiler4">
        <input type="button" value="¢" name="H" title="¢" onclick="bbcode('¢','')" />
<input type="button" value="£ " name="H" title="£ " onclick="bbcode('£','')" />
<input type="button" value="€ " name="H" title="€" onclick="bbcode('€','')" />
<input type="button" value="₪" name="H" title="₪" onclick="bbcode('₪','')" />
<input type="button" value="¤" name="H" title="¤ " onclick="bbcode('¤','')" />
<input type="button" value="¥ " name="H" title="¥" onclick="bbcode('¥','')" />
<input type="button" value="¦" name="H" title="¦ " onclick="bbcode('¦','')" />
<input type="button" value="§" name="H" title="§" onclick="bbcode('§','')" />
<input type="button" value="¨" name="H" title="¨ " onclick="bbcode('¨','')" />
<input type="button" value="©" name="H" title="©" onclick="bbcode('©','')" />
<input type="button" value=" ª " name="H" title=" ª " onclick="bbcode(' ª ','')" />
<input type="button" value=" º " name="H" title=" º " onclick="bbcode(' º ','')" />
<input type="button" value="«" name="H" title="«" onclick="bbcode('«','')" />
<input type="button" value="» " name="H" title="»" onclick="bbcode('»','')" />
<input type="button" value="¬ " name="H" title="¬ " onclick="bbcode('¬','')" />
<input type="button" value="®" name="H" title="®" onclick="bbcode('®','')" />
<input type="button" value="¯" name="H" title="¯" onclick="bbcode('¯','')" />
<input type="button" value="‰" name="H" title="‰" onclick="bbcode('‰','')" />
<input type="button" value=" µ " name="H" title=" µ " onclick="bbcode(' µ ','')" />
<input type="button" value="¶" name="H" title="¶" onclick="bbcode('¶','')" />
<input type="button" value="•" name="H" title="•" onclick="bbcode('•','')" />
<input type="button" value="¹" name="H" title="¹" onclick="bbcode('¹','')" />
<input type="button" value="¿" name="H" title="¿" onclick="bbcode('¿','')" />
<input type="button" value="←" name="H" title="←" onclick="bbcode('←','')" />
<input type="button" value="↑" name="H" title="↑" onclick="bbcode('↑','')" />
<input type="button" value="→" name="H" title="→" onclick="bbcode('→','')" />
<input type="button" value="↓" name="H" title="↓" onclick="bbcode('↓','')" />
<input type="button" value="↔" name="H" title="↔" onclick="bbcode('↔','')" />
<input type="button" value="⇒" name="H" title="⇒" onclick="bbcode('⇒','')" />
<input type="button" value="⇐" name="H" title="⇐" onclick="bbcode('⇐','')" />
<input type="button" value="⇔" name="H" title="⇔" onclick="bbcode('⇔','')" />
<input type="button" value="⇑" name="H" title="⇑" onclick="bbcode('⇑','')" />
<input type="button" value="⇓" name="H" title="⇓" onclick="bbcode('⇓','')" />
<input type="button" value="↵" name="H" title="↵" onclick="bbcode('↵','')" />
<input type="button" value="♠" name="H" title="♠" onclick="bbcode('♠','')" />
<input type="button" value="♣" name="H" title="♣" onclick="bbcode('♣','')" />
<input type="button" value="♥" name="H" title="♥" onclick="bbcode('♥','')" />
<input type="button" value="♦" name="H" title="♦" onclick="bbcode('♦','')" />
<input type="button" value="◊" name="H" title="◊" onclick="bbcode('◊','')" />
<input type="button" value="○" name="H" title="○" onclick="bbcode('○','')" />
<input type="button" value="●" name="H" title="●" onclick="bbcode('●','')" />
<input type="button" value="◄" name="H" title="◄" onclick="bbcode('◄','')" />
<input type="button" value="▼" name="H" title="▼" onclick="bbcode('▼','')" />
<input type="button" value="►" name="H" title="►" onclick="bbcode('►','')" />
<input type="button" value="▲" name="H" title="▲" onclick="bbcode('▲','')" />
<input type="button" value="■" name="H" title="■" onclick="bbcode('■','')" />
<input type="button" value="▪" name="H" title="▪" onclick="bbcode('▪','')" />
<input type="button" value="▫" name="H" title="▫" onclick="bbcode('▫','')" />
<input type="button" value="♀" name="H" title="♀" onclick="bbcode('♀','')" />
<input type="button" value="♂" name="H" title="♂" onclick="bbcode('♂','')" />
<input type="button" value="™" name="H" title="™" onclick="bbcode('™','')" />
<input type="button" value="≤" name="H" title="≤" onclick="bbcode('≤','')" />
<input type="button" value="≥" name="H" title="≥" onclick="bbcode('≥','')" />
<input type="button" value="≈ " name="H" title="≈" onclick="bbcode('≈','')" />
<input type="button" value="≠" name="H" title="≠" onclick="bbcode('≠','')" />
<input type="button" value="≡" name="H" title="≡" onclick="bbcode('≡','')" />
<input type="button" value="±" name="H" title="±" onclick="bbcode('±','')" />
<input type="button" value="²" name="H" title="²" onclick="bbcode('²','')" />
<input type="button" value="³" name="H" title="³" onclick="bbcode('³','')" />
<input type="button" value="∀" name="H" title="∀" onclick="bbcode('∀','')" />
<input type="button" value="∃" name="H" title="∃" onclick="bbcode('∃','')" />
<input type="button" value="∅" name="H" title="∅" onclick="bbcode('∅','')" />
<input type="button" value="∴" name="H" title="∴" onclick="bbcode('∴','')" />
<input type="button" value="≅" name="H" title="≅" onclick="bbcode('≅','')" />
<input type="button" value="⊕" name="H" title="⊕" onclick="bbcode('⊕','')" />
<input type="button" value="⊗" name="H" title="⊗" onclick="bbcode('⊗','')" />
<input type="button" value="�" name="H" title="�" onclick="bbcode('�','')" />
<br /></div></div>
<br><Br>

0

5

Выделить код
В форму ответа

Код:
<script type="text/javascript">
function select_text(elem) {
	if(window.getSelection) {   
var s=window.getSelection();   
if(s.setBaseAndExtent){   
	s.setBaseAndExtent(elem,0,elem,elem.innerText.length-1);   
}
else {   
	var r=document.createRange();   
	r.selectNodeContents(elem);   
	s.removeAllRanges();   
	s.addRange(r);
}   
	}
	else if(document.getSelection){   
var s=document.getSelection();   
var r=document.createRange();   
r.selectNodeContents(elem);   
s.removeAllRanges();   
s.addRange(r);   
	}
	else if(document.selection){   
var r=document.body.createTextRange();   
r.moveToElementText(elem);   
r.select();
	}   
}
</script>
<script type="text/javascript">
var div = document.getElementById('pun-main').getElementsByTagName('div');
for(x in div){
	if(div[x].className=='code-box'){
div[x].getElementsByTagName('strong')[0].innerHTML = '<a href="#" onclick="select_text(this.parentNode.parentNode.childNodes[1].getElementsByTagName(\'pre\')[0]); return false;">Выделить код</a>';
	}
}
</script>

0

6

PR вход

Код:
<style>.Myimge {position:absolute;margin-top:-14px;}</style>
    <script type="text/javascript">
    PiarNik="Пиар";
    PiarPas="5555";
    var L="<div id=\"PR_loginDiv\" style=\"display:none;\">\
    <form id=\"form_login\" name=\"login\" method=\"post\" action=\"login.php?action=in\" onsubmit=\"return check_form()\">\
    <fieldset>\
    <input type=\"hidden\" name=\"form_sent\" value=\"1\"/>\
    <input type=\"text\" id=\"fld1\" name=\"req_username\" size=\"21\" maxlength=\"25\"/>\
    <input type=\"text\" id=\"fld2\" name=\"req_password\" size=\"7\" maxlength=\"16\"/>\
    <input type=\"submit\" class=\"button\" name=\"login\"/>\
    </fieldset>\
    </form>\
    </div>\
    <span id=spMyimg><img class=\"Myimge\"  title=\"Быстрый вход для 'Пиарщиков'\" onclick=\"PiarIn()\" src=\"http://savepic.ru/2867133.png\" onmouseover=\"this.src='http://savepic.ru/2857917.png' \" onmouseout=\"this.src='http://savepic.ru/2867133.png'\" /></span>";
    if($("#navlogin").html()!=null){
    $("#navlogin").append(L) //navlogin
    $("#PR_loginDiv #fld1").val(PiarNik)
    $("#PR_loginDiv #fld2").val(PiarPas)
    function PiarIn () {$("#PR_loginDiv input[type='submit']").click();}
    }
    </script>

0

7

Цветовыделение групп

Код:
<script type="text/javascript">
var arr=document.links
[color=red]var arr1=new Array ("Admin", "Татьяна")[/color]
[color=blue]var arr2=new Array ("Ruslan", "WebMaster")[/color]
for (x in arr)
{for (y in arr1)
{for (j in arr2)
{if (arr[x].innerHTML==arr1[y])
{var b=arr[x].innerHTML
arr[x].innerHTML="<font color='red'>"+b+"</font>"}
else if (arr[x].innerHTML==arr2[j])
{var c=arr[x].innerHTML
arr[x].innerHTML="<font color='#0000FF'>"+c+"</font>"}}}}
</script>

0

8

Удобный вход

Код:
<script language="JavaScript">
        function showLDiv()
        {
        if(  document.getElementById("loginDiv").style.display == 'none' )
             document.getElementById("loginDiv").style.display = ''
        else document.getElementById("loginDiv").style.display = 'none'

        return false;
        }
        function check_form()
        {
        if(document.forms["form_login"].req_username.value=='' || document.forms["form_login"].req_username.value=='') {
        alert('Еще рано нажимать на "Войти"');
        return false;
        }
        return true
        }
        url=document.URL
        if(url.indexOf("login.php")==-1  && document.getElementById('navlogin')){
        document.getElementById('navlogin').innerHTML  = "<a href=\"login.php\" onclick=\"return showLDiv()\"><span>Войти</span></a>"
        login = "<centr><div id=loginDiv style=\"display: none; \">"

        login += "<form id=form_login name=login method=post action=\"login.php?action=in\" onsubmit=\"return check_form()\">"
        login += "<fieldset>"
        login += "<legend>Введите свое имя и пароль</legend>"
        login += "<input type=hidden name=form_sent value=1 />"
        login = login + "<input type=hidden name=redirect_url value="+document.URL+" />"
        login += "<br><table width=\"100%\" align=centr>"
        login += "<tr><td align=left><b>Имя :</b></td><td align=left><input type=\"text\" id=\"fld1\" name=\"req_username\" size=\"21\" maxlength=\"25\" /></td></tr>"
        login += "<tr><td align=left><b>Пароль :</b></td><td align=left><input type=\"password\" id=\"fld2\" name=\"req_password\" size=\"7\" maxlength=\"16\" /><span class=formsubmit><input type=submit class=button name=login value=\"Войти\" /></span>"
        login += "</form></td></tr>"
        login += "</table>"
        login += "</fieldset>"
        login += "<p><a href=\"register.php\">  Зарегистрироваться.</a>                                                         <a href=\"login.php?action=forget\">   Забыли пароль?</a></p>"   
    login += "</div></center>"

        document.getElementById('pun-navlinks').innerHTML += login
        }
        </script>

0

9

Спойлер
Надо убрать звездочки

Код:
<style>
#button-spoiler {background-image:url('https://forumupload.ru/uploads/0000/12/13/488-1.gif'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>

<script type="text/javascript">
function tag_spoiler(){
	var y = prompt("Показать спойлер",'');
	if(y!='null' && y!='' && typeof(y)!='object' && typeof(y)!='undefined'){
	var x = prompt("Скрыть спойлер",'');
	if(x=='null' || x=='' || typeof(x)=='object' || typeof(x)=='undefined') bbcode('[*spoiler='+y+']','[/spoiler*]'); else bbcode('[*spoiler='+y+'|'+x+']','[/spoiler*]');}
	else bbcode('[*spoiler]','[/spoiler*]')
}
function addSpoiler(str,from,internal){
	var pos=0,pos2=0,pos_c=0,pos_l=0,newpos=0,string='',close='',open='';
	if((pos=str.indexOf("[*spoiler",from))==-1) return str;
	if((pos2=str.indexOf("[/spoiler*]"),pos+9)==-1) return str;
	if(((pos_c=str.indexOf("]",pos+8))!=-1) && ((pos_c!=pos+8)&&(pos_c!=pos+9))){
	string = str.substring(pos+9,pos_c);
	if((pos_l = string.indexOf("|"))!=-1){
close = string.substring(0,pos_l);
open = string.substring(pos_l+1,string.length);
	}
	else{
close = string;
open = string;
	}
	}
	else{
close = 'Показать спойлер';
open = 'Скрыть спойлер';
	}
	newpos=str.indexOf("[*spoiler",pos+9)
	if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
	if((pos2=str.indexOf("[/spoiler]",pos+9))==-1) return str;
	str=str.substring(0,pos)+makeSpoiler(str.substring(pos_c+1,pos2),open,close)+str.substring(pos2+10,str.length)
	if( str.indexOf("[*spoiler")!=-1 && internal==false) str=addSpoiler(str,0,false)
	return str;
}

function makeSpoiler(txt,open,close){
	txt='<div class="quote-box" style="padding:1px;background: none; border: 0;"><cite style="width:100%;margin:0;"><input id="'+open+'" class="spoiler-button" style="width:140px;font-size:10px; margin:0;" type="button" value="'+close+'"></cite><blockquote class="quote-box" style="display:none; width: 80%;border: 1px solid black;margin:0;">'+txt+'</blockquote></div>'
	return txt;
}

$(document).ready(function(){
	$("div.quote-box > cite > input.spoiler-button").click(function(){
$(this).parents("div.quote-box:first").find("blockquote.quote-box:first").toggle("slow");
var a = $(this).attr('value');$(this).attr('value',$(this).attr('id'));$(this).attr('id',a);
	});
});

if((document.URL.indexOf("viewtopic.php")!=-1) || (document.URL.indexOf("post.php")!=-1)){
	elm=document.getElementById("pun-main").getElementsByTagName("div")
	for(x in elm) if(elm[x].className=="post-content"){
var post=elm[x]
post.innerHTML=addSpoiler(post.innerHTML,0,false)
	}
}
if(form=document.getElementById("form-buttons"))
	form.getElementsByTagName("tr")[0].insertCell(16).innerHTML="<img  id=\"button-spoiler\" title=\"Спойлер\" onclick=\"tag_spoiler('[*spoiler]','[*/spoiler]')\" src=\"/i/blank.gif\" />"
</script>

<!--Спойлер - контейнер-->
<script type="text/javascript"> 
$(document).ready(function(){
	$('.splLink').parent().hover(function(){
$(this).children('div.splCont').toggle('normal');
	},
	function(){
$(this).children('div.splCont').toggle('normal');
	});
});
  </script>

0


Вы здесь » Тестовик aka пробник » Тестовый форум » Скрипты


Рейтинг форумов | Создать форум бесплатно