|
<script type="text/Javascript"> // Add Avatars v1 by Chris // Do not redistribute without permission
// Don't edit this var avatars = []; function addAvi(avi){ avatars.push(avi); }
// Add avatars // repeat addAvi("AVATAR URL"); for more default avatars addAvi("AVATAR URL");
// No need to edit if(document.edit_profile){ for(a=0;a<avatars.length;a++) document.edit_profile.avatar.appendChild(new Option(avatars[a].split(/\//)[avatars[a].split(/\//).length-1].split(/\./)[0],avatars[a]));
function show_avatar(){ if(!document.images) return true;
val = document.edit_profile.avatar.options[document.edit_profile.avatar.selectedIndex].value; if(val.match(/^http:\/\//i)) document.images.avatar_preview.src = val; else document.images.avatar_preview.src="http://207.44.144.11/v2images/"+val; }
if(document.addEventListener) document.edit_profile.addEventListener('submit',saveAvi,false); else document.edit_profile.attachEvent('onsubmit',saveAvi);
function saveAvi(){ val = document.edit_profile.avatar.options[document.edit_profile.avatar.selectedIndex].value; if(val.match(/^http:\/\//i)){ document.edit_profile.avatar_type[1].checked = true; document.edit_profile.custom_avatar.value = val; } } } </script> Place the module in your global footers. To customize it, find this part. // Add avatars // repeat addAvi("AVATAR URL"); for more default avatars addAvi("AVATAR URL"); That pretty much says what you need to do. Just add more addAvi("AVATAR URL"); For each avatar you want to add.
Last Edit: Aug 25, 2006 16:42:02 GMT by Chris
|
|
|
|