Coding-Spot

You are not connected. Please login or register

 
 

IPB Style statistics

Message (Page 1 of 1)


 
Advance Member

Posted on Tue Aug 13, 2013 3:14 pm

 
Hello {USERNAMELINK}! I need help... I don't really know where to put this thread but I'm pretty sure it uses javascript?
SO here's the screenshot:

Source: here



View user profile



 
Administrator
Administrator

Posted on Tue Aug 13, 2013 3:18 pm

 
Yep. I will provide the code tomorrow since i am using mobile now. Wink 



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Tue Aug 13, 2013 3:21 pm

 
Ok mark, I'll wait for that ^_^ Thanks in advance.



View user profile



 
Administrator
Administrator

Posted on Wed Aug 14, 2013 12:57 pm

 
Create a new Javascript, check homepage only:
Code:
$(document).ready(function(){
var rdtOn = $('.rdtOn strong').html();
var lastUser = $('.lastUser strong').html();
var totalUser = $('.totalUser strong').html();
var totalPost = $('.totalPost strong').html();
 
 
$('ul.statsPers').prepend('
<li><span>'+totalPost+'</span> Total Posts</li>
<li><span>'+totalUser+'</span> Total Member</li>
<li><span>'+lastUser+'</span> Newest Member</li>
<li><span>'+rdtOn+'</span> Most Online</li>
');
 
 
});
Now find this on your index_body:
Code:
{BOARD_INDEX}
Then add this below it:
Code:
<div id="statistics">
                  <br />
                  <ul class="statsPers">
                    <li class="statHide totalPost">Total Posts: {TOTAL_POSTS}</li>
                    <li class="statHide totalUser">Total Members: {TOTAL_USERS}</li>
                    <li class="statHide lastUser">Newest Member: {NEWEST_USER}</li>
                    <li class="statHide rdtOn">Most Online: {RECORD_USERS}</li>
                  </ul>
              <br />
</div>
For CSS, add this one:
Code:
#statistics {
padding-left: 0 !important;
}



View user profile http://coding-spot.darkbb.com



 
Advance Member

Posted on Wed Aug 14, 2013 1:05 pm

 
Thanks mark! Solved :D



View user profile



 
Administrator
Administrator

Posted on Wed Aug 14, 2013 1:13 pm

 
~ Solved. Locked



View user profile http://coding-spot.darkbb.com


#7

Sponsored content


 

Posted Today at 11:55 am

 





Message (Page 1 of 1)

Permissions in this forum:
You cannot reply to topics in this forum

In total there is 0 user online :: 0 Registered, 0 Hidden and 0 Guests

Users browsing this forum: None