MyBB Community Forums

Full Version: How do I set the "Show E-mail" to not show by default? - How to Remove Registration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Problem 1(UNSOLVED)


I would like to make the email addresses not show by default while using the "Create User" function in the Admin Control Panel.

I've been looking around for it for a while and still can't find how to do that.
[Image: attachment.php?aid=23357]


I have already found how to make registering users have the check-box automatically checked but that won't fix the issue for me when I'm going to be creating all the users manually through the Admin CP.

Is it possible to default to hide emails from that functionality?




Problem 2(Solved by Harest)


Also, does anyone know how to remove these links?
(See Image)
[Image: attachment.php?aid=23353]

numero uno:
If you create a new user you have to add an email adress. Else you will get an error. Just hiding the field wouldn't solve that issue.
To be honest i don't even know if it is possible to make a plugin without changing the core files.
But if you don't mind changing the core files, i could take a look at it.

numero due:
Admin CP -> Templates & Style -> Templates -> Header Templates -> header_welcomeblock_guest

Replace:
<script type="text/javascript">
<!--
	lang.username = "{$lang->login_username}";
	lang.password = "{$lang->login_password}";
	lang.login = "{$lang->login}";
	lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
	lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
	lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
		<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin(); return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span>
with:
<script type="text/javascript">
<!--
	lang.username = "{$lang->login_username}";
	lang.password = "{$lang->login_password}";
	lang.login = "{$lang->login}";
	lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
	lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
		<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin(); return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span>


For the second one you have to post the following template:
Admin CP -> Templates & Style -> Templates -> Member Templates -> member_login
(2011-07-12, 06:02 PM)Harest Wrote: [ -> ]For the second one you have to post the following template:
Admin CP -> Templates & Style -> Templates -> Member Templates -> member_login

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->login}</title>
{$headerinclude}
</head>
<body>
{$header}
<br />
{$inline_errors}
{$member_loggedin_notice}
<form action="member.php" method="post">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->username}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" size="25" maxlength="{$mybb->settings['maxnamelength']}" style="width: 200px;" value="{$username}" /></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->password}</strong><br /><span class="smalltext">{$lang->pw_note}</span></td>
<td class="trow2"><input type="password" class="textbox" name="password" size="25" style="width: 200px;" value="{$password}" /> (<a href="member.php?action=lostpw">{$lang->lostpw_note}</a>)</td>
</tr>
<tr>
<td class="trow1" colspan="2" align="center"><label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" checked="checked" value="yes" /> {$lang->remember_me}</label></td>
</tr>
{$captcha}
</table>
<br />
<div align="center"><input type="submit" class="button" name="submit" value="{$lang->login}" /></div>
<input type="hidden" name="action" value="do_login" />
<input type="hidden" name="url" value="{$redirect_url}" />
</form>
{$footer}
</body>
</html>

(2011-07-12, 06:02 PM)Harest Wrote: [ -> ]numero uno:
If you create a new user you have to add an email adress. Else you will get an error. Just hiding the field wouldn't solve that issue.
To be honest i don't even know if it is possible to make a plugin without changing the core files.
But if you don't mind changing the core files, i could take a look at it.

numero due:
Admin CP -> Templates & Style -> Templates -> Header Templates -> header_welcomeblock_guest

Replace:
<script type="text/javascript">
<!--
	lang.username = "{$lang->login_username}";
	lang.password = "{$lang->login_password}";
	lang.login = "{$lang->login}";
	lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
	lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";
	lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
		<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin(); return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span>
with:
<script type="text/javascript">
<!--
	lang.username = "{$lang->login_username}";
	lang.password = "{$lang->login_password}";
	lang.login = "{$lang->login}";
	lang.lost_password = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=lostpw\">{$lang->lost_password}<\/a>";
	lang.remember_me = "{$lang->remember_me}";
// -->
</script>
<span style="float: right;">{$lang->welcome_current_time}</span>
		<span id="quick_login">{$lang->welcome_guest} (<a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="MyBB.quickLogin(); return false;">{$lang->welcome_login}</a> &mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>)</span>

To be honest, I already edited the header_welcomeblock_guest and removed the following;
&mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>

If you remove the;
lang.register_url = " &mdash; <a href=\"{$mybb->settings['bburl']}/member.php?action=register\">{$lang->welcome_register}<\/a>";

from the top it gives you an "undefined" error when trying to login.

Try this in the header_welcomeblock_guest template:
<!--&mdash; <a href="{$mybb->settings['bburl']}/member.php?action=register">{$lang->welcome_register}</a>-->

Regarding the other issue: what site is the second picture from?
Okay, so, thanks to you I realized what I was doing wrong. Instead of deleting the line and getting the undefined error, I changed that line to
lang.register_url = "";
This got rid of the "Undefined" error I kept getting.

This doesn't get rid of the second link, but I assume that is in the code you had me pull down for you.

The second register link is from when you're logged out, guests don't have access to view forums so it shows a login box.
(2011-07-12, 06:02 PM)Harest Wrote: [ -> ]numero uno:
If you create a new user you have to add an email adress. Else you will get an error. Just hiding the field wouldn't solve that issue.
To be honest i don't even know if it is possible to make a plugin without changing the core files.
But if you don't mind changing the core files, i could take a look at it.

For this one I think you misunderstand what I meant. I have the emails I want to input, and I don't want to leave them blank.
There is an option for users to "Hide" their email from other users on the forum as a profile feature. I want to user the Admin CP to make all the users, and set them to "hide" their emails from other users as a default.

Otherwise I have to go in and change each one to "hide" their email manually for every user I create.
(2011-07-12, 06:20 PM)Kmurphy Wrote: [ -> ]This doesn't get rid of the second link, but I assume that is in the code you had me pull down for you.

The second register link is from when you're logged out, guests don't have access to view forums so it shows a login box.

Yeah, it was the wrong template.

Edit "... -> Error Message Templates -> error_nopermission" to:

{$lang->error_nopermission_guest_1}
<ol>
<li>{$lang->error_nopermission_guest_2}</li>
<li>{$lang->error_nopermission_guest_3}</li>
<li>{$lang->error_nopermission_guest_4}</li>
<li>{$lang->error_nopermission_guest_5}</li>
</ol>
<form action="member.php" method="post">
<input type="hidden" name="action" value="do_login" />
<input type="hidden" name="url" value="{$url}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><span class="smalltext"><strong>{$lang->login}</strong></span></td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->username}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" tabindex="1" /></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->password}</strong></td>
<td class="trow2"><input type="password" class="textbox" name="password" tabindex="2" /></td>
</tr>
<tr>
<td class="trow2" colspan="2"><span class="smalltext" style="float:right; padding-top:3px;"><a href="member.php?action=lostpw">{$lang->forgot_password}</a>&nbsp;</span>&nbsp;<input type="submit" class="button" value="{$lang->login}" tabindex="3" /></td>
</tr>
</table>
</form>
<br />

or just delete the following part:
<a href="member.php?action=register">{$lang->need_reg}</a> |
(2011-07-12, 06:29 PM)Harest Wrote: [ -> ]or just delete the following part:
<a href="member.php?action=register">{$lang->need_reg}</a> |
HeartThank you. That solves my link problem!
Kein Problem Wink
Now there is just my first problem remaining.
(2011-07-12, 06:38 PM)Harest Wrote: [ -> ]Kein Problem Wink

Haha, thanks. If I ever decide to revert back to using the registration I only have to revert those 2 files back to their original.