March 29, 2024, 01:29:16 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to Revolution X, where Coding meets Graphics.
 
  Home Help Search Arcade Affiliates Staff List Calendar Members Login Register  

Activity Code

Pages: [1]   Go Down
  Print  
Author Topic: Activity Code  (Read 2172 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator
Adminitrator
Offline Offline

Gender: Male
Posts: 1,470



View Profile WWW
Badges: (View All)
Tenth year Anniversary Nineth year Anniversary Search
« on: October 18, 2009, 10:00:44 pm »

heh, never thought of that.

Back when I wrote this code, I didn't know how to use the split/join functions Tongue

I haven't messed with a code in awhile, lets hope I can still do it xD

EDIT:
Yep, totally didn't work right:
Code:
<script type="text/javascript">
var bPosts = "", fPosts = "";
$("td.titlebg:contains(Forum Stats)").parent().next().each(function(){
if(this.innerHTML.match(/(\d+) Posts/i)){
if(RegExp.$1.match(/,/i)){
bPosts = RegExp.$1.split(",").join("");
}else{
bPosts = RegExp.$1;
}
$("tr").each(function(){
if(this.innerHTML.match(/(\d+) Posts/i)){
if(RegExp.$1.match(/,/i)){
fPosts = RegExp.$1.split(",").join("");
}else{
fPosts = RegExp.$1;
}
var Activity = Math.round(100 * fPosts / bPosts);
$(this).find("td.windowbg[valign='middle'] span.smalltext").append("<br>" + Activity + "% Activity");
};});};});
</script>
« Last Edit: October 18, 2009, 10:14:50 pm by Agent Moose » Report Spam   Logged




Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy