Hiding Members List - Private Forums

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/63954?pagenum=1
05 November 2025, 18:31

Topic


ssneumann
Hiding Members List - Private Forums
06 February 2007, 21:54


I have used these forums many times since launching one of my forums a few years ago and happy to say I have never had to register and ask a question... until now.
I have searched for a resolution for quite some time and get results but not for exactly what I am trying to accomplish. I hope someone can help me.
I operate a forum/message board as a feature on one of my community portals. I have several groups or councils that I have set up private forum areas reserved just for them. The problem is that these groups would like to use their real names as their usernames, ie. JohnDoe.
To them, this is great because it's like wearing a name tag at a conference. Of course, I have suggested they not do this, but am determined to find them a solution.
What they don't want is obvious - their usernames showing up in the member list and being visible to any registered member. They would like them to only be visible from inside their own private forum.
I know that it can be done by ranking level if I make them all moderators. I also know I can completely remove access to the member list, but don't want to do that either.
Sorry if this sounds stupid, but I can't seem to figure out the best way to do this. Any ideas?
<moved from="Help: General / Current Version (v3.4.xx)" by="Shaggy" /><

 

Replies ...


AnonJr
07 February 2007, 09:05


To restrict the members list to just admins, I did this:
Note, I commented out the original function and added the part in red. If you checked for an mLev >= 3 it would allow moderators to see the member list too.
Code:
'if strDBNTUserName = "" then
' Err_Msg = "<li>You must be logged in to view the Members List</li>"
' Response.Write "<table width=""100%"" border=""0"">" & _
' "<tr>" & _
' "<td>" & _
' "<a href=""" & strHomeURL & """>T & D Home</a>  »" & _
' "  Member Information<hr width=""100%"" color=""#C0C0C0""></td>" & _
' "</tr>" & _
' "</table>" & _
' "<p class=""hfs hlfc c"">There Was A Problem!</p>" & _
' "<p class=""hlfc c"">You must be logged in to view this page</p>"& _
' "<p class=""c""><a href=""JavaScript:history.go(-1)"">Back to Forum</a></p>" & _
' "<br />"
' Call WriteFooter
' Response.End
'end if

If (mlev <> 4) Then
Response.Redirect("default.asp")
End If

An alternate option would be to add the UserGroups MOD and restrict the members page to Admins, Mods, and a specific UserGroup. Its more coding in the long run, but you won't have to make people Mods who might not otherwise be granted those privs. I posted some code a couple weeks back for using the UserGroups MOD in a similar maner.<
campinmom03
30 January 2008, 09:42


AnonJr hello.
This is something I would like to implement. However, I think I might of missed something. The code is to be added in members.asp or pop_profile.asp?

Wanted to ask so I don't create a mess. smile
Thanks in advance.<
AnonJr
30 January 2008, 10:01


It was added to members.asp since the original request was to make the members list visible to just admins.<
JJenson
30 January 2008, 10:31


Just a thought here Anon but I might be off but I think they want the members list to show everyone on the bored for everyone but this specific group. So wouldn't they want to create a usergroup and in members.asp make it so that usergroup doesn't show up?<
campinmom03
30 January 2008, 10:56


Ok, I haven't had much coffee today, so please bear with me.

Actually, I would like profiles to be viewed by anyone. Its just their personal info upon registration that I want private. (Name and Surname)?

Anyway to do this without adding usergroup mod as JJenson is suggesting?
Thank you. (Running for a cup of coffee) smile<
JJenson
30 January 2008, 11:13


You could probably just do a mlev check on any areas that you don't want anyone that isn't a moderator or Admin depending on how you want to make that see it.<
JJenson
30 January 2008, 11:17


Not sure if this would work cause I can't test right now but maybe something like this?
Find these lines in pop_profile.asp
Code:

if strFullName = "1" and (Trim(rs("M_FIRSTNAME")) <> "" or Trim(rs("M_LASTNAME")) <> "" ) then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Real Name: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & ChkString(rs("M_FIRSTNAME"), "display") & " " & ChkString(rs("M_LASTNAME"), "display") & "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if

and and insert something like this
Code:

if mlev=3 then
if strFullName = "1" and (Trim(rs("M_FIRSTNAME")) <> "" or Trim(rs("M_LASTNAME")) <> "" ) then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Real Name: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & ChkString(rs("M_FIRSTNAME"), "display") & " " & ChkString(rs("M_LASTNAME"), "display") & "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if
end if

* edit to change some code<
AnonJr
30 January 2008, 11:20


Given that its an old topic, and the OP never clarified what they wanted... I was assuming that the solution presented was acceptable and the only question was where to put it. wink<
JJenson
30 January 2008, 11:24


