Author |
Topic |
thewebprojects
Starting Member
USA
25 Posts |
Posted - 06 February 2002 : 13:50:02
|
Has anyone out there been able to use 'User Fields v2 MOD' with version Snitz Forum 3.3?
I need to add additional fields to my registration form.
|
|
Chuck McB
Junior Member
WooYay
196 Posts |
Posted - 04 March 2002 : 09:16:41
|
yup, got it working, kludgy as hell tho. :)
there where some errors in the install code, missing & and ' in the wrong place.
then I had to add the line intUserFields = 1 to the start of each function in the mod_config.asp (or inc_mod_config.asp) ..I'm sure there's a better way to do it, but this works fine for me
HTH
Chuck --- DNA.styx DNA Games |
|
|
Chuck McB
Junior Member
WooYay
196 Posts |
Posted - 04 March 2002 : 09:22:09
|
hmm...seems that you can't rename/set SHORTNAME after the above 'fix'
UPDATE: seem that there is a char limit on the SHORTNAME that's why it wasn't updating for me..
Chuck --- DNA.styx DNA Games
Edited by - chuck mcb on 04 March 2002 19:14:12 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 04 March 2002 : 20:51:54
|
It would be helpfull if you explained what you considered to be Kludgy ?
The shortname has a limit of 10 characters (hence the name).
|
|
|
Chuck McB
Junior Member
WooYay
196 Posts |
Posted - 05 March 2002 : 08:46:14
|
quote:
It would be helpfull if you explained what you considered to be Kludgy ?
My fix was kludgy (adding intUserFields = 1 to mod_config.asp). Anytime I put a check in the 'enable user fields' then ckick on SET the page just refreshes & doesn't activate the user fields.
quote: The shortname has a limit of 10 characters (hence the name).
opps :) thanks.
Chuck --- DNA.styx DNA Games |
|
|
barky81
Junior Member
USA
166 Posts |
Posted - 28 March 2002 : 17:13:24
|
quote:
It would be helpfull if you explained what you considered to be Kludgy ?
A number of things, maybe...
The download link calls it v1.1;
The readme calls it v2.0;
And it shows up in the Mod Commander as v.1.
But more significantly, I have noticed the following in using it with snitz v3.1 SR4:
Though I have created a "Simple Input" field (type S), it does not show as editable in the register.asp page.
Also, the Administrator is NOT able to edit any of the info in the User Fields, even though it can edit anything else?
The two problems are probably related, as in my forum, the Administrator has to do all user registration (a closed forum).
Why CAN'T the Administrator edit the User Fields? And what change to your code would allow it to?
Thanks!
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 28 March 2002 : 18:29:14
|
quote:
Why CAN'T the Administrator edit the User Fields? And what change to your code would allow it to?
I have no idea. don't remember anyone reporting that before, do the edit boxes not show, or does it not save the values ?
|
|
|
barky81
Junior Member
USA
166 Posts |
Posted - 29 March 2002 : 10:57:54
|
On the pop_profile both types show, but any changes do not save.
On register.asp, the simple input (type S) does not show in editable form (so the label is there and no box to type in...but the checkbox is both editable and the choice is saved....however, thereafter, in pop_profile modify mode, the text box shows empty (since nothing could be entered earlier), and any admin changes will not save. (the user can correctly edit both field types.
quote:
quote:
Why CAN'T the Administrator edit the User Fields? And what change to your code would allow it to?
I have no idea. don't remember anyone reporting that before, do the edit boxes not show, or does it not save the values ?
|
|
|
barky81
Junior Member
USA
166 Posts |
Posted - 02 April 2002 : 14:40:54
|
bump?
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 02 April 2002 : 15:06:57
|
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 #######################################
|
|
|
barky81
Junior Member
USA
166 Posts |
Posted - 03 April 2002 : 15:23:55
|
You have partially corrected my issue. This code does correct the Admin editing issue. (It does store the changed values back to the table...)
However, I still have this problem:
On register.asp, the simple input (type S) does not show in editable form (so the label is there and no box to type in...but the checkbox is both editable and the choice is saved....however, thereafter, in pop_profile modify mode, the text box shows empty (since nothing could be entered earlier)...
Again, my forum is a little different as I have modded the policy/register.asps to restrict new account creation to Admin. In other words, you don't sign yourself up for an account, the admin does it for you.
But the code you have for register.asp depends (I think) on grabbing the returned id in order to stuff it's own values into the separate userfields table??????
Whatever it is, the Type S field does NOT show as editable on the register page...(but the checkbox type does)...
So why does 1 field type work properly and the other doesn't on register?
THANKS!
Still trying to puzzle this out...could the problem be in the different treatment of the 3 userfield types in inc_profile.asp? Apparently it is called/included in the register.asp routine. There is a three-way if then series to address the three types of fields...
The second one, Type S, still doesn't work right.
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 #######################################
...snipped for space....
'Rem User Field Code #######################################
Edited by - barky81 on 04 April 2002 20:15:08 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 05 April 2002 : 05:01:57
|
I'm pretty sure that it must be something you have done, this mod has been in existance for well over a year and nobody has complained that it doesn't allow you to fill in the fields when registerring.
I have just tested this on my site and my test site, and it works as expected.
|
|
|
barky81
Junior Member
USA
166 Posts |
Posted - 05 April 2002 : 12:39:00
|
If you say so. But all I did was add an include that checked to see if it was an admin accessing the register page (and if not, then redirect). This is to restrict user registrations to an admin, who actually inputs another user's registration for them.....no code mods in that.
But here's the output of my site's /forum/register.asp?mode=Register versus your site's:
My Forum (3.1 SR4):
<tr> <td align=center bgcolor='slateblue' colspan='2'><b><font face=Verdana, Arial, Helvetica size=2 color=mintcream>Extra Info..</font></b></td> </tr> <tr> <td></td> </tr> <tr> <td valign="top" align="right" bgColor=navyblue > <b><font face="Verdana, Arial, Helvetica" size=2>Class Year:</font></b></td> </tr> <tr> <td valign="top" align="right" bgColor=navyblue > <b><font face="Verdana, Arial, Helvetica" size=2>Subscribe to Newsletter:</font></b></td> <td valign="top" bgColor="navyblue"><font face="Verdana, Arial, Helvetica" size="2"><INPUT name="User_3" type="checkbox" value="1"></font></td> </tr> </table>
Your Forum (3.3.03:
<tr> <td align=center bgcolor="orange" colspan="2"><b><font face="Verdana, Arial, Helvetica" size="1" color="FFFFFF">Extra Info..</font></b></td> </tr> <tr> <td></td> </tr> <tr> <td valign="top" align="right" bgColor=F7FFE7 > <b><font face="Verdana, Arial, Helvetica" size=1>NewLabel:</font></b></td> <td valign="top" bgColor=F7FFE7><font face="Verdana, Arial, Helvetica" size="1"><INPUT name=User_2 size="20" value=""></font></td> </table>
I see several differences occurring between the two versions. I will have to download 3.3.03 just to look at it's code to see if it is actually rewritten....
I realize this mod has been around awhile, and I like it, but it does need a little toning up, don't you think? That's how this thread started...I'll know more after I look at the 3.3.03 code as well.
Thanks for everything so far...still working on it.
ADDITIONAL COMMENT: I just edited inc_profile to use a default value instead of the recordset result and it displays properly. You will notice in the code that the checkbox type field simply supplies a default value and makes no similar database call.
Now, I can't leave it that way, because inc_profile gets called elsewhere, so there is a logic problem to address. Maybe, since I am using an older Access DB, there's no "default" value for the userfield and the "NULL" result is causing that whole line to fail? I mean, there is no user "yet," is there, until they get actually registered?
Can you briefly walk me through the logic of how this works together to add a new user/and new user fields, keying off the member_ID?
quote:
I'm pretty sure that it must be something you have done, this mod has been in existance for well over a year and nobody has complained that it doesn't allow you to fill in the fields when registerring.
I have just tested this on my site and my test site, and it works as expected.
Edited by - barky81 on 05 April 2002 13:21:07 |
|
|
Cycas
Starting Member
United Kingdom
14 Posts |
Posted - 23 April 2002 : 17:36:25
|
Hi I just set up my first forum this week and was feeling pretty chuffed. I want to use the Userfield Mod (with v3.3) and have downloaded and read the readme but this thread terrifies me.
Q1 With v3.3 (brand new) am I ok to overwrite the files with the mod files?
Q2 Are the edits suggested in this thread additional or are they in the version I downloaded today?
Q3 Am I biting off more than I can chew?
Phil
|
|
|
ddg21
Starting Member
USA
5 Posts |
Posted - 01 May 2002 : 22:07:53
|
I would also like to impliment this MOD but have the same questions / concerns that Cycas does. Does anyone have the answers? Thanks.
John http://www.usscochrane.com/ddg21/forum/default.asp
Edited by - ddg21 on 01 May 2002 22:09:18 |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 02 May 2002 : 07:41:45
|
Obviously the decision is up to you, but if you do a search here, you will find very few issues reported regarding the MOD, you will need to add the code I posted here though to fix the admin edit issue.
|
|
|
Topic |
|