Advertisement:
NameCheap

Author Topic: How to modify registration page & defaults?  (Read 3395 times)

Offline starbock

  • Semi-Newbie
  • *
  • Posts: 11
How to modify registration page & defaults?
« 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!

Offline Eudemon

  • Sr. Member
  • ****
  • Posts: 802
  • An Anime Fan
    • KumaKuni
Re: How to modify registration page & defaults?
« Reply #1 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
Code: [Select]
<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
Code: [Select]
<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>
« Last Edit: February 20, 2012, 10:21:06 PM by Eudemon »

Offline starbock

  • Semi-Newbie
  • *
  • Posts: 11
Re: How to modify registration page & defaults?
« Reply #2 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!

Offline Eudemon

  • Sr. Member
  • ****
  • Posts: 802
  • An Anime Fan
    • KumaKuni
Re: How to modify registration page & defaults?
« Reply #3 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

Offline JimM

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,977
  • Gender: Male
    • Southern Spirit Hunters
Re: How to modify registration page & defaults?
« Reply #4 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.
Jim "JimM" Moore
Former Support Specialist
jimm@simplemachines.org

Please do not PM me for support!                   
Installing SMF
Upgrade SMF
Manual Installation of Mods

Offline starbock

  • Semi-Newbie
  • *
  • Posts: 11
Re: How to modify registration page & defaults?
« Reply #5 on: February 22, 2012, 10:14:23 PM »
Thanks for the pointers, Jim!  Will definitely check out that thread.