Welcome Guest [Log In] [Register]
Search Members Calendar | Rules ZB Code Index IF Code Index
ZBCode
  • Navigation
  • ZBCode
  • Coding Resources
  • Code Requests
  • Completed Requests
  • [Completed] [ZB] Hiding Groups/Members
Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ;)

Interested in joining? Click here.


If you are already a member of ZBCode, feel free to login right here:

Username:   Password:
Locked Topic
[Completed] [ZB] Hiding Groups/Members
Tweet Topic Started: Nov 19 2009, 12:20 AM (218 Views)
viperver1 Nov 19 2009, 12:20 AM Post #1
Member Avatar


Posts:
100
Group:
Member
Member
#1,984
Joined:
Jan 9, 2009
Coding language
Everything
I want a code that can hide specific groups/members in my forum.

For example, I want to hide my zbAIO Validator group and the member AIO that automatically appear in my forum after me or any of my members post.

Can someone do a code like this?
Offline Profile Goto Top
 
Gorgor Nov 19 2009, 03:43 PM Post #2
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
code
 
<script type='text/javascript'>
$(function(){
members = ["469024","469025"];
groups = ["325743","325743"];

for(x=0;x<members.length;x++){ $("#stats_members a").each(function(){ if(this.href.match(members[x])){ $(this).remove() }})}
for(x=0;x<groups.length;x++){ $("#stats_legend a").each(function(){ if(this.href.match(groups[x])){ $(this).remove() }})}

})
</script>
The red is for certain user's ID numbers that you want to hide, and the blue is for certain group ID numbers that you want to hide.
Offline Profile Goto Top
 
viperver1 Nov 19 2009, 07:09 PM Post #3
Member Avatar


Posts:
100
Group:
Member
Member
#1,984
Joined:
Jan 9, 2009
Coding language
Everything
Thanks Grogor for this code. I'll hopefully will try this and see what will happen if I place it below the board.

Edit: Also, is there a way to remove the extra comma(s) before where the hidden member is?
Edited by viperver1, Nov 19 2009, 07:15 PM.
Offline Profile Goto Top
 
Gorgor Nov 19 2009, 07:26 PM Post #4
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
code
 
<script type='text/javascript'>
$(function(){
members = ["469024","469025"];
groups = ["325743","325744"];

for(x=0;x<members.length;x++){ $("#stats_members a").each(function(){ if(this.href.match(members[x])){ $(this).remove() }}); $("#stats_members").html($("#stats_members").html().replace(",","")); }
for(x=0;x<groups.length;x++){ $("#stats_legend a").each(function(){ if(this.href.match(groups[x])){ $(this).remove() }}); $("#stats_legend").html($("#stats_legend").html().replace(" ยท ","")); }
})
</script>
That should do it :)
Offline Profile Goto Top
 
viperver1 Nov 20 2009, 12:42 AM Post #5
Member Avatar


Posts:
100
Group:
Member
Member
#1,984
Joined:
Jan 9, 2009
Coding language
Everything
Thank you for the response. It's exactly working the way I want it.

Thanks again.

Offline Profile Goto Top
 
Gorgor Nov 20 2009, 03:28 PM Post #6
Hello

Posts:
1,187
Group:
Former Staff
Member
#2,728
Joined:
Apr 2, 2009
Coding language
PHP
You're welcome.
See? We can read thoughts too. ;)

Your request has been completed, and we're moving it to the correct forum. We hope it works for you; if it doesn't, feel free to post another request topic in the requests forum. Just remember: read the rules first!

Thanks,
The ZBCode Staff
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Completed Requests · Next Topic »
Locked Topic

Track Topic · E-mail Topic Time: 2:26 PM Jul 11
Hosted for free by ZetaBoards · Privacy Policy