2008-02-23, 04:14 PM
I'd like to be able to control the default user settings that are shown at registration. For example, I would like the "Email Notification" box to be checked by default.
$this->verify_yesno_option($options, 'emailnotify', 'no');
The last column ('no') is the default option, so you can change it to 'yes' to make it on by default.ZiNgA BuRgA Wrote:You can do so by editing /inc/datahandlers/user.php
Find:
The last column ('no') is the default option, so you can change it to 'yes' to make it on by default.$this->verify_yesno_option($options, 'emailnotify', 'no');
function verify_options()
{
$options = &$this->data['options'];
// Verify yes/no options.
$this->verify_yesno_option($options, 'allownotices', 'yes');
$this->verify_yesno_option($options, 'hideemail', 'no');
$this->verify_yesno_option($options, 'emailnotify', 'yes');
$this->verify_yesno_option($options, 'emailpmnotify', 'yes');
$this->verify_yesno_option($options, 'receivepms', 'yes');
$this->verify_yesno_option($options, 'pmpopup', 'yes');
$this->verify_yesno_option($options, 'pmnotify', 'yes');
$this->verify_yesno_option($options, 'invisible', 'no');
$this->verify_yesno_option($options, 'remember', 'yes');
$this->verify_yesno_option($options, 'dst', 'no');
$this->verify_yesno_option($options, 'showsigs', 'yes');
$this->verify_yesno_option($options, 'showavatars', 'yes');
$this->verify_yesno_option($options, 'showquickreply', 'yes');
$this->verify_yesno_option($options, 'showredirect', 'yes');
if(isset($options['showcodebuttons']))
{$emailnotifycheck}
And replace with: checked="checked"
ZiNgA BuRgA Wrote:The above will not change the checkboxes on the registration page - they will merely set a default value if none is supplied to the userhandler.
If you want to make the checkbox checked by default, go to your AdminCP -> Templates -> Modify -> <expand your templateset> -> Member Templates -> member_register
Find:
And replace with:{$emailnotifycheck}
checked="checked"
(note that this will have a slight side effect if the user fails to register, but nothing drastic)