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
Next Page
Author Previous Topic Topic Next Topic
Page: of 6

thewebprojects
Starting Member

USA
25 Posts

Posted - 06 February 2002 :  13:50:02  Show Profile  Visit thewebprojects's Homepage
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  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
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
Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 04 March 2002 :  09:22:09  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 04 March 2002 :  20:51:54  Show Profile  Visit HuwR's Homepage
It would be helpfull if you explained what you considered to be Kludgy ?



The shortname has a limit of 10 characters (hence the name).

Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 05 March 2002 :  08:46:14  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
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
Go to Top of Page

barky81
Junior Member

USA
166 Posts

Posted - 28 March 2002 :  17:13:24  Show Profile
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!

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 28 March 2002 :  18:29:14  Show Profile  Visit HuwR's Homepage
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 ?


Go to Top of Page

barky81
Junior Member

USA
166 Posts

Posted - 29 March 2002 :  10:57:54  Show Profile
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 ?






Go to Top of Page

barky81
Junior Member

USA
166 Posts

Posted - 02 April 2002 :  14:40:54  Show Profile
bump?

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 02 April 2002 :  15:06:57  Show Profile  Visit HuwR's Homepage
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 #######################################


Go to Top of Page

barky81
Junior Member

USA
166 Posts

Posted - 03 April 2002 :  15:23:55  Show Profile
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 05 April 2002 :  05:01:57  Show Profile  Visit HuwR's Homepage
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.

Go to Top of Page

barky81
Junior Member

USA
166 Posts

Posted - 05 April 2002 :  12:39:00  Show Profile
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
Go to Top of Page

Cycas
Starting Member

United Kingdom
14 Posts

Posted - 23 April 2002 :  17:36:25  Show Profile
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

Go to Top of Page

ddg21
Starting Member

USA
5 Posts

Posted - 01 May 2002 :  22:07:53  Show Profile  Visit ddg21's Homepage
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
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 02 May 2002 :  07:41:45  Show Profile  Visit HuwR's Homepage
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.

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