Неофициальная техническая поддержка MyBB

Объявление

Приветствуем ;)

На форуме Неофициальной Технической Поддержки MyBB.

Нам 11 лет 6 месяцев.

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

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



Полезные Скрипты

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

1

Большинство скриптов были предоставлены  Duka, Zebra, Karpoff
За что им огромное спасибо и за разрешение использовать их бесплатно


Пожалуйста выкладывайте рабочие скрипты и не засоряйте эту тему флудом. Также вопросы " не работает!" и " где найти скрипт для..." тут нельзя задавать. В этой теме выкладываются только скрипты, а вопросы по ним задавайте пожалуйста в заранее предназначенной для этого темы.
Начну.

Для многих форумов чат необходим. Существуют 3 самых известных и как я помню бесплатных чата.
Чат можно вставлять:
В ХТМЛ-НИЗ
В ХТМЛ-ВЕРХ
В ХТМЛ-ФОРМУ ОТВЕТА
В ОБЪЯВЛЕНИЕ.
То есть куда хотите.

А теперь 3 ссылки на разные чаты:

Cbox
Обычный чат, довольно быстрый но он на английском языке.

Xat
Чат просто красавец построенный на флэш технологиях, но к сожалению на английском языке.

InterChat
Интегрированный и русскоязычный чат. Но он сейчас недоступен.

0

2

Скрипты часов на форум.
Можно вставлять:
В ХТМЛ-ВЕРХ
В ХТМЛ-НИЗ
В ХТМЛ-ФОРМУ ОТВЕТА.

3D часики. Указывают сколько часов, минут и секунд.

Код:
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="mailhigh002-navy.swf";obj.TimeZone="R2T";obj.width=182;obj.height=60;obj.wmode="transparent";showClock(obj);</script>

Новогодние часики. Круглый шар с звёздочками и снегом, в котором Дед Мороз катается по кругу на санях. Часы без циферблата.

Код:
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="0028-blue.swf";obj.TimeZone="NZT";obj.width=150;obj.height=150;obj.wmode="transparent";showClock(obj);</script>

0

3

Рисованные часики.

Код:
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="0031-black.swf";obj.TimeZone="NZT";obj.width=130;obj.height=130;obj.wmode="transparent";showClock(obj);</script>

Тройные часы. Отдельно часы, минуты, секунды.

Код:
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="0030-black.swf";obj.TimeZone="NZT";obj.width=130;obj.height=130;obj.wmode="transparent";showClock(obj);</script>

0

4

Транцетличные  часы. Указывают сколько времени, а остальной циферблат закрыт.

Код:
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="0027-black.swf";obj.TimeZone="NZT";obj.width=130;obj.height=130;obj.wmode="transparent";showClock(obj);</script>

Электронные часы. Указывают год,месяц,день,часы,минуты и секунды.

Код:
<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="5013-yellow.swf";obj.TimeZone="NZT";obj.width=150;obj.height=46;obj.wmode="transparent";showClock(obj);</script>

0

5

Скрипт радио на форум. Вставлять в ХТМЛ-НИЗ

Love Radio

Код:
<td align="center"><OBJECT ID="NSPlay" WIDTH=200 HEIGHT=125 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows Media Player components...">
<PARAM NAME="FileName" VALUE="http://www.loveradio.ru/love-radio-96k.m3u">
<PARAM NAME="ShowControls" VALUE="1">
<PARAM NAME="ShowPositionControls" VALUE="0">
<PARAM NAME="ShowAudioControls" VALUE="1">
<PARAM NAME="ShowTracker" VALUE="0">
<PARAM NAME="ShowDisplay" VALUE="1">
<PARAM NAME="ShowStatusBar" VALUE="1">
<PARAM NAME="ShowGoToBar" VALUE="0">
<PARAM NAME="ShowCaptioning" VALUE="0">
<PARAM NAME="AutoStart" VALUE="1">
<PARAM NAME="AutoSize" VALUE="1">
<Embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows/mediaplayer/en/default.asp"
filename="http://www.loveradio.ru/love-radio-96k.m3u"
src="http://www.loveradio.ru/love-radio-96k.m3u"
Name=NSPlay
ShowControls="1"
ShowPositionControls="0"
ShowAudioControls="1"
ShowTracker="0"
ShowDisplay="1"
ShowStatusBar="1"
ShowGoToBar="0"
ShowCaptioning="0"
AutoStart="1"
AutoSize="0"
width=200
height=125>
</embed>
</OBJECT>

Хит FM

Код:
<td align="center"><OBJECT ID="NSPlay" WIDTH=200 HEIGHT=125 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows Media Player components...">
<PARAM NAME="FileName" VALUE="http://cluster.quantumart.ru/broadcast/default.aspx?media=hitfm">
<PARAM NAME="ShowControls" VALUE="1">
<PARAM NAME="ShowPositionControls" VALUE="0">
<PARAM NAME="ShowAudioControls" VALUE="1">
<PARAM NAME="ShowTracker" VALUE="0">
<PARAM NAME="ShowDisplay" VALUE="1">
<PARAM NAME="ShowStatusBar" VALUE="1">
<PARAM NAME="ShowGoToBar" VALUE="0">
<PARAM NAME="ShowCaptioning" VALUE="0">
<PARAM NAME="AutoStart" VALUE="1">
<PARAM NAME="AutoSize" VALUE="1">
<Embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows/mediaplayer/en/default.asp"
filename="http://cluster.quantumart.ru/broadcast/default.aspx?media=hitfm"
src="http://cluster.quantumart.ru/broadcast/default.aspx?media=hitfm"
Name=NSPlay
ShowControls="1"
ShowPositionControls="0"
ShowAudioControls="1"
ShowTracker="0"
ShowDisplay="1"
ShowStatusBar="1"
ShowGoToBar="0"
ShowCaptioning="0"
AutoStart="1"
AutoSize="0"
width=200
height=125>
</embed>

Юмор FM

Код:
<table width=100% cellpadding=0 cellspacing=0 border=0>
<tr>
 <td align="center"><OBJECT ID="NSPlay" WIDTH=200 HEIGHT=125 classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Loading Microsoft Windows Media Player components...">
