MyBB Community Forums

Full Version: Remove Invisible mode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is there a way i can remove invisible mode for members only?
What we can do is to remove the code from the User CP. For that reason in Admin CP > Templates > Modify / Delete > Expand > User control panel templates > usercp_options

Find and remove
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="invisible" id="invisible" value="yes" {$invisiblecheck} /></td>
<td><span class="smalltext"><label for="invisible">{$lang->invisible_mode}</label></span></td>
</tr>
What if we need to remove these kinds of options during registration?

Answered my own question. That would be in the Member templates -> member_register
judel Wrote:What if we need to remove these kinds of options during registration?

All the things you see in Edit option under user cp can be found in this particular template




judel Wrote:What if we need to remove these kinds of options during registration?

Then you have to edit member_register template.
thanks! Updated the same time you posted! LOL
LOL I can see from the timingToungue 04:50 AM. don't edit it anymore. Wink Toungue
LMAO! Sorry! Toungue I just kept finding the answers to my own questions! But this is a useful thread! It has bothered me that the member can select a few of those, and I thought I couldn't do anything about it! Guess I should have known better! Big Grin

But I think I ran into a snag! For instance, if we go with Dragonlord's original question, to take away the ability for the user to make themselves invisible...let's say you want it always set to invisible, but if you take this out of the template, it will default to always off. How can we, as the admin, make that switch always on?
Well we can do something based on a custom permission
in usercp.php

Find
eval("\$editprofile = \"".$templates->get("usercp_options")."\";");
above it add
	if($mybb->user['usergroup'] == 3 || $mybb->user['usergroup'] == 4)
	{
		$invmode = "<tr>
<td valign=\"top\" width=\"1\"><input type=\"checkbox\" class=\"checkbox\" name=\"invisible\" id=\"invisible\" value=\"yes\" {$invisiblecheck} /></td>
<td><span class=\"smalltext\"><label for=\"invisible\">{$lang->invisible_mode}</label></span></td>
</tr>";
	}
Now instead of removing the code mentioned above from usercp_options template which is
<tr>
<td valign="top" width="1"><input type="checkbox" class="checkbox" name="invisible" id="invisible" value="yes" {$invisiblecheck} /></td>
<td><span class="smalltext"><label for="invisible">{$lang->invisible_mode}</label></span></td>
</tr>

We replace it with
{$invmode}

And you can give permission by altering this IF statement above.
Hmm...that is an interesting bit of code, but I think I didn't make it clear what I actually was looking for! Toungue Let's say I want all members to be invisible when they register, but I don't want to give them the option to be able turn it off or on themselves.
Oh well ... you only need one more thing then, which is done during registration

open member.php

find
"invisible" => $mybb->input['invisible'],
replace with
"invisible" => "yes",

And ofcourse you apply the previous codes to restrain them from change it later.
Pages: 1 2