Поиск:
  • Страница 1 из 1
  • 1
Модератор форума: Senator  
Скрипт - печатки для форума
Дата: Пятница, 04.03.2011, 22:03 | Сообщение # 1
Offline
  • Премиум
  • Ранг: Генералиссимус
  • 2185 Сообщения

[Table]Описание работы скрипта:
По нажатию на кнопочку, открывается панель, с печатками. По нажатию на любую из них, она копируется в поле ввода бб-кодом. Ну вот впринципе и всё, дальше всё понятно.
Установка:
1.Общий вид страниц форума. В head ставим [/Table]
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>

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

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>
  • Страница 1 из 1
  • 1
Поиск:
Администрация проекта не несет ответственности за публикуемые материалы.
Дизайн полностью принадлежит "Up-Rise.Ru".
Дизайн сайта разработал life_man.
© 2025 Сайт управляется системой uCoz.