YaBB Community and Support Forum
YaBB Home About YaBB Download YaBB YaBB Support Customize Your Forum Development Contribute to the Project
  Welcome, Guest. Please Login or Register


 
Page Index Toggle Pages: 1
Topic Tools
 
Adding Extended Profile fields 'locks' Members (Read 2,849 times)
 Dec 28th, 2011 at 7:22pm
There are no actions to perform.  

JonB 
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 3,623
Land of the Blazing Sun!


None
Adding Extended Profile fields 'locks' Members
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.
 
IP Logged  
 Reply #1 - Aug 8th, 2012 at 11:09pm
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,859
Earth


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
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 »  
WWW  
IP Logged  
 Reply #2 - Aug 9th, 2012 at 12:47am
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
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...
 
 
IP Logged  
 Reply #3 - Aug 9th, 2012 at 12:57am
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,859
Earth


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
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 »  
WWW  
IP Logged  
 Reply #4 - Aug 9th, 2012 at 1:29am
There are no actions to perform.  

Derek Barnstorm 
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline
Posts: 1,269
United Kingdom


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
Okay, great. Smiley
 
 
IP Logged  
 Reply #5 - Aug 9th, 2012 at 2:37am
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,859
Earth


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
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.
 
WWW  
IP Logged  
 Reply #6 - Aug 9th, 2012 at 3:31pm
There are no actions to perform.  

JonB 
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 3,623
Land of the Blazing Sun!


None
Re: Adding Extended Profile fields 'locks' Members
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.
 
IP Logged  
 Reply #7 - Aug 9th, 2012 at 6:30pm
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,859
Earth


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
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
 
WWW  
IP Logged  
 Reply #8 - Aug 10th, 2012 at 1:45am
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,859
Earth


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
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?
 
WWW  
IP Logged  
 Reply #9 - Aug 10th, 2012 at 2:12am
There are no actions to perform.  

westwegoman 
Ex Member
*


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
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 | 90 )
yabbext_profile.jpg
Never use both feet to test the depth of the water
 
IP Logged  
 Reply #10 - Aug 10th, 2012 at 2:34am
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,859
Earth


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
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 »  
WWW  
IP Logged  
 Reply #11 - Nov 6th, 2012 at 9:33pm
There are no actions to perform.  

Dandello 
Global Moderator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline
Posts: 1,859
Earth


YaBB 2.5
Re: Adding Extended Profile fields 'locks' Members
This Topic was moved here from YaBB 2 - Bugs [Need Verification] by Dandello.
 
WWW  
IP Logged  
Page Index Toggle Pages: 1
Topic Tools
 

Get Yet another Bulletin Board at SourceForge.net. Fast, secure and Free Open Source software downloads Support This Project BoardMod - YaBB features and templates YaBB Codex - support on installation and usage YaBB Toolbar for your browser

YaBB Facebook Group Page

Vulnerability Scanner

Valid RSS Valid XHTML Valid CSS Powered by Perl
YaBB Chat and Support Community » Powered by YaBB 3.0 Beta!
YaBB Forum Software © 2000-2011. All Rights Reserved.