// RPG Inferno Post Modules // Add Money Upon Posting // Post Pages if((location.href.match(/act=Post&CODE=(\d+)/) || (location.href.match(/showtopic=(\d+)/) && document.getElementById('qr_open'))) && document.forms['REPLIER'] && isGuest==false){ function addMoney(amount){ if(document.forms['REPLIER'].TopicTitle){ check = document.forms['REPLIER'].TopicTitle.value.length > 2 } else { check = 1 == 1 // LOL! } if(document.getElementById('qr_open')){ check_a = document.forms['REPLIER'].Post.value.length > 2 } else { check_a = ValidateForm() == true } if(check_a && check){ RPGData = srcForm.document.forms['REPLIER'].rpgdata.value curMoney = GrabRPGSetting('Money',RPGData, '0') newMoney = parseInt(curMoney)+parseInt(amount) NewData = SwapRPGSetting('Money', srcForm.document.forms['REPLIER'].rpgdata.value, newMoney) srcForm.document.forms['REPLIER'].rpgdata.value = NewData srcForm.sigSubmit(); } else { alert('Please enter a topic title/post.') document.forms['REPLIER'].submit.disabled = false } } function enableForm(){ if(srcForm.document.referrer.match(/UserCP/)){ document.forms['REPLIER'].onsubmit = function(){} document.forms['REPLIER'].submit.parentNode.removeChild(document.forms['REPLIER'].submit) document.forms['REPLIER'].submit(true) } else { document.forms['REPLIER'].disabled = false } } // Type? Type = RegExp.$1 if(Type == 00){ // Posting New Thread _i = Grab('input') for(i=0;i<_i.length;i++){ if(_i[i].type == "submit" && _i[i].value == "Post New Topic"){ _i[i].parentNode.innerHTML = _i[i].parentNode.innerHTML.replace('type=submit','type="button" onclick="addMoney(\''+MoneyPerThread+'\');"') } } document.forms['REPLIER'].disabled = true Frame = "