Simple Machine Codes
January 22, 2022, 11:03:13 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Money Code

Pages: [1] 2   Go Down
  Print  
Author Topic: Money Code  (Read 4224 times)
Celebrus
Artificially Conscious
Administrator

Offline Offline

Gender: Male
Posts: 1,337


aka Omikron


View Profile WWW
« on: July 19, 2007, 06:01:05 am »

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:
Code:
<script src="http://vikhyatk.googlepages.com/vikhyatscookielibrary.js">//Vikhyat's cookie library</script>

And this is the code:
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.
Report Spam   Logged



Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy