|
Agent Moose
|
 |
« on: June 09, 2007, 10:27:15 am » |
|
Footers: <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
|
 |
« 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 
|
|
|
|
« Last Edit: June 09, 2007, 01:24:11 pm by deathwilldie »
|
Logged
|
|
|
|
|
LaundryLady
|
 |
« Reply #2 on: June 09, 2007, 02:12:36 pm » |
|
Now that 's smooth
|
|
|
|
|
Logged
|
|
|
|
|
Kimmie
|
 |
« 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?  (or is this just a way to change that text?)
|
|
|
|
|
Logged
|
|
|
|
|
Agent Moose
|
 |
« 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
|
 |
« 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
|
 |
« 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 
|
|
|
|
|
Logged
|
|
|
|
|
Agent Moose
|
 |
« 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
|
 |
« 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?  (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
|
 |
« Reply #9 on: June 16, 2007, 11:21:32 pm » |
|
Oh. Ok, try this: <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
|
 |
« Reply #10 on: June 17, 2007, 10:21:09 pm » |
|
Yay it now shows the members. Thanks moosie.
|
|
|
|
|
Logged
|
|
|
|
|
Kimmie
|
 |
« Reply #11 on: June 17, 2007, 10:36:46 pm » |
|
WHHHHHOOOOOOOOOOOOHOOOOOOOOOO!! Gooooooooooo MOOSEY!!!!!!!
|
|
|
|
|
Logged
|
|
|
|
|
Agent Moose
|
 |
« 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]
|
|
|
|
|
|