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
 User Fields v2.0 by Huw Reddick
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 6

ddg21
Starting Member

USA
5 Posts

Posted - 02 May 2002 :  21:23:46  Show Profile  Visit ddg21's Homepage
Thanks for the response Huwr. I guess my biggest fear is that the MOD was written for a previous version and I don't want to mess up my version 3.3.03 when I alter the code. Is it compatable with the newer version? Thanks

John
http://www.usscochrane.com/ddg21/forum/default.asp

Go to Top of Page

Tmpj
Junior Member

Denmark
467 Posts

Posted - 22 May 2002 :  05:55:16  Show Profile
Thankz for the fix HuwR!


------------------------------
Magic is an Orange
http://www.magicorange.tk
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 18 July 2002 :  19:17:33  Show Profile  Visit richfed's Homepage
quote:

I have discovered the problem, there is no code in the

case "ModifyIt" section to update the fields.


add this code after the my_conn.execute which performs the member udate

'Rem User Field Code #######################################
if (strUseExtendedProfile) then
if (intUserFields > 0) then

memID = ChkString(Request.Form("MEMBER_ID"), "SQLString")
UserstrSql = "SELECT * "
UserstrSql = UserstrSql & " FROM " & strMemberTablePrefix & "USERFIELDS "
set rsIDs =My_Conn.Execute(UserstrSql)
do until rsIDs.EOF
sInputName = rsIDs("USR_SHORTNAME")
sUpdateValue = Request.Form(sInputName)
if DoesUserFieldExist(memID,rsIDs("USR_FIELD_ID")) then
UpdSQL = "UPDATE " & strMemberTablePrefix & "MEMBERFIELDS "
UpdSQL = UpdSQL & "SET " & strMemberTablePrefix & "MEMBERFIELDS.USR_VALUE ='" & sUpdateValue & "'"
UpdSQL = UpdSQL & "WHERE " & strMemberTablePrefix & "MEMBERFIELDS.USR_FIELD_ID =" & rsIDs("USR_FIELD_ID") & " AND "
UpdSQL = UpdSQL & strMemberTablePrefix & "MEMBERFIELDS.MEMBER_ID =" & memID
My_Conn.Execute(UpdSQL)
UpdSQL = ""
else
UpdSql = "INSERT INTO " & strMemberTablePrefix & "MEMBERFIELDS "
UpdSql = UpdSql & "VALUES ( " & memID & "," & rsIDs("USR_FIELD_ID") & ",'"
UpdSql = UpdSql & sUpdateValue & "')"
My_Conn.Execute(UpdSQL)
UpdSQL = ""
end if
rsIDs.MoveNext
loop
rsIDs.Close
Err_Msg = "OK"
end if
end if
'Rem User Field Code #######################################






OK!

This sounds all very similar to my problem ...

