MyBB Community Forums

Full Version: Stop members from disabling private messages?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

How can I stop members from disabling private messages on my forum?
I send out all of my announcements on my forum this way.


Thank you!
Go to your ACP -> Themes & Templates -> Templates -> YOUR THEME ->User control Panel Templates -> usercp_options

Find this line:
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="receivepms" id="receivepms" value="1" {$receivepmscheck} /></td>
<td><span class="smalltext"><label for="receivepms">{$lang->receive_pms}</label></span></td>
</tr>

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

Nobody will be able to see this option, so no one can Disable/Enable it Big Grin It is by Defauld enabled, that means USERS can Receive messages.

Enjoy Wink
ACP -> Templates and styles -> templates -> <your template theme set> -> User control panel template -> usercp_options template and remove

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

This will disable "receive pm" checkbox in UserCP.

For users who have unchecked that option run this query

UPDATE `mybb_users` SET `receivepms` = 'yes'

Nobody will be able to see this option, so no one can Disable/Enable it  It is by Defauld enabled, that means USERS can Receive messages.

Technically it's still there but it's only hidden, anybody with sufficient html knowledge and browser with dev tools (firebug, element inspector, dragonfly) can remove style="display:none;" from tr tag and check / uncheck that checkbox.
Removing it is not actually a good idea. Maybe somehow the VALUE gets to '0' then what? Since you haven't specified any value for recievepms.

Better to hide it.
thanks so much!
You are welcome dude Wink