SMF For Free Support Forum
Signup For Free Forum
October 06, 2008, 05:43:23 pm *
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] SMCodes Stats V1  (Read 1113 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 635


Do not PM me for Code Support or Request


View Profile
« on: June 09, 2007, 10:27:15 am »

Footers:
Code:
<script type="text/javascript">
function board_stats_vone(){
//Created by Agent Moose at smcodes.smfforfree3.com
var span = document.getElementsByTagName("span");
for(x=0;x<span.length;x++){
if(span[x].innerHTML.match(/[\d,]+ Posts in [\d,]+ Topics by [\d,]+ Members/i) && span[x].className == "middletext"){
span[x].innerHTML = span[x].innerHTML.replace(/([\d,]+) Posts in ([\d,]+) Topics by [\d,]+ Members. Latest Member: <b>\s?(<a.+?\/a>)<\/b>/i, "Posts: <b>$1</b><br />Topics: <b>$2</b><br />Newest Member: <b>$3</b>");
};};};
board_stats_vone();
</script>

Place in Headers or Footers

Ok, what this does is:
Posts: [number]
Topics: [number]
Newest Member: [member]
Latest Post: [last post]

That is the best I can explain...well, ok, here is a preview...
http://smcodes.smfforfree3.com/index.php
« Last Edit: May 02, 2008, 09:34:29 pm by Agent Moose » Logged

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/center]
deathwilldie
Style Designer
****
Online Online

Posts: 584

Give me an idea for a Stylesheet


View Profile WWW
« Reply #1 on: June 09, 2007, 01:21:55 pm »

OOO I likey

You forgot a part that says how many members it has.
Edit:  Agent Moose Told Me to Grin
« Last Edit: June 09, 2007, 01:24:11 pm by deathwilldie » Logged
LaundryLady
Global Moderator
*
Offline Offline

Posts: 3046



View Profile WWW
« Reply #2 on: June 09, 2007, 02:12:36 pm »

Now that 's smooth
Logged

Kimmie
SMF For Free Master
*
Offline Offline

Posts: 2013


View Profile WWW
« Reply #3 on: June 09, 2007, 02:48:04 pm »

ummmmmmmm... call me blonde - but - I dont see anything different on yours than I do on mine. Our forums already have this info down at the bottom. Am I missing something?  Grin (or is this just a way to change that text?)
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 635


Do not PM me for Code Support or Request


View Profile
« Reply #4 on: June 09, 2007, 03:35:28 pm »

Just makes it look diffrent.  still keeps the same information.
Logged

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/center]
Kimmie
SMF For Free Master
*
Offline Offline

Posts: 2013


View Profile WWW
« Reply #5 on: June 09, 2007, 07:40:58 pm »

I wanted to add this so people will know - currently this code will not work on anything but FF. I have tested it on Opera, IE 6, Sea Monkey, and FF.
Logged

Kimmie
SMF For Free Master
*
Offline Offline

Posts: 2013


View Profile WWW
« Reply #6 on: June 16, 2007, 10:37:56 pm »

Wanted to bump this up to see if Moosey had a chance to add the section for # of members yet Smiley
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 635


Do not PM me for Code Support or Request


View Profile
« Reply #7 on: June 16, 2007, 10:51:32 pm »

That is going to be hard to do since it doesn't have it already...
Logged

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/center]
Kimmie
SMF For Free Master
*
Offline Offline

Posts: 2013


View Profile WWW
« Reply #8 on: June 16, 2007, 11:04:34 pm »

That is going to be hard to do since it doesn't have it already...

thats a stat that our forums have anyways - you cant add that part to your code like you did the other parts?  Undecided

(the one I am referring to is the part where it says "2758 Posts in 2125 Topics by 46 Members" and adding the "# of members" part)
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 635


Do not PM me for Code Support or Request


View Profile
« Reply #9 on: June 16, 2007, 11:21:32 pm »

Oh.  Ok, try this:
Code:
<script type="text/javascript">
function board_stats_vone() {
//Created by Agent Moose at smcodes.smfforfree3.com
$(function() {
$("span.middletext").each(function() {
if(this.innerHTML.match(/[\d,]+ Posts in [\d,]+ Topics by [\d,]+ Members/i)) {
this.innerHTML = this.innerHTML.replace(/([\d,]+) Posts in ([\d,]+) Topics by ([\d,]+) Members. Latest Member: <b>\s?(<a.+?\/a>)<\/b>/i, "Posts: <b>$1</b><br />Topics: <b>$2</b><br />Members: <b>$3</b><br />Newest Member: <b>$4</b>");
}});});}
board_stats_vone();
</script>
Logged

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/center]
deathwilldie
Style Designer
****
Online Online

Posts: 584

Give me an idea for a Stylesheet


View Profile WWW
« Reply #10 on: June 17, 2007, 10:21:09 pm »

Yay it now shows the members.  Thanks moosie.
Logged
Kimmie
SMF For Free Master
*
Offline Offline

Posts: 2013


View Profile WWW
« Reply #11 on: June 17, 2007, 10:36:46 pm »

WHHHHHOOOOOOOOOOOOHOOOOOOOOOO!!

Gooooooooooo MOOSEY!!!!!!!
Logged

Agent Moose
Moderator
*****
Offline Offline

Posts: 635


Do not PM me for Code Support or Request


View Profile
« Reply #12 on: June 18, 2007, 01:58:56 am »

IT was easy, I just though I would have to do it diffrent.
Logged

SMC Code Index - The best Code Index for all your Needs!  Includes a bunch of codes not on Support.[/center]


Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.583 seconds with 17 queries.