11.01.2013, 17:33 | |||||
Популярность темы на форумеЭтот скрипт окрашивает другим цветом те темы которые мало, средне или очень сильно популярно. Установка: ПУ \ Управление дизайном \ Форум и после $BODY$ вставляем: Код <?if($PAGE_ID$='recentthreads')?> <script type="text/javascript"> $("a:contains('Просмотры')").attr('onclick','onclick'); $('td.gTableSubTop').find("a:contains('Просмотры')").html('<a href="javascript://" onclick="prosmotrov1webo4karu();" class="kvadratvawebo4karuColor" style="background: #FDEBAE;" title="Тема мала популярна"></a> <a href="javascript://" onclick="prosmotrov2webo4karu();" class="kvadratvawebo4karuColor" style="background: #d1f7b6;" title="Тема становится известной"></a> <a href="javascript://" onclick="prosmotrov3webo4karu();" class="kvadratvawebo4karuColor" style="background: #c2ddf9;" title="Тема популярна"></a> <a href="javascript://" onclick="prosmotrov4webo4karu();" class="kvadratvawebo4karuColor" style="background: #ffcccc;" title="Тема зазвездилась)"></a>'); $('td.threadViewTd').each(function(){ if($(this).text() >= 0 && $(this).text() <= 10){$(this).css('background','#fdebae');} if($(this).text() >= 11 && $(this).text() <= 20){$(this).css('background','#d1f7b6');} if($(this).text() >= 21 && $(this).text() <= 30){$(this).css('background','#c2ddf9');} if($(this).text() >= 31){$(this).css('background','#ffcccc');} }); function prosmotrov1webo4karu() { $('td.threadViewTd').each(function(){ if($(this).text() >= 0 && $(this).text() <= 10) {$(this).each(function(){$(this).parent().show(); return false;});} if($(this).text() >= 11) {$(this).each(function(){$(this).parent().hide(); return false;});} }); } function prosmotrov2webo4karu() { $('td.threadViewTd').each(function(){ if($(this).text() >= 0 && $(this).text() <= 10) {$(this).each(function(){$(this).parent().hide(); return false;});} if($(this).text() >= 11 && $(this).text() <= 20) {$(this).each(function(){$(this).parent().show(); return false;});} if($(this).text() >= 21) {$(this).each(function(){$(this).parent().hide(); return false;});} }); } function prosmotrov3webo4karu() { $('td.threadViewTd').each(function(){ if($(this).text() >= 0 && $(this).text() <= 20) {$(this).each(function(){$(this).parent().hide(); return false;});} if($(this).text() >= 21 && $(this).text() <= 30) {$(this).each(function(){$(this).parent().show(); return false;});} if($(this).text() >= 31) {$(this).each(function(){$(this).parent().hide(); return false;});} }); } function prosmotrov4webo4karu() { $('td.threadViewTd').each(function(){ if($(this).text() >= 0 && $(this).text() <= 30) {$(this).each(function(){$(this).parent().hide(); return false;});} if($(this).text() >= 31) {$(this).each(function(){$(this).parent().show(); return false;});} }); } $("body").bind('keydown',function(w){$('td.threadViewTd').each(function(){$(this).each(function(){$(this).parent().show(); return false;});});}); // webo4ka.ru (Copyright 01/09/2013) </script> <style>.gTableSubTop {padding:0px !important;} .kvadratvawebo4karuColor {display:block; width:14px; height:19px; float:left; border:1px solid #fff;} .kvadratvawebo4karuColor:hover {border:1px solid #0998d4;}</style> <?endif?> на этом всё! Материал взят с сайта infoscript.ru
| |||||
Категория: Скрипты uCoz | Просмотров: 1358 | Добавил: sold93 | Рейтинг: 5.0/1 | | |||||
Теги: |
Пока комментариев нет. Ты можешь быть первым! | |
Кроме того, материал перепечатывали с сайта на сайт, ставили... файл можно найти на Вэбочке (название tables_tablichki_dli_foruma.js).