Written for IPB1.3 / invisionfree
fully rewritten,
all bugs of V1 got fixed
for those who don't know V1,
its an award script, you can give users an award for any reason you want.
this can be as many awards as you want.
these awards will display in the profile and miniprofile
with thanks to Ken and Slayer766
PREVIEW:
http://i7.tinypic.com/642mgqd.png Quote:
|
Originally Posted by board wrappers >>> footers <script>
/* Gk awards V2
By Godkillah from phantom-designs.net */
var victim=[];n=0
//victim[n++]=["name", "award", "image"]
victim[n++]=["duveaux", "best admin award", "http://www.ag.ncat.edu/agedispatch/images/award_icon.gif"]
victim[n++]=["slaytanist", "great m8 award", "http://www.ag.ncat.edu/agedispatch/images/award_icon.gif"]
victim[n++]=["beta", "getting pwned award", "http://www.ag.ncat.edu/agedispatch/images/award_icon.gif"]
victim[n++]=["retrodude", "being awesome award", "http://www.ag.ncat.edu/agedispatch/images/award_icon.gif"]
victim[n++]=["swordbeta", "being cool award", "http://www.ag.ncat.edu/agedispatch/images/award_icon.gif"]
victim[n++]=["godkillah", "coding this award", "http://www.ag.ncat.edu/agedispatch/images/award_icon.gif"]
if(location.href.match(/showtopic=/i)){a=document.getElementsByTagName("span");for(i= 0;i<a.length;i++){if(a[i].innerHTML.match(/Joined  .*)/i)){teh=RegExp.$1;name=a[i].parentNode.parentNode.parentNode.getElementsByTag Name("a")[0].innerHTML.toLowerCase();
//regexp by ken
while(name.match(/>(?!<)(.+?)<\//i)){name=RegExp.$1;}
//regexp by ken
awards="";for(blah in victim){if(victim[blah][0].toLowerCase()==name){awards+="<a href='javascript :void(0)' onclick='alert(\""+victim[blah][1]+"\")'><img src='"+victim[blah][2]+"'></a>";}}if(awards){awards="<b>Awards</b><div id='quote'>"+awards+"</div>";}else{awards="Awards: None";}a[i].innerHTML+="<br>"+awards;}}}if(location.href.matc h(/showuser=/i)){name=document.getElementById("profilename").in nerHTML.toLowerCase();awards="";for(blah in victim){if(victim[blah][0].toLowerCase()==name){awards+="<a href='javascript :void(0)' onclick='alert(\""+victim[blah][1]+"\")'><img src='"+victim[blah][2]+"'></a>";}}if(awards==""){awards="<i>No Information</i>";}
//Add section to profile by slayer766
a=document.getElementsByTagName("TABLE");for (i=0;i<a.length;i++){if(a[i].align == "center" && a[i].cellPadding == 0 && a[i].cellSpacing == 2 && a[i].width == "100%"){b = '<table cellspacing="1" cellpadding="6" width="100%">';b += '<tr><td align="center" colspan="2" class="maintitle">Awards</td></tr><tr><td class="row3" width="30%" valign="top"><b>Awards</b></td><td align="left" width="70%" class="row1"><i>'+awards+'</i></td></tr></table>';a[i].insertRow(-1);a[i].rows[2].insertCell(-1);a[i].rows[2].cells[0].innerHTML = b;a[i].rows[2].cells[0].vAlign= "top";a[i].rows[2].cells[0].className= "plainborder";}}
//Add section to profile by slayer766
}
</script> |
to add or edit awards find the victim[n++]=["name", "award", "image"]
simply add more of them, remove some or edit them