HuwR, can you let me know what file this code goes on [I think pop_profile.asp?], and also be a little more specific as to its placement [I'm far from an asp expert!], and, maybe most importantly does the fix still apply to version 3.3.05?

NOTE TO FORUM MODERATOR: I have sort of duplicated the request of my other thread on this topic ... sorry, just found this while searching for answers. I know, I know ... should have searched first!

Rich
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 18 July 2002 :  19:25:05  Show Profile  Visit HuwR's Homepage
quote:

HuwR, can you let me know what file this code goes on [I think pop_profile.asp?],


correct
quote:

and also be a little more specific as to its placement [I'm far from an asp expert!], and, maybe most importantly does the fix still apply to version 3.3.05?


No, since I have noidea what you pop_profile looks like in relationship to mine. Yes the fix would apply to any version of Snitz, since it i a fix for the mod not snitz.
quote:

... sorry, just found this while searching for answers. I know, I know ... should have searched first!


No comment!
[/quote]

Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 19 July 2002 :  06:37:59  Show Profile  Visit richfed's Homepage
OK ... this is the third instance of my_conn.execute in my pop_profile.asp [towards the bottom].

quote:
if ChkString(Request.Form("Level"),"") = "1" then
'## Forum_SQL - Remove the member from the moderator table
strSql = "DELETE FROM " & strTablePrefix & "MODERATOR "
strSql = strSql & " WHERE " & strTablePrefix & "MODERATOR.MEMBER_ID = " & ChkString(Request.Form("MEMBER_ID"), "SQLString")

my_Conn.Execute (strSql)
end if
%>


I believe it may be the correct instance, as it is below the "ModifyIt" code ...

Do I just insert your fix code after the %>? Or where?

Thanks ...

Rich
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 19 July 2002 :  06:42:17  Show Profile  Visit HuwR's Homepage
quote:

after the my_conn.execute which performs the member UPDATE



so no would be the answer to your question, since that is a DELETE queery

Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 19 July 2002 :  19:28:52  Show Profile  Visit richfed's Homepage
I try & I try ... no matter where on pop_profile.asp I add your code [above], the result is the same ... As Administrator, it appears that I can edit the new field [USER_7], but, in reality, nothing happens. Only a user can edit that field.

If I were to post a link to a text version, could you then tell me where to place that code?

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

Also ...

Like the user above, my register page does not allow the person registering to enter info in that new field at the time of registration. The "Title" is there, but next to it there is no text field in which to input text. The user must return, after registration, to enter info in the field!

Your help is not only needed, but appreciated!

Rich
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 19 July 2002 :  20:35:50  Show Profile  Visit HuwR's Homepage
to fix the registration page, replace the code you added to inc_profile.asp with this


'Rem User Field Code #######################################
if (intUserFields = "1") then
Response.write "<tr>" &_
" <td align=center bgcolor='" & strCategoryCellColor & "' colspan='2'><b>" &_
" <font face='" & strDefaultFontFace & "' size='" & strDefaultFontSize & "' color='" & strHeadFontColor & "'>Extra Info..</font></b></td>" &_
" </tr>"
set rs2 = My_Conn.Execute("SELECT * FROM " & strMemberTablePrefix & "USERFIELDS ORDER BY USR_FIELD_ID")
do until rs2.EOF
fieldValue = getUserFieldValue(rs2("USR_FIELD_ID"),rs("MEMBER_ID"))
Response.Write ("<tr><td valign=""top"" align=""right"" bgColor=" &strPopUpTableColor & " > <b><font face=""" & strDefaultFontFace & """ size=" & strDefaultFontSize & ">" & rs2("USR_LABEL") & ":</font></b></td>")
if rs2("USR_FIELDTYPE") = "T" then
Response.Write "<td valign=""top"" bgColor=""" & strPopUpTableColor & """><textarea maxLength=""255"" name=" & rs2("USR_SHORTNAME") &_
" cols=""20"" rows=3>" & fieldValue & "</textarea></td>"
Else
if rs2("USR_FIELDTYPE") = "S" then
Response.write "<td valign=""top"" bgColor=""" & strPopUpTableColor & """>" &_
"<INPUT name=""" & rs2("USR_SHORTNAME") & """ size=""20"" value=""" & fieldValue & """></font></td>"
Else
Response.write "<td valign=""top"" bgColor=""" & strPopUpTableColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" &_
"<INPUT name=""" & rs2("USR_SHORTNAME") & """ type=""checkbox"" value=""1"" "
If fieldValue = "1" then Response.write "checked"
Response.write "></font></td>"
End If
End If
response.write "</tr>"
rs2.MoveNext
loop
rs2.Close
end if
'Rem User Field Code #######################################


Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 19 July 2002 :  21:19:34  Show Profile  Visit richfed's Homepage
That fixed that!

Thanks ...

The other part (Admin not being able to edit) is not that big a deal ... unless,of course, someone where to post an obscenity or something in there. If it's a lot of trouble, I can live with it as is ...

Appreciate the assistance!

Rich
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 19 July 2002 :  22:32:33  Show Profile  Visit HuwR's Homepage
I am currently updating the mod for 3.4, and adding Lookup lists and admin only fields, which is why I'm not around that much at the moment.



Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 20 July 2002 :  00:29:09  Show Profile
quote:

I am currently updating the mod for 3.4, and adding Lookup lists and admin only fields, which is why I'm not around that much at the moment.



Goodness. I forgot to send you the changes I compiled. I'll pack it and e-mail you in a minute. Maybe you can merge them.

I just couldn't find the time to make it v4 compatible, but there are also problems with multiple simultaneous language case anyway.


Think Pink
==> Start Internationalization Here
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 20 July 2002 :  06:13:55  Show Profile  Visit HuwR's Homepage
what changes did you make ?

Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 20 July 2002 :  17:15:39  Show Profile
quote:

what changes did you make ?



I sent you an e-mail with the package explaining what is in (sent it to huw@forum... address).

In short, this is the extended readme file:

quote:

Instructions For Configurable User Fields.

USR_LABEL This is what the User sees as label.
USR_DESC Description of the field used in registration. You can use forum code here.
USR_FIELDTYPE Basic display control to be used.
S = Simple Input
T = Text Area
C = Check Box
O = Select Box
M = Multi-Select Box
H = Horizontal Radio Buttons
V = Vertical Radio Buttons
USR_VALUES Select box & radio button options, separated by | sign
USR_DEFAULT Default value if not specified by user
USR_OPTIONAL If unchecked, user must fill the field
USR_PRIVATE Specify who sees the field
USR_SHORTNAME Used internally for form field names.
Use values like "user_1, user_2" etc.
(Do not use spaces in the short name)



Also a little security related changes (not complete), collected most html into one include file.

Installation is made easy, an INCLUDE directive and a couple subroutine calls get inserted into base forum files.

It is not fully packaged thou. More info is in the e-mail...


Think Pink
==> Start Internationalization Here
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 20 July 2002 :  17:36:32  Show Profile  Visit HuwR's Homepage
Thanks, Bozden.

Go to Top of Page

Gato
New Member

Brazil
92 Posts

Posted - 21 July 2002 :  14:16:20  Show Profile  Visit Gato's Homepage
Can you post the changes???

Go to Top of Page
Page: of 6 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