Пьер был неуклюж. Толстый, выше обыкновенного роста, широкий, с огромными красными руками, он, как говорится, не умел войти в салон и еще менее умел из него выйти, то есть перед выходом сказать что-нибудь особенно приятное. Кроме того, он был рассеян. Вставая, он вместо своей шляпы захватил треугольную шляпу с генеральским плюмажем и держал ее, дергая султан, до тех пор, пока генерал не попросил возвратить ее. Но вся его рассеянность и неуменье войти в салон и говорить в нем выкупались выражением добродушия, простоты и скромности.

Секунда до...

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

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


Вы здесь » Секунда до... » Сохраненные стили » Скрипты и коды


Скрипты и коды

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

1

...

0

2

Код:
<!-- Кнопка баннеров -->
<style>
#spo_all {margin:-10px 0 10px 0;}
#spo_top center img {margin:0 0 -10px 0;}
#spoiler4{width:100%!important;}
</style>
<div class="main" id="spo_all"><div class="category" id="spo_top" onclick="$('#spoiler4').toggle('slow');"><center><img src="http://s2.ipicture.ru/uploads/20111207/J7EnvZ73.png" /></center></div><div id="spoiler4" style="display: none">

<center>
тут баннеры
</center>

</div></div>
Код:
<!-- Подпись -->
<script type="text/javascript">
if (document.URL.indexOf("viewtopic")!=-1)
{var sigs=document.getElementById('pun-main').getElementsByTagName("div")
var v=0
for (v=0; v<=(sigs.length-1); v++)
{if (sigs[v].className=="post-content")
{if (sigs[v].innerHTML.toLowerCase().indexOf("<span>подпись автора</span>")==-1)
{sigs[v].innerHTML=sigs[v].innerHTML+"<dl class='post-sig'><dt><span>Подпись автора</span></dt><dd><p>"+"Заполните подпись согласно шаблону"+"</p></dd></dl>"}}}}
</script>
Код:
<!-- Важные темы -->
<script type="text/javascript">
if (document.URL.indexOf("viewforum")!=-1)
{var trs=document.getElementById('pun-main').getElementsByTagName("table")[0].rows
var io=1
for (io=1; io<=(trs.length-1); io++)
{if ((trs[io].className.indexOf("isticky")!=-1)&&(io==1))
{var portant=document.getElementById('pun-main').getElementsByTagName("table")[0].insertRow(1)
var im=portant.insertCell(0)
im.innerHTML="Важные темы"
im.style.color="#061624"
im.style.backgroundColor="#436173"
im.colSpan="4"}
else if ((trs[io].className.indexOf("isticky")!=-1)&&(trs[io+1].className.indexOf('isticky')==-1))
{var normal=document.getElementById('pun-main').getElementsByTagName("table")[0].insertRow(io+1)
var normal1=normal.insertCell(0)
normal1.innerHTML="Темы форума"
normal1.style.color="#061624"
normal1.style.backgroundColor="#436173"
normal1.colSpan="4"
}}}
</script>

0

3

