We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Average post per day in mini profile; By HelenaZF
Topic Started: Jan 23 2010, 12:47 AM (135 Views)
Reid
Member Avatar
È una trappola!

This topic has been moved from our official support board.

Originally posted by: HelenaZF
Average post per day in mini profile
 
Repost of code after server 1 crash
This code was made by CraZyJ:

Name: Average posts per day in mini profile
Description: it adds the average post per day to the mini profile...
Preview: SCREENSHOT
Where it goes: ACP > Skinning & Styles < Board Wrappers > Footers

Code:
 
<script type='text/javascript'>
/*Average posts per day in mini profile
by CrAzY_J ~ http://s9.invisionfree.com/iFusion/
do not redistribute this code without the creator's permission*/

String.prototype.todays = function(){
if(this && this.match(/^(\d{2})-(\w+)\s(\d{2})/)){
var days = RegExp.$1;
var month = RegExp.$2;
var year = ((parseInt(RegExp.$3)>71)? '19':'20')+RegExp.$3;
return (Math.floor((new Date()-new Date((month+' '+days+' '+year).toString()))/86400000));
}
}

if(/showtopic/i.test(this.location.href)){
var td = document.getElementsByTagName('td');
for(var t=0;t<td.length;t++){
if(/^post(1|2)$/.test(td[t].className) && td[t].vAlign=='top' && td[t].innerHTML.match(/Posts:\s([0-9,]+)</)){
var posts = parseInt(RegExp.$1.replace(/,/g,''));
var days = (td[t].innerHTML.split(/Joined:\s/)[1].split(/</)[0]).todays();
var average = Math.floor((posts/days)*100)/100;
td[t].getElementsByTagName('span')[0].appendChild(document.createTextNode('Average Post/day: '+average));
}
}
}
</script>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply