I'm trying to make it so that Private Messages are always enabled for every user. (The user can't be allowed to disable them).
I can't comment out the checkbox because then it thinks the user has PM's disabled.
I also still want the user to be able to enable/disable email notifications of PM's and pop-up notifications while browsing.
Any ideas?
The code for the display of the options, can be found in the "modifyoptions" template and looks like this:
Code:
<if condition="$show['pmoptions']">
<fieldset class="fieldset">
<legend><label for="cb_receivepm">$vbphrase[private_messaging]</label></legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0" width="100%">
<tr>
<td>
<phrase 1="private.php?$session[sessionurl]">$vbphrase[features_private_messaging_system]</phrase>
</td>
</tr>
<tr>
<td><label for="cb_receivepm"><input type="checkbox" name="options[receivepm]" value="1" id="cb_receivepm" onclick="toggle_disabled(this.checked, 'pmoptions')" $checked[receivepm] />$vbphrase[enable_private_messaging]</label></td>
</tr>
<tbody id="pmoptions"<if condition="!$bbuserinfo[receivepm]"> disabled="disabled"</if>>
<tr>
<td><br />$vbphrase[can_email_when_sends_you_pm]</td>
</tr>
<tr>
<td><label for="cb_emailonpm"><input type="checkbox" name="options[emailonpm]" value="1" id="cb_emailonpm" $checked[emailonpm] />$vbphrase[receive_email_notification_pm]</label></td>
</tr>
<tr>
<td><br /><br />$vbphrase[browsing_when_receive_pm_popup]</td>
</tr>
<tr>
<td><label for="cb_pmpopup"><input type="checkbox" name="pmpopup" value="1" id="cb_pmpopup" $checked[pmpopup] />$vbphrase[show_pm_popup]</label></td>
</tr>
</tbody>
</table>
</fieldset>
<else />
<input type="hidden" name="options[receivepm]" value="$bbuserinfo[receivepm]" />
<input type="hidden" name="options[emailonpm]" value="$bbuserinfo[emailonpm]" />
<input type="hidden" name="pmpopup" value="$bbuserinfo[pmpopup]" />
</if>