2
Вы не авторизованы!
Присоединяйтесь к нашему сообществу :)
авторизация
Вакансии
На сайт требуется контент-менеджер
смотреть вакансии

Иконки рядом с названием как на U.Helper uCoz

Виды материалов 2010-Дек-01 chocopie 941 0

Инструкция:
1) Заходим Главная » Управление дизайном » Форум » Общий вид страниц форума
2) Ставим перед </head>:

Код: Выделить всё

Code
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.pack.js"></script>

3) Далее вставляем после $BODY$ в общем виде страниц форума:

Код: Выделить всё

Code
<script type="text/javascript">  
  // By U.Helper ~ http://helper.ucoz.ru/ & AllCity ~ http://allcity.net.ru/  
  $('.thDescr').each(function(){  
  var s = $(this).html().match( /sml\[(\w+)\]/ );  
  $(this).show();  
  if (s==null) return;  
  s = s[0];  
  $(this).html( $(this).html().replace(s,'') );  
  if( $(this).html()=='()' ) $(this).html('');  
  })  
  $('.threadDescr').each(function(){  
  var s = $(this).html().match( /sml\[(\w+)\]/ );  
  $(this).show();  
  if (s==null) return;  
  var name = s[1];  
  s = s[0];  
  $(this).html( $(this).html().replace(s,'') );  
  $(this).parent().prev().find('img').attr('src','/threadIcons/'+name+'.png');  
  });  
  </script>

4) Заменяем в коде:

Code
Quote
threadIcons

На папку в которую вы загрузите иконки.

5) Идем в форму добавления сообщения и находим:

Код:

Code
<tr id="frM28"><td class="gTableLeft" id="frM29">Описание темы:</td><td class="gTableRight" id="frM30">$_THREAD_DESCR$</td></tr>

Заменяем на:

Код: Выделить всё

Code
<tr id="frM28"><td class="gTableLeft" id="frM29">Описание темы:</td><td class="gTableRight" id="frM30">  

  <input type="text" style="width:40%" id="threadAbout" class="postDescrFl" size="60" maxlength="50" />  
  <img src="/imgforum/iktem/thread.gif" alt="" name="" />  
  <img src="/imgforum/iktem/arrow.png" alt="arrow" />  
  <img src="/imgforum/iktem/warn.png" alt="warn" />  
  <img src="/imgforum/iktem/engine.png" alt="engine" />  
  <img src="/imgforum/iktem/hammer.png" alt="hammer" />  
  <img src="/imgforum/iktem/info.png" alt="info" />  
  <img src="/imgforum/iktem/help.png" alt="help" />  
  <img src="/imgforum/iktem/idea.png" alt="idea" />  
  <img src="/imgforum/iktem/smile.png" alt="smile" />  
  <img src="/imgforum/iktem/lightning.png" alt="lightning" />  
  <img src="/imgforum/iktem/question.png" alt="question" />  
  <img src="/imgforum/iktem/star.png" alt="star" />  
  <div style="display: none;">$_THREAD_DESCR$</div>  

  <script type="text/javascript">  
  // By U.Helper ~ http://helper.ucoz.ru/ & AllCity ~ http://allcity.net.ru/  
  $('#frM30 img').click(function(){  
  $('#frM30 .selectedImg').removeClass('selectedImg');  
  $(this).addClass('selectedImg')  
  });  
  if( $('#frF4').val()!='' ){  
  if( $('#frF4').val().match( /sml\[\w+\]/ ) ){  
  $('#threadAbout').val( $('#frF4').val().replace( $('#frF4').val().match( /sml\[(\w+)\]/ )[0], '' ) );  
  $('#frM30 .selectedImg').removeClass('selectedImg');  
  $('#frM30 img[alt="'+ $('#frF4').val().match( /sml\[(\w+)\]/ )[1] +'"]').addClass('selectedImg');  
  } else $('#threadAbout').val( $('#frF4').val() );  
  }  
  function checksubmit(){  
  var s = $('#frM30 .selectedImg').attr('alt');  
  if( s!='' ) s = 'sml['+s+']';  
  $('#frF4').val( s + $('#threadAbout').val() );  
  return true;  
  }  
  </script>  
  </td></tr>

Где так же заменяем:

Code
Quote
/imgforum/iktem/[code]

На папку в которой будут лежать иконки.  

6) Вставляем в CSS этот код:  

Код:  
[code]/* Иконки темы форума */  
  #frM30 img {opacity:0.33; -moz-opacity:0.33; filter:alpha(opacity=33);}  
  #frM30 img:hover {opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50);}  
  #frM30 img.selectedImg {opacity:1; ; -moz-opacity:1; filter:alpha(opacity=100);}  
  /* ------------- */

Осталось только лишь скачать и залить в свою папку иконки.

Источник: не указан
0 комментариев
avatar