Revolution X

Coding Community => Other Forum Coding => Topic started by: Vitality on November 03, 2008, 07:05:30 pm



Title: [IF] Hide Member From Mod Team
Post by: Vitality on November 03, 2008, 07:05:30 pm
My first script.
This code will hide a specified member from the list of moderators/admins from the moderating team page.
I saw some of those forums where the administrator creates the root account with the name "Admin" and then creates another admin account to make their posts and such with. So, this is intended to hide unwanted names on the mod team list.

Admin CP -> Footers
Preview: http://z9.invisionfree.com/Vitcodetesting/index.php - You will notice the latest member name is 'HiddenUser', and is a global mod so that name would show up on the mod team list, but has been hidden.

Code:
<script type="text/javascript">
//Code by Vitality
if(location.href.match('act=Stats&CODE=leaders')){
var a=document.getElementsByTagName('td')
for(i=0;i<a.length;i++){
if(a[i].className == "row1" && a[i].innerHTML.match("Username")){
a[i].parentNode.style.display='none';
}}}
</script>

Replace the "Username" with the name of the member you wish to hide.