SMF For Free Support Forum
Signup For Free Forum
December 02, 2008, 05:17:13 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: [Code] Activity Code  (Read 710 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 669


Do not PM me for Code Support or Request


View Profile
« on: July 07, 2008, 05:02:33 pm »

Footers:
Code:
<script>
function Activity(){
$("td.titlebg:contains(Forum Stats)").parent().next().each(function(){
if(this.innerHTML.match(/(\d+) Posts/i)){
var bPosts = RegExp.$1 + RegExp.$2;
$("tr").each(function(){
if(this.innerHTML.match(/(\d+) Posts/i)){
var fPosts = RegExp.$1;
var Activity = Math.round(100 * fPosts / bPosts);
$(this).find("td.windowbg[valign='middle'] span.smalltext").append("<br>" + Activity + "% Activity");
};});};});};
Activity();
</script>

Here is the code alot of people wanted!  The Activity Code, straight from the SMCodes Footers!  There is one problem with it though.  If you look at your board stats, find (number) Posts.

If that number doesn't have a comma for you, it will work perfectly right when you put it on your forums, but, if you do have a comma, you will need to edit a part of the code.

You will need to add ,(\d+) to the code in this line:
Code:
if(this.innerHTML.match(/(\d+) Posts/i)){
Example, if you have 10,000 posts, that line of code would look like this:
Code:
if(this.innerHTML.match(/(\d+),(\d+) Posts/i)){

There ya go, might be a little confusion for some of you, but you can try to get it Tongue

Enjoy Smiley


Note*

Some of my members on my forum have tried this code on there forum and it didn't work, and I don't know why.  So if you have that problem, please don't keep on asking about it.  Thanks.
Logged



SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/cen
3lf-ครรครรเภ
SMF For Free Full Member
*
Offline Offline

Posts: 108



View Profile
« Reply #1 on: July 16, 2008, 05:47:20 pm »

thanks!!
Logged

FableAssassin
SMF For Free Newbie
*
Offline Offline

Posts: 4


View Profile
« Reply #2 on: November 05, 2008, 01:43:32 am »

I'm sorry, I'm new so, may I ask what is an activity code?
Logged
Spoken
SMF For Free Sr. Member
*
Offline Offline

Posts: 423


Previously known as Colonel Pepsi


View Profile WWW
« Reply #3 on: November 05, 2008, 08:28:29 am »

Ya what exactly does it do?
Logged

Celebrus
SMF For Free Hero
*
Offline Offline

Posts: 827


Previously known as Omikron


View Profile WWW
« Reply #4 on: November 05, 2008, 08:40:21 am »

Shows the percentage of posts a board contribute to the forum total.
« Last Edit: November 05, 2008, 08:43:01 am by Celebrus » Logged


Royal Boo
SMF For Free Sponsors
*
Offline Offline

Posts: 738

Its Boo


View Profile
« Reply #5 on: November 05, 2008, 09:43:39 am »

Thanks celebrus i didnt really no what it was either
Logged
killztime
SMF For Free Member
*
Offline Offline

Posts: 55


I Come here to Kill Time =P Nice site.


View Profile WWW
« Reply #6 on: November 08, 2008, 12:29:30 am »

Forum Url: http://http://killztime.smfforfree3.com
Thz Helped alot Fourm members Loved it  angel
Logged



Pages: [1]
  Print  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.371 seconds with 16 queries.