|
Post by Ron White on Mar 31, 2006 0:56:28 GMT -5
Goes in the Main Footer
This code will alphabetize the users online in the info center. It may not work with other info center modifying codes.
<script> //Alphabetize Users Online v1.0 [CB]
//Copyright 01-03-2006 by ~Wonder //May be reposted anywhere as long as this header remains in tact
if(!location.href.match(/\=/)) { usersOnline=new Array(); for(i=document.links.length-1;i>=0;i--) { if(document.links[i].parentNode.innerHTML.match(/Most users online/)) { usersOnline.push(document.links[i].cloneNode(true)); if(document.links[i].nextSibling) document.links[i].nextSibling.nodeValue=""; document.links[i].style.display="none"; } else if(usersOnline.length>0) break; }
usersOnline.sort(sortLinks); document.links[i+1].parentNode.insertBefore(usersOnline[usersOnline.length-1],document.links[i+1]); for(j=usersOnline.length-2;j>=0;j--) { c=document.createElement("span"); c.innerHTML=", "; document.links[i+1].parentNode.insertBefore(c,document.links[i+1]); document.links[i+1].parentNode.insertBefore(usersOnline[j],c); } }
function sortLinks(a,b) { c=a.innerHTML.charAt(0).toLowerCase(); d=b.innerHTML.charAt(0).toLowerCase(); if(c>d) return 1; if(c<d) return -1; return 0; } </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-+-
|
|