Post by ialex on Apr 30, 2008 2:42:14 GMT -8
This will place the users in the 'Active Users in the past 24 hours' list into alphabetical order.
Main Footer.
Cross Browser.
<script type="text/javascript">
<!--
/*Alphabetize Active Users in the past 24 Hour - By iAlex - Open Source*/
var iAlpha_Object={
iAlpha_Locate: function(){
if(window.location.href.match(/action=home/) || !window.location.href.match(/action/) && !document.postForm && !document.modifyForm && !document.title.match(/\s-\sLogin/)){
this.iAlpha_Execute();
}
},
iAlpha_Execute: function(){
var iTd=document.getElementsByTagName('td');
var i=iTd.length-1;
do{
if(iTd.item(i).className=="catbg" && iTd.item(i).colSpan=="2" && iTd.item(i).innerHTML.match(/>Active Users In The Past 24 Hours</) && !iTd.item(i).parentNode.nextSibling.firstChild.nextSibling.innerHTML.match(/<br\s?\/?>Hidden<\/fo/i)){
var iActive_Font = iTd.item(i).parentNode.nextSibling.firstChild.nextSibling.getElementsByTagName('font').item(0);
var iUser_Link=iActive_Font.getElementsByTagName('a');
var iStart_Loop=(iUser_Link.item(0).className)? 0 : 1;
iUser_Array=[];
var a=iUser_Link.length-1;
do{
var iSpan_Hold=document.createElement('span');
iSpan_Hold.appendChild(iUser_Link.item(a).cloneNode(true));
iUser_Array.push(iSpan_Hold.innerHTML);
a--;
}
while(a>=iStart_Loop);
iUser_Array=iUser_Array.sort(function(iCheck, iCheck2){
var iFirst=((iCheck.toLowerCase()).toString()).replace(/^<a(.+?)>/i, '').replace(/<\/a>$/i, '');
var iSecond=((iCheck2.toLowerCase()).toString()).replace(/^<a(.+?)>/i, '').replace(/<\/a>$/i, '');
if(iFirst>iSecond){
return 1;
}
if(iFirst<iSecond){
return -1;
}
return 0;
});
iActive_Font.innerHTML=iActive_Font.innerHTML.replace(/^(.+?)<br\s?\/?>(.+?)$/i, '$1<b'+'r/>'+iUser_Array.join(', '));
break;
}
i--;
}
while(i>10);
}
};
iAlpha_Object.iAlpha_Locate();
//-->
</script>
Main Footer.
Cross Browser.
<script type="text/javascript">
<!--
/*Alphabetize Active Users in the past 24 Hour - By iAlex - Open Source*/
var iAlpha_Object={
iAlpha_Locate: function(){
if(window.location.href.match(/action=home/) || !window.location.href.match(/action/) && !document.postForm && !document.modifyForm && !document.title.match(/\s-\sLogin/)){
this.iAlpha_Execute();
}
},
iAlpha_Execute: function(){
var iTd=document.getElementsByTagName('td');
var i=iTd.length-1;
do{
if(iTd.item(i).className=="catbg" && iTd.item(i).colSpan=="2" && iTd.item(i).innerHTML.match(/>Active Users In The Past 24 Hours</) && !iTd.item(i).parentNode.nextSibling.firstChild.nextSibling.innerHTML.match(/<br\s?\/?>Hidden<\/fo/i)){
var iActive_Font = iTd.item(i).parentNode.nextSibling.firstChild.nextSibling.getElementsByTagName('font').item(0);
var iUser_Link=iActive_Font.getElementsByTagName('a');
var iStart_Loop=(iUser_Link.item(0).className)? 0 : 1;
iUser_Array=[];
var a=iUser_Link.length-1;
do{
var iSpan_Hold=document.createElement('span');
iSpan_Hold.appendChild(iUser_Link.item(a).cloneNode(true));
iUser_Array.push(iSpan_Hold.innerHTML);
a--;
}
while(a>=iStart_Loop);
iUser_Array=iUser_Array.sort(function(iCheck, iCheck2){
var iFirst=((iCheck.toLowerCase()).toString()).replace(/^<a(.+?)>/i, '').replace(/<\/a>$/i, '');
var iSecond=((iCheck2.toLowerCase()).toString()).replace(/^<a(.+?)>/i, '').replace(/<\/a>$/i, '');
if(iFirst>iSecond){
return 1;
}
if(iFirst<iSecond){
return -1;
}
return 0;
});
iActive_Font.innerHTML=iActive_Font.innerHTML.replace(/^(.+?)<br\s?\/?>(.+?)$/i, '$1<b'+'r/>'+iUser_Array.join(', '));
break;
}
i--;
}
while(i>10);
}
};
iAlpha_Object.iAlpha_Locate();
//-->
</script>