Page Index Toggle Pages: 1
Topic Tools
Hot Topic (More than 10 Replies) Adding Extended Profile fields 'locks' Members (Read 3,430 times)
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,270
Location: Earth

YaBB 2.6.0
Re: Adding Extended Profile fields 'locks' Members
Reply #11 - Nov 6th, 2012 at 9:33pm
Post Tools
This Topic was moved here from YaBB 2 - Bugs [Need Verification] [move by] Dandello.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,270
Location: Earth

YaBB 2.6.0
Re: Adding Extended Profile fields 'locks' Members
Reply #10 - Aug 10th, 2012 at 2:34am
Post Tools
Something's odd going on with my 'basic' install. Got to do more investigating. Thanks

Edited:
Okay, here's what I came up with. When the Date field option is used and set to Required on Registration, it fails. It doesn't accept the input either from the Registration form or in Profile, no matter if it's set to Admin or user editable. All the other input options appear to work properly. Date does work properly when set to Optional/show on Registration. Note that my test installs are 2.5
« Last Edit: Aug 10th, 2012 at 3:58am by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
westwegoman
Ex Member
**




None
Re: Adding Extended Profile fields 'locks' Members
Reply #9 - Aug 10th, 2012 at 2:12am
Post Tools
I just tried it with 2 required fields and both worked. Both fields also show up in the profile of the new user.
« Last Edit: Aug 10th, 2012 at 2:19am by WestwegoMan »  

yabbext_profile.jpg ( 54 KB | 89 Downloads )
yabbext_profile.jpg
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,270
Location: Earth

YaBB 2.6.0
Re: Adding Extended Profile fields 'locks' Members
Reply #8 - Aug 10th, 2012 at 1:45am
Post Tools
BTW, has anybody else noticed that when you have 2 'required for registration' fields, the second one doesn't get its input saved so stops the registration process?
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,270
Location: Earth

YaBB 2.6.0
Re: Adding Extended Profile fields 'locks' Members
Reply #7 - Aug 9th, 2012 at 6:30pm
Post Tools
I've tested in on 2.5. But based on my reading of the code, it should work with 2.4 as well. Of course, testing is always good.  Cheesy
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,818
Location: Land of the Blazing Sun!

YaBB 2.6.0
Re: Adding Extended Profile fields 'locks' Members
Reply #6 - Aug 9th, 2012 at 3:31pm
Post Tools
* JonB raises hand - <== BUG!

Just for clarification -
Which versions has this been tested on?  2.4 & 2.5??

Thanks
Cool
« Last Edit: Aug 9th, 2012 at 3:32pm by JonB »  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,270
Location: Earth

YaBB 2.6.0
Re: Adding Extended Profile fields 'locks' Members
Reply #5 - Aug 9th, 2012 at 2:37am
Post Tools
To clarify for everybody else:
In /Sources/ExtendedProfiles.pl find:
Code
Select All
		if ($field{'required_on_reg'} == 1 && $newprofile{'ext_'.$id} eq "") { $output .= $field{'name'}.": ".$lang_ext{'required'}."<br />\n"; }
 


and replace it with:
Code
Select All
		if ($field{'required_on_reg'} == 1 && $newprofile{'ext_'.$id} eq "" && $action eq "register2") { $output .= $field{'name'}.": ".$lang_ext{'required'}."<br />\n"; }
 



This makes the 'Required at Registration/Admin edit only' only required at Registration but still Admin edit only.
  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Adding Extended Profile fields 'locks' Members
Reply #4 - Aug 9th, 2012 at 1:29am
Post Tools
Okay, great. Smiley
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,270
Location: Earth

YaBB 2.6.0
Re: Adding Extended Profile fields 'locks' Members
Reply #3 - Aug 9th, 2012 at 12:57am
Post Tools
That should work too.  Grin

I just checked it and it works - the additional fields are written to .vars as empty.
« Last Edit: Aug 9th, 2012 at 1:18am by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Adding Extended Profile fields 'locks' Members
Reply #2 - Aug 9th, 2012 at 12:47am
Post Tools
Instead of adding a 'word filler', you could just check the 'action' to see if it is on the register page, and only throw the error if it's on the register page and not the profile page.

Add the highlighted to the original line you posted:

Code (Perl)
Select All
        if ($field{'required_on_reg'} == 1 && $newprofile{'ext_'.$id} eq "" && $action eq "register2") { $output .= $field{'name'}.": ".$lang_ext{'required'}."<br />\n"; } 


I have only tested that very quickly though...
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,270
Location: Earth

YaBB 2.6.0
Re: Adding Extended Profile fields 'locks' Members
Reply #1 - Aug 8th, 2012 at 11:09pm
Post Tools
Can I cook or can I cook?
In ExtendedProfiles.pl find:
Code
Select All
		if (!defined $newprofile{'ext_'.$id} || $field{'active'} == 0) { $newprofile{'ext_'.$id} = $value; }
 


Add after:
Code
Select All
		if ($field{'required_on_reg'} == 1 && $newprofile{'ext_'.$id} eq "" && $field{'editable_by_user'} == 0) { $newprofile{'ext_'.$id} = 'Filler'; }
 



This of course assumes the field was supposed to have text in it. What it does is check and see if the settings are for required/Admin edit and if the field is empty, simply puts in the word filler.
Has not been tested with field requirements like number only or date.
Edited:
And yes, it works.
« Last Edit: Aug 8th, 2012 at 11:14pm by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 3,818
Location: Land of the Blazing Sun!

YaBB 2.6.0
Adding Extended Profile fields 'locks' Members
Dec 28th, 2011 at 7:22pm
Post Tools
Adding a  'new' required for registration field to the registration process locks the profiles of pre-existing members.

this topic -
http://www.yabbforum.com/community/YaBB.pl?num=1320402825/18

verified in topic by JonB and Derek B

Cool
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Topic Tools
 
  « Board Index ‹ Board  ^Top