Главная страница
Форум сайта
Главная страница
Поиск по сайту
Каталог файлов
Статьи
Новости сайта
Лента новостей
Для просмотра всех возможностей сайта, вам необходимо пройти процедуру регистрации, либо войти в свой аккаунт.*
*Форма входа и регистрация пользователя, располагается в шапке сайта, либо в блоке "Профиль" на страницах типа "Главная".
Поиск по сайту  RSS канал 
Просмотреть новые сообщения на форуме Просмотреть пользователей сайта Просмотреть правила форума

  • Страница 1 из 1
  • 1
Форум » Разное » Скрипты для uCoz » Усовершенствование "Тем"
Усовершенствование "Тем"
ПрочитаноСреда, 10.08.2011, 20:49
Сообщение
#1

Fuuck

Статус: n/a
Проверенные
Подробная информация


Вот решил выложить давно написанный мною и Русланом скрипт, который скрывает стандартный столбцы на форуме с количеством тем и ответов и вставляет эту информацую в рамочку, которая появляется при наведении на строку.

Я выкладываю 4 версии, чтобы Вам, пользователям, было легче.

1 версия:

Эту версию ставьте если используете описания в форумах (то есть под ссылками на форумы есть div с class="forumDescr").
Также в этой версии показывается количество просмотров.

