Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 Changing fields?? Can anyone help me with this?
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 October 2006 :  13:07:02  Show Profile  Send ruirib a Yahoo! Message
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=62611&SearchTerms=required,field,

Search is your friend.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  17:36:35  Show Profile
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.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 October 2006 :  17:46:59  Show Profile  Send ruirib a Yahoo! Message
Are you filling in that info or using the fields for some other purpose?


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  18:14:43  Show Profile
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
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 October 2006 :  18:52:02  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  18:57:34  Show Profile
OK I'll give it a shot...be back Thanks!
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  19:15:40  Show Profile
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
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  19:23:56  Show Profile
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...
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 October 2006 :  19:45:29  Show Profile  Send ruirib a Yahoo! Message
Hmmm... haven't tested it, but just with that change it shouldn't show if you are not an admin. I guess I will need to test it.


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  19:55:54  Show Profile
Thanks! Let me know what you learn. Any help would be great. Really like to not display some private info.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 24 October 2006 :  19:57:09  Show Profile  Send ruirib a Yahoo! Message
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
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  20:29:57  Show Profile
I'm wondering.. should it be change on the pop_profile file instead?
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  20:32:23  Show Profile
Ha ha I just posted my previous message without seeing your message! ok will give it a try.. be back.
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  20:56:41  Show Profile
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
Go to Top of Page

jplecher
Starting Member

39 Posts

Posted - 24 October 2006 :  22:48:19  Show Profile
Got it to work!! Syntax wasn't right

Many many thanks!!!! :)
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07