News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to modify registration page & defaults?

Started by starbock, February 20, 2012, 04:53:32 PM

Previous topic - Next topic

starbock

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!

Eudemon

#1
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>

starbock

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!

Eudemon

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

JimM

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.
Jim "JimM" Moore
Former Support Specialist

starbock

Thanks for the pointers, Jim!  Will definitely check out that thread.

Advertisement: