Красивый вид популярности темы на форуме


Красивый вид популярности темы на форуме 

В Общий вид страниц форума перед $BODY$

Вставляем данный код:
Code
<script src="http://joomla.ucoz.com/ucoz/1/jquery.js"></script>  
<script type="text/javascript">  
$(document).ready(function() {  

$('td.gTableSubTop').find("a:contains('Просмотры')").html('Популярность');  
$('td.threadViewTd').each(function(){  
if($(this).html() > 0 && $(this).html() < 9 || $(this).html() == 0 && $(this).html() < 9){$(this).html('<img title="Очень низкая популярность" src="http://joomla.ucoz.com/ucoz/1/0stars.gif" border="0" alt="img" />');}  
if($(this).html() > 8 && $(this).html() < 60){$(this).html('<img title="Низкая популярность" src="http://joomla.ucoz.com/ucoz/1/1stars.gif" border="0" alt="img" />');}  
if($(this).html() > 59 && $(this).html() < 190){$(this).html('<img title="Средняя популярность" src="http://joomla.ucoz.com/ucoz/1/2stars.gif" border="0" alt="img" />');}  
if($(this).html() > 189 && $(this).html() < 290){$(this).html('<img title="Высокая популярность" src="http://joomla.ucoz.com/ucoz/1/3stars.gif" border="0" alt="img" />');}  
if($(this).html() > 289 && $(this).html() < 450){$(this).html('<img title="Очень высокая популярность" src="http://joomla.ucoz.com/ucoz/1/4stars.gif" border="0" alt="img" />');}  
if($(this).html() > 449){$(this).html('<img title="Очень популярная тема" src="http://joomla.ucoz.com/ucoz/1/5stars.gif" border="0" alt="img" />');}  
});  
});  

</script>


Готово.


  Категория: Другие скрипты для ucoz | Добавил: AID | Дата: 11.02.2012

Другие новости


Поделиться ссылкой


Ссылка:
BB-code:
HTML:
Добавлять комментарии могут только зарегистрированные пользователи.
[ Регистрация | Вход ]
Хостинг от uCoz