February 01, 2023, 03:58:56 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
Author Topic: Activity Code  (Read 1907 times)
Agent Moose
Offline Offline

Gender: Male
Posts: 1,470

View Profile WWW
Badges: (View All)
« 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

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

Pages: [1]   Go Up
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