Вот этот код вставить после $BODY$:
Code
<script type="text/javascript">   
$('.gTable tr').each(function() {   
<?if($PAGE_ID$='main' || $PAGE_ID$='category')?>$('.forumDescr',this).before('<div class="uHover">' + $('.forumThreadTd',this).text() + declOfNum($('.forumThreadTd',this).text(), [' тема', ' темы', ' тем'])+ ' | ' +$('.forumPostTd',this).text()+declOfNum($('.forumPostTd',this).text(), [' ответ ', ' ответа ', ' ответов '])+'</div>');   
$('.forumNameTd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
<?if($PAGE_ID$='forum')?>$('.threadLink',this).before('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' ответ', ' ответа', ' ответов'])+ ' | ' +$('.threadViewTd',this).text()+declOfNum($('.threadViewTd',this).text(), [' просмотр ', ' просмотра ', ' просмотров '])+ ' | Автор: ' +$('.threadAuthTd span a',this).text())+'</div>';   
$('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
});   
function declOfNum(number, titles) {   
    cases = [2, 0, 1, 1, 1, 2];   
    return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];   
}   
</script>   
<style type="text/css">   
.uHover {float:right;display:none;margin-right:5px;}   
.gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}   
</style>


2 версия:

Эту версию ставьте если используете описания в форумах (то есть под ссылками на форумы есть div с class="forumDescr").
Также в этой версии НЕ показывается количество просмотров.

Вот этот код вставить после $BODY$:
Code
<script type="text/javascript">   
$('.gTable tr').each(function() {   
<?if($PAGE_ID$='main' || $PAGE_ID$='category')?>$('.forumDescr',this).before('<div class="uHover">' + $('.forumThreadTd',this).text() + declOfNum($('.forumThreadTd',this).text(), [' тема', ' темы', ' тем'])+ ' | ' +$('.forumPostTd',this).text()+declOfNum($('.forumPostTd',this).text(), [' ответ ', ' ответа ', ' ответов '])+'</div>');   
$('.forumNameTd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
<?if($PAGE_ID$='forum')?>$('.threadLink',this).before('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' ответ', ' ответа', ' ответов'])+ ' | Автор: ' +$('.threadAuthTd span a',this).text())+'</div>';   
$('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
});   
function declOfNum(number, titles) {   
    cases = [2, 0, 1, 1, 1, 2];   
    return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];   
}   
</script>   
<style type="text/css">   
.uHover {float:right;display:none;margin-right:5px;}   
.gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}   
</style>


3 версия:

Эту версию используйте тогда, когда Вы не пишите или не писали описания форумов и тем. Информация будет вставляться сразу после ссылки на тему/форум. В этой версии НЕ показываются количество просмотров.

Вот этот код вставить после $BODY$:
Code
<script type="text/javascript">   
$('.gTable tr').each(function() {   
<?if($PAGE_ID$='main' || $PAGE_ID$='category')?>$('.forum:first',this).append('<div class="uHover">' + $('.forumThreadTd',this).text() + declOfNum($('.forumThreadTd',this).text(), [' тема', ' темы', ' тем'])+ ' | ' +$('.forumPostTd',this).text()+declOfNum($('.forumPostTd',this).text(), [' ответ ', ' ответа ', ' ответов '])+'</div>');   
$('.forumNameTd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
<?if($PAGE_ID$='forum')?>$('.threadLink:first',this).append('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' ответ', ' ответа', ' ответов'])+ ' | Автор: ' +$('.threadAuthTd span a',this).text())+'</div>';   
$('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
});   
function declOfNum(number, titles) {   
    cases = [2, 0, 1, 1, 1, 2];   
    return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];   
}   
</script>   
<style type="text/css">   
.uHover {float:right;display:none;margin-right:5px;}   
.gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}   
</style>


Оффлайн
Сообщение

Вот решил выложить давно написанный мною и Русланом скрипт, который скрывает стандартный столбцы на форуме с количеством тем и ответов и вставляет эту информацую в рамочку, которая появляется при наведении на строку.

Я выкладываю 4 версии, чтобы Вам, пользователям, было легче.

1 версия:

Эту версию ставьте если используете описания в форумах (то есть под ссылками на форумы есть div с class="forumDescr").
Также в этой версии показывается количество просмотров.

Вот этот код вставить после $BODY$:
Code
<script type="text/javascript">   
$('.gTable tr').each(function() {   
<?if($PAGE_ID$='main' || $PAGE_ID$='category')?>$('.forumDescr',this).before('<div class="uHover">' + $('.forumThreadTd',this).text() + declOfNum($('.forumThreadTd',this).text(), [' тема', ' темы', ' тем'])+ ' | ' +$('.forumPostTd',this).text()+declOfNum($('.forumPostTd',this).text(), [' ответ ', ' ответа ', ' ответов '])+'</div>');   
$('.forumNameTd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
<?if($PAGE_ID$='forum')?>$('.threadLink',this).before('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' ответ', ' ответа', ' ответов'])+ ' | ' +$('.threadViewTd',this).text()+declOfNum($('.threadViewTd',this).text(), [' просмотр ', ' просмотра ', ' просмотров '])+ ' | Автор: ' +$('.threadAuthTd span a',this).text())+'</div>';   
$('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
});   
function declOfNum(number, titles) {   
    cases = [2, 0, 1, 1, 1, 2];   
    return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];   
}   
</script>   
<style type="text/css">   
.uHover {float:right;display:none;margin-right:5px;}   
.gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}   
</style>


2 версия:

Эту версию ставьте если используете описания в форумах (то есть под ссылками на форумы есть div с class="forumDescr").
Также в этой версии НЕ показывается количество просмотров.

Вот этот код вставить после $BODY$:
Code
<script type="text/javascript">   
$('.gTable tr').each(function() {   
<?if($PAGE_ID$='main' || $PAGE_ID$='category')?>$('.forumDescr',this).before('<div class="uHover">' + $('.forumThreadTd',this).text() + declOfNum($('.forumThreadTd',this).text(), [' тема', ' темы', ' тем'])+ ' | ' +$('.forumPostTd',this).text()+declOfNum($('.forumPostTd',this).text(), [' ответ ', ' ответа ', ' ответов '])+'</div>');   
$('.forumNameTd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
<?if($PAGE_ID$='forum')?>$('.threadLink',this).before('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' ответ', ' ответа', ' ответов'])+ ' | Автор: ' +$('.threadAuthTd span a',this).text())+'</div>';   
$('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
});   
function declOfNum(number, titles) {   
    cases = [2, 0, 1, 1, 1, 2];   
    return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];   
}   
</script>   
<style type="text/css">   
.uHover {float:right;display:none;margin-right:5px;}   
.gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}   
</style>


3 версия:

Эту версию используйте тогда, когда Вы не пишите или не писали описания форумов и тем. Информация будет вставляться сразу после ссылки на тему/форум. В этой версии НЕ показываются количество просмотров.

Вот этот код вставить после $BODY$:
Code
<script type="text/javascript">   
$('.gTable tr').each(function() {   
<?if($PAGE_ID$='main' || $PAGE_ID$='category')?>$('.forum:first',this).append('<div class="uHover">' + $('.forumThreadTd',this).text() + declOfNum($('.forumThreadTd',this).text(), [' тема', ' темы', ' тем'])+ ' | ' +$('.forumPostTd',this).text()+declOfNum($('.forumPostTd',this).text(), [' ответ ', ' ответа ', ' ответов '])+'</div>');   
$('.forumNameTd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
<?if($PAGE_ID$='forum')?>$('.threadLink:first',this).append('<div class="uHover">' + $('.threadPostTd',this).text() + declOfNum($('.threadPostTd',this).text(), [' ответ', ' ответа', ' ответов'])+ ' | Автор: ' +$('.threadAuthTd span a',this).text())+'</div>';   
$('.threadNametd',this).hover(function(){$(this).find('.uHover:not(:animated)').fadeIn()},function(){$(this).find('.uHover').fadeOut()});<?endif?>   
});   
function declOfNum(number, titles) {   
    cases = [2, 0, 1, 1, 1, 2];   
    return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];   
}   
</script>   
<style type="text/css">   
.uHover {float:right;display:none;margin-right:5px;}   
.gTableSubTop:nth-child(3), .gTableSubTop:nth-child(4), .forumThreadTd, .forumPostTd, .threadViewTd, .threadPostTd, .threadAuthTd<?if($PAGE_ID$='forum')?>, .gTableSubTop:nth-child(5)<?endif?> {display:none}   
</style>

Автор - Fuuck
Дата добавления - 10.08.2011 в 20:49
Форум » Разное » Скрипты для uCoz » Усовершенствование "Тем"
  • Страница 1 из 1
  • 1
Поиск:



Подробная информация
Нас сегодня посетили
Пользователи, посетившие нас сегодня:
.
Популярные тэги
Счетчики сайта
  
Загрузка...

Games World


Хостинг от uCoz