Go Back   Webmaster Forum > Development > Programming > JavaScript
REMOVE the ads below !
Reply
 
LinkBack Thread Tools
  # 1 (permalink)
Old
Junior Geek
Posts: 65
Join Date: Feb 2007
iTrader: (0)
[ZB] Simple And basic money per post - 12-03-2007

written for zetaboards

My first code for the ZB how its now,
wrote 1 for the beta test aswell but that one seemed to have IE problems and the host has died,
anyways this is just a very simple money per post code because i wanted to start simple,
still checking out some stuff,

PREVIEW: Simple & Basic money thing

Add anywhere below the main forum content
Code:
<script>
/*Very Basic Money Per Post Script
By Godkillah from phantom-designs.net*/

StartMoney=25;
MoneyPerPost=5;
MoneyName='Cash';

if(location.href.match(/\/topic\//i)){
a=document.getElementsByTagName("td")
for(i=0;i<a.length;i++){
if(a[i].className=='c_user' && a[i].innerHTML.match(/Joined:/i)){
Cash=parseInt(StartMoney)+(parseInt(a[i].getElementsByTagName("dd")[0].innerHTML)*MoneyPerPost);
a[i].getElementsByTagName("dl")[0].innerHTML='<dt>'+MoneyName+'</dt><dd>'+Cash+'</dd>'+a[i].getElementsByTagName("dl")[0].innerHTML
}}}
</script>
i think I'll rewrite my IF shopmod for ZB soon as it'd be quite easy,
enjoy

Last edited by Shadab : 12-04-2007 at 05:43 AM.
Reply With Quote
Reply


Thread Tools



PSD to HTML

vBulletin®, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. | SEO by vBSEO | Skin developed by vBStyles.com