I didn't even notice the date on it smile
Just read and thought I would put my 2 cents in. Now I look at the date I look a little dumb tongue<
AnonJr
30 January 2008, 11:54


Well, campinmom03 did the right thing and found close to what he wanted. I just assumed that barring any other points of clarification, he just needed to know where to put the code. smile
Since it seems he wants something a little different, I think you're on the right track. Its been a while since I played with the member details on pop_profile or members.asp.<
campinmom03
30 January 2008, 13:27


JJenson, don't feel that way. It was my fault for using this old topic to reply.. I used search and this topic was about as close as I could get to find the info I am looking for.
If anyone can help me make a members Name and Surname private when any given member is viewing their profile I would appreciate it.
Although I am requiring members to submit that information upon registration, (without the additional code), and for members that do submit it, (which is required to be approved) I want to help protect their right to privacy.
Thank you in advance. smile<
JJenson
30 January 2008, 15:25


Terry did you try adding the mlev code above?<
campinmom03
30 January 2008, 15:36


JJenson, I just got in and have to run back out again. I have not tried it as of yet. Which file are you proposing that I try the code with? (pop_profile.asp or members.asp) Let me know and I'll test it when I get back in.
Thanks a bunch JJ. I sure appreciate it.<
JJenson
30 January 2008, 15:39


pop_profile.asp<
campinmom03
30 January 2008, 16:40


Ooops sorry. I didn't see that just above the code box.
I told you I hadn't had much coffee today. bigsmile That sometimes happens. I end up overlooking the obvious even when its right in my face! tongue
Anyway, now that I see that I'll try it right after dinner.

Thanks again. smile<
campinmom03
30 January 2008, 18:43


JJenson,

Ok had a look at my pop_profile.asp, I cannot find the code you are having me look for. Is it possible the reason why I cannot find it is because I don't have Name and Last Name as a required field?
This is all I have, that I could see anyway.

Code:
if trim(Request.Form("Name")) = "" then 
Err_Msg = Err_Msg & "<li>You must choose a UserName</li>"
end if
if (Instr(Request.Form("Name"), ">") > 0 ) or (Instr(Request.Form("Name"), "<") > 0) then
Err_Msg = Err_Msg & "<li> > and < are not allowed in the UserName, Please Choose Another</li>"

Let me know what you think when you can.
<
campinmom03
31 January 2008, 11:19


Hey guys its me again. lol

I thought maybe the code provided would not work unless I made those fields required with the code necessary to attempt this.
So I have successfully made those fields required with the appropriate code. I have tested it and it was done properly to now show those fields with *.

However, I still cannot find the code JJ asked me to look for in pop_profile.asp. Any help is greatly appreciated. Thank you.<
AnonJr
31 January 2008, 11:22


What version of the forum are you running? Jeff's probably looking at 3.4.06, and I think there has been a few changes from previous versions.
Edit: its also worth mentioning one of the neat "hidden" features that's available on these support forums: the [scrollcode] tag. If you reply w/quote to JJenson's earlier post you'll see how it works. This way long bits of code don't push the table out and cause me to do some horizontal scrolling when I'm on anything other than my laptop. tongue<
JJenson
31 January 2008, 11:23


Search for "strFullName" in that file that should bring it up.<
campinmom03
31 January 2008, 11:59


AnonJr sorry about that.. really. I am using 3.4.06

Code:
if strFullName = "1" then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font> Firstname: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""FirstName"" size=""25"" maxLength=""50"" value="""
if strMode <> "Register" then Response.Write(rs("M_FIRSTNAME"))
Response.Write """></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font> Surname: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""LastName"" size=""25"" maxLength=""50"" value="""
if strMode <> "Register" then Response.Write(rs("M_LASTNAME"))
Response.Write """></font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if

This is what I have in inc_profile.asp (edited to show correct file that this code came from)<
JJenson
31 January 2008, 12:11


OK lets give this a shot you have the required mod working here as well smile I was just going of the base version.
basically that whole chunk of code you will just wrap the mlev code in the mlev code

if mlev=4 then if strFullBane = "1" then
rest of the code
end if
end if<
campinmom03
31 January 2008, 12:24


JJ,

I have never done that... bear with me. When you say wrap, do you mean that I should add that bit of code above the strFullname= "1"?
BTW, did you get the email with the attached file I sent. If not, I'll re-send it. smile<
JJenson
31 January 2008, 12:46


Yeah I got it smile. Basically you want to add the code in green above the if strfullname ="1" then and then add another end if after the one in the code you posted above.<
campinmom03
31 January 2008, 13:31


