Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« on: June 24, 2008, 10:30:58 am » |
|
Footers: <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: if(this.innerHTML.match(/(\d+) Posts/i)){ Example, if you have 10,000 posts, that line of code would look like this: if(this.innerHTML.match(/(\d+),(\d+) Posts/i)){ There ya go, might be alittle comfusion for some of you, but you can try to get it Enjoy
|
|
|
|
|
legend 1234
100 Club Member
Offline
Gender:
Posts: 461
Legend 1234
|
|
« Reply #1 on: June 30, 2008, 01:38:33 am » |
|
woooooot thanks alot moosey ive been wanting this for ages
thanks alot although i only have 866 posts and with no commar
but when i add this it doesnt work any idea why ?
legend 1234
|
|
|
|
|
CodeLover
100 Club Member
Offline
Gender:
Posts: 331
|
|
« Reply #2 on: June 30, 2008, 06:24:17 am » |
|
I don't get this, what exactly does it do?
|
|
|
|
legend 1234
100 Club Member
Offline
Gender:
Posts: 461
Legend 1234
|
|
« Reply #3 on: July 01, 2008, 02:49:33 am » |
|
go to the index of the forums
and ull see were it says 514 posts and 14 topics
it has a activity thing
like it may say 1% activity meaning 1% of the activities oon these forums have been in that board
u undertanad that ?
and moosey can u look 2 posts up and tell me y mine wont work ?
legend 1234
|
|
|
|
legend 1234
100 Club Member
Offline
Gender:
Posts: 461
Legend 1234
|
|
« Reply #4 on: July 03, 2008, 04:44:56 am » |
|
moosey ? legend 1234
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« Reply #5 on: July 03, 2008, 12:52:23 pm » |
|
Honestly legend, I don't know why it isn't working.
Can you post your forum URL?
|
|
|
|
legend 1234
100 Club Member
Offline
Gender:
Posts: 461
Legend 1234
|
|
« Reply #6 on: July 04, 2008, 09:40:43 pm » |
|
kk sure its:
http://havenworld.smfforfree4.com/index.php?action=forum
legend 1234
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« Reply #7 on: July 05, 2008, 10:52:32 am » |
|
Well, I don't know why it isn't working, but I did see that you had a lot of unnecessary codes in there, Take out all this: <script> function name_across_board() { //Created by Agent Moose (smcodes.smfforfree3.com) $(function() { var vfour = new Array() vfour[vfour.length] = ["Roger","Roger","white","<img src=http://img442.imageshack.us/img442/4047/43260273ax3.gif <img>"]
for(f=0;f<vfour.length;f++){ $("a").each(function() { if(this.innerHTML == vfour[f][0]){this.innerHTML = this.innerHTML.replace(vfour[f][0],"<font color='" + vfour[f][2] + "'>" + vfour[f][3] + vfour[f][(vfour[f][1] != "" ? 1 : 0)] + "</font>");}; });};});} name_across_board(); </script>
<script> function name_across_board() { //Created by Agent Moose (smcodes.smfforfree3.com) $(function() { var vfour = new Array() vfour[vfour.length] = ["Layton","Layton","white","<img src=http://img442.imageshack.us/img442/4047/43260273ax3.gif <img>"]
for(f=0;f<vfour.length;f++){ $("a").each(function() { if(this.innerHTML == vfour[f][0]){this.innerHTML = this.innerHTML.replace(vfour[f][0],"<font color='" + vfour[f][2] + "'>" + vfour[f][3] + vfour[f][(vfour[f][1] != "" ? 1 : 0)] + "</font>");}; });};});} name_across_board(); </script>
<script> function name_across_board() { //Created by Agent Moose (smcodes.smfforfree3.com) $(function() { var vfour = new Array() vfour[vfour.length] = ["Predator","Predator","white","<img src=http://img442.imageshack.us/img442/4047/43260273ax3.gif <img>"]
for(f=0;f<vfour.length;f++){ $("a").each(function() { if(this.innerHTML == vfour[f][0]){this.innerHTML = this.innerHTML.replace(vfour[f][0],"<font color='" + vfour[f][2] + "'>" + vfour[f][3] + vfour[f][(vfour[f][1] != "" ? 1 : 0)] + "</font>");}; });};});} name_across_board(); </script>
<script> function name_across_board() { //Created by Agent Moose (smcodes.smfforfree3.com) $(function() { var vfour = new Array() vfour[vfour.length] = ["anton","anton","white","<img src=http://img444.imageshack.us/img444/4125/modicons0xa5.gif <img>"]
for(f=0;f<vfour.length;f++){ $("a").each(function() { if(this.innerHTML == vfour[f][0]){this.innerHTML = this.innerHTML.replace(vfour[f][0],"<font color='" + vfour[f][2] + "'>" + vfour[f][3] + vfour[f][(vfour[f][1] != "" ? 1 : 0)] + "</font>");}; });};});} name_across_board(); </script>
<script> function name_across_board() { //Created by Agent Moose (smcodes.smfforfree3.com) $(function() { var vfour = new Array() vfour[vfour.length] = ["legend1234","legend1234","white","<img src=http://img444.imageshack.us/img444/4125/modicons0xa5.gif <img>"]
for(f=0;f<vfour.length;f++){ $("a").each(function() { if(this.innerHTML == vfour[f][0]){this.innerHTML = this.innerHTML.replace(vfour[f][0],"<font color='" + vfour[f][2] + "'>" + vfour[f][3] + vfour[f][(vfour[f][1] != "" ? 1 : 0)] + "</font>");}; });};});} name_across_board(); </script>
For this: [code]<script> function name_across_board() { //Created by Agent Moose (smcodes.smfforfree3.com) $(function() { var vfour = new Array() vfour[vfour.length] = ["Roger","Roger","white","<img src=http://img442.imageshack.us/img442/4047/43260273ax3.gif <img>"] vfour[vfour.length] = ["Layton","Layton","white","<img src=http://img442.imageshack.us/img442/4047/43260273ax3.gif <img>"] vfour[vfour.length] = ["Predator","Predator","white","<img src=http://img442.imageshack.us/img442/4047/43260273ax3.gif <img>"] vfour[vfour.length] = ["anton","anton","white","<img src=http://img444.imageshack.us/img444/4125/modicons0xa5.gif <img>"] vfour[vfour.length] = ["legend1234","legend1234","white","<img src=http://img444.imageshack.us/img444/4125/modicons0xa5.gif <img>"]
for(f=0;f<vfour.length;f++){ $("a").each(function() { if(this.innerHTML == vfour[f][0]){this.innerHTML = this.innerHTML.replace(vfour[f][0],"<font color='" + vfour[f][2] + "'>" + vfour[f][3] + vfour[f][(vfour[f][1] != "" ? 1 : 0)] + "</font>");}; });};});} name_across_board(); </script> [/code]
|
|
|
|
legend 1234
100 Club Member
Offline
Gender:
Posts: 461
Legend 1234
|
|
« Reply #8 on: July 06, 2008, 08:46:24 am » |
|
kk thanks and yea i know i was goina actually do that but never got around to it. thanks moosey but dnno y code wont work ps. Howd u get my headers and footers hahahhaha pss. I know how to do it aswell lol but i would never take anything from smc if i wasnt aloud psss. ok enough of these im out legend 1234
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« Reply #9 on: July 07, 2008, 10:52:33 am » |
|
I have no idea how to get the code working, it worked on SMC, I have no idea why it wont work on your forum.
And all I did was view the page source of your forum, it shows all the layout of your forum.
|
|
|
|
legend 1234
100 Club Member
Offline
Gender:
Posts: 461
Legend 1234
|
I have no idea how to get the code working, it worked on SMC, I have no idea why it wont work on your forum.
And all I did was view the page source of your forum, it shows all the layout of your forum.
mmk well thanks for trying i guess ill just have to live without it haha yea thats wat i do aswell thanks for trying mate
|
|
|
|
legend 1234
100 Club Member
Offline
Gender:
Posts: 461
Legend 1234
|
soz to double post
but i tried it on a different forum and still not working
has any 1 actually got this code working on there forum ?
|
|
|
|
Kalphiter
100 Club Member
Offline
Gender:
Posts: 203
Never forget to drink coffee.
|
I have no idea how to get the code working, it worked on SMC, I have no idea why it wont work on your forum.
And all I did was view the page source of your forum, it shows all the layout of your forum.
Yes. Front page of forum displays index.template.php along with boardindex.template.php Front page includes CSS link(depends on which theme you have)
I don't understand how the code couldn't work!
|
Java is your friend.
|
|
|
legend 1234
100 Club Member
Offline
Gender:
Posts: 461
Legend 1234
|
ermm well mine didnt work on 2 dif forums lol
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
I made that code on one of my test forums, and it worked fine there
|
|
|
|
|
|