|
Post by Ron White on Mar 31, 2006 0:45:05 GMT -5
Goes in the Global Footer
This code will add the image of your choosing to the mini-profile of each user who has a birthday today. This code stores the bithday info in the cookie and should not be used by forums who have thousands of members. A user has to visit the main page in order to get the initial birthday info. Edit where specified.
<script> //Birthday Image in Mini-Profile v1.0
//Copyright 12-01-2005 by ~Wonder //May be reposted anywhere as long as this header remains in tact
//Enter the url to the image you want displayed if it's a members birthday bdimage="http://img221.imageshack.us/img221/3871/evil1vp.gif";
if(!location.href.match(/\=/)) { bdays=new Array(); for(i=0;i<document.links.length;i++) { if(document.links[i].parentNode.innerHTML.match(/\d birthday(s)? today./)) { bdays.push(document.links[i].href.split("user=")[1]); } } d=new Date();d=new Date(d.getFullYear(),d.getMonth(),d.getDate(),23,59,59) document.cookie="bd="+bdays.join(",")+"; expires="+d; } else if(location.href.match(/action=(display|goto|viewprofile|pmview|recent)/)) { var td=document.getElementsByTagName("td"); bdays=""; document.cookie.match(/bd=/)?bdays=","+document.cookie.split('bd=')[1].split(';')[0]+",":""; for(i=0;i<td.length;i++) { if(td[i].width=="20%" && td[i].className.match(/windowbg/) && td[i].innerHTML.match(/user\=(.*?)"/)) { bdays.match(","+RegExp.$1+",")?td[i].innerHTML+="<br><center><img src=\""+bdimage+"\"></center>":""; } } } </script>
-+-Win32##Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (VAUSSU03)##1280 × 768##1-+-
|
|