Create A Forum - Support Forums

Support => Create a Forum Codes and Support => Topic started by: SomeHandsomeGuy on December 15, 2014, 07:36:27 pm

Title: I have code problems...
Post by: SomeHandsomeGuy on December 15, 2014, 07:36:27 pm
The codes don't work on my forum, I tried several of them. My friend on some forum even told me how to put the code, but nothing happened, and yet, those codes work on his forum.
Title: Re: I have code problems...
Post by: CreateAForum on December 15, 2014, 07:52:40 pm
What code?
Title: Re: I have code problems...
Post by: SomeHandsomeGuy on December 16, 2014, 09:50:04 pm
This (http://support.createaforum.com/5/(code)-money-code-(simple)/)


And a new smiley set code.
Title: Re: I have code problems...
Post by: SomeHandsomeGuy on December 22, 2014, 09:19:59 am
Please help.
Title: Re: I have code problems...
Post by: aIURbliS on December 23, 2014, 03:36:28 am
You modified the code which caused it to stop working. Change
Code: [Select]
li.innerHTML = RegExp.$1; to
Code: [Select]
li.innerHTML = Name + ": " + Sign + (RegExp.$1 * Amount);
Title: Re: I have code problems...
Post by: SomeHandsomeGuy on December 23, 2014, 02:14:46 pm
You modified the code which caused it to stop working. Change
Code: [Select]
li.innerHTML = RegExp.$1; to
Code: [Select]
li.innerHTML = Name + ": " + Sign + (RegExp.$1 * Amount);
Got it, thanks. Will do now.
Title: Re: I have code problems...
Post by: SomeHandsomeGuy on December 23, 2014, 02:22:06 pm
Tried. Doesn't w.ork
Title: Re: I have code problems...
Post by: aIURbliS on December 24, 2014, 06:01:37 pm
You've changed it once again.....
Change
Code: [Select]
li.innerHTML = AwesomeCoins + ": " + $ + (RegExp.$1 * Amount); to
Code: [Select]
li.innerHTML = Name + ": " + Sign + (RegExp.$1 * Amount);
Title: Re: I have code problems...
Post by: CyanProductions on January 04, 2015, 01:13:24 am
Flyzer, this is what you want:

Code: [Select]
<script type="text/javascript">
var Name = "AwesomeCoins";
var Sign = "$";
var Amount = 1;

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>

The only thing you might want to change is: "var Amount = 1;"
Where the 1 is replaced with the amount you want per post.
Title: Re: I have code problems...
Post by: SomeHandsomeGuy on February 19, 2015, 06:49:04 pm
Flyzer, this is what you want:

Code: [Select]
<script type="text/javascript">
var Name = "AwesomeCoins";
var Sign = "$";
var Amount = 1;

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>

The only thing you might want to change is: "var Amount = 1;"
Where the 1 is replaced with the amount you want per post.
Thanks.
Title: Re: I have code problems...
Post by: CyanProductions on February 23, 2015, 08:57:40 pm
]Thanks.
np :)