Главная » 2010 » Май » 17 » Иконка темы для форума (Скрипты для ucoz)
17.05.2010, 13:43

Иконка темы для форума



1) Скачиваем архив. Распаковываем и заливаем его содержимое на сайт, в папку "threadIcons".

2) Идем в ПУ-->Управление дизайном-->Форум-->Общий вид страниц форума. После $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>

3) Заходим в CSS и вставляем в самый низ это:

Code
/* Значок темы форума */  
.thDescr, .threadDescr {display: none;}  
#frM30 img {opacity: 0.33;}  
#frM30 img:hover {opacity: 0.5;}  
#frM30 img.selectedImg {opacity: 1;}  
/* ------------- */

4) Открываем ПУ-->Управление дизайном-->Форум-->Форма добавления сообщения. Находим там это:

Code
$_THREAD_DESCR$

и заменяем на это:

Code
<input type="text" id="threadAbout" class="postDescrFl" size="60" maxlength="50" />  
<img src="/threadIcons/thread.gif" alt="" class="selectedImg" />  
<img src="/threadIcons/arrow.png" alt="arrow" />  
<img src="/threadIcons/warn.png" alt="warn" />  
<img src="/threadIcons/engine.png" alt="engine" />  
<img src="/threadIcons/hammer.png" alt="hammer" />  
<img src="/threadIcons/info.png" alt="info" />  
<img src="/threadIcons/help.png" alt="help" />  
<img src="/threadIcons/idea.png" alt="idea" />  
<img src="/threadIcons/smile.png" alt="smile" />  
<img src="/threadIcons/lightning.png" alt="lightning" />  
<img src="/threadIcons/question.png" alt="question" />  
<img src="/threadIcons/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>
Материал взят с сайта infoscript.ru
Теги: Скачать Иконка темы для форума
Скачать "Иконка темы для форума"
Внимание! Копирование данного материала запрещено без указания ссылки на сайт Infoscript.ru
Источник/Автор: allcity.net.ru
Категория: Скрипты uCoz | Просмотров: 2319 | Добавил: antisept | Рейтинг: 4.0/1 |
Теги: иконка, форума, для, темы
Всего комментариев: 3
0  
1 FocuS   (17.05.2010 22:01) [Материал]
Аватар пользователя
*У меня не пашет

0  
2 Dimsan   (17.11.2010 13:34) [Материал]
Аватар пользователя
[quote]Заменяем $BODY$ на[/quote]

У автора явно не хватает мозгов... надо да такого догадаться снести $BODY$


0  
3 antisept -Infoscript Team-  (17.11.2010 17:33) [Материал]
Аватар пользователя
Поправил

Добавлять комментарии могут только зарегистрированные пользователи.
[ Регистрация | Вход ]