Author |
Topic |
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 17:36:35
|
Thanks Ruirib!
I got it to work!! :)
Now I will use the search and see if I can find the solution to how to show some of the profile info on pop_profile.asp?mode=display&id=
For example not show occupation, location, and real name. |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 18:14:43
|
quote: Originally posted by ruirib
Are you filling in that info or using the fields for some other purpose?
Yes... I want member to fill in the required fields that i have made. I changed the labels and put in the required asterik before each label.
However I do not want other member to see what their occupation, first name and last name by going, for example to the member link at the top of the page and get the pop up window by clicking on their name and see their profile. How can I turn off some display profile info? I look in the search and could not find the info I'm looking for. Much thanks! I tried commenting out the display line on the pop |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 24 October 2006 : 18:52:02
|
Probably you want to display that info for administrators. You will need to change inc_profile.asp. Basically what you need to do is add a new condition to each line that displays the info, so that it is displayed only to admins.
For example, to show the name just to admins, find line 297 and add the condition in red:
if strFullName = "1" and mlev = 4 then
For the other fields the change is similar. Haven't tested this, but you can try it and let me know how it goes. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 18:57:34
|
OK I'll give it a shot...be back Thanks! |
|
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 19:15:40
|
The full name works! However when I started adding the code to the occupation. city and state then it doesn't work, it even show the full name.
So it works just for one line, full name. I don't know if it'll work for each line separately i haven't tried that.
here's the code for city and state for example:
if strCity = "1" and mlev = 4 then Response.Write " <tr>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font>City: </font></b></td>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""City"" size=""25"" maxLength=""50"" value=""" if strMode <> "Register" then Response.Write(rs("M_CITY")) Response.Write """></font></td>" & vbNewLine & _ " </tr>" & vbNewLine end if if strState = "1" and mlev = 4 then Response.Write " <tr>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" nowrap width=""10%""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><font color=""" & strHiLiteFontColor & """>*</font>State: </font></b></td>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><input name=""State"" size=""25"" maxLength=""50"" value=""" if strMode <> "Register" then Response.Write(rs("M_STATE")) Response.Write """></font></td>" & vbNewLine & _ " </tr>" & vbNewLine end if |
|
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 19:23:56
|
I made a mistake.. even with only one change:
if strFullName = "1" and mlev = 4 then Response.Write "
I noticed the first and last name still shows. Hmmm?? I'm not logged in as Admin either... |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 19:55:54
|
Thanks! Let me know what you learn. Any help would be great. Really like to not display some private info. |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 24 October 2006 : 19:57:09
|
You need to change pop_profile.asp. For first and last name, you will need to add the red part to pop_profile.asp, line# 505:
if strFullName = "1" and mlev=4 And (Trim(rs("M_FIRSTNAME")) <> "" or Trim(rs("M_LASTNAME")) <> "" ) then
For city, country, ... info, change line 511
if mlev=4 and ( (strCity = "1" and Trim(rs("M_CITY")) <> "") or (strCountry = "1" and Trim(rs("M_COUNTRY")) <> "") or (strState = "1" and Trim(rs("M_STATE")) <> "") )then
Don't forget the closing parenthesis before the then, line 511.
|
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 20:29:57
|
I'm wondering.. should it be change on the pop_profile file instead? |
|
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 20:32:23
|
Ha ha I just posted my previous message without seeing your message! ok will give it a try.. be back. |
|
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 20:56:41
|
I'm getting this error below.. What am I missing?
Microsoft VBScript compilation error '800a03ee'
Expected ')'
/forum/pop_profile.asp, line 511
if mlev=4 and ( (strCity = "1" and (Trim(rs("M_CITY")) <> "") or (strCountry = "1" and Trim(rs("M_COUNTRY")) <> "") or (strState = "1" and Trim(rs("M_STATE")) <> "") )then -----------------------------------------------------------------------------------------------------------------------------------------------------------------------^
Here's my revised code:
end if if strFullName = "1" and mlev=4 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 if mlev=4 and ( (strCity = "1" and (Trim(rs("M_CITY")) <> "") or (strCountry = "1" and Trim(rs("M_COUNTRY")) <> "") or (strState = "1" and Trim(rs("M_STATE")) <> "") )then Response.Write " <tr>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """ align=""right"" nowrap valign=""top""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Location: </font></b></td>" & vbNewLine & _ " <td bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" myCity = ChkString(rs("M_CITY"),"display") myState = ChkString(rs("M_STATE"),"display") myCountry = ChkString(rs("M_COUNTRY"),"display") myLocation = ""
if myCity <> "" and myCity <> " " then myLocation = myCity end if
if myLocation <> "" then if myState <> "" and myState <> " " then myLocation = myLocation & ", " & myState end if else if myState <> "" and myState <> " " then myLocation = myState end if end if
if myLocation <> "" then if myCountry <> "" and myCountry <> " " then myLocation = myLocation & "<br />" & myCountry end if else if myCountry <> "" and myCountry <> " " then myLocation = myCountry end if end if Response.Write myLocation Response.Write "</font></td>" & vbNewLine & _ " </tr>" & vbNewLine
|
|
|
jplecher
Starting Member
39 Posts |
Posted - 24 October 2006 : 22:48:19
|
Got it to work!! Syntax wasn't right
Many many thanks!!!! :) |
|
|
Topic |
|