• Page 1 of 1
  • 1
uCause Community » Trash & Archives » Other » New statistics for uCoz Blocks
New statistics for uCoz Blocks
AnimorphDate: Sunday, 2011-08-21, 1:18 AM | Message # 1
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(


1. go to CP ---> Design ---> Design management (css) and add this:
Code
.cross1 {padding-top:1px; display:inline-block; padding-bottom:1px; color:#fff; text-align:center; margin:0px -1px; text-shadow:0px 1px 0px rgba(0,0,0,0.30); border:1px solid #757B7F; background:#7d7d7d url('http://ucause.ucoz.com/tutorials/img/highlight_faint.png') repeat-x top; text-align:left;}   
   .cross2 {padding-top:1px; display:inline-block; padding-bottom:1px; color:#fff; text-align:center; margin:0px -1px; text-shadow:0px 1px 0px rgba(0,0,0,0.30); border:1px solid #586a7c; border-left:1px solid #646A6D; background:#61768A url('http://ucause.ucoz.com/tutorials/img/highlight_faint.png') repeat-x top; text-align:right;}   
   #icon-border {margin:0px; padding:1px; display:inline-block; border:1px solid #ccc; background:#fff;}   
   #icon-blue {display:inline-block; height:6px; width:6px; border:1px solid #586a7c; background:#607c99 url('http://ucause.ucoz.com/tutorials/img/highlight_faint.png') repeat-x top;}   
   #icon-gray {display:inline-block; height:6px; width:6px; border:1px solid #757B7F; background:#999999 url('http://ucause.ucoz.com/tutorials/img/highlight_faint.png') repeat-x top;}


2. go to CP ---> Design ---> Design management (templates) First or Second container ---> Add this in a block:
Code
<div style="display:none;">$ONLINE_COUNTER$</div>
  <div style="float:right;"><span style="color:#61768a;">Members</span><span id="icon-border" style="margin-left:3px;"><span id="icon-blue"></span></span></div>
  <div><span id="icon-border" style="margin-right:3px;"><span id="icon-gray"></span></span><span style="color:#7d7d7d;">Visitors</span></div>
  <div style="border:1px solid #ccc; background:#fff; padding:1px 2px; margin-top:2px;" id="stat-line" align="left"></div>
  <div style="border:0px; padding:2px; text-align:center;" id="all-users"></div>


3. go to CP ---> Design ---> Design management (templates) ---> Add after $BODY$:
Code
<script type="text/javascript">
  var allusers = $('.tOnline b').html();
  var gostusers = $('.gOnline b').html();
  var siteusers = $('.uOnline b').html();
  var uGosti = (gostusers/allusers).toFixed(2)*100;
  var uUsers = 100 - uGosti;
  function skl(a, n) {return a[n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>= 20) ? 1 : 2];};
  $('#stat-line').html('<div class="cross1" style="width:'+Number(uGosti).toPrecision(3)+'%;" id="ghostss"><span style="padding-left:3px;">'+uGosti.toFixed()+'%</span></div><div class="cross2" style="width:'+Number(uUsers).toPrecision(3)+'%;" id="userss"><span style="padding-right:3px;">'+uUsers.toFixed()+'%</span></div>');
  $('#all-users').html('A total of <b>'+allusers+'</b> '+skl(['people', 'people', 'people'],allusers)+'</div>');
  if (siteusers<1) $('#userss').hide();
  if (gostusers<1) $('#ghostss').hide();
  </script>   
tags-zB11New, statistics, for, uCoz, Blocks
Attachments: 1675319.png(2.4 Kb)
 
0 Thanked you For This Useful Post:
uCause Community » Trash & Archives » Other » New statistics for uCoz Blocks
  • Page 1 of 1
  • 1
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers