Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Modifications    Mod Requests and Support  ›  extra registration fields Moderators: 10 Series Support Team
Users Browsing Forum
No Members and 1 Guests

extra registration fields  This thread currently has 480 views. Print
1 Pages 1 Recommend Thread
thomasinnv
December 16, 2006, 12:06pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 306
Gender: Male
Posts Per Day: 0.38
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 14 days 19 hours 11 minutes
Location: Fernley, NV
Age: 37
i am in the process of re-writing the extra reg fields mod for 10.2
i am 95%done, i have rewritten everything and all appears to work, all fields are appearing in the member center and in the new user registration area according to the options set in admin panel.  the problem is the info is not writing to the member .dat file.

the mod was originally written for 9.7.  the only code i have not been able to figure out the changes for is this:

register.pl
Code
<mod search="2">
	for($q = 0; $q < 48; $q++) { print FILE "$newuser->[$q]\n"; }
</mod end>
<mod write="2" action="2">
for($q = 0; $q < $usersetcount; $q++) { print FILE "$newuser->[$q]\n"; }
</mod end>


i'm sure i'm missing something simple.  i have attached the mod with the changes i have made (minus the above code so i could test the rest of the mod)

anyone up for it??  i think most of the work is already done.
i have the mod installed on a test forum here



This post contains attachments; to download them you must login.







Logged Offline
Site Site Private Message Private message
Justin
December 16, 2006, 1:05pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,075
Gender: Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
Ah, that's not going to work.  The new format for writing things is like so ...

$addtoID{'VARIABLE_NAME'} = "VALUE";

Or:

%addtoID = (
'VARIABLE_NAME' => 'VALUE'
);

The latter should ONLY be used when there's no other data in the $addtoID hash, else it'll all be replaced with the new data (in other words, you should use the first one mostly).  There's probably already a %addtoID in Register.pl though, so just add your stuff after a comma.

%addtoID = (
'VARIABLE_NAME' => 'VALUE',
'NEW_STUFF' => 'NEW VALUE'
);

Oh, and you need to call SaveMemberID($USERID); after all that.

I still have it on my list to add this mod one of these days, but just haven't had the desire to do it yet.  


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 1 - 7
thomasinnv
December 16, 2006, 1:21pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 306
Gender: Male
Posts Per Day: 0.38
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 14 days 19 hours 11 minutes
Location: Fernley, NV
Age: 37
this is some of what i did...

Code
<openfile="Code/ProfileEdit.pl" writes="4">
<mod search="1">
$addtoID{'sn'} = $bah;
		}

		$email = lc($FORM{'email'});

		$addtoID{'email'} = $email;
</mod end>
<mod write="1" action="1">
$addtoID{'fullname'} = $FORM{'fullname'};
$addtoID{'streetaddress'} = $FORM{'streetaddress'};
$addtoID{'cityaddress'} = $FORM{'cityaddress'};
$addtoID{'stateaddress'} = $FORM{'stateaddress'};
$addtoID{'zipaddress'} = $FORM{'zipaddress'};
$addtoID{'usrfieldone'} = $FORM{'usrfieldone'};
$addtoID{'usrfieldtwo'} = $FORM{'usrfieldtwo'};
$addtoID{'usrfieldthree'} = $FORM{'usrfieldthree'};
$addtoID{'usrfieldfour'} = $FORM{'usrfieldfour'};
</mod end>

<mod search="2">
		%addtoID = (
			'personaltxt' => $personaltext,
			'sex'         => $FORM{'sex'},
			'dob'         => $birthday,
			'sitename'    => $FORM{'sname'},
			'siteurl'     => $FORM{'url'},
			'location'    => $FORM{'location'}
</mod end>
<mod write="2" action="1">
		,
			'fullname'        => $FORM{'fullname'},
			'streetaddress'   => $FORM{'streetaddress'},
			'cityaddress'     => $FORM{'cityaddress'},
			'stateaddress'    => $FORM{'stateaddress'},
			'zipaddress'      => $FORM{'zipaddress'},
			'usrfieldone'     => $FORM{'usrfieldone'},
			'usrfieldtwo'     => $FORM{'usrfieldtwo'},
			'usrfieldthree'   => $FORM{'usrfieldthree'},
			'usrfieldfour'    => $FORM{'usrfieldfour'}

and...

Code
<openfile="Code/Register.pl" writes="3">
<mod search="1">
	SaveMemberID(
		$curnumber,
		%addtoID = (
			'password'   => $FORM{'pw'},
			'sn'         => $wantedname,
			'email'      => lc($FORM{'email'}),
			'posts'      => 0,
			'registered' => $curtime,
			'timezone'   => $gtzone || 0,
			'status'     => $vradmin,
			'validation' => $formid,
</mod end>
<mod write="1" action="1">
	'fullname'       => $FORM{'fullname'},
	'streetaddress'  => $FORM{'streetaddress'},
	'cityaddress'    => $FORM{'cityaddress'},
	'stateaddress'   => $FORM{'stateaddress'},
	'zipaddress'     => $FORM{'zipaddress'},
	'usrfieldone'    => $FORM{'usrfieldone'},
	'usrfieldtwo'    => $FORM{'usrfieldtwo'},
	'usrfieldthree'  => $FORM{'usrfieldthree'},
	'usrfieldfour'   => $FORM{'usrfieldfour'},
</mod end>


Quoted Text
Oh, and you need to call SaveMemberID($USERID); after all that.


what would be the code?  and would it be placed directly after the added code above?






Logged Offline
Site Site Private Message Private message Reply: 2 - 7
thomasinnv
December 16, 2006, 1:41pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 306
Gender: Male
Posts Per Day: 0.38
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 14 days 19 hours 11 minutes
Location: Fernley, NV
Age: 37
update...the info is being written to the dat file, but is not being printed to screen when you goto member center...the fields are blank.  that little peice of code i couldn't figure out mentioned in the beginning of this thread i am guessing is what prints the info to the fields in the member center?






Logged Offline
Site Site Private Message Private message Reply: 3 - 7
Justin
December 16, 2006, 2:28pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,075
Gender: Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
Huh?


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 4 - 7
thomasinnv
December 16, 2006, 3:20pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 306
Gender: Male
Posts Per Day: 0.38
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 14 days 19 hours 11 minutes
Location: Fernley, NV
Age: 37
when you goto "member center/name and contact info" the extra input fields are there, and you can input text to the field and it will save to the .dat files, but when you go back to the "member center/name and contact info" the extra fields are blank.  i have verified that the info is being written to the dat file.  i have modified the following code as such:

Code
<mod search="4">
 <td><input type="text" name="skype" value="$memberid{$URL{'u'}}{'skype'}" maxlength="30" /></td>
   </tr><tr>
    <td class="center win2" style="height: 8px;"></td>
    <td colspan="2"></td>
   </tr>
  </table>
 </td>
</tr>
EOT
</mod end>
<mod write="4" action="1">
if ($reqfullname) { $isrequired{"fullname"} = "*";}
if ($reqmailaddress) { $isrequired{"mailaddress"} = "*";}
if ($requsrfieldone) { $isrequired{"usrfieldone"} = "*";}
if ($requsrfieldtwo) { $isrequired{"usrfieldtwo"} = "*";}
if ($requsrfieldthree) { $isrequired{"usrfieldthree"} = "*";}
if ($requsrfieldfour) { $isrequired{"usrfieldfour"} = "*";}

if (($usefullname) || ($usemailaddress) || ($usrfieldonelabel) || ($usrfieldtwolabel) || ($usrfieldthreelabel) || ($usrfieldfourlabel)){
	$displaycenter .= <<"EOT";
<td colspan="2" bgcolor="$color{'catbg'}" class="catbg" align="center"><font size="1" class="smalltext"><b>Private User Information (* indicates required fields)</b><BR>Only you and administrators have access to following information.</font></td>
</tr><tr><td bgcolor="$color{'win'}" class="win"><table width="100%">
EOT
}


if ($usefullname){
	$displaycenter .= <<"EOT";
<TR>
<TD WIDTH="40%" ALIGN="RIGHT"><b>First and Last Names:$isrequired{"fullname"}</b></TD>
<TD COLSPAN="2" valign="top" width="60%"><INPUT TYPE="TEXT" class="textinput" NAME="fullname" SIZE="25" MAXLENGTH="30" VALUE="$addtoID{'fullname'}"></TD>
</TR>
EOT
}

if ($usemailaddress){
	$displaycenter .= <<"EOT";
<TR>
<TD WIDTH="40%" ALIGN="RIGHT"><b>Street Address:$isrequired{"mailaddress"}</b></TD>
<TD COLSPAN="2" valign="top" width="60%"><INPUT TYPE="TEXT" class="textinput" NAME="streetaddress" SIZE="25" MAXLENGTH="30" VALUE="$addtoID{'streetaddress'}"></TD>
</TR>
<TR>
<TD WIDTH="40%" ALIGN="RIGHT"><b>City:$isrequired{"mailaddress"}</b></TD>
<TD COLSPAN="2" valign="top" width="60%"><INPUT TYPE="TEXT" class="textinput" NAME="cityaddress" SIZE="25" MAXLENGTH="30" VALUE="$addtoID{'cityaddress'}"></TD>
</TR>
<TR>
<TD WIDTH="40%" ALIGN="RIGHT"><b>State:$isrequired{"mailaddress"}</b></TD>
<TD COLSPAN="2" valign="top" width="60%"><INPUT TYPE="TEXT" class="textinput" NAME="stateaddress" SIZE="2" MAXLENGTH="2" VALUE="$addtoID{'stateaddress'}"></TD>
</TR>
<TR>
<TD WIDTH="40%" ALIGN="RIGHT"><b>Zip Code:$isrequired{"mailaddress"}</b></TD>
<TD COLSPAN="2" valign="top" width="60%"><INPUT TYPE="TEXT" class="textinput" NAME="zipaddress" SIZE="40"  VALUE="$addtoID{'zipaddress'}"></TD>
</TR>
EOT
}

if ($usrfieldonelabel){
	$displaycenter .= <<"EOT";
<TR>
<TD WIDTH="40%" ALIGN="RIGHT"><b>$usrfieldonelabel:$isrequired{"usrfieldone"}</b></TD>
<TD COLSPAN="2" valign="top" width="60%"><INPUT TYPE="TEXT" class="textinput" NAME="usrfieldone" SIZE="40"  VALUE="$addtoID{'usrfieldone'}"></TD>
</TR>
EOT
}

if ($usrfieldtwolabel){
	$displaycenter .= <<"EOT";
<TR>
<TD WIDTH="40%" ALIGN="RIGHT"><b>$usrfieldtwolabel:$isrequired{"usrfieldtwo"}</b></TD>
<TD COLSPAN="2" valign="top" width="60%"><INPUT TYPE="TEXT" class="textinput" NAME="usrfieldtwo" SIZE="40" VALUE="$addtoID{'usrfieldtwo'}"></TD>
</TR>
EOT
}

if ($usrfieldthreelabel){
	$displaycenter .= <<"EOT";
<TR>
<TD WIDTH="40%" ALIGN="RIGHT"><b>$usrfieldthreelabel:$isrequired{"usrfieldthree"}</b></TD>
<TD COLSPAN="2" valign="top" width="60%"><INPUT TYPE="TEXT" class="textinput" NAME="usrfieldthree" SIZE="40" VALUE="$addtoID{'usrfieldthree'}"></TD>
</TR>
EOT
}

if ($usrfieldfourlabel){
	$displaycenter .= <<"EOT";
<TR>
<TD WIDTH="40%" ALIGN="RIGHT"><b>$usrfieldfourlabel:$isrequired{"usrfieldfour"}</b></TD>
<TD COLSPAN="2" valign="top" width="60%"><INPUT TYPE="TEXT" class="textinput" NAME="usrfieldfour" SIZE="40" MAXLENGTH="30" VALUE="$addtoID{'usrfieldfour'}"></TD>
</TR>
EOT
}

if (($usefullname) || ($usemailaddress) || ($usrfieldonelabel) || ($usrfieldtwolabel) || ($usrfieldthreelabel) || ($usrfieldfourlabel)){
$displaycenter .= "</table></td></tr>";
}
</mod end>


what am i missing?  the code that calls for the user info should be modified to include the extra fields maybe?






Logged Offline
Site Site Private Message Private message Reply: 5 - 7
Justin
December 16, 2006, 3:44pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,075
Gender: Male
Posts Per Day: 6.52
Reputation: 93.40%
Reputation Score: +297 / -21
Time Online: 36 days 23 hours 27 minutes
Location: Tallassee, AL
Age: 22
$memberid{"USERID"}{'VARIABLE_NAME'}


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 6 - 7
thomasinnv
December 16, 2006, 4:12pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 306
Gender: Male
Posts Per Day: 0.38
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 14 days 19 hours 11 minutes
Location: Fernley, NV
Age: 37
hey i figured it out...had to change some code.

part of the original mod code was
Code
VALUE="$userset{$URL{'u'}}->[50]"

but needed to be
Code
VALUE="$memberid{$URL{'u'}}{'userfield'}"

all seems to be working good now, so i will post in a new mod thread shortly.






Logged Offline
Site Site Private Message Private message Reply: 7 - 7
1 Pages 1 Recommend Thread
Print

E-Blah Community    Modifications    Mod Requests and Support  ›  extra registration fields