<PARAM NAME="FileName" VALUE="http://realaudio.aradio.ru/RadioDisco">
<PARAM NAME="ShowControls" VALUE="1">
<PARAM NAME="ShowPositionControls" VALUE="0">
<PARAM NAME="ShowAudioControls" VALUE="1">
<PARAM NAME="ShowTracker" VALUE="0">
<PARAM NAME="ShowDisplay" VALUE="1">
<PARAM NAME="ShowStatusBar" VALUE="1">
<PARAM NAME="ShowGoToBar" VALUE="0">
<PARAM NAME="ShowCaptioning" VALUE="0">
<PARAM NAME="AutoStart" VALUE="1">
<PARAM NAME="AutoSize" VALUE="1">
<Embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/windows/mediaplayer/en/default.asp"
filename="http://realaudio.aradio.ru/RadioDisco"
src="http://realaudio.aradio.ru/RadioDisco"
Name=NSPlay
ShowControls="1"
ShowPositionControls="0"
ShowAudioControls="1"
ShowTracker="0"
ShowDisplay="1"
ShowStatusBar="1"
ShowGoToBar="0"
ShowCaptioning="0"
AutoStart="1"
AutoSize="0"
width=200
height=125>
</embed>
</OBJECT>

0

6

Дополнительные символы в форму ответа.

Код:
<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>

СТАВИТЬ В ХТМЛ-ФОРМУ ОТВЕТА.

Отредактировано arnsheridan (26.09.2009 18:11:54)

0

7

Скрипт "Переливающийся текст".

Код:
<!-- Начало скрипта - ... --> 
<font size=5>
<script>
var text="Ваш текст" // YOUR TEXT
var speed=80 // SPEED OF FADE

if (document.all||document.getElementById){
document.write('<span id="highlight">' + text + '</span>')
var storetext=document.getElementById? document.getElementById("highlight") : document.all.highlight
}
else
document.write(text)
var hex=new Array("00","14","28","3C","50","64","78","8C","A0","B4","C8","DC","F0")
var r=1
var g=1
var b=1
var seq=1
function changetext(){
rainbow="#"+hex[r]+hex[g]+hex[b]
storetext.style.color=rainbow
}
function change(){
if (seq==6){
b--
if (b==0)
seq=1
}
if (seq==5){
r++
if (r==12)
seq=6
}
if (seq==4){
g--
if (g==0)
seq=5
}
if (seq==3){
b++
if (b==12)
seq=4
}
if (seq==2){
r--
if (r==0)
seq=3
}
if (seq==1){
g++
if (g==12)
seq=2
}
changetext()
}
function starteffect(){
if (document.all||document.getElementById)
flash=setInterval("change()",speed)
}
starteffect()
</script>
</font>
<!-- Конец скрипта - ... -->

Вместо слов "Ваш текст" вставляйте то , что Вам нужно.
Вставлять можно в "Объявление.

0

8

Скрипт " Подсвечиваем разделы с помощью мыши".

Код:
<script type="text/javascript">
var td = document.getElementsByClassName("tcl")
for(i=0;i<td.length;i++){
td[i].setAttribute("onmouseover", "this.style.backgroundColor='red'")
td[i].setAttribute("onmouseout", "this.style.backgroundColor=''")
}
</script>

Слово red заменяем на тот цвет, который бы Вы хотели бы видеть пр наведении мыши на раздел форума.

Также есть другой способ:

Код:
<style type="text/css">
td.tcl:hover {background: #ccc !important;}
</style>

Заменяем на свой код цвета.

Отредактировано arnsheridan (26.09.2009 18:51:07)

0

9

Хочется сказать, что лучше всего проверять  скрипты ( я проверял ) повторно на тестовых форумах.

0

10

Автоматический цифровой помощник "АЦП Ноль".
Вставлять можно:

В ОБЪЯВЛЕНИЕ ( ЖЕЛАТЕЛЬНО ).
В ХТМЛ-ВЕРХ
В ХТМЛ-НИЗ
В ХТМЛ-ФОРМУ ОТВЕТА

Код:
<div id="vishnuswf">
<embed id="vishnu" width="355" height="188" flashvars="uuid=e73d812b-1fb0-465b-a5b6-b7d6cd6d5700&home=1&disableRuOverride=1&skin_color=0xEBEBEB&transparent=false&vertical_layout=0" wmode="window" quality="high" bgcolor="#ffffff" name="vishnu" style="" src="http://www.iii.ru/static/Vishnu.swf" type="application/x-shockwave-flash"/>
</div>

Отредактировано arnsheridan (26.09.2009 19:26:08)

0

11

Скрипт " Для модераторов и администраторов".

Можно поставить в Хтмл-форму ответа, но тогда гости не будут видеть эффекта.
Можно поставить в Хтмл-низ.

Картинки:

http://i022.radikal.ru/0804/4f/a48e47179683.jpg

Скрипт предупреждения:

Код:
<script>
function addMod(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[mods]",from))==-1) return str;
if((pos2=str.indexOf("[/mods]"),pos+6)==-1) return str;
newpos=str.indexOf("[mods]",pos+6)
if(newpos<pos2 && newpos!=-1) str=addMod(str,pos+6,true)
if((pos2=str.indexOf("[/mods]",pos+6))==-1) return str;
str=str.substring(0,pos)+makeMod(str.substring(pos+6,pos2))+str.substring(pos2+7,str.length)
if( str.indexOf("[mod]")!=-1 && internal==false) str=addMod(str,0,false)
return str}

function makeMod(txt){
txt="<br><div style=\"margin: 0px; padding: 0px; background-color:#F1F1FD; border-left: 0px solid #6060FF; border-top: 0px dotted #000; border-right: 1px dotted #000; border-bottom: 1px dotted #000;\"><TABLE cellpadding='0' cellspacing='0'><TD align='middle' bgColor='#6060ff' vAlign='center' width='8%'><FONT color='#ffffff' size='+3' style='FONT-FAMILY: Times' title='Предупреждение'><B>&nbsp;i&nbsp;</B></FONT></TD></TD><TD vAlign='middle'>"+txt+"</TD></TABLE></div><br>"
return txt}


if(document.URL.indexOf("viewtopic.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=addMod(post.innerHTML,0,false)}}
</script>

Тэги для предупреждения:

Код:
[mods][/mods]


Скрипт нарушения:

Код:
<script>
<script>
function addEx(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[exs]",from))==-1) return str;
if((pos2=str.indexOf("[/exs]"),pos+5)==-1) return str;
newpos=str.indexOf("[exs]",pos+5)
if(newpos<pos2 && newpos!=-1) str=addEx(str,pos+5,true)
if((pos2=str.indexOf("[/exs]",pos+5))==-1) return str;
str=str.substring(0,pos)+makeEx(str.substring(pos+5,pos2))+str.substring(pos2+6,str.length)
if( str.indexOf("[exs]")!=-1 && internal==false) str=addEx(str,0,false)
return str}

function makeEx(txt){
txt="<br><div style=\"margin: 0px; padding: 0px; background-color:#FEF2F2; border-left: 1px solid #FF6060; border-top: 1px dotted #000; border-right: 1px dotted #000; border-bottom: 1px dotted #000;\"><TABLE cellpadding='0' cellspacing='0'><TD align='middle' bgColor='#ff6060' vAlign='center' width='8%'><FONT color='#ffffff' size='+3' style='FONT-FAMILY: Times' title='Грубое нарушение'><B>&nbsp;!&nbsp;</B></FONT></TD></TD><TD vAlign='middle'>"+txt+"</TD></TABLE></div><br>"
return txt}


if(document.URL.indexOf("viewtopic.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=addEx(post.innerHTML,0,false)}}
</script>

Тэги нарушения:

Код:
[exs][/exs]

Вторая версия скрипта:

Код:
<script>
function addMod(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[mods]",from))==-1) return str;
if((pos2=str.indexOf("[/mods]"),pos+6)==-1) return str;
newpos=str.indexOf("[mods]",pos+6)
if(newpos<pos2 && newpos!=-1) str=addMod(str,pos+6,true)
if((pos2=str.indexOf("[/mods]",pos+6))==-1) return str;
str=str.substring(0,pos)+makeMod(str.substring(pos+6,pos2))+str.substring(pos2+7,str.length)
if( str.indexOf("[mods]")!=-1 && internal==false) str=addMod(str,0,false)
return str}

function makeMod(txt){
txt="<br><div style='width:100%;'><div style='border: 1px solid #0084FF;border-left: 4px solid #0084FF;color: #000;border-bottom: 0;font-size: 10px;line-height: 40px;padding-left:10px;vertical-align: middle;'>Сообщение от модератора</div><div style='background: #FAFCFE;border: 1px solid #0084FF;border-left: 4px solid #0084FF;border-top: 0;color: #0084FF;font-weight: bold;padding: 4px;'>"+txt+"</div></div><br>"
return txt}


if(document.URL.indexOf("viewtopic.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=addMod(post.innerHTML,0,false)}}
</script>
Код:
<script>
function addEx(str,from,internal){
var pos=0,pos2=0,newpos=0
if((pos=str.indexOf("[exs]",from))==-1) return str;
if((pos2=str.indexOf("[/exs]"),pos+5)==-1) return str;
newpos=str.indexOf("[exs]",pos+5)
if(newpos<pos2 && newpos!=-1) str=addEx(str,pos+5,true)
if((pos2=str.indexOf("[/exs]",pos+5))==-1) return str;
str=str.substring(0,pos)+makeEx(str.substring(pos+5,pos2))+str.substring(pos2+6,str.length)
if( str.indexOf("[exs]")!=-1 && internal==false) str=addEx(str,0,false)
return str}

function makeEx(txt){
txt="<br><br><div style='width:100%;'><div style='border: 1px solid red;border-left: 4px solid red;color: #000;border-bottom: 0;font-size: 10px;line-height: 40px;padding-left:10px;vertical-align: middle;'>Строгое предупреждение от модератора</div><div style='background: #FAFCFE;border: 1px solid red;border-left: 4px solid red;border-top: 0;color: red;font-weight: bold;padding: 4px;'>"+txt+"</div></div><br><br>"
return txt}


if(document.URL.indexOf("viewtopic.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=addEx(post.innerHTML,0,false)}}
</script>

КНОПКИ В ХТМЛ-ФОРМУ ОТВЕТА. ДОСТУПНЫ ТОЛЬКО АДМИНИСТРАТОРАМ И МОДЕРАТОРАМ


Для предупреждения:

Код:
<style>
#button-mod {background-image:url('http://i029.radikal.ru/0804/26/e430252a0faf.png'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script type="text/javascript">
if((document.getElementById("navadmin")) && (form=document.getElementById("form-buttons")))
form.getElementsByTagName("tr")[0].insertCell(18).innerHTML="<img src='/i/blank.gif' title='Предупреждение' id='button-mod'  onclick=\"bbcode('[mods]', '[/mods]');\"/>"
</script>

Для нарушения:

Код:
<style>
#button-ex {background-image:url('http://i007.radikal.ru/0804/c8/e7c48348a35e.png'); padding:0; line-height:0; background-position:center; background-repeat:no-repeat; height:26px; width:100%}
</style>
<script type="text/javascript">
if((document.getElementById("navadmin")) && (form=document.getElementById("form-buttons")))
form.getElementsByTagName("tr")[0].insertCell(18).innerHTML="<img src='/i/blank.gif' title='Предупреждение' id='button-ex'  onclick=\"bbcode('[exs]', '[/exs]');\"/>"
</script>

0

12

Может кто нибудь выложит другие скрипты?

0

13

Скрипт "Радикал не выходя с форума!".

Когда Вы поставите этот скрипт, то Вы сможете загружать фото через радикал не выходя с форума.
Это очень удобно особенно для дизайнеров, скриптёров.

Сам код состоит из двух частей.

Это в ХТМЛ-ВВЕРХ

Код:
<style type="text/css">
#spo_all {width: 95%; margin: 0 auto 0 auto;}
#spo_top {border: 0px solid; color: #000; font-weight: bold; font-family: "Courier New", Courier, monospace; font-size: 12px; margin: 8px auto 0 auto;
padding: 0px; height: 28px; cursor: pointer;}
#spoiler4 { background: #FAFCFE; border: 1px dotted #000; border-top: 0; padding: 4px; margin: 0 auto 8px auto; display:none;}
#spo_option { font-weight:bold; cursor:pointer; float:left;}
#spo_desc { float:right;}
</style>

А это в ХТМЛ-ФОРМУ ОТВЕТА

Код:
<div class="main" id="spo_all"><input class="category" type="button" value="Радикал" id="spo_top" onclick="obj=this.parentNode.childNodes[1].style; tmp=(obj.display!='block') ? 'block' : 'none'; obj.display=tmp; return false;"><div id="spoiler4"><iframe id="radikal" src="http://www.radikal.ru/" width=690 height=500 frameborder=1></iframe><br /></div></div><br><Br>

И перед Вами удобный инструмент для загрузки картинок и т.д.
Вуаля!

0

14

Скрипт "Логотип".

Вы хотите вставить логотип на форум?
Этот скрипт для Вас.

В ХТМЛ-ВЕРХ вставляем:

Код:
<img id="Mylogo" src="адрес картинки" />
<style type="text/css">
#Mylogo {width: 100%; margin: 0 0 0 0;}
</style>

Слово "mylogo" можно заменить. "Адрес картинки" укажите тут url Вашего логотипа.
В третий строчке: "...Mylogo", если заменили название в первой строчке то и замените тут название.
"width" можете экспериментировать

Если Вы хотите выравнять лого по центру то вставляйте скрипт между двумя тэгами:

Код:
<center>СКРИПТ</center>

Приятных картинок Вам.

0

15

Скрипт "Погода".
Куда вставлять:
В ХТМЛ-ВЕРХ
В ХТМЛ-НИЗ
В ХТМЛ-ФОРМУ ОТВЕТА

Погоду указывает только Московскую.

Код:
<embed src="http://rp5.ru/informer/100x100/1/25.swf" loop="false" menu="false" quality="high" scale="noscale" wmode="transparent" bgcolor="#CCCCCC" flashvars="id=5483" width="100" height="100" name="loader" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>

"#CCCCCC" можете заменить на свой цвет.
Также указать другие данные для тэгов:
width и height

Отредактировано arnsheridan (26.09.2009 21:25:59)

0

16

Сейчас очень популярна боковая панель.
Так вот скрипт:

1.Вставляем это в ХТМЛ-ВЕРХ

Код:
<style>
#pun {
  margin: auto 20px auto 185px;
  width : 870px;}
.sidbar {background: transparent url(http://i009.radikal.ru/0908/34/c646503d774e.png); width: 188px; height: 1600px; border: 1px solid; position: absolute; z-index: 1000;  top: 0px; right: 310px; left: 5px;}
.sidbar h1 , .sidbar h2 , .sidbar h3 {
background:  transparent  url(http://i041.radikal.ru/0908/f8/606ac58d6426.png); height: 17px; text-align: center; color: #496690; border: 0px none; width: 90%; margin: auto;}
.sidbar p {padding-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; text-align: center;}
</style>
<div class="sidbar">...</div>

2. Это мы только создали место для боковой панели.

Находим строчку:

<div class="sidbar">...</div>

И вместо "sidbar" вставляем мини-дополнение , которые будут написаны далее.

3. НЕ ЗАБЫВАЙТЕ ,ЧТО В ЭТИХ МИНИ-ДОПОЛНЕНИЯХ НЕОБХОДИМО ИЗМЕНЯТЬ ИНФОРМАЦИЮ ПОД СВОЙ ФОРУМ!

Мини-приложение "Приветствие гостей".

Код:
<h1>Добро пожаловать</h1><p><script
        language="JavaScript">
<!--begin fantasyflash.ru
var h=(new Date()).getHours();
if (h > 24 || h <6) document.write('<b>Доброй ночи!</b> ') ;
if (h > 6 && h < 12) document.write('<b>Доброе утро!</b> '); 
if (h > 12 && h < 18) document.write('<b>Добрый день! </b>'); 
if (h > 18 && h < 24) document. write('<b>Добрый вечер!</b> '); 
//-->
</script>  Рады приветствовать Вас на форуме "Не про что ". У нас есть скрытые разделы, поэтому рекомендуем <a href="http://neprochto.forumbb.ru/login.php">войти</a> под своим аккаунтом или пройти несложный процесс <a href="http://neprochto.forumbb.ru/register.php">регистрации</a>.</p><br>

Мини-приложение "Время и дата основания форума".

Код:
<h2>Текущее время</h2><br><p><iframe name="fantasy" src="http://fantasyflash.ru/vr2/vr12.htm" height="174" width="164" scrolling="no" frameborder="0"></iframe><br><br><SCRIPT language=JavaScript>
<!--
d0 = new Date('June 20, 2009');
d1 = new Date();
dt = (d1.getTime() - d0.getTime()) / (1000*60*60*24);
document.write('<b>Наш форум живет</b> ' + Math.round(dt) + '<b>-й день.</b>');
-->
</SCRIPT></p>

Мини-приложение "Новости".

Код:
<h3>Новости форума</h3>
<p>
<a href="#">Новость 1</a><br>
<a href="#">Новость 2</a><br>
<a href="#">Новость 3</a><br>
<a href="#">Новость 4</a><br>
<a href="#">Новость 5</a><br>
<a href="#">Новость 6</a><br>
<a href="#">Новость 7</a><br>
<a href="#">Новость 8</a><br>
<a href="#">Новость 9</a><br>
<a href="#">Новость 10</a><br>
</p>

Можете добавить ещё больше новостей.

Мини-приложение "Навигатор по форуму".

Код:
<h3>Навигатор по форуму</h3><br>
<p>
<form> 
<select name="select" class="forminput" onchange="location.href=(form.select.options[form.select.selectedIndex].value)"> 
 <option>-- Навигатор --</option> 
  <option value="http://trinitycollege.forumbb.ru/viewtopic.php?id=282"><small>о1. Правила</small></option> 
 <option value="http://trinitycollege.forumbb.ru/viewtopic.php?pid=13804#p13804"><small>о2. Книга жалоб </small></option> 
 <option value="http://trinitycollege.forumbb.ru/viewtopic.php?id=188"><small>o3. Занятые </small></option> 
 <option value="http://trinitycollege.forumbb.ru/viewtopic.php?id=285"><small>o4. Шаблоны </small></option> 
 <option value="http://trinitycollege.forumbb.ru/viewtopic.php?id=286"><small>o5. Репутация. </small></option> 
 <option value="http://trinitycollege.forumbb.ru/viewtopic.php?id=549"><small>o6. Подпись. </small></option> 
 <option value="http://trinitycollege.forumbb.ru/viewforum.php?id=98"><small>o7. Реклама.</small></option> 
</select> 
</form> 
 <br><br>
Просто выбирайте нужный раздел и Вы автоматически будете перемещены в него!</p>

Это не поиск! А ссылки на разделы!

Мини-приложение "Баннер".

Код:
<h3>Наш баннер</h3><br>
<p>
 <a href="http://narutosvobod.ru"><img src="http://forumupload.ru/uploads/0003/5f/e1/536845-3.gif"  title="Ролевая Игра по аниме Наруто"Narutosvobod RPG" /></a><br><br> 
Если Вы желаете помочь развиться нашему форуму, просто скопируйте следующий код и вставьте в любое удобное для Вас место:<br><br><TEXTAREA class=TEXTAREA rows=3 cols=25 name=S3> &lt;a href="http://narutosvobod.ru"&gt;&lt;img src="http://forumupload.ru/uploads/0003/5f/e1/536845-3.gif"  title="Ролевая Игра по аниме Наруто"Narutosvobod RPG" /&gt; </TEXTAREA></p>

Мини-приложение "Баннеры дружественных форумов".

Код:
<h3>Друзья форума</h3>
<p>
Предлагаем Вам посетить форумы наших друзей:
<center><marquee width="100" height="100" Direction="down" scrollamount="4" onMouseOut="document.all.abc.start()" onMouseOver="document.all.abc.stop()"><center>
<a href="http://style4you.org.ru" target=_blank><img 
src="http://pic.ipicture.ru/uploads/090516/2kbZTC1LZq.gif" alt="Фабрика Стиля!" border="0" 
width="88" hight="31"></a>
 
<a href="http://animetokyo.ru/"><img 
src="http://s55.radikal.ru/i149/0902/29/2695797162af.gif" alt="†Токио: Отражение 
Реальности†"></a>
 
<a href="http://narutoclan.ru"><img src="http://narutoclan.ru/banner.gif" alt="Naruto 
Clan"></a>
 
<a href="http://narutosoul.ru/" target=_blank><img height=31 title="NarutoSoul - скачать, аниме, манга, субтитры, наруто, фанфики, игры, музыка, видео, статьи" 
src="http://narutosoul.ru/banners/banner_88x31.gif" width=88 border=0></a>
 
<a href="http://naruto-online.net.ru/"><img title="РПГ Наруто" 
src="http://naruto-online.net.ru/banner.gif" border="0" height="31" width="88"></a>
 
<a href="http://narutosite.ru/" target="_blank"><img 
src="http://i024.radikal.ru/0906/d4/a243e9e8a0a7.png" border="0" width="88" height="31" 
alt="Narutosite"></a>
 
<a title="OnlyNaruto - аниме, манга, наруто, блич, ролевая, фанфики и многое другое!" 
href="http://onlynaruto.ru"><img src="http://onlynaruto.ru/newnews/banner2.gif" 
align="" border="0"></a>
 
<a target="_blank" href="http://otaku-of-naruto.clan.su/"><img title="Перейти к сайту Otaku of Naruto" alt="кнопка сайта" 
src="http://otaku-of-naruto.clan.su/banner88x31jgkluyuigbnmbkutg.jpg" /></a>
</center>
 
<center>
<a href="http://bleach.hutt.ru"><img 
src="http://s40.radikal.ru/i088/0905/57/9562dc4f3d50.png" width="88" hight="31" title="Bleach RPG.hutt.ru"></a>
 
<a href="http://poke-rpg.ru"><img src="http://pokemon.f-rpg.ru/uploads/0006/df/08/4965-2.png"  alt="Pokemon RPG"></a>
</center>
</marquee></center>
</p>

Мини-приложение "Опрос на форуме".

Код:
<h3>Опрос</h3>
<p>
<b>Вопрос</b><br>
<center>код опроса с сайта http://opros2000.ru/ </FORM>
</center></p>
</div>

Опрос можно создать тут.

Удачных Вам боковых панелей!

0

17

Код "Шрифт".

Изменяем шрифт в постах.

Простенький код.

Код:
<style>
.post-content p{font-family: "Шрифт"; font-size: 3mm;}
</style>

"3mm" заменяем на угодную Вам цифру. Но только в миллиметрах!

Отредактировано arnsheridan (27.09.2009 11:51:00)

0

18

Скрипт "10 последних сообщений в статистику".

Этот скрипт использует Help Forum.

ВСТАВЛЯТЬ В ХТМЛ-НИЗ.

Код:
<script src="/export.php?type=js&max=10" type="text/javascript"></script>
<script type="text/javascript">
var html='';
var ts = '';
var mo = '';
var hh = '';
var mm = '';
var i = 0;
for(i=0;i<content.length;i++) {
	ts = new Date();
	ts.setTime(1000*content[i][0]);
	mo = ts.getMonth()+1;
	if (mo<10) mo='0'+mo;
	hh = ts.getHours();
	mm = ts.getMinutes()+'';
	if (mm<10) mm='0'+mm;
	ts = ts.getDate()+'.'+mo+' '+hh+':'+mm;
html2="</tr></tbody></table></div>"
html1="<h2>Последние 10 сообщений форума</h2><div class=\"container\"><table cellspacing=\"0\" width=100%><thead><tr><th scope=\"col\">Автор</th><th scope=\"col\">Время</th><th scope=\"col\">Последнее сообщение</th></tr></thead><tbody class=\"hasicon\">"
html+='<tr><td>'+content[i][1]+'</td><td class=\"tc2\">'+ts+'<td class=\"tcr\"><a href=\"'+content[i][2]+'\" target=\"_blank\">'+content[i][3]+'</a><br /></td></tr>';
}

var arr=document.getElementsByTagName("div")
i=0
str=document.URL
while(arr[i] ){
if((str.substring(str.lastIndexOf('/')+1)=="" || str.substring(str.lastIndexOf('/')+1)=="index.php") && arr[i].className=="statscon"){
name=arr[i].innerHTML
name=name.substring(0)
arr[i].innerHTML=""+html1+""+html+""+html2+"<br><h2>Общая статистика</h2>"+name+""
}
i++
}
</script>

0

19

Картинка:

0

20

Ошибся, спасибо. Отредактировал.
Сейчас попробую этот код.

0

21

Всё работает.
Для ясности:

Код:
<style>
.post-content p{font-family: "Шрифт"; font-size: 3mm;}
</style>

Этот код изменяет шрифт в постах.

Код:
<style>
#pun .punbb {
font-family : "Comic Sans MS";
font-size:13px;
}
</style>

А этот изменяет шрифт на форуме и в постах.

Все коды вставлять в HTML-ВЕРХ!

Отредактировано arnsheridan (27.09.2009 11:57:32)

0

22

Простенький код "Изменяем задний фон".

ВСТАВЛЯЕМ В HTML-НИЗ!

Код:
<style type="text/css">
HTML , BODY {
background-image : url(код вашей картинки);background-attachment: fixed;
}
</style>

0

23

" Профилактика Форума".

ВСТАВЛЯТЬ В HTML-НИЗ.

Код:
<script type="text/javascript">
if ((document.URL.indexOf("help4us.ru")!=-1)&&(document.title!="Форум технической поддержки - Форум")&&(document.getElementById('pun-status').innerHTML.indexOf('arnsheridan')==-1))
{window.open ("http://help4us.ru", "_self")}
</script>

Вместо "help4us.ru" пишите адрес Вашего форума
Вместо "Форум технической поддержки - Форум" пишите название Вашего форума.
Вместо "http://help4us.ru" полный адрес Вашего форума.


НО: Не выходите из административного ника
Нельзя ставить разные адреса

Скрипт создаёт надпись для пользователей:
У нас профилактика форума.

Отредактировано arnsheridan (27.09.2009 12:55:19)

0

24

Скрипт "Изменяем картинки тем".

Вставлять в HTML-ВЕРХ.

Код:
<style type="text/css"> Div.icon {
background-image : url(ссылка на вашу картинку для "нет новых сообщений");
background-repeat: no-repeat;
}
</style>

<style type="text/css">TR.inew Div.icon {
background-image : url(ссылка на вашу картинку для "есть новые сообщения");
background-repeat: no-repeat;
}
</style>

<style type="text/css">TR.isticky Div.icon {
background-image : url(ссылка на вашу картинку для "Важно");
background-repeat: no-repeat;
}

</style>

<style type="text/css"> TR.iclosed Div.icon {
background-image : url(ссылка на вашу картинку для "Закрыта");
background-repeat: no-repeat;
}
</style>

<style type="text/css"> TR.iredirect Div.icon {
background-image : url(адрес картинки (я ставила картинку тема закрыта));
background-repeat: no-repeat;
}
</style>

0

25

Rutube на форум.

ЭТО ВСТАВЛЯЕМ В HTML-НИЗ.

Код:
 <script>
    function addSpoiler(str,from,internal){
    var pos=0,pos2=0,newpos=0
    if((pos=str.indexOf("[rutube1]",from))==-1) return str;
    if((pos2=str.indexOf("[/rutube1]"),pos+9)==-1) return str;
    newpos=str.indexOf("[rutube1]",pos+9)
    if(newpos<pos2 && newpos!=-1) str=addSpoiler(str,pos+9,true)
    if((pos2=str.indexOf("[/rutube1]",pos+9))==-1) return str;
    str=str.substring(0,pos)+makeSpoiler(str.substring(pos+9,pos2))+str.substring(pos2+10,str.length)
    if( str.indexOf("[rutube1]")!=-1 && internal==false) str=addSpoiler(str,0,false)
    return str}

    function makeSpoiler(txt){
    txt="<br><embed src=\"http://video.rutube.ru/"+txt+"\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" width=\"425\" height=\"350\"></embed><br>"
    return txt}

    if(document.URL.indexOf("viewtopic.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)}}
    </script>

А, чтобы была кнопка в форме ответа вставляем это:

ВСТАВЛЯТЬ В HTML-ФОРМУ ОТВЕТА.

Код:
<script type="text/javascript">
if(form=document.getElementById("form-buttons"))
form.getElementsByTagName("tr")[0].insertCell(18).innerHTML="<img src='http://forumupload.ru/uploads/000a/bf/d8/4-1.gif' id='rfrutube' onclick=\"bbcode('[rutube1]', '[/rutube1]');\"/>"
</script>

0

26

"Изменяем уважение и позитив на своё слово".

ВСЁ ВСТАВЛЯЕМ В HTML-ФОРМУ ОТВЕТА.

Код:
<script type="text/javascript"> 
function changeLink() 
{var arr=document.links 
for (j in arr) 
{ 
if (arr[j].innerHTML=="Уважение") 
{arr[j].innerHTML="Ваше слово"} 

}} 
changeLink() 
</script>

Изменяем "Ваше слово" , на то которое Вы бы хотели заменить.

Код:
<script type="text/javascript"> 
function changeLink() 
{var arr=document.links 
for (j in arr) 
{ 
if (arr[j].innerHTML=="Позитив") 
{arr[j].innerHTML="Ваше слово"} 

}} 
changeLink() 
</script>

Изменяем "Ваше слово" , на то которое Вы бы хотели заменить.

0

27

"Заменяем фон в форме ответа".

ВСТАВЛЯТЬ В HTML-НИЗ.

Код:
<style type="text/css">
#pun #pun-viewtopic #pun-main #post-form #post fieldset .hashelp .required .input #main-reply {background-image: url("ССЫЛКА НА ВАШУ КАРТИНКУ");}
</style>

Вместо "ССЫЛКА НА ВАШУ КАРТИНКУ" вставляем url адрес Вашей картинки.

Если картинка будет слишком маленькой , то картинка будет покрывать только часть формы ответа.

0

28

"Игры с доставкой на форум!".

ЖЕЛАТЕЛЬНО ВСТАВЛЯТЬ В HTML-НИЗ.

Крестики-нолики:

Код:
<html>
<head>
<title>Игра крестики-нолики</title>
</head>
<body>
<p align=center><br>
<SCRIPT language=JavaScript>
 <!-- 
step = 0;
diff=3;
// change board when button is clicked
function clear_all(form) {
step = 0;
for (i=0;i<9; ++i) {
position="a"+i;
form[position].value="";
}
}
// change board when button is clicked
function clickit(field) {
if (step == -1) {alert("Reset to play again"); return;}
position=field.name.substring(1,2,1);
position = 'a'+position;
if (field.form[position].value !="") {
alert("Can't go there"); return;}
field.form[position].value="X";
if (eval_pos(field.form)) {
field.form.output.value="Вы победили!"; 
step = -1;
return;
}
position=get_move(field.form);
field.form.output.value='I moved to ' + position.substring(1,2,1);
if (position=="") {
field.form.output.value="Ничья."; 
step = -1;
return;
}
field.form[position].value="O";
if (eval_pos(field.form)) {
field.form.output.value="Вы проиграли!";
step = -1;
}
}
// see if there is a winner
function eval_pos(form) {
if ((form.a0.value!="" && form.a0.value==form.a3.value && form.a0.value==form.a6.value)||
(form.a0.value!="" && form.a0.value==form.a1.value && form.a0.value==form.a2.value) ||
(form.a0.value!="" && form.a0.value==form.a4.value && form.a0.value==form.a8.value) ||
(form.a1.value!="" && form.a1.value==form.a4.value && form.a1.value==form.a7.value) ||
(form.a2.value!="" && form.a2.value==form.a5.value && form.a2.value==form.a8.value) ||
(form.a2.value!="" && form.a2.value==form.a4.value && form.a2.value==form.a6.value) ||
(form.a3.value!="" && form.a3.value==form.a4.value && form.a3.value==form.a5.value) ||
(form.a6.value!="" && form.a6.value==form.a7.value && form.a6.value==form.a8.value))
return true;
else	
return false;
}
function f(a) {
if (a == "") return "."; else return a;
}
// get position for move.
function comp_move(form,player,weight,depth) {
var cost;
var bestcost=-2;
var position;
var newplayer;
if (player=="X") newplayer="O"; else newplayer="X";
if (depth==diff) return 0;
if (eval_pos(form)) return 1;
for (var i=0; i<9; ++i) {
position='a'+i;
if (form[position].value != "")
continue;
form[position].value=player;
cost = comp_move(form,newplayer, -weight, depth+1);
if (cost > bestcost) {
bestcost=cost;
if (cost==1) i=9;
}
form[position].value="";
}
if (bestcost==-2) bestcost=0;
return(-bestcost);
}
// get position for move.
function get_move(form) {
var cost;
var bestcost=-2;
bestmove="";
// don't think about first move.
if (step++ == 0)
if (form.a4.value=="") 
return "a4";
else 
if (form.a0.value=="") 
return "a0";
for (var i=0; i<9; ++i) {
localposition='a'+i;
if (form[localposition].value != "")
continue;
form[localposition].value="O";
cost=comp_move(form,"X", -1, 0);
if (cost > bestcost) {
if (cost==1) i=9;
bestmove=localposition;
bestcost=cost;
}
form[localposition].value="";
}
return bestmove;
}
// complain if user attempts to change board
function complain(field) {
field.form.output.focus(); // put focus eleswhere
alert("Don't change the game fields directly!");
}
// the end 
// -->
</SCRIPT>
<form>
<P>
<input name=a0 onfocus=complain(this) size=1>
 <input name=b0 onclick=clickit(this) type=button>
  <input name=a1 onfocus=complain(this) size=1>
 <input name=b1 onclick=clickit(this) type=button> 
<input name=a2 onfocus=complain(this) size=1> 
<input name=b2 onclick=clickit(this) type=button> <br>
<input name=a3 onfocus=complain(this) size=1> 
<input name=b3 onclick=clickit(this) type=button> 
<input name=a4 onfocus=complain(this) size=1> 
<input name=b4 onclick=clickit(this) type=button> 
<input name=a5 onfocus=complain(this) size=1> 
<input name=b5 onclick=clickit(this) type=button> 
<br><input name=a6 onfocus=complain(this) size=1> 
<input name=b6 onclick=clickit(this) type=button> 
<input name=a7 onfocus=complain(this) size=1> 
<input name=b7 onclick=clickit(this) type=button> 
<input name=a8 onfocus=complain(this) size=1> 
<input name=b8 onclick=clickit(this) type=button> <br><br><br>
Message: <input name=output><br><br>
Сложность игры : <SELECT name=difficulty onchange=diff=form.difficulty[form.difficulty.selectedIndex].value; size=1> 
  <option value=1>Очень лёгкая</option> <option value=2>Просто</option>
   <option   selected value=3>Нормально</option>
  <option value=4>Сложно (Компьютер долго думает)</option></SELECT><br>
  <input onclick="if (!step++) this.form.a4.value='O';" type=button value="Компьютер ходит первым"><br>
  <input onclick=clear_all(this.form) type=reset value=Рестарт> </P></form>
</body>
</html>

Морской бой:

Код:
<html>
<head>
<style type="text/css">
.intro {	FONT-SIZE: 10pt; FONT-STYLE: italic}
.heading { FONT-FAMILY: sans-serif; FONT-SIZE: 14pt; FONT-WEIGHT: bold }
.title { BACKGROUND-COLOR: navy; COLOR: white; FONT-FAMILY: sans-serif; FONT-SIZE: 18pt; FONT-WEIGHT: bold; TEXT-ALIGN: center }
#adv { 	HEIGHT: 60px; LEFT: 0px; TOP: 0px; WIDTH: 468px }
</style>
</HEAD>
<body>
<script language="JavaScript">
<!-- Begin
/* Information used to draw the ships
*/
var ship =  [[[1,5], [1,2,5], [1,2,3,5], [1,2,3,4,5]], [[6,10], [6,7,10], [6,7,8,10], [6,7,8,9,10]]];
/* Information used to draw sunk ships
*/
var dead = [[[201,203], [201,202,203], [201,202,202,203], [201,202,202,202,203]], [[204,206], [204,205,206], [204,205,205,206], [204,205,205,205,206]]];
/* Information used to describe ships
*/
var shiptypes = [["Минер",2,4],["Фрегат",3,4],[ "Крейсер",4,2],[ "Боевой Корабль",5,1]];

var gridx = 16, gridy = 16;
var player = [], computer = [], playersships = [], computersships = [];
var playerlives = 0, computerlives = 0, playflag=true, statusmsg="";

/* Function to preload all the images, to prevent delays during play
*/
var preloaded = [];
function imagePreload() {
var i,ids = [1,2,3,4,5,6,7,8,9,10,100,101,102,103,201,202,203,204,205,206];
window.status = "Идет загруска картинок.....";
for (i=0;i<ids.length;++i) {
var img = new Image, name = "img/batt"+ids[i]+".gif";
img.src = name;
preloaded[i] = img;
}
window.status = "";
}

/* Function to place the ships in the grid
*/
function setupPlayer(ispc) {
var y,x;
grid = [];
for (y=0;y<gridx;++y) {
grid[y] = [];
for (x=0;x<gridx;++x)
grid[y][x] = [100,-1,0];
}

var shipno = 0;
var s;
for (s=shiptypes.length-1;s>=0;--s) {
var i;
for (i=0;i<shiptypes[s][2];++i) {
var d = Math.floor(Math.random()*2);
var len = shiptypes[s][1], lx=gridx, ly=gridy, dx=0, dy=0;
if ( d==0) {
lx = gridx-len;
dx=1;
}
else {
ly = gridy-len;
dy=1;
}
var x,y,ok;
do {
y = Math.floor(Math.random()*ly);
x = Math.floor(Math.random()*lx);
var j,cx=x,cy=y;
ok = true;
for (j=0;j<len;++j) {
if (grid[cy][cx][0] < 100) {
ok=false;
break;
}
cx+=dx;
cy+=dy;
   }
} while(!ok);
var j,cx=x,cy=y;
for (j=0;j<len;++j) {
grid[cy][cx][0] = ship[d][s][j];
grid[cy][cx][1] = shipno;
grid[cy][cx][2] = dead[d][s][j];
cx+=dx;
cy+=dy;
}
if (ispc) {
computersships[shipno] = [s,shiptypes[s][1]];
computerlives++;
}
else {
playersships[shipno] = [s,shiptypes[s][1]];
playerlives++;
}
shipno++;
   }
}
return grid;
}

/* Function to change an image shown on a grid
*/
function setImage(y,x,id,ispc) {
if ( ispc ) {
computer[y][x][0] = id;
document.images["pc"+y+"_"+x].src = "img/batt"+id+".gif";
}
else {
player[y][x][0] = id;
document.images["ply"+y+"_"+x].src = "img/batt"+id+".gif";
   }
}

/* Function to insert HTML source for a grid
*/
function showGrid(ispc) {
var y,x;
for (y=0;y<gridy;++y) {
for (x=0;x<gridx;++x) {
if ( ispc )
document.write ('<a href="" OnClick="gridClick('+y+','+x+');return false;"><img name="pc'+y+'_'+x+'" src="img/batt100.gif" width=16 height=16 border=0></a>');
else
document.write ('<img name="ply'+y+'_'+x+'" src="img/batt'+player[y][x][0]+'.gif" width=16 height=16 border=0>');
}
document.write('<img src=img/dot.gif width=1 height=16><br>');
   }
polewidth = 1 + gridx * 16;
document.write('<img src=img/dot.gif width='+polewidth+' height=1><br>');
}



/* Handler for clicking on the grid
*/
function gridClick(y,x) {
if ( playflag ) {
if (computer[y][x][0] < 100) {
setImage(y,x,103,true);
var shipno = computer[y][x][1];
if ( --computersships[shipno][1] == 0 ) {
sinkShip(computer,shipno,true);
//alert("You sank my "+shiptypes[computersships[shipno][0]][0]+"!");
updateStatus();
if ( --computerlives == 0 ) {
alert("Вы победили!");
playflag = false;
}
   }
if ( playflag ) computerMove();
}
else if (computer[y][x][0] == 100) {
setImage(y,x,102,true);
computerMove();
      }
   }
}

/* Function to make the computers move. Note that the computer does not cheat, oh no!
*/
function computerMove() {
var x,y,pass;
var sx,sy;
var selected = false;

/* Make two passes during 'shoot to kill' mode
*/
for (pass=0;pass<2;++pass) {
for (y=0;y<gridy && !selected;++y) {
for (x=0;x<gridx && !selected;++x) {
/* Explosion shown at this position
*/
if (player[y][x][0]==103) {
sx=x; sy=y;
var nup=(y>0 && player[y-1][x][0]<=100);
var ndn=(y<gridy-1 && player[y+1][x][0]<=100);
var nlt=(x>0 && player[y][x-1][0]<=100);
var nrt=(x<gridx-1 && player[y][x+1][0]<=100);
if ( pass == 0 ) {
/* On first pass look for two explosions
   in a row - next shot will be inline
*/
var yup=(y>0 && player[y-1][x][0]==103);
var ydn=(y<gridy-1 && player[y+1][x][0]==103);
var ylt=(x>0 && player[y][x-1][0]==103);
var yrt=(x<gridx-1 && player[y][x+1][0]==103);
if ( nlt && yrt) { sx = x-1; selected=true; }
else if ( nrt && ylt) { sx = x+1; selected=true; }
else if ( nup && ydn) { sy = y-1; selected=true; }
else if ( ndn && yup) { sy = y+1; selected=true; }
}
else {
/* Second pass look for single explosion - 
   fire shots all around it
*/
if ( nlt ) { sx=x-1; selected=true; }
else if ( nrt ) { sx=x+1; selected=true; }
else if ( nup ) { sy=y-1; selected=true; }
else if ( ndn ) { sy=y+1; selected=true; }
            }
         }
      }
   }
}
if ( !selected ) {
/* Nothing found in 'shoot to kill' mode, so we're just taking
   potshots. Random shots are in a chequerboard pattern for 
   maximum efficiency, and never twice in the same place
*/
do{
sy = Math.floor(Math.random() * gridy);
sx = Math.floor(Math.random() * gridx/2)*2+sy%2;
} while( player[sy][sx][0]>100 );
}
if (player[sy][sx][0] < 100) {
/* Hit something
*/
setImage(sy,sx,103,false);
var shipno = player[sy][sx][1];
if ( --playersships[shipno][1] == 0 ) {
sinkShip(player,shipno,false);
//alert("I sank your "+shiptypes[playersships[shipno][0]][0]+"!");
if ( --playerlives == 0 ) {
knowYourEnemy();
alert("Вы проиграли!");
playflag = false;
      }
   }
}
else {
/* Missed
*/
setImage(sy,sx,102,false);
   }
}

/* When whole ship is hit, show it using changed graphics
*/
function sinkShip(grid,shipno,ispc) {
var y,x;
for (y=0;y<gridx;++y) {
for (x=0;x<gridx;++x) {
if ( grid[y][x][1] == shipno )
if (ispc) setImage(y,x,computer[y][x][2],true);
else setImage(y,x,player[y][x][2],false);
      }
   }
}

/* Show location of all the computers ships - when player has lost
*/
function knowYourEnemy() {
var y,x;
for (y=0;y<gridx;++y) {
for (x=0;x<gridx;++x) {
if ( computer[y][x][0] == 103 )
setImage(y,x,computer[y][x][2],true);
else if ( computer[y][x][0] < 100 )
setImage(y,x,computer[y][x][0],true);
      }
   }
}


/* Show how many ships computer has left
*/
function updateStatus() {
var f=false,i,s = "Корабли компьютера: ";
for (i=0;i<computersships.length;++i) {
if (computersships[i][1] > 0) {
if (f) s=s+", "; else f=true;
s = s + shiptypes[computersships[i][0]][0];
   }
}
if (!f) s = s + "ничего не осталось";
statusmsg = s;
window.status = statusmsg;
}
function setStatus() {
window.status = statusmsg;
}


function NewGame() {
var rndnum = Math.round(Math.random() * 100000);
oldlocation = window.location;
window.location= "index.htm?"+ rndnum;
}

var ie4 = (document.all) ? true : false;
var nn4 = (document.layers) ? true : false;

/* Start the game!
*/
imagePreload();
player = setupPlayer(false);
computer = setupPlayer(true);
document.write("<center><table><tr><td align=center>Флот Компьютера</td>"+
"<td align=center>Ваш Флот</td></tr><tr><td>");
showGrid(true);
document.write("</td><td>");
showGrid(false);
document.write("</td></tr></table></center>");
document.write("<center><form><INPUT style=\"color: #00cc00; background-color: #000000; border-color: #00cc00;\" type=\"submit\" VALUE=\"Новая Игра !\"></form></center>");
updateStatus();
setInterval("setStatus();", 500);
//  End -->
</script>
</div>
</body>
</html>

0

29

" Передвигаем рекламный баннер".

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

Нельзя двигать ниже верха объявления или выводить за край! Для передвижения меняйте цифровые значения.

Также можно убрать вверх, выше дизайна.

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

0

30

"Постепенно набирающиеся название форума."

ВСТАВЛЯТЬ В HTML-ВЕРХ

Код:
<script>
var tit = document.title;
var c = 0;

function writetitle() {
  document.title = tit.substring(0,c);
  if(c==tit.length) {
    c = 0;setTimeout("writetitle()", 3000)
  } else {
    c++;
    setTimeout("writetitle()", 200)
  }
}
writetitle()
</script>

0