Welcome Guest [Log In] [Register]

Viewing Single Post From: expanding size
.Josh
Member Avatar
BB Beta
[ *  * ]
This is the code that I've put into my board template which I used last time.. No awards have currently been added though, Will be starting to build on them soon this get's sorted.

Code:
 
<script>
/*GK Awards V1.1
by godkillah and michael
phantom-designs.net*/
var sizeH=16
var sizeW=16
//User ID, Award Title, Reason, Image
var Award=[]
//SOTW
Award[Award.length]=[644842, 'SOTW Winner','Winner of the first SOTW','http://z3.ifrm.com/379/9/0/f382727/sotw1.png']

a=document.getElementsByTagName("tr")
for(i=0;i<a.length;i++){
if(a[i].id.match(/post-[0-9]/i) && a[i].getElementsByTagName("a")[0] && a[i].getElementsByTagName("a")[0].href.match(/\/profile\/(.*)\//i) && a[i].getElementsByTagName("td")[0].className=='c_username'){
ID=parseInt(RegExp.$1); i++;
o=a[i].getElementsByTagName("dl")[0]; aws='';
for(blah in Award){
if(Award[blah][0]==ID){
aws+='<a href="#" onclick="javascript:alert(\''+Award[blah][2]+'\');"><img width="'+sizeW+'" height="'+sizeH+'" src="'+Award[blah][3]+'" title="'+Award[blah][1]+'" /></a>'
}}
if(aws==''){
o.innerHTML+='<fieldset><legend>Awards</legend><b>[None]</b></fieldset><div id="SHOWstat"></div>'
}else{
o.innerHTML+='<fieldset><legend>Awards</legend>'+aws+'</fieldset><div id="SHOWstat"></div>'
}}}
</script>
Edited by .Josh, Nov 25 2009, 09:24 PM.

Posted Image
Offline
Profile
Quote Post
expanding size · ZetaBoards