JJ, I think I made error above. I'm trying to sort it out now by following back through my steps. If my haunch is correct, the appropriate change for what I'm wanting to do would not be in pop_profile.asp but rather inc_profile.asp.
I will let you know my findings in just a bit. Thanks for your help and patience. smile<
JJenson
31 January 2008, 13:33


Actually I believe you will want the change in both but I could be wrong on that.<
campinmom03
31 January 2008, 13:58


JJ, I'm checking that now. The code I posted above in the scrollcode is actually from my in_profile.asp. (Sorry about that... still learning here) I will post my findings in just a bit. I have to stop to the market and then to pick up the kids. Be back as soon to let you know.<
JJenson
31 January 2008, 15:10


Campinmom03

post a txt file of you pop_profile.asp and also inc_profile.asp<
campinmom03
31 January 2008, 16:46


JJ here you go. So that you know, I did try your code. It wouldn't work that way. Our profiles wouldn't even show up. I tried another way, that didn't work either. Here are good txt copies of the successful changes I made earlier with the required fields for Firs and Last Name. On pop_ profile change is on 1123 - 1133, inc_profile change is on 355 - 368. If you need any other info let me know.
http://www.myfamilyforumz.com/inc_profile.txt

http://www.myfamilyforumz.com/pop_profile.txt

Thank you.<
JJenson
01 February 2008, 12:52


I will take a look this weekend I am sorry I had some things come up outside of work I really had to take care of. But I haven't forgotten smile<
campinmom03
01 February 2008, 20:50


JJenson, no problem. You know I had a thought. It might work but I wanted to run it by you to see if you think it would work.
I thought maybe I could use my bad word filter. The idea is to enter in the members name as a "bad word" and have XXX appear like a bad word would. I tried it and the name still appears as name instead of XXXX.

This would probably be a good solution if I could just figure out how to do it. Maybe less code work? What do you think?
<
campinmom03
02 February 2008, 19:51


JJenson, or maybe this code I found will work?
If (mLev >= 3) or (CLng(rs("MEMBER_ID")) = MemberId) Then
... display the fields here
end if

I tried it out with no luck. Profiles wouldn't come up at all. But then again maybe I added it to the wrong line. Not sure. At least I have some stuff to go on and check out.

Let me know what you think.<
campinmom03
03 February 2008, 17:26


JJenson,

I figured it out and it works! I'll post everthing I did to achieve this for the next member who wants this done.

The Super Bowl is gonna start soon. So I'll gather this all up and have it ready to post on this thread this week coming.
Go Giants! bigsmile
<
AnonJr
04 February 2008, 08:59


Being a Patriots fan, last night was a heart-breaker. At least it was a hard-fought game. I'll start a different topic for that though. wink
Glad you figured out what you needed. Just don't forget to share... smile<
campinmom03
04 February 2008, 16:21


Here is the info I was able to get so that First, Last Name and Country was required upon registration along with *'s for those fields.

I would like to add, that I only wanted the those fields required upon registration. (If your looking for other fields to be required, do a search cause plenty of them will turn up). For those though that want what I did, go here:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=61025&SearchTerms=adding,first,and,last,name

The above link explains exactly how to get those fields required for members when they register. (Be sure to always back up before attempting any code changes). Once this has been implemented successfully, do the following below in pop_profile.asp only! (My site is loaded with mods, so I'm not sure where you would find the following code, but for mine the line needed was found on around 541)

Look for this block of code

Code:
Response.Write	"                    <tr>" & vbNewLine & _
" <td bgColor=""" & strAltForumCellColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Real Name: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strAltForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & ChkString(rs("M_FIRSTNAME"), "display") & " " & ChkString(rs("M_LASTNAME"), "display") & "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if





Now add this line of code directly above the code you found.
Code:
if strFullName = "1" and mlev > 3 and (Trim(rs("M_FIRSTNAME")) <> "" or Trim(rs("M_LASTNAME")) <> "" ) then

So that it looks like this:

Code:
 if strFullName = "1" and mlev > 3 and (Trim(rs("M_FIRSTNAME")) <> "" or Trim(rs("M_LASTNAME")) <> "" ) then
Response.Write " <tr>" & vbNewLine & _
" <td bgColor=""" & strAltForumCellColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Real Name: </font></b></td>" & vbNewLine & _
" <td bgColor=""" & strAltForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & ChkString(rs("M_FIRSTNAME"), "display") & " " & ChkString(rs("M_LASTNAME"), "display") & "</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
end if

This last step just above, will only make the members First and Last name private from other members when they are viewing other members profiles, as that is all I needed. Again, if your looking to make other fields private do a search and you will find what your looking for... hopefully anyway.

I surely hope this helps someone in the future. smile<
© 2000-2021 Snitz™ Communications