Обновленная версия скрипта - смотреть тут!!!Очень не плохой скрипт, показывающий соотношение пользователей и гостей в процентах, которые находятся в данный момент на сайте, то-есть будет показываться в процентах кого больше гостей или пользователей... Установка:1) Вставляем после $ONLINE_USERS_LIST$ (там где у вас блок статистика) Code <div style="float:right;"> <span style="margin-bottom:-1px;
display:inline-block;">Пользователи</span><span
style="margin:0px; margin-right:2px; padding:1px; padding-bottom:3px;
display:inline-block; border:1px solid #ccc; border-bottom:0px;
background:#fff;"><img style="height:6px; width:6px;
background:#34a61e;"
src="http://new-info.ucoz.net/apo/21/skoloko_ludeq_bilo_v1px.gif" border="0"
alt="" /></span></div> <div><span
style="margin:0px; margin-right:2px; padding:1px; padding-bottom:3px;
display:inline-block; border:1px solid #ccc; border-bottom:0px;
background:#fff;"><img style="height:6px; width:6px;
background:#7d7d7d;"
src="http://new-info.ucoz.net/apo/21/skoloko_ludeq_bilo_v1px.gif" border="0"
alt="" /></span> Гости сайта</div> <div style="border:1px solid #ccc; background:#fff; padding:1px; margin-top:-1px;" id="Statku" align="left"></div>
<script type="text/javascript"> var allusers = $(".tOnline b").text(); var gostusers = $(".gOnline b").text(); var siteusers = $(".uOnline b").text(); var uGosti = (gostusers/allusers).toFixed(2)*100; var uUsers = (siteusers/allusers).toFixed(2)*100;
$("#Statku").html('<div class="cross" style="min-width:10px;
width:'+uGosti+'%;
background:#7d7d7d;">'+Math.floor(uGosti)+'%</div><div
class="cross" style="min-width:10px; width:'+uUsers+'%;
background:#34a61e;">'+Math.floor(uUsers)+'%</div>'); </script>
<style>.cross {padding-top:2px; display:inline-block;
padding-bottom:3px; color:#fff; text-align:center; text-shadow:0px 1px
0px rgba(0,0,0,0.25)}</style>
Полезный материал ? Посетите сайт автора: http://usite.su/
|