Written for IPB1.3 / invisionfree
well this is some sort of automated member legend,
you dont have to add in colors and groupnames,
they get all information they need from tags around the name of members of the group
go to manage usergroups and add in the prefix something like <span gname='Admin' style='color:red'>
and in the suffix something like </span>
this will add Admin (red text) to the member legend when theres an admin online
WARNING: the gname='groupname' must be in the first tag around the name of the groups members in order to work!
PREVIEW:
http://img250.imageshack.us/img250/6983/ac...erlegenddy6.png Quote:
|
Originally Posted by footers <script>
/* Active Groups Legend (public version),
By Godkillah of:
z3.invisionfree.com/UG_Net & phantom-designs.net */
var groups=[];a=document.getElementsByTagName("td");
for(i=0;i<a.length;i++){if(a[i].innerHTML.match(/Show detailed list by:/i) && a[i].className=="row4" && a[i].width=='95%'){
aa=a[i].getElementsByTagName("div")[0].getElementsByTagName("a");
for(ii=0;ii<aa.length;ii++){if(aa[ii].firstChild.getAttribute("gname")!=null){
groups[aa[ii].firstChild.getAttribute("gname")]=aa[ii].innerHTML;name=aa[ii].innerHTML;
while(name.match(/>(?!<)(.+?)<\//i)){name=RegExp.$1;}
groups[aa[ii].firstChild.getAttribute("gname")]=groups[aa[ii].firstChild.getAttribute("gname")].split(name)[0]+aa[ii].firstChild.getAttribute("gname")+groups[aa[ii].firstChild.getAttribute("gname")].split(name)[1]
}}a[i].innerHTML=a[i].innerHTML.replace("Show detailed list by:","Active groups Legend: <span id='TehLegend' onclick='location.href=\"http://z3.invisionfree.com/UG_Net/index.php?act=idx\"'>[ None ]</span><hr>Show detailed list by:");t=0;
for(blah in groups){if(t==0){document.getElementById("TehLegen d").innerHTML="";t++;}
document.getElementById("TehLegend").innerHTML+="["+groups[blah]+"] ";}}}
</script> |
it whas originally made as a custom code for the board of a friend of me, (z3.invisionfree.com/UG_Net/index.php)
as i liked it pretty much we came up with the idea to make this public version of it,
they're pretty much the same though
enjoy