Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« on: May 30, 2007, 12:05:34 pm » |
|
Finnally, a code that eveyone wants. The Money Code!!! It took me forever to finish, but I got it done. It isn't the the place I want it, but it works for now. It showes up under the AIM and MSN icons... <script> function smc_money_code(name,sign,amount){ //Created by Agent Moose at smcodes.smfforfree3.com c = document.getElementsByTagName("div"); for(v=0;v<c.length;v++){ if(c[v].className=="smalltext" && c[v].innerHTML.match(/Posts: (\d+)/)){ var total = amount * RegExp.$1; c[v].innerHTML+="<br />" + name+": " + sign + total; };};} smc_money_code("MONEY NAME","SIGN","AMOUNT PER POST") </script> This is simple MONEY NAME is the name of the money...(eg: Money) SIGN is the sign of the money(eg: $) AMOUNT PER POST is how much you get per post(eg: 5[The number you put will be multiplied the posts.]) EDIT: I forgot to tell you people something. If you want to decrease someones money, decrese there post count by going to there profile.
|
|
« Last Edit: May 02, 2008, 09:02:37 pm by Agent Moose »
|
Report Spam
Logged
|
|
|
|
|
deathwilldie
100 Club Member
Offline
Posts: 214
|
|
« Reply #1 on: May 30, 2007, 08:07:58 pm » |
|
This is a great code. Is it the only one that SMF has?
|
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« Reply #2 on: June 01, 2007, 02:00:39 pm » |
|
Well, it is the only one that SMF for Free Has.
|
|
|
|
deathwilldie
100 Club Member
Offline
Posts: 214
|
|
« Reply #3 on: June 01, 2007, 02:11:58 pm » |
|
Im sure that alot of people will use this then.
|
|
|
|
LaundryLady
Geriatric Goddess
Global Moderator
Offline
Gender:
Posts: 290
I'm watching, I have a sense of humor: Guess Who
|
|
« Reply #4 on: June 15, 2007, 04:58:32 am » |
|
I am using it and my members love it. They are always making suggestions as to what they think they can buy with it, heh heh. Someday I will tell them it's not real money.
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« Reply #5 on: June 15, 2007, 11:30:07 am » |
|
lol, you might wanna do that soon...lol
|
|
|
|
deathwilldie
100 Club Member
Offline
Posts: 214
|
|
« Reply #6 on: June 17, 2007, 02:50:29 pm » |
|
You need to somehow make it have a donate thing.
|
|
|
|
NOOB MUFFIN
Newcomers!
Offline
Posts: 1
|
|
« Reply #7 on: June 27, 2007, 03:02:15 pm » |
|
where is the headers section?
|
|
|
|
Celebrus
Artificially Conscious
Administrator
Offline
Gender:
Posts: 1,337
aka Omikron
|
|
« Reply #8 on: June 29, 2007, 11:27:47 am » |
|
Your Forums|Admin|Manage Styles|Edit Headers/Footers. Hey could you have it show up somewhere near the the place where it shows the amount of time logged in. It would be nice if the member didn't have to go see his posts to find out how much 'money' he has.
|
|
« Last Edit: July 05, 2007, 03:22:53 am by vikhyat »
|
Report Spam
Logged
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
|
« Reply #9 on: June 29, 2007, 02:17:06 pm » |
|
I have tried to do that. But I only got it to show when your veiwing the topic. Which wouldn't be much help...I will work more on it.
|
|
|
|
Celebrus
Artificially Conscious
Administrator
Offline
Gender:
Posts: 1,337
aka Omikron
|
I got it to show up in the user's area correctly when viewing a post. Otherwise, it shows null as the money so I got it off. To use it, you need this cookie library. So ensure you have this in your headers: <script src="http://vikhyatk.googlepages.com/vikhyatscookielibrary.js">//Vikhyat's cookie library</script>
And this is the code: <script> function smc_money_code(name,sign,amount){ //Created by Agent Moose at smcodes.smfforfree3.com //Edited by Vikhyat at smcodes.smfforfree3.com $(function() { c = $("div") for (v=0;v<c.length;v++) if((c[v].className=="smalltext")&&(c[v].innerHTML.match(/Posts: (\d+)/))){ total = amount*RegExp.$1 setcookie("money"+name+amount+sign,total); c[v].innerHTML+="<br />"+name+": "+sign+total+"" } var moneyobtainedfromcookie=getcookie("money"+name+amount+sign); if(moneyobtainedfromcookie) { texttoshowinusersarea=name+": "+sign+moneyobtainedfromcookie; $("#upshrinkHeader td table tr td.windowbg2").append(texttoshowinusersarea); };});} smc_money_code("MONEY NAME","SIGN","AMOUNT PER POST") </script>
Let me give you a little advice to check if all the codes you are using are compatible with each other. Get a test forum and put in all the codes you are using in the order you are using them. And have some posts there to check if they all work fine together. You might also want to mention in your TOS that there are actually 2 cookies your site is using. Oh, and by the way, this is a preview: vikhyatstestforum3.smfforfree3.com.
|
|
|
|
LaundryLady
Geriatric Goddess
Global Moderator
Offline
Gender:
Posts: 290
I'm watching, I have a sense of humor: Guess Who
|
Let me give you a little advice to check if all the codes you are using are compatible with each other. Get a test forum and put in all the codes you are using in the order you are using them. And have some posts there to check if they all work fine together . This is a good thing to do. It will keep you from destroying your main forum while you see if a particular code will work for you.
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
One thing to do, don't test codes on your main forum, made that mistake about a day or two ago.
|
|
|
|
Frost
Members
Offline
Posts: 30
|
One thing to do, don't test codes on your main forum, made that mistake about a day or two ago.
Ah luckily mine was a success. I makin a test forum now
|
|
|
|
Agent Moose
Administrator
Offline
Gender:
Posts: 2,672
|
Be smart and make a test forum before making new codes.
|
|
|
|
|
|