DIR Return Create A Forum - Home
---------------------------------------------------------
Create A Forum - Support Forums
HTML https://support.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Create a Forum Codes and Support
*****************************************************
#Post#: 500--------------------------------------------------
[Code] Money Code (Simple)
By: Agent Moose Date: August 2, 2010, 12:43 am
---------------------------------------------------------
Footers: (Admin > Style Manager > Headers and Footers > Footers)
[code]<script type="text/javascript">
var Name = "NAME";
var Sign = "SIGN";
var Amount = AMOUNT PER POST;
var Aug_02_2010 = document.getElementsByTagName("li");
//Created by Agent Moose
for(x=0;x<Aug_02_2010.length;x++){
if(Aug_02_2010[x].className === "postcount" &&
Aug_02_2010[x].innerHTML.match(/posts: (.*)/i)){
var li = document.createElement("li");
li.className = "money";
li.innerHTML = Name + ": " + Sign + (RegExp.$1 * Amount);
Aug_02_2010[x].parentNode.insertBefore(li,
Aug_02_2010[x].nextSibling);
};
};
</script>[/code]
That's right! I'm back into the coding business (not really a
business for me, since I do it on my free time :P )
It took me awhile to think of the first code to make for
CreateAForum, so I went to my old forum (Simple Machine Codes)
and looked at the most viewed codes, and boom, the Money Code
was close to the top :)
This code could be better (coding wise), but I will just need to
figure it out as I go, (after all, it has been a couple months
since I have created a code).
NAME = The Name of the currency (EX: Money)
SIGN = The Sign of the currency (EX: $)
AMOUNT PER POST = How much the user will get for each post they
make (EX: 2. Whatever number you set, will be multiplied by
their post number)
If you have any questions, just ask.
Oh, and expect a lot more codes :)
Enjoy :)
#Post#: 503--------------------------------------------------
Re: [Code] Money Code (Simple)
By: Fate Date: August 2, 2010, 7:18 am
---------------------------------------------------------
Nice. The Master Coder has returned. :D
#Post#: 505--------------------------------------------------
Re: [Code] Money Code (Simple)
By: McLovin Date: August 2, 2010, 8:06 am
---------------------------------------------------------
Re we able to change the variable from amount per post to
something else..?
#Post#: 508--------------------------------------------------
Re: [Code] Money Code (Simple)
By: Fate Date: August 2, 2010, 8:26 am
---------------------------------------------------------
Change [font=monospace][/font]AMOUNT PER POST to the amount you
want users to be given for every post they make. [quote](EX: 2.
Whatever number you set, will be multiplied by their post
number)[/quote]
#Post#: 518--------------------------------------------------
Re: [Code] Money Code (Simple)
By: McLovin Date: August 2, 2010, 12:05 pm
---------------------------------------------------------
I know, but I want it to be a different variable. I can't really
put what I want into words so nevermind, lol..
#Post#: 2545--------------------------------------------------
Re: [Code] Money Code (Simple)
By: guest879 Date: September 5, 2011, 7:44 am
---------------------------------------------------------
I think I know what you mean. I want so it isn't affected by the
posts they make. Could I change it so I can AWARD/DOCK points
from them myself?
#Post#: 2549--------------------------------------------------
Re: [Code] Money Code (Simple)
By: Alex P. Date: September 5, 2011, 11:49 am
---------------------------------------------------------
Well that depends Jeenso. If you want it so that they don't gain
money simply by posing-- so that you or another administrator
would have to give them points for their posts, then you could
always set it up with the karma system.
#Post#: 2550--------------------------------------------------
Re: [Code] Money Code (Simple)
By: xboi209 Date: September 5, 2011, 12:16 pm
---------------------------------------------------------
I doubt you would want to do it with the karma system because
you can only give 1 karma at a time and when you want to give
20, you have to click applaud 20 times. Should just make it so
that only mods and above can edit custom titles which will be
easier
#Post#: 2552--------------------------------------------------
Re: [Code] Money Code (Simple)
By: guest879 Date: September 5, 2011, 3:20 pm
---------------------------------------------------------
I've found a way to do that without having to click applaud
until your finger bleeds. =] I guess I have to stick with that
after all. Thank you for your help anyways!
#Post#: 7690--------------------------------------------------
Re: [Code] Money Code (Simple)
By: starlitnightfalls Date: December 11, 2012, 11:00 pm
---------------------------------------------------------
I've added this to my forum, but only problem is that it has
already awarded cash to everyone based on how many posts they've
made. Is there any way I can change it so that as of today
everyone is at zero, and they can start earning today?
*****************************************************
DIR Next Page