Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: starbock on February 20, 2012, 04:53:32 PM

Title: How to modify registration page & defaults?
Post by: starbock on February 20, 2012, 04:53:32 PM
I would like to modify the registration page and the defaults (in specific, I want to make the "allow users to email me" checkbox checked by default).  I've enabled the Advanced Profile Fields, but that doesn't help me in this case nore does it allow me to modify the actual registration page (e.g., to change the order of the questions asked during registration).  How do I accomplish these customization tasks?  Thanks!
Title: Re: How to modify registration page & defaults?
Post by: Eudemon on February 20, 2012, 04:56:29 PM
this is the file for registration page
Themes/default/Register.template.php

to make "allow users to email me" checked
find
<dt><strong><label for="allow_email">', $txt['allow_user_email'], ':</label></strong></dt>
<dd>
<input type="checkbox" name="allow_email" id="allow_email" tabindex="', $context['tabindex']++, '" class="input_check" />
</dd>

in that file, change to
<dt><strong><label for="allow_email">', $txt['allow_user_email'], ':</label></strong></dt>
<dd>
<input type="checkbox" name="allow_email" id="allow_email" tabindex="', $context['tabindex']++, '" class="input_check" checked="checked" />
</dd>
Title: Re: How to modify registration page & defaults?
Post by: starbock on February 20, 2012, 09:56:33 PM
Many thanks Eudemon!  That pointed me in the right direction to take care of the default "allow users to email me" checkbox.  I used checked="checked" vs. check="checked" to get it to work, and that did the trick.  Also, for other newbies out there, I am using a theme other than default, so I had to find this file in my specific theme and changed the setting there (or do it in all themes if you want the same behavior in all themes).

Now...how to get date of birth added to the page...other than editing the Register.template.php file to add the field, is there a better/easier way?  The advanced profile fields adds gender to the display list but none of the other many (more useful) fields...

Thanks again!
Title: Re: How to modify registration page & defaults?
Post by: Eudemon on February 20, 2012, 10:22:47 PM
yeah, the expression is checked="checked"
i wrote it out of my head so i made a mistake, thanks for pointing it out

and no problem!
glad i can help
Title: Re: How to modify registration page & defaults?
Post by: JimM on February 22, 2012, 09:12:36 PM
Welcome to SMF starbock.

You might find what you are looking for in this topic.

http://www.simplemachines.org/community/index.php?topic=351983.20

Of course that is assuming you are using SMF 2.0.  It's always best to state in your request for support what version you are running/asking about.
Title: Re: How to modify registration page & defaults?
Post by: starbock on February 22, 2012, 10:14:23 PM
Thanks for the pointers, Jim!  Will definitely check out that thread.