MyBB Community Forums

Full Version: Hide options
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How do you hide options in the usercp, and the signup page, but it will be checked still. I just don't want them to uncheck it...
You can remove them from your templates.

Go to ACP>Templates & Styles>Templates>YOUR THEME>Member Templates>Member_register

Find and Remove:

<fieldset class="trow2">

<legend><strong>{$lang->account_prefs}</strong></legend>
<table cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="allownotices" id="allownotices" value="1" {$allownoticescheck} /></td>
<td valign="top"><span class="smalltext"><label for="allownotices">{$lang->allow_notices}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="hideemail" id="hideemail" value="1" {$hideemailcheck} /></td>
<td valign="top"><span class="smalltext"><label for="hideemail">{$lang->hide_email}</label></span></td>
</tr>
<tr>
<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>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="pmnotice" id="pmnotice" value="1"{$pmnoticecheck} /></td>
<td valign="top"><span class="smalltext"><label for="pmnotice">{$lang->pm_notice}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="emailpmnotify" id="emailpmnotify" value="1" {$emailpmnotifycheck} /></td>
<td valign="top"><span class="smalltext"><label for="emailpmnotify">{$lang->email_notify_newpm}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="invisible" id="invisible" value="1" {$invisiblecheck} /></td>
<td valign="top"><span class="smalltext"><label for="invisible">{$lang->invisible_mode}</label></span></td>
</tr>
<tr>
<td colspan="2"><span class="smalltext"><label for="subscriptionmethod">{$lang->subscription_method}</label></span></td>
</tr>
<tr>
<td colspan="2">
	<select name="subscriptionmethod" id="subscriptionmethod">
		<option value="0" {$no_subscribe_selected}>{$lang->no_auto_subscribe}</option>
		<option value="1" {$no_email_subscribe_selected}>{$lang->no_email_subscribe}</option>
		<option value="2" {$instant_email_subscribe_selected}>{$lang->instant_email_subscribe}</option>
	</select>
</td>
</tr>
</table>
</fieldset>

Then go to ACP>Templates & Styles>Templates>YOUR THEME>UserCP Templates>Usercp_Options

Find and Remove:

<fieldset class="trow2">
<legend><strong>{$lang->messaging_notification}</strong></legend>
<table cellspacing="0" cellpadding="2">
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="allownotices" id="allownotices" value="1" {$allownoticescheck} /></td>
<td><span class="smalltext"><label for="allownotices">{$lang->allow_notices}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="hideemail" id="hideemail" value="1" {$hideemailcheck} /></td>
<td><span class="smalltext"><label for="hideemail">{$lang->allow_emails}</label></span></td>
</tr>
<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>
{$pms_from_buddys}
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="pmnotice" id="pmnotice" value="1"{$pmnoticecheck} /></td>
<td><span class="smalltext"><label for="pmnotice">{$lang->pm_notice}</label></span></td>
</tr>
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="pmnotify" id="pmnotify" value="1" {$pmnotifycheck} /></td>
<td><span class="smalltext"><label for="pmnotify">{$lang->pm_notify}</label></span></td>
</tr>
<tr>
<td colspan="2"><span class="smalltext"><label for="subscriptionmethod">{$lang->subscription_method}</label></span></td>
</tr>
<tr>
<td colspan="2">
	<select name="subscriptionmethod" id="subscriptionmethod">
		<option value="0" {$no_subscribe_selected}>{$lang->no_auto_subscribe}</option>
		<option value="1" {$no_email_subscribe_selected}>{$lang->no_email_subscribe}</option>
		<option value="2" {$instant_email_subscribe_selected}>{$lang->instant_email_subscribe}</option>
	</select>
</td>
</tr>

</table>
</fieldset>

The above will remove the options which can be seen in the screenshot below.

[Image: 4G9DJ.png]
Would it uncheck the options?
Nope. Those options would be removed from display/public view.
Last time I did that, it unchecked the options...
It's impossible because the solution I provided removes those options and not uncheck them.
(2013-10-08, 03:17 AM)Arbaz Wrote: [ -> ]It's impossible because the solution I provided removes those options and not uncheck them.

Ok, I'll try it then...
MYBB GHOST Wrote:Ok, I'll try it then...

Wait, I thought you did already, didn't you?

Quote:Last time I did that, it unchecked the options...

Anyways, the solution I provided will remove those options from public view.

Good Luck!
(2013-10-08, 04:00 AM)Arbaz Wrote: [ -> ]
MYBB GHOST Wrote:Ok, I'll try it then...

Wait, I thought you did already, didn't you?

Quote:Last time I did that, it unchecked the options...

Anyways, the solution I provided will remove those options from public view.

Good Luck!

Yea I did, and I had to go through every member to recheck all of those through the acp, but I'll try again your way...

Edit:
I just tried it, and went to the acp, and everything was unchecked again, is there a code that can hide it, like it will be in the back ground?
Change the type attribute of the HTML to hidden, and set the value attribute to whatever you want.

Eg:

<input type="hidden" class="checkbox" name="hideemail" id="hideemail" value="1" {$hideemailcheck} /> This will HIDE the member's email.
<input type="hidden" class="checkbox" name="hideemail" id="hideemail" value="0" {$hideemailcheck} /> This will SHOW the member's email.
Pages: 1 2