Preset and lock 'account preferences' ?
akm Offline
Member
***
Posts: 115
Joined: Nov 2011
Post: #6
RE: Preset and lock 'account preferences' ?
(03-04-2012 07:34 AM)RateU Wrote:  On the reg form, maybe you can "combine" a dummy fields (disabled) and a hidden fields (unless you don't want to display the fields on the form) by editing the member_register template. Set it checked or not, depends on your default settings. And maybe you need to override the input value if you're not sure whether a user can bypass it or not in member.php
Example:
In the scr above, I've checked the 'Hide your email from other members' setting (by default, it is unchecked), and not allowing user to change the value. And I'm not allowing a user to change the 'Receive emails from Administrators' setting.
You can use the similar method for the UserCP.
I'm sorry if I misunderstand what you mean.

Thanks much for the direction !

Preset checkbox/s @ member.php
(add "checked=\"checked\""; to all that want checked)...

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 if(!$fromreg)
		{
			$allownoticescheck = "checked=\"checked\"";
			// $hideemailcheck = '';
			$hideemailcheck = "checked=\"checked\"";
			$emailnotifycheck = '';
			$receivepmscheck = "checked=\"checked\"";
			$pmnoticecheck = " checked=\"checked\"";
			$emailpmnotifycheck = '';
			$invisiblecheck = '';
			if($mybb->settings['dstcorrection'] == 1)
			{
				$enabledstcheck = "checked=\"checked\"";
			}
			
		} 


...and disabled at Edit Template: member_register (after figured out the disabled="disabled" code)...

Code:
 <td valign="top" width="0">
<input type="checkbox" class="checkbox" disabled="disabled" name="allownotices" id="allownotices" value="0" {$allownoticescheck} /></td>
<td valign="top"><span class="smalltext"><label for="allownotices">{$lang->allow_notices}</label></span></td></tr> 


That seems to do it.
Does that seem right ?


Thanks again for your help !
(This post was last modified: 03-04-2012 01:53 PM by akm.)
03-04-2012 01:52 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Preset and lock 'account preferences' ? - akm - 03-04-2012 01:52 PM

 Standard Tools
Forum Jump: