Post by iAlex on Jan 2, 2008 5:13:40 GMT -5
This code will display each user's individual skin choice in their mini profile.
Cross Browser.
Global Footer.
Open Source.
<script type="text/javascript">
<!--
/*Selected Skin in Mini Profile - By iAlex - Open Source*/
if(document.modifyForm){
var iPersonal=document.modifyForm.personaltext;
iPersonal.value=iPersonal.value.replace(/\[5ki:(.+?)\]/, '');
if(document.addEventListener){
document.modifyForm.addEventListener('submit', iSaveSkin, false);
}
else{
document.modifyForm.attachEvent('onsubmit', iSaveSkin);
}
}
function iSaveSkin(){
var iPersonal=document.modifyForm.personaltext;
var iSkin=document.modifyForm.skin;
iPersonal.value=iPersonal.value+'[5ki:'+iSkin.options[iSkin.selectedIndex].innerHTML+']';
}
if(location.href.match(/action=(display|viewprofile|(user)?recent|(calendar|pm)view|search2)/) || location.href.match(/index.cgi$/) && document.title.match(/Preview/) && document.postForm){
var iTd=document.getElementsByTagName('td');
var i=iTd.length;
while(--i){
if(iTd.item(i).width=="20%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).vAlign=="top" && iTd.item(i).innerHTML.match(/member is/) && iTd.item(i).innerHTML.match(/\[5ki:(.+?)\]/)){
var iSkin=(iTd.item(i).innerHTML.match(/\[5ki:(.+?)\]/))? RegExp.$1 : '';
var iSkiSpan=document.createElement('span');
iSkiSpan.innerHTML='<b'+'r />Skin: '+iSkin;
iTd.item(i).appendChild(iSkiSpan);
iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/\[5ki:(.+?)\]/, '');
}
}
}
//-->
</script>
Cross Browser.
Global Footer.
Open Source.
<script type="text/javascript">
<!--
/*Selected Skin in Mini Profile - By iAlex - Open Source*/
if(document.modifyForm){
var iPersonal=document.modifyForm.personaltext;
iPersonal.value=iPersonal.value.replace(/\[5ki:(.+?)\]/, '');
if(document.addEventListener){
document.modifyForm.addEventListener('submit', iSaveSkin, false);
}
else{
document.modifyForm.attachEvent('onsubmit', iSaveSkin);
}
}
function iSaveSkin(){
var iPersonal=document.modifyForm.personaltext;
var iSkin=document.modifyForm.skin;
iPersonal.value=iPersonal.value+'[5ki:'+iSkin.options[iSkin.selectedIndex].innerHTML+']';
}
if(location.href.match(/action=(display|viewprofile|(user)?recent|(calendar|pm)view|search2)/) || location.href.match(/index.cgi$/) && document.title.match(/Preview/) && document.postForm){
var iTd=document.getElementsByTagName('td');
var i=iTd.length;
while(--i){
if(iTd.item(i).width=="20%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).vAlign=="top" && iTd.item(i).innerHTML.match(/member is/) && iTd.item(i).innerHTML.match(/\[5ki:(.+?)\]/)){
var iSkin=(iTd.item(i).innerHTML.match(/\[5ki:(.+?)\]/))? RegExp.$1 : '';
var iSkiSpan=document.createElement('span');
iSkiSpan.innerHTML='<b'+'r />Skin: '+iSkin;
iTd.item(i).appendChild(iSkiSpan);
iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/\[5ki:(.+?)\]/, '');
}
}
}
//-->
</script>