2007-03-06, 11:34 AM
Pages: 1 2
2007-03-06, 12:08 PM
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
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>
2007-03-06, 06:04 PM
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
Answered my own question. That would be in the Member templates -> member_register
2007-03-06, 06:50 PM
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.
2007-03-06, 06:51 PM
thanks! Updated the same time you posted! LOL
2007-03-06, 07:04 PM
LOL I can see from the timing 04:50 AM. don't edit it anymore.
2007-03-06, 07:29 PM
LMAO! Sorry! 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!
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?
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?
2007-03-06, 07:46 PM
Well we can do something based on a custom permission
in usercp.php
Find
We replace it with
And you can give permission by altering this IF statement above.
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.
2007-03-06, 09:40 PM
Hmm...that is an interesting bit of code, but I think I didn't make it clear what I actually was looking for! 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.
2007-03-06, 09:59 PM
Oh well ... you only need one more thing then, which is done during registration
open member.php
find
And ofcourse you apply the previous codes to restrain them from change it later.
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