• Смотреть онлайн Паркер .
  • Крепкий орешек 5: Хороший день, чтобы умереть.
  • Доспехи Бога 3: Миссия Зодиак.

Скрипт - печатки для форума


После нажатия на неё вспылвает панель:

Описание работы скрипта:
По нажатию на кнопочку, открывается панель, с печатками. По нажатию на любую из них, она копируется в поле ввода бб-кодом. Ну вот впринципе и всё, дальше всё понятно.
Установка:
1.Общий вид страниц форума. В head ставим

Code
<script type="text/javascript">  
function addBbButton(word,where,action,word2){  
button=document.createElement('input');  
button.type='button';button.className='codeButtons';if(word2){button.value=word2;}else{button.value=word;}  
button.style.margin='1 1 0 0px';button.name=word;  
if(action){button.onclick=action;}else{button.onclick=function(){simpletag(word);}}  
input=document.getElementsByTagName('input');  
for(i=0;i<input.length;i++){  
if(input[i].value==where && input[i].className=='codeButtons'){target=input[i];break;}}  
try{target.parentNode.insertBefore(button,target);}catch(e){}}  
</script>  
<style>.pechati {border:0px inset;background:#FFFFFF;}</style>

2.Затем в этом же шаблоне ставим сразу после $BODY$ код:

Code
<script type="text/javascript">  
addBbButton('Печатки','b',onClick="$('#link').slideToggle('slow')");  
</script>

3.Теперь идём в форму добавления сообщений и ставим сразу после $MESSAGE$

Code
<div class="uz" id="link" style="display:none">  
   
<table width="100%" class="pechati" height="120" cellpadding="0" onmouseover="document.getElementById('asmltrxZMM_').style.display='';" onmouseout="document.getElementById('asmltrxZMM_').style.display='none';"><tr><td ><a href="javascript://" onclick="emoticon('[img]http://all-for-ucoz.ru/shtampi/012.gif[/img]','message');return false;"><img src="http://all-for-ucoz.ru/shtampi/012.gif"></a></td><td ><a href="javascript://" onclick="emoticon('[img]http://all-for-ucoz.ru/shtampi/005.gif[/img]','message');return false;"><img src="http://all-for-ucoz.ru/shtampi/005.gif" ></a></td><td ><a href="javascript://" onclick="emoticon('[img]http://all-for-ucoz.ru/shtampi/039.gif[/img]','message');return false;"><img src="http://all-for-ucoz.ru/shtampi/039.gif" ></a></td><td ><a href="javascript://" onclick="emoticon('[img]http://all-for-ucoz.ru/shtampi/045.gif[/img]','message');return false;"><img src="http://all-for-ucoz.ru/shtampi/045.gif" ></a></td><td ><a href="javascript://" onclick="emoticon('[img]http://all-for-ucoz.ru/shtampi/047.gif[/img]','message');return false;"><img src="http://all-for-ucoz.ru/shtampi/047.gif" ></a></td><td><a href="javascript://" onclick="emoticon('[img]http://all-for-ucoz.ru/shtampi/049.gif[/img]','message');return false;"><img src="http://all-for-ucoz.ru/shtampi/049.gif" ></a></td><td ><a href="javascript://" onclick="emoticon('[img]http://all-for-ucoz.ru/shtampi/002.gif[/img]','message');return false;"><img src="http://all-for-ucoz.ru/shtampi/002.gif" width="122"></a></td></tr></table>  
</div>
Вроде всё! Удачи! Скажу что в скрипте есть код, написаный сайтом allcity.net.ru, который выводит кнопочку в один ряд с основными.




Комментарии   

Оставьте комментарий

Имя / Логин
Email
 

Так

Друзья

Форма входа

Мини чат

Рекламный блок

Здесь может быть реклама ВАШЕГО товара (ресурса)

Подробнее...

Рекламный блок

Здесь может быть реклама ВАШЕГО товара (ресурса)

Подробнее...

Рекламный блок

Здесь может быть реклама ВАШЕГО товара (ресурса)

Подробнее...