MyBB Community Forums
[How To?] Auto Select Receive PM's when registering. - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [How To?] Auto Select Receive PM's when registering. (/thread-225570.html)



Auto Select Receive PM's when registering. - steveuk12345 - 2019-12-02

Hi,

I have changed the default membership options so that when a new user registers on my forum, they are not greeted with a massive long reg form with unnecessary options.

In the original format, the reg form was not responsive and was too wide on mobile.  It did not allow the user to select any options, leading to confusion and low subscriber takeup.  Therefore I shortened the options (by removing them) to fit 1 page on a small mobile and I am happy with the results.

However, I would like newly registered users to have the ability to receive PMs AUTO Selected.  I recall previously this was a checkbox option which I have removed.

Note : I don't want the checkbox.  I want it to be auto selected.

My forum : https://www.stevejabbaforum.com (if that is necessary).

Thanks very much in advance.

Steve


RE: Auto Select Receive PM's when registering. - NoRules - 2019-12-02

Hi,

in your member_register template, must be something like this (or maybe it's missing):
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="receivepms" id="receivepms" value="1" {$receivepmscheck} /></td>

<td valign="top"><span class="smalltext"><label for="receivepms">{$lang->receive_pms}</label></span></td>


You'll have to change it to:

<td valign="top" width="1" style="display: none;"><input type="checkbox" class="checkbox" name="receivepms" id="receivepms" value="1" {$receivepmscheck} /></td>
<td valign="top" style="display: none;"><span class="smalltext"><label for="receivepms">{$lang->receive_pms}</label></span></td>


And it's done, PMs auto selected and option hidden.


RE: Auto Select Receive PM's when registering. - Ashley1 - 2019-12-02

^^ It's not necessary to do this because the OP stated that he removed these options already.

Since PMs are already auto selected it is not clear what the OP wants.


RE: Auto Select Receive PM's when registering. - steveuk12345 - 2019-12-03

(2019-12-02, 08:24 PM)Ashley1 Wrote: ^^ It's not necessary to do this because the OP stated that he removed these options already.

Since PMs are already auto selected it is not clear what the OP wants.
I stated I removed the options because the form was unwieldy, unresponsive on mobile and not fit for purpose.
Obviously I was not aware this would turn off PMs.  That was implicit in what I originally wrote.
The poster above you has grasped the problem.

(2019-12-02, 07:19 PM)NoRules Wrote: Hi,

in your member_register template, must be something like this (or maybe it's missing):
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="receivepms" id="receivepms" value="1" {$receivepmscheck} /></td>

<td valign="top"><span class="smalltext"><label for="receivepms">{$lang->receive_pms}</label></span></td>


You'll have to change it to:

<td valign="top" width="1" style="display: none;"><input type="checkbox" class="checkbox" name="receivepms" id="receivepms" value="1" {$receivepmscheck} /></td>
<td valign="top" style="display: none;"><span class="smalltext"><label for="receivepms">{$lang->receive_pms}</label></span></td>


And it's done, PMs auto selected and option hidden.
Thanks very much man, appreciate it.


RE: Auto Select Receive PM's when registering. - steveuk12345 - 2019-12-12

Norules, I have just done this and it worked perfectly.  Thanks so much.

The problem now is I have quite a few users who registered after I shortened the form, but before I added your code one moment ago...

Is there any way of re-adding PM's as default for users who are currently members but do NOT have PM's enabled?

Thanks again!


RE: Auto Select Receive PM's when registering. - Crazycat - 2019-12-12

Answered you in your new thread