Found a way to set the default user preferences checkboxes in registration template
Hi Community,
been searching for a way to select which ckeckboxes are to be checked by default in the registration page.
Found that most threads in the community had no effective answer. 
Some of them talk about a plugin called Registration Checkboxes  Which is supposed to work but there's not a stable release, so i didnt try it.
As MyBB 2.0 has been seen now in the horizon i guess there will be no more development of that plugin.
So i found my way to set the default status i want for the checkboxes of my registration page. 
It basically forces the value of the checkbox in the template itself of the registration page (there was one solution for this issue exposed in 1.6 support boards which don't work -at least- for 1.8, however the way i fixed this is very similar)
The process would be:
  1. Locate the template
    ACP → Styles & Templates → Templates → [your_template] → Member Templates → member_register
  2. Locate the table that shows the checkboxes, wich comes after 
  3. After that code you will find several
    <input type="checkbox" class="checkbox" name="allownotices" id="allownotices" value="1" {$allownoticescheck} /> Note the bolded text will be different for each of the checkboxes
  4.  Then you have to remove the text between brackets and put in its place the attribute "checked" in case you want the checkbox checked or just leave it blank for not checked.
  5.  Then would look like this:
    A) Checked example<input type="checkbox" class="checkbox" name="hideemail" id="hideemail" value="1" checked />B) Unckecked example<input type="checkbox" class="checkbox" name="hideemail" id="hideemail" value="1"/>
  6. Done!
Hope it helps someone!

Moved to Tutorials

Please do not PM me for support. I am looking to be hired for paid services.

You can view my paid services here.
Good tutorial!  Worked in 1.8...thanks!
MyBB 1.8.33 (x2) &

Forum Jump:

Users browsing this thread: 1 Guest(s)