Код:
<!--Спойлер-->
<style>
#button-spoiler {background-image:url('http://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:250px;font-size:10px; margin:0;" type="button" value="'+close+'"></cite><blockquote class="quote-box" style="display:none; width: 90%;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>
Код:
<!--audio плеер (special edition)v.2-->
<style>
#button-audio {background-image:url('http://img31.imageshack.us/img31/1875/sound.gif'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script language="javascript">
var changer, player, popup, popupp, pop, popzz, poprg, popam, popfl;
if ((document.URL.indexOf("viewtopic.php")!=-1) || (document.URL.indexOf("post.php")!=-1)){
elm=document.getElementsByTagName("div")
for(x in elm){
if(elm[x].className=="post-content") 
   {
post = elm[x].innerHTML;
if(post.indexOf("[/playf]")) {
changer = /\[playf\](\d+)\[\/playf\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(changer, "[audio]http://playfile.ru/get/$1/[/audio]")
    }
if(post.indexOf("[/music]")) {
changer = /\[music\](.*?)\[\/music\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(changer, "[audio]http://www.filehoster.ru/files/$1[/audio]")
    }
if(post.indexOf("[/yandx]")) {
changer = /\[yandx\](.*?)\[\/yandx\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(changer, "[audio][flash=300,72,http://static.video.yandex.ru/lite-audio/$1][/audio]")
    }
if(post.indexOf("[/mymp3]")) {
changer = /\[mymp3\](.*?)\|(.*?)\[\/mymp3\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(changer, "[audio]$1[/audio]")
    }
if(post.indexOf("http://playfile.ru")) {
player = /\[audio\](.*?)\/get\/(\d+)\/\[\/audio\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(player, "<br /><embed src='http://playfile.ru/images/player.swf' flashvars='st=http://playfile.ru/images/player_style_audio.inc&amp;file=http://playfile.ru/load/$2/' type='application/x-shockwave-flash' id='videoplayer757' wmode='transparent' width='230' height='36'>")
    } 
if(post.indexOf("http://static.video.yandex.ru/lite-audio")) {
player = /\[audio\]\[flash=([0-9]+)\,([0-9]+)\,(.*?)\/lite-audio\/(.*?)\[\/audio\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(player, "<br /><embed src='http://static.video.yandex.ru/lite-audio/$4' type='application/x-shockwave-flash' width='300' height='72' allowFullScreen='true' scale='noscale'/>")
    } 
if(post.indexOf("http://www.filehoster.ru")) {
player = /\[audio\]http:\/\/www\.filehoster\.ru\/files\/(.*?)\[\/audio\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(player, "<br /><embed src='http://www.filehoster.ru/player/' flashvars='dataurl=$1' type='application/x-shockwave-flash' width='350' height='50' allowFullScreen='sameDomain' wmode='transparent'>")
    }
if(post.indexOf("zippyshare.com")) {
player = /\[audio\]http:\/\/www(\d+)\.zippyshare\.com\/v\/(\d+)\/file\.html\[\/audio\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(player, "<br /><embed type='application/x-shockwave-flash' src='http://www.zippyshare.com/mediaplayer/mediaplayer.swf?backcolor=0xFFFFFF&amp;frontcolor=0x3366FF&amp;lightcolor=0xC0C0C0&amp;file=http://www$1.zippyshare.com/downloadMusic%3Fkey%3D$2xx&type=flv' quality='high' menu='false' wmode='transparent' allowscriptaccess='always' height='20' width='400' name='mp3player' border='0' style='margin-bottom: 6px;'/>")
    }
if(post.indexOf("http://rghost.ru")) {
player = /\[audio\](.*?)\/(\d+)\[\/audio\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(player, "<br /><object height='15' width='455' type='application/x-shockwave-flash' data='http://rghost.ru/flash/mediaplayer.swf' id='preview_mp3' style='visibility: visible;'><param name='flashvars' value='file=http://rghost.ru/download/action/$2/mp3&amp;streamer=http://rghost.ru/download/action/$2/mp3'></object>")
    }
if(post.indexOf("http://www.aimini.net")) {
player = /\[audio\](.*?)\?fid=([a-zA-Z0-9]{1})([a-zA-Z0-9]{1})([a-zA-Z0-9]{1})([a-zA-Z0-9]{1})([a-zA-Z0-9]{16})\[\/audio\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(player, "<br /><embed src='http://$5.$4.$3.$2.aimini.net/player/mp3/?file=http://$5.$4.$3.$2.aimini.net/play/?fid=$2$3$4$5$6&auto=no&repeat=yes' width='380' height='120' type='application/x-shockwave-flash' wmode='transparent'>")
    } 
if(post.indexOf(".mp3")) {
player = /\[audio\](.*?)\[\/audio\]/g
elm[x].innerHTML  = elm[x].innerHTML.replace(player, "<br /><embed src='http://www.demo-music.ru/pleer/pleer4.swf' type='application/x-shockwave-flash' allowscriptaccess='always' wmode='transparent' flashvars='comment=demo-music.ru&amp;st=http://www.demo-music.ru/pleer/style_pleer.txt&amp;file=$1' width='470' height='33'>")
    } 
 }}}
function pop1(){
 popup = window.open("http://www.playfile.ru/","popDialog","height=380,width=650")
 if (!document.all)  {popup.moveTo(100,100);}
 return false}
function pop2(){
 popupp = window.open("http://www.yapfiles.ru/","popDialog","height=200,width=700")
 if (!document.all)  {popupp.moveTo(100,100);}
 return false}
function pop3(){
 pop = window.open("http://klopp.net.ru/files/","popDialog","height=380,width=440")
 if (!document.all)  {pop.moveTo(100,100);}
 return false}
function pop4(){
 popzz = window.open("http://www.zippyshare.com/","popDialog","height=40%,width=80%")
 if (!document.all)  {popzz.moveTo(100,100);}
 return false}
function pop5(){
 poprg = window.open("http://rghost.ru/","popDialog","height=380,width=440")
 if (!document.all)  {poprg.moveTo(100,100);}
 return false}
function pop6(){
 popam = window.open("http://aimini.net/","popDialog","height=380,width=440")
 if (!document.all)  {popam.moveTo(100,100);}
 return false}
function pop7(){
 popfl = window.open("http://www.filehoster.ru/","popDialog","height=380,width=440")
 if (!document.all)  {popfl.moveTo(100,100);}
 return false}
function pop8(){
 poppro = window.open("http://prostopleer.com/#/upload","popDialog","height=380,width=440")
 if (!document.all)  {poppro.moveTo(100,100);}
 return false}
function tag_play()
 {var FoundErrors = '';
 var enterURL = prompt("Введите ссылку на музыку с ресурсов из списка или прямую ссылку формата .mp3 ", "http://");
 if (!enterURL)
 {FoundErrors += " " + error_no_url;}
 if (FoundErrors)
 {alert("Ошибка!" + FoundErrors);
 return;}
insert("[audio]" + enterURL + "[/audio]");}
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(12).innerHTML="<img src='/i/blank.gif' title='Загрузить музыку' alt='Загрузить музыку' id='button-audio'  onclick=\"return changeVisibility('audio', this)\"/>"
</script>
<div class="container" id="audio" style="display:none; width:auto; padding:8px; height:auto; position:absolute; margin-top:-37%; margin-left:40%; z-index:20">
<div id="video-area-hsel">
<div><strong>Выберите аудиохостинг</strong></div><br>
<div>
<a class="turn_link" href="#playfile.ru" onclick="pop1(); tag_play(); return changeVisibility('audio', this)">playfile.ru</a>,
<a class="turn_link" href="#yapfiles.ru" onclick="pop2(); tag_play(); return changeVisibility('audio', this)">yapfiles.ru</a>,
<a class="turn_link" href="#klopp.net.ru" onclick="pop3(); tag_play(); return changeVisibility('audio', this)">klopp.net.ru</a>,
<a class="turn_link" href="#zippyshare.com" onclick="pop4(); tag_play(); return changeVisibility('audio', this)">zippyshare.com</a>,<br>
<a class="turn_link" href="#rghost.ru" onclick="pop5(); tag_play(); return changeVisibility('audio', this)">rghost.ru</a>,
<a class="turn_link" href="#aimini.net" onclick="pop6(); tag_play(); return changeVisibility('audio', this)">aimini.net</a>,
<a class="turn_link" href="#filehoster.ru" onclick="pop7(); tag_play(); return changeVisibility('audio', this)">filehoster.ru</a>,
<a class="turn_link" href="#prostopleer.com" onclick="pop8(); tag_play(); return changeVisibility('audio', this)">prostopleer.com</a>
</div></div>
Код:
<!-- Окантовка профиля -->
<style type="text/css">
.post-author ul li {
	text-align: center;
	padding: 2px;
	border: 1px solid #aa7744;
	background: #transparent;
	margin: 2px;
}
.post-author ul li.pa-reg {
	border-bottom: none;
	margin-bottom: 0px;
}
.post-author ul li.pa-posts, 
.post-author ul li.pa-respect {
	border-top: none;
	border-bottom: none;
	margin-top: 0px;
	margin-bottom: 0px;
}
.post-author ul li.pa-positive {
	margin-top: 0px;
	border-top: none;
	//border-bottom: none;
}
.post-author ul li.pa-online, .post-author ul li.pa-author {
	border: #aa7744 solid 1px;
	padding: 2px;
	background: #ddcb9a;
	font-size: 11px;
}
.post-author ul li.pa-fld1 {
	border: #ddcb9a solid 1px;
	padding: 2px;
	background: #transparent;
	font-size: 11px;
}
</style>

0

4

<!--Рандомное изображение -->
<script type="text/javascript">
<!--
var a=Math.round(Math.random()*3)
image = new Array();
image[0]="картинка"
image[1]="картинка"
image[2]="картинка"
image[3]="картинка"
document.write ("<img src="+image[a]+" />");
//-->
</script>

Красным - общее количество изображений
Красный=синий
____________________________________________________________

Код:
<!-- Количество символов -->
<script type="text/javascript">
if ((document.URL.indexOf("viewtopic.php") != -1) || (document.URL.indexOf("post.php") != -1) || (document.URL.indexOf("edit.php") != -1)) {
var repl = document.getElementById("main-reply");
var submit = document.getElementsByTagName("p")
for (var i=0; i<submit.length; i++){
if (submit[i].className == "formsubmit")
submit[i].innerHTML = "<span id=\"plng\" style=\"border: 1px solid; padding: 2px 3px;\">Написано символов: <b>0</b></span>" + submit[i].innerHTML;
}
repl.onkeyup = repl.onkeydown = repl.onfocus = repl.onblur = function(){
document.getElementById("plng").innerHTML ="Написано символов: <b>" + (repl.value.length) + "</b>";
}}
</script>
Код:
<!-- Выделить код -->
<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

5

Код:
<!-- Пиар-вход-->
<script type="text/javascript">
PiarNik="Реклама";
PiarPas="12345";
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>\
<li id=\"navpiar\"><span id=spMyimg><a onclick=\"PiarIn()\">Пиар-Вход</a></span></li>";
if($("#navlogin").html()!=null){
$("#navlogin").after(L) //navlogin
$("#PR_loginDiv #fld1").val(PiarNik)
$("#PR_loginDiv #fld2").val(PiarPas)
function PiarIn () {$("#PR_loginDiv input[type='submit']").click();}
}
</script>
Код:
<!-- Цветовыделение групп -->
<script type="text/javascript">
var arr=document.links
var arr1=new Array ("Админы", "Медузия", "Арей", "Дафна", "Gamer")
var arr2=new Array ("Модераторы", "Диметра", "Юля Северова", "Таня")
var arr3=new Array ("Квестоплеты")
var arr4=new Array ("Аватарщики")

for (x in arr)
{for (y in arr1)
{if (arr[x].innerHTML==arr1[y])
{
arr[x].innerHTML="<font color='#8B0000'>"+arr[x].innerHTML+"</font>"}
}}

for (x in arr)
{for (j in arr2)
{if (arr[x].innerHTML==arr2[j])
{
arr[x].innerHTML="<font color='#483D8B'>"+arr[x].innerHTML+"</font>"}}}

for (x in arr)
{for (l in arr3)
{if (arr[x].innerHTML==arr3[l])
{
arr[x].innerHTML="<font color='#4682B4'>"+arr[x].innerHTML+"</font>"}}}

for (x in arr)
{for (l in arr4)
{if (arr[x].innerHTML==arr4[l])
{
arr[x].innerHTML="<font color='#6A5ACD'>"+arr[x].innerHTML+"</font>"}}}

</script>
Код:
<!-- Аватар по умолчанию -->
<script type="text/javascript">
defaultPict = "http://forumupload.ru/uploads/0000/12/13/61-1.png"
var arr=document.getElementsByTagName("ul")
i=1
while(arr[++i]){
str=arr[i].innerHTML
if(str.indexOf("pa-avatar")==-1) {
q=str.toLowerCase()
if((pos=q.indexOf("<li class=pa-from>"))!=-1 || (pos=q.indexOf("<li class=\"pa-from\">"))!=-1 || (pos=q.indexOf("<li class=pa-reg>"))!=-1 || (pos=q.indexOf("<li class=\"pa-reg\">"))!=-1){
nstr =str.substring(0,pos)
nstr+="<li class=\"pa-avatar item2\"><img src="+ defaultPict +" alt=\"Аватар\" /></li>"
nstr+=str.substring(pos)
arr[i].innerHTML=nstr
}}}
</script>

0

6

Днев розыск из таблицы

Код:
<div style="overflow: auto; overflow- hidden; width: 100%; height: 180px;">

<img src="http://s2.ipicture.ru/uploads/20111010/2YwaeYUa.png">
<img src="http://s2.ipicture.ru/uploads/20111010/mo5UwUF1.png">
<img src="http://s1.ipicture.ru/uploads/20111011/2UG97aTg.png">
<br/>
 <img src="http://s1.ipicture.ru/uploads/20110722/C3hhMW3Q.png"> 
<img src="http://s1.ipicture.ru/uploads/20110722/U8V65Tmg.png">
 <img src="http://s1.ipicture.ru/uploads/20110722/Y4BVS2xk.png">
<br/>
<img src="http://s1.ipicture.ru/uploads/20110722/fHc7wGwe.png">
 <img src="http://s2.ipicture.ru/uploads/20111010/r94K2F2l.png">  
<br/>
</center>
</div>

0

7

Код:
<!-- Форма входа на главной -->
<script type="text/javascript">
var a =document.getElementById('pun-status').innerHTML
if (a.indexOf("Гость")!=-1)
{document.getElementById('pun-status').innerHTML="<div class='formal'>"+"<form id='login'"+" class='container'"+" method='post'"+" action='http://scoolwitch.9bb.ru/login.php?action=in'"+" onsubmit='return my_form(this)'>"+"<fieldset><legend><span>Введите ваше имя и пароль ниже</span></legend><div class='fs-box inline'>"+"<input type='hidden'"+" name='form_sent'"+" value='1' />"+"<input type='hidden'"+" name='redirect_url'"+" value='index.php' />"+"<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='16'"+" maxlength='16' /></span></p></div></fieldset>"+"<p class='formsubmit'>"+"<input type='submit'"+" class='button'"+" name='login'"+" value='Войти' /></p></form></div>"}
function my_form(the_form)
{
var element_names = new Object()
    element_names["req_username"] = "Имя"
    element_names["req_password"] = "Пароль"

if (document.all || document.getElementById)
{
    for (i = 0; i < the_form.length; ++i)
    {
    var elem = the_form.elements[i]
    if (elem.name && elem.name.substring(0, 4) == "req_")
    {
        if (elem.type && (elem.type=="text" || elem.type=="textarea" || elem.type=="password" || elem.type=="file") && elem.value=='')
        {
        alert("\"" + element_names[elem.name] + "\" это поле обязательно для заполнения в этой форме.")
        elem.focus()
        return false
        }
    }
    }
}

return true
}
</script>
Код:
<!-- Коллекция аватаров -->
<script type="text/javascript">
var arr=document.getElementsByTagName("p")
i=0
while(arr[i] ){
if(arr[i].className=="inputfield"){
name=arr[i].innerHTML
name=name.substring(0)
arr[i].innerHTML="<a target=\"_blank\" href=\"http://www.avata.ru\">Коллекция аватаров</a><br><br>"+name+""
}
i++
}
</script>
Код:
<!-- Скрыть надпись Отредактировано -->
<style type="text/css">
.lastedit {display:none}
</style>

0

8

Код:
<!-- Своя иконка -->
<link rel="icon" href="URL-адрес иконки" type="image/x-icon">
<link rel="shortcut icon" href="URL-адрес иконки" type="image/x-icon"
Код:
<!-- Цветовыделение ников -->
<script type="text/javascript">
    var arr=document.links
    var arr1=new Array ("Reysler", "Admin")
    var arr2=new Array ("", "", "", "")
    var arr3=new Array ("", "", "", "", "")
    var arr4=new Array ("krime")
    var arr5=new Array ("", "", "", "", "")
    var arr6=new Array ("", "", "", "","", "")
    for (x in arr)
    {for (y in arr1)
    {if (arr[x].innerHTML==arr1[y])
    {
    arr[x].innerHTML="<font color='red'>"+arr[x].innerHTML+"</font>"}
    }}
    for (x in arr)
    {for (j in arr2)
    {if (arr[x].innerHTML==arr2[j])
    {
    arr[x].innerHTML="<font color='darkblue'>"+arr[x].innerHTML+"</font>"}}}
    for (x in arr)
    {for (l in arr3)
    {if (arr[x].innerHTML==arr3[l])
    {
    arr[x].innerHTML="<font color='goldenrod'>"+arr[x].innerHTML+"</font>"}}}
    for (x in arr)
    {for (j in arr4)
    {if (arr[x].innerHTML==arr4[j])
    {
    arr[x].innerHTML="<font color='Green'>"+arr[x].innerHTML+"</font>"}}}
    for (x in arr)
    {for (p in arr5)
    {if (arr[x].innerHTML==arr5[p])
    {
    arr[x].innerHTML="<font color='steelblue'>"+arr[x].innerHTML+"</font>"}}}
    for (x in arr)
    {for (s in arr6)
    {if (arr[x].innerHTML==arr6[s])
    {
    arr[x].innerHTML="<font color='steelblue'>"+arr[x].innerHTML+"</font>"}}}
    </script>

Ставить в начало ХТМЛ-низа

Код:
<!-- Допуск в тему или форум -->
<script type="text/javascript">
Offcategor("Название темы или форума", new Array("Ник1", "Ник2", "Ник3",  "Ник4", "Ник5", "Ник6"))
Offcategor("Название темы или форума", new Array("Ник1", "Ник2", "Ник3",  "Ник4", "Ник5", "Ник6"))
Offcategor("Название темы или форума", new Array("Ник1", "Ник2", "Ник3",  "Ник4", "Ник5", "Ник6"))
        function Offcategor(categor,myarray){ 
        var a = 1
        if(GroupTitle =="Гость"||GroupTitle =='Гости'){UserLogin = " ";}
        st = document.getElementById("pun-crumbs1").innerHTML;
        if (st.indexOf(categor)!= -1){
        var a = 0
        for(q=0;q<myarray.length;q++){
        if (myarray[q]== UserLogin){
        a = 1}}
        if (a != 1){document.getElementById("pun-main").innerHTML = "<div id=\"pun-main\" class=\"main\" style=\"margin-top: -25px!important;\"><h1><span>Информация</span></h1><div class=\"info\"><div class=\"container\"><b><span style='font-size:14px;'>Вы не имеете прав доступа к этой странице.</span><b></div></div></div>"}
}
}
</script>

0

9

В ХТМЛ-низ

<!-- Своя картинка в каждой категории -->
<script type="text/javascript"><!--Своя картинка в каждую категорию -->
$(document).ready(function(){
myarray=new Array(
"Информационный раздел", "http://mybb.ru/f/collection/0208.gif",
"Техническая поддержка", "http://mybb.ru/f/collection/0211.gif",
"Форумы опытных пользователей", "http://mybb.ru/f/collection/0213.gif",
"Разное", "http://i039.radikal.ru/0806/ec/a5ffc6d7cfd9.gif",
"Статистика форума", "http://mybb.ru/f/collection/0217.gif"    //Последний элемент без запятой! 
)
        $("#pun-index div.category h2,#pun-index #pun-stats h2").each(function (i) {
for(q=0;q<myarray.length;q++){
var cssObj = {
  "height":"50px",
  "background-color": "transparent",
  "background-image":"url("+myarray[q+1]+")",
  "background-position":"50% 50%",
  "background-repeat":"no-repeat"       //Последний элемент без запятой!
}
        if($(this).children("span").text()==myarray[q])$(this).css(cssObj);
        q++}
    });
});
</script>

Синим - название категории
Красным - ссылка на картинку
Зеленым - ширина категории

Чтобы скрыть надписи, в ХТМЛ-верх

<!-- Своя картинка в каждой категории убрать надписи-->
<style>
#pun-stats h2 span,
.category h2 span {
visibility:hidden!important;
}
</style>

Синим статистика. При ненужности скрытия строку убираем

___________________________________________________________________

Код:
<!-- Растягивание фона для любого разрешения -->
<style type="text/css">
html, body {
background: transparent none !important;
}
</style>
<img src="http://savepic.net/1233511.png" style="position: fixed; top: 0; left: 0; z-index: -1; width: 100%; height: 100% ; margin: 0 0 0 0;"/>

____________________________________________________________________

<!-- Объявление в шапке -->
<div style="height:112px; width:200px;border:red 1px solid; top:210px;margin-left: 380px;position:absolute;z-index:100;">
Тут код вашей картинки или объявления ...
</div>

112 - Высота Блока;
200 - ширина Блока;
210 - Отступ от верхнего края экрана (*Регулируем
380 - Отступ вправо от текущего положения (*Регулируем - значение может быть как положительным, - так и отрицательным
*Все цифры красным регулируем под себя
Cинее - убираем, после успешного позиционирования

0

10

Объявление для разных групп пользователей

<script type="text/javascript">
if(GroupID == 1)
document.write("<span id=\"admin\">Это текст для администраторов.</span>")
else if(GroupID == 2)
document.write("<span id=\"moder\">Это текст для модераторов.</span>")
else if(GroupID == 3)
document.write("<span id=\"guest\">Это текст для гостей.</span>")
else if(GroupID == 4)
document.write("<span id=\"user\">Это текст для пользователей.</span>")
</script>

____________________________________________________________________

0

11

Выпадающее меню
http://forum.mybb.ru/viewtopic.php?id=21285

0

12

Код:
<script><!--Ставим рамку на все Аватары -->
  $(document).ready(function(){
GifArray=new Array(

"http://savepic.org/1465023.png"    //End myarray_!!Последняя ссылка без Запятой!!!
)

   var imgURL;var i;var x;var y;

    $("div.post-author ul li img[alt='Аватар']").each(function () {
    x = this.offsetWidth;
    y = this.offsetHeight;
    inb = $(this).parent().get(0).tagName;
    $(this).css("width",x+"px");
    $(this).css("height",y+"px");
    imgURL = $(this).attr("src");
    i=GifArray[Math.round(Math.random()*(GifArray.length-1))];
    $(this).attr("src",i);
    $(this).css("background-image","url("+imgURL+")");});
});
</script><!--Конец//Рамки для Аватара-->

0

13

ХТМЛ верх (13.03.12)

ХТМЛ низ

0

14

Код:
<!--Спойлер-->
<style>
#button-spoiler {background-image:url('http://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:250px;font-size:10px; margin:0;" type="button" value="'+close+'"></cite><blockquote class="quote-box" style="display:none; width: 90%;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>

0

15

Замена слов в панели навигации своими картинками, со сменой картинки
при наведении курсора

Скрипт устанавливаем в начало HTML низ(*Если используем скрипт информирующий о новых сообщениях, ставим его раньше данного скрипта

Код:
<script><!--Свои картинки в панель навигации со сменой картинки по наведению курсора" -->
   navlinks=new Array(
  "navextra1",    // Дополнительный пункт меню 1
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navextra2",    // Дополнительный пункт меню 2
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navextra3",    // Дополнительный пункт меню 3
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navindex",    // Форум
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navuserlist",	// Участники
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navrules",    // Правила
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navsearch",    // Поиск
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navprofile",    // Профиль
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navpm",    // Сообщения
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navadmin",    // Администрирование
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navregister",	// Регистрация
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navlogin",    // Войти
"Ссылка на картинку","Ссылка на картинку при наведении",
  "navlogout",    // Выход
"Ссылка на картинку","Ссылка на картинку при наведении"  // !ПОСЛЕДНИЙ элемент без запятой 
)
var s0,s1,s2,s3,i; for (i=0; i < navlinks.length; i++){s0=navlinks[i+1];s1="onmouseover=\"this.src='"+navlinks[i+2]+"'\""; s2="onmouseout=\"this.src='"+s0+"'\"";s3='<img class="navlinks" src="'+s0+'" '+s1+' '+s2+' border="0" />';$("#"+navlinks[i]+" a").html("<span>"+s3+"</span>");i++;i++; }
</script>

0

16

Боковая выплывающая менюшка

<!-- JampPanel-->
<style>
#JampPanel:hover{
margin-right:-20px;
}
#JampPanel,#JampPanel .container{
border-radius:12px;
-webkit-border-radius:10px;
-khtml-border-radius:10px;
-moz-border-radius:10px;
-o-border-radius:10px;
border:1px solid #FE2323;
background-color:#F0F0F0;
box-shadow: 0px 5px 5px #626262;
-webkit-box-shadow:0px 5px 5px #626262;
-khtml-box-shadow:0px 5px 5px #626262;
-moz-box-shadow:0px 5px 5px #626262;
}
#JampPanel {opacity:0.86;
position:fixed;z-index:1200;
height:190px;top:8px;right:0;margin-right:-302px;
background:#F0F0F0 url(боковая картинка) 4px 2px no-repeat;
   transition-duration: 0.33s;
  -webkit-transition-duration: 0.33s;
  -moz-transition-duration: 0.33s;
  -o-transition-duration: 0.33s;
width:330px;
}
#JampPanel .container{
padding:12px;
height:360px;
width:100%;margin:-1px 0 0 30px;
}
#Zaslonyalka{ /*прикрывает область тени на стыке уха с container*/
position:absolute;
height:190px;width:14px;
background-color:#F0F0F0;
margin:-12px 0 0 -18px;
}
</style>
<div id=JampPanel>
  <div class=container>
    <div id=Zaslonyalka></div>
текст наполнения ТЕКСТ
</div>
</div>
<!--End//JampPanel-->

Вот это меняет высоту контейнера
Вот это его общую ширину
Вот это отвечает за то, насколько контейнер будет уходить за край (т.е. если ты поставишь предыдущий параметр на 500, то и этот тебе нужно будет увеличить, чтобы была видна только надпись)
Вот это меняет высоту колонки с надписью
От этого зависит, как высоко/низко будет висеть менюшка
Вот это поднимет или опустит текст внутри меню
Это ширина окошка под название

0

17

Замена ссылок в навигации на свои изображения

<!-- Замена ссылок в навигации на свои изображения -->
<script type="text/javascript">
$(function(){
$('li#navindex>a>span:contains("Форум")').html('<img src="ссылка на изображение" title="Форум"/> ');
$('li#navrules>a>span:contains("Правила")').html('<img src="ссылка на изображение" title="Правила"/> ');
$('li#navuserlist>a>span:contains("Участники")').html('<img src="ссылка на изображение" title="Участники"/> ');
$('li#navsearch>a>span:contains("Поиск")').html('<img src="ссылка на изображение" title="Поиск"/> ');
$('li#navprofile>a>span:contains("Профиль")').html('<img src="ссылка на изображение" title="Профиль"/> ');
$('li#navpm>a>span:contains("Сообщения")').html('<img src="ссылка на изображение" title="Сообщения"/> ');
$('li#navadmin>a>span:contains("Администрирование")').html('<img src="ссылка на изображение" title="Администрирование"/> ');
$('li#navregister>a>span:contains("Регистрация")').html('<img src="ссылка на изображение" title="Регистрация"/> ');
$('li#navlogin>a>span:contains("Войти")').html('<img src="ссылка на изображение" title="Войти"/> ');
$('li#navlogout>a>span:contains("Выход")').html('<img src="ссылка на изображение" title="Выход"/> ');
});
</script>

0

18

Ротатор Банеров
Cтавим код туда, где хотим увидеть банеры
Кол-во банеров размножаем, добавляя строки >

"Ссылка на картинку банера","Ссылка перехода по клику на банер",

100 - горизонтальный cдвиг ротатора
12 - вертикальный cдвиг ротатора
200 -высота картинок
5000 -5 секунд
Скрипт выбирает случайным образом начальный банер при загрузке страницы и далее через время 'sek' меняет банеры

<div style="position:absolute;margin-left:100px;margin-top:-12px"><!-- Ротатор Банеров местного разлива -->
<a  id="Mbanners" href="Ссылка перехода по клику на 1-й банер" target="_blank" ><img height="200" border="1" src="Ссылка на 1-ю картинку банера" ></a>
<script language="javascript">
var sek = 5000;  // Время отображения
imgArray = new Array (
   "Ссылка на картинку банера","Ссылка перехода по клику на банер",
   "Ссылка на картинку банера","Ссылка перехода по клику на банер",
   "Ссылка на картинку банера","Ссылка перехода по клику на банер",
   "Ссылка на картинку банера","Ссылка перехода по клику на банер",
"End");var i=Math.round(Math.random()*((imgArray.length-3)/2))*2;banners(i);
function banners(i) {
if(  i >= imgArray.length-1){i=0};
$("#Mbanners img").attr("src",imgArray[i]);
$("#Mbanners").attr("href",imgArray[i+1]);
i+=2;j = i;timerID = setTimeout("banners(j)",sek);}
</script></div>

0

19

Cлучайная картинка

<div id="My_IMG"><!-- Случайная Картинка -->
<img height="100" border="1" src="Ссылка на 1-ю картинку"/>
<script type="text/javascript">
var tik = 5000;  // Время отображения(в дан.случ. 5сек);
ImgA = new Array (
   "http://forums.0pk.ru/img/smilies/MyBB/dark/angry.gif",
   "http://forums.0pk.ru/img/smilies/MyBB/dark/blink.gif",
   "http://forums.0pk.ru/img/smilies/MyBB/dark/canthearyou.gif",
"End");var i=Math.round(Math.random()*(ImgA.length-1));randomIMG(i);function randomIMG(i){if( i >= ImgA.length-1){i=0};$("#My_IMG img").attr("src",ImgA[i]);var i=Math.round(Math.random()*(ImgA.length-1));j = i;timerID = setTimeout("randomIMG(j)",tik);};</script></div><!-- /End/Случ.Картинк. -->

100 - высота картинки ( если нужно фиксировать ширину - меняем в коде height на weight
Красным, - любое количество собственных картинок(*ставим собственные ссылки
1-секунда -1000тиков
в часе -3600000 тиков

0

20

Инфо-панель: "КТО и ГДЕ ?"
http://savepic.org/1862567.png
В HTML верх

<!-- Инфо-Панель:"КТО-ГДЕ" в HTML Верх --><style id="MePanel">#myINfO{display:none;}</style>
<link id="iNFpanel" rel="stylesheet" href="http://hostjs-mybb2011.narod.ru/css/iNFpanelWHOWHERE.css" type="text/css"/><script src="http://hostjs-mybb2011.narod.ru/js/iNFpanelWHOWHERE.js"></script><!--END/ Инфо-Панель:"КТО-ГДЕ" в HTML Верх -->

В Самый низ Объявления:

<!-- Инфо-Панель:"КТО-ГДЕ" в Объявление --><div id="myINfO"><span><img id="byt_2" src="http://savepic.org/1852486.png" title="Скрыть «Кто-Где»"/></span><div id="MyInf_Active" class="ScrollBox-y" style="display:none; height: auto"></div></div><script>START_MyPANEL ()</script><!--END/Инфо-Панель:"КТО-ГДЕ" в Объявление -->

У Гостей - нет данной панели, У юзеров видно везде, - кроме: страниц Профиля и "Кто в онлайне":
Есть кнопка включения/отключения функции;

0

21

Скрипт системы оповещения о новом личном сообщении
http://forumupload.ru/uploads/000e/8b/b7/111-1-f.png
в html-верх:

<style>
#messanger { position:fixed; right:10%; top:65%; z-index:100; width:280px; border: 2px solid #696969;
-moz-border-radius: 8px;border-radius: 8px;khtml-border-radius:8px;-webkit-border-radius:8px;
box-shadow: 5px 5px 5px #9C9C9C; -moz-box-shadow: 5px 5px 5px #9C9C9C; -webkit-box-shadow: 5px 5px 5px #9C9C9C; filter: progid:DXImageTransform.Microsoft.Shadow(color='#9C9C9C', direction=145, strength=7);}

#closer{
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.41, #1F1F1F),color-stop(0.94, #D7E3E3));
background-image: -moz-linear-gradient(center bottom,#1F1F1F 41%,#D7E3E3 94%);
background-image: -o-linear-gradient(top,#D7E3E3,#1F1F1F);
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#D7E3E3', endColorstr='#1F1F1F');
color: lime;
-moz-border-radius: 9000em;border-radius: 9000em;khtml-border-radius:9000em;-webkit-border-radius:9000em;cursor: pointer;float: right;font-size: 15px; border: 2px solid #696969;
}
#closer:hover {color: #FF4500; }</style>

в html-низ:

<!-- Система оповещения о личных сообщениях v.2-->
<script type="text/javascript">
if((document.getElementById("navpm").innerHTML.indexOf("(") != -1) && (document.URL.indexOf("messages.php") == -1)) {document.write('<div id="messanger" class="container" style="padding: 15px; text-align: right; background-color: #ebeaf0;"><span><img style="border: 2px solid #696969;" align="left" src="'+UserAvatar+'" width="60" height="60" alt="">Привет, <strong>'+UserLogin+'</strong><br>у Вас новое личное сообщение</span><br /><br /> <ul class="pisma"></ul><audio autoplay="autoplay"><source src="http://irpi.jr1.ru/ku-ku.ogg" type="audio/ogg; codecs=vorbis"><source src="http://promobil.kiev.ua/uploads/files/1188937250_icq.mp3" type="audio/mpeg"></audio><br /><span id="closer" ><strong>&nbsp;X&nbsp;</strong></span></div>');}
$.get('messages.php','',processMessage);
function processMessage(data){
$(data).find('tr.icon').each(function(){ 
var QMess=$(this).find('div.tclcon a').text();var QLink=$(this).find('div.tclcon a').attr('href');var Qautor=$(this).find('td.tc2 a').text();
var QProf=$(this).find('td.tc2 a').attr('href');ProfilUser = /(.*?)\/profile\.php\?id=(\d+)/g;
RrofId=(QProf.replace(ProfilUser, '$2'));
$.get('profile.php?section=avatar&id='+RrofId,'',processGetImg);
function processGetImg(data){
$(data).find('td#profile-left li div, div.fs-box').map(function(){ 
var ZAva=$(this).find('img').attr('src');
$('.pisma').append('<li><a onclick=\'window.open(href="'+QLink+'"); return false\'  class="mess" href="'+QLink+'">'+QMess+'</a> от <a onclick=\'window.open(href="'+QProf+'"); return false\'  class="mess" href="'+QProf+'">'+Qautor+'</a><img style="border: 1px solid #696969;margin: 3px 0 -2px 5px;" src="'+ZAva+'" width="24" height="24" alt=""></li>');
$('.mess').click(function(){
$('#messanger').toggle();});
});} });}
$('#closer').click(function(){
$('#messanger').slideToggle('slow');});
</script>

Скрипт замены надписей в Меню - должен стоять ниже данного скрипта

0

22

Индикатор групп

Код:
<script type="text/javascript">
var text="<center><font color=Red> Администратор </font> | <font color=Blue> Координатор </font>  |  [u]<font color=[color=red]Green[/color]> [color=green]Модератор[/color][/u] </font></center>"
pa=document.getElementById("pun-stats")
pa.style.position = "relative"
pa.innerHTML = "<div style=\"position:absolute; z-index:2; center: 10px; top: 40px; width: 100%;\">"+text+"</div>"+ pa.innerHTML
</script>

Подчёркнутое размножайте по количеству групп, которые нужно вывести в легенду. Красное - цвет, которым будет выделяться название группы, зелёным - собственно и название.

0

23

Рандомная картинка
Работает при перезагрузке страницы

<script type="text/javascript">
<!--
var a=Math.round(Math.random()*28)
image = new Array();
image[0]="http://s2.uploads.ru/SPv9g.png"
image[1]="http://s2.uploads.ru/EMxLk.png"
image[2]="http://s3.uploads.ru/HXzuD.png"

document.write ("<img src="+image[a]+" />");
//-->
</script>

0

24

Защита Страницы Регистрации капчёй от Спам Ботов

В HTML низ

<script>
if ($("#pun-register").html()!=null){
KapchaArray=new Array(
//Ссылки на рисунок              //дешифровка надписи
"http://savepic.ru/2538043.jpg","7664",
"http://savepic.ru/2516539.jpg","2688",
"http://savepic.ru/2510395.jpg","9905",
"http://savepic.ru/2499131.jpg","29892",
"http://savepic.ru/2503227.jpg","98075",
"http://savepic.ru/2492987.jpg","6394",
"http://savepic.ru/2550330.jpg","8877",
"http://savepic.ru/2555450.jpg","77546",
"http://savepic.ru/2546234.jpg","4668",
"http://savepic.ru/2538042.jpg","45788"  //End myarray_!!Последний элемент без Запятой!!!
)
var vv1=Math.floor(Math.floor(Math.random()*(KapchaArray.length-1)/2)) //KapchaArray[];
var link=KapchaArray[2*vv1];
var req_username="";
var timezone="";
$("p.formsubmit input[name='register']").before('<div id="000"><input style="display:none;" id="register-reset" type="reset" value="Очистить"><b>P O Б O T - А Н Т И Б О Т</b><br/><br/><p id="LL" align=right style="width:156px;margin:6px 0;">Введите цифры и буквы,<br/> видимые на картинке</p><p style="padding:2px 0;margin:6px 0;"><img id="ImgKapcha" src="'+link+'" /> <input type="text" id="kapcha" name="kapcha" size="10" maxlength="10"/></p></div>')
$("p.formsubmit input[name='register']").replaceWith('<input type="button" class="button" name="register" value="Регистрация"/>')
function KapchaChange(){
vv1=Math.floor(Math.floor(Math.random()*(KapchaArray.length-1)/2));link=KapchaArray[2*vv1];
$("#ImgKapcha").attr("src",""+link+"");$("#ImgKapcha").attr("src",""+link+"");
$("#kapcha").val('');
}
function TestKapcha(){
var timezone=$("#ctl_tzselect option:selected").val()
        req_username=$("input[name='req_username']").val(); //запомнили имя
  if($("#kapcha").val()!=KapchaArray[2*vv1+1]){
KapchaChange();$("#register-reset").click();
$("input[name='req_username']").val(req_username);
$("#ctl_tzselect option[value='"+timezone+"']").attr("selected","selected");
$("#LL").html($("#LL").html().replace("видимые на картинке","Повторите ввод"));return false;
  }else KapchaChange(); return true;  // Совпало!;
}
$("input[value='Регистрация']").click(function (){
  if($("input[name='req_email2']").val()!="" && $("input[name='req_email1']").val()!="" && $("input[name='req_username']").val()!=""){
   if (TestKapcha()==true) {
    $("p.formsubmit input[name='register']").replaceWith('<input type="submit" class="button" name="register" value="Отправить"/>');$("p.formsubmit [name='register']").click();
    } else KapchaChange();return false;
  } else KapchaChange();$("p.formsubmit [name='register']").submit();
});
} //конец пров-ки стр. регистрации
</script>

Deff написал(а):

(*Сделал на 10шт. картинок капчи - нужно больше - просто добавляем/изменяем на свои  в списке

Рекомендация: - Перезаливайте картинки на свой форум и вставляйте свои ссылки - в противном случае - идентичные ссылки на десятке форумов уже будут представлять для входа Спам-Бота - секрет Полишинеля!

Конечно можно делать и свои картинки: необязательно только цифры - сейчас модно ставить значки :
Конвертик - Пусть пишут конверт;
Машинка - пусть пишут машина;
Самолётик - пусть пишут самолёт;

0

25

Центрируем раздел верх-низ:
Либо в HTML-верх:

<!-- Раздел в центр -->
<style type="text/css">
.punbb h1 span, .punbb h2 span {
display: block;
padding-top: 25px;
}
</style>

Либо в Цвета style_cs.css после пункта /* CS1.3 */

.punbb h1 span, .punbb h2 span {
display: block;
padding-top: 25px;
}

Можно разделить на два скрипта:
.punbb h1 span - раздел на страницах
.punbb h2 span - разделы на главной

Не показывать раздел

.punbb h1 span {
display: none;
}

0

26

Изменить расстояние между "Новые сообщения" и объявлением:

/* D6.3 */
#pun-announcement .container {
  padding: 1.5em 0.5em 0.5em;
  }

Изменить расстояние между панелью навигации и "Новые сообщения":

/* D3.1 */
#pun-navlinks, #pun-navlinks .container {
  border-style: none;
  border-width: 0;
  margin-bottom: 10px;
  }

0

27

Разделитель подписи картинкой

.punbb .post-sig dt {
    background: url("картинка") repeat scroll 0 0 transparent;
    border: medium none;
    height: 10px;
    width: 250px;
}

Настройка стиля подписи

.post-sig {
*настройки стиля*
}

0

28

Вариант растягивающейся рамки на Аватар
Автор Deff

http://s3.uploads.ru/m9fje.jpg

В HTML верх

<!--Ставим рамки для Аватара -->
<style type="text/css">
li.pa-avatar .Wrp-ava img[alt]{
  display:block;
  padding:0;
  border-width:0;
  margin:6px; /*Отступ рамки*/
}
</style>
<script>
  $(document).ready(function(){
    var imgWrp = "http://s2.uploads.ru/h3rnz.png"; // Ccылка на картинку;
    imgWrp = '<img src="'+imgWrp+'" width=100% height=100% style="position:absolute;z-index:100;"/>'
    $("div.post-author ul li.pa-avatar img[alt]").each(function () {
    $(this).wrap('<div class="Wrp-ava" style="display:inline-block;text-align:left;position:relative;"></div>');
    $(this).parent().prepend(imgWrp)
});});
</script><!--Конец//Рамки для Аватара-->

0

29

/*имя*/
.pa-author {
background: url("http://s4.uploads.ru/QY8Ii.png") 0px 0px no-repeat transparent !important;
color: #EAF1DF !important;
height: 35px;
line-height: 0px !important;
margin-left: -9px !important;
padding-top: 35px !important;
text-align: center;
text-shadow: 1px 1px 3px #000000;
width: 220px !important;
}

.pa-author {
background: url(http://vlla.ru/images/2013/10/29/verh2.png) 0% 0% no-repeat;
color: #aeae8d !important;
height: 138px;
line-height: 26px !important;
margin-top: -50px !important;
padding: 32px 0px 0px 0px !important;
position: relative;
text-align: center;
width: 215px !important;

.post-author > ul {
background: url("http://vlla.ru/images/2013/10/29/niz3.png") no-repeat scroll transparent bottom;
width: 215px;

.post-author > ul {
background: url(http://s7.uploads.ru/UWGNw.png) 50% 100% no-repeat scroll transparent;
margin-left: 0px;
}

0

30

/*аватар и поля профиля*/
.post-author ul li {
background: url(http://forumstatic.ru/files/0011/32/b8/21314.png) 0% 0% repeat-y;
padding-left: 24px;
padding-right: 20px;
width: 184px;
color: #9C8746;
}
.pa-respect a, .pa-positive a {
color: #9C8746 !important ;
}
.post-author a:hover, .post-author a:focus, .post-author a:active  {
   color: #DCCB8B ;
}

/*скрываем ненужные*/
.pa-awards, .pa-gifts, .pa-online { 
display: none;
}

.pa-author {
background: url("http://forumstatic.ru/files/0011/32/b8/15311.png") 0px 0px repeat-y transparent !important;
color: #1D3106 !important;
height: 48px;
padding-top: 50px !important;
text-align: center;
line-height: 0px !important;
padding-left: 28px !important;
padding-right: 24px !important;
width: 176px !important;
padding-bottom: 0px !important
}
.pa-author ul li a{
color: #1D3106 !important;
}
.pa-author  ul li a:hover, .pa-author  ul li a:focus, .pa-author  ul li a:active{
color: #264015 !important;
}

/*статус*/
.pa-title {background: transparent !important;
height: 32px;
line-height: 12px !important;
margin-top: -33px !important;
position: relative;
text-align: center;
}
.pa-avatar.item2{
background: url("http://forumstatic.ru/files/0011/32/b8/83323.png") transparent !important;
position: relative;
padding-left: 11px !important;
padding-right: 11px !important;
line-height: 0px !important;
border: none !important;
width:206px;
text-align: center;
}
.pa-avatar.item2 img {
}
.fs-box .pa-avatar.item2 {display: none;}

/*первая строка статуса*/
.pa-reg {
background: url("http://forumstatic.ru/files/0011/32/b8/15311.png") 0px -98px transparent !important;
padding-top: 10px !important;
}

/*последняя строка статуса*/
.pa-time-visit, #profile .pa-posts, .pa-replies {
background: url("http://forumstatic.ru/files/0011/32/b8/15311.png") 0px -124px transparent !important;
height: 60px !important;
}

.button {

   background: -webkit-gradient(linear, left top, left bottom, from(#96AB44), to(#1D3505))!important;
   background: -webkit-linear-gradient(top, #96AB44, #1D3505)!important;
   background: -moz-linear-gradient(top, #96AB44,#1D3505)!important;
   background: -ms-linear-gradient(top, #96AB44, #1D3505)!important;
   background: -o-linear-gradient(top, #96AB44, #1D3505)!important;
   padding: 6.5px 13px;
   -webkit-border-radius: 2px;
   -moz-border-radius: 2px;
   border-radius: 2px;
   -webkit-box-shadow: rgba(0,0,0,1) 0 1px 0;
   -moz-box-shadow: rgba(0,0,0,1) 0 1px 0;
   box-shadow: #4A2B05 0px 2px 5px 1px;
   text-shadow: 0px 1px 3px black;
   color: #E1BB6B !important;
   border-top: 2px solid #F7E997 !important;
   border-bottom: none;
   border-left:  none;
   border-right: none;
   }
.button:hover, .button:active, .button:focus {
   color: #DCCB8B !important;
}

Взято с http://fairytale.3bb.ru/

0


Вы здесь » Секунда до... » Сохраненные стили » Скрипты и коды