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: MOD Implementation
 Adding 2 profile fields
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jorrit787
Average Member

Netherlands
681 Posts

Posted - 08 March 2005 :  22:23:20  Show Profile  Visit Jorrit787's Homepage  Send Jorrit787 an AOL message  Send Jorrit787 a Yahoo! Message
I am trying to add two yes/no fields to the edit profile page. I see the fields and the dropdown boxes, but it's not saving my settings. These are the fields in inc_profile (1 instance around line 102):

'############## Start Hide/Display Profile/IM Info code	
		Response.Write	"                    <tr valign=""middle"">" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" width=""10%"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Hide your Profile<br />from public view?: </font></b></td>" & vbNewLine
		if strMode = "Register" then
			Response.Write	"                      <td bgColor=""" & strPopUpTableColor & """ valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
					"                      <select name=""strHideProfile"">" & vbNewLine & _
					"                      	<option value=""1"" selected>Yes</option>" & vbNewLine & _
					"                      	<option value=""0"">No</option>" & vbNewLine & _
					"                      </select></font></td>" & vbNewLine
		else
			Response.Write	"                      <td bgColor=""" & strPopUpTableColor & """ valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
					"                      <select name=""strHideProfile"">" & vbNewLine & _
					"                      	<option value=""1"""
			if rs("M_HIDE_PROFILE") <> "0" then Response.Write(" selected")
			Response.Write	">Yes</option>" & vbNewLine & _
					"                      	<option value=""0"""
			if rs("M_HIDE_PROFILE") = "0" then Response.Write(" selected")
			Response.Write	">No</option>" & vbNewLine & _
					"                      </select></font></td>" & vbNewLine
		end if
		Response.Write	"                    </tr>" & vbNewLine 
		
		Response.Write	"                    <tr valign=""middle"">" & vbNewLine & _
				"                      <td bgColor=""" & strPopUpTableColor & """ align=""right"" valign=""middle"" width=""10%"" nowrap><b><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Hide your IM contact<br />info from public view?: </font></b></td>" & vbNewLine
		if strMode = "Register" then
			Response.Write	"                      <td bgColor=""" & strPopUpTableColor & """ valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
					"                      <select name=""strHideIMInfo"">" & vbNewLine & _
					"                      	<option value=""1"" selected>Yes</option>" & vbNewLine & _
					"                      	<option value=""0"">No</option>" & vbNewLine & _
					"                      </select></font></td>" & vbNewLine
		else
			Response.Write	"                      <td bgColor=""" & strPopUpTableColor & """ valign=""middle""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
					"                      <select name=""strHideIMInfo"">" & vbNewLine & _
					"                      	<option value=""1"""
			if rs("M_HIDE_IMINFO") <> "0" then Response.Write(" selected")
			Response.Write	">Yes</option>" & vbNewLine & _
					"                      	<option value=""0"""
			if rs("M_HIDE_IMINFO") = "0" then Response.Write(" selected")
			Response.Write	">No</option>" & vbNewLine & _
					"                      </select></font></td>" & vbNewLine
		end if
		Response.Write	"                    </tr>" & vbNewLine
'############## End Hide/Display Profile/IM Info code

And this is the code in pop_profile (2 instances , same code):

					if strBio = "1" then
						strSql = strSql & ", M_BIO = '" & chkString(Request.Form("Bio"),"message") & "'" 
					end if
					strSql = strSql & ",     M_HIDE_PROFILE = " & cLng(Request.Form("strHideProfile")) & " "
					strSql = strSql & ",     M_HIDE_IMINFO = " & cLng(Request.Form("strHideIMInfo")) & ""
					strSql = strSql & " WHERE MEMBER_ID = " & cLng(Request.Form("MEMBER_ID"))
The fields have been added to the db correctly - What am I doing wrong?

eXtremeGossip

Classicmotorcycling
Development Team Leader

Australia
2084 Posts

Posted - 09 March 2005 :  02:55:21  Show Profile
I have just setup a major profile page for another site and it took me more than a day to work it out. In register.asp you need to add the DB fields and order they come up on the inc_profile.asp page and in pop_profile you need to add it there as well.

When you add the firelds to your DB, you not only need to add them to the MEMBERS table but also to the PENDING_MEMBERS table as well.

If you need a hand with it, send me an e-mail and I will respond and you can send me zipped up the 3 files I just memtioned and I will add them for you as there is a few lines that need to be added to each of them.

Cheers,

David Greening
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07