MyBB Community Forums

Full Version: Removing custom avatar option
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone,

I have searched to no avail. How can I remove the option for users to upload their own avatars? I just want them to be able to choose from the selection of avatars that I make available.
acp user and groups usergroup untick can upload avatar
(2009-09-15, 07:27 PM)Andii S. Wrote: [ -> ]acp user and groups usergroup untick can upload avatar

Thank you!

However, that option still leaves the box there for the user to try to upload an avatar. People are bound to be confused. How can I remove the Custom Avatar Upload area entirely from the User CP?
Try removing...

<tr>
<td class="tcat" colspan="2"><strong>{$lang->custom_avatar}</strong></td>
</tr>
<tr>
<td class="trow1" width="40%"><strong>{$lang->avatar_upload}</strong></td>
<td class="trow1" width="60%">
<form enctype="multipart/form-data" action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="file" name="avatarupload" size="25" class="fileupload" />
{$auto_resize}
</td>
</tr>
<tr>
<td class="trow2" width="40%"><strong>{$lang->avatar_url}</strong></td>
<td class="trow2" width="60%"><input type="text" class="textbox" name="avatarurl" size="45" value="{$avatarurl}" /></td>
</tr>

... from the usercp_avatar template.
usercp_avatar template remove:
<tr>
<td class="tcat" colspan="2"><strong>{$lang->custom_avatar}</strong></td>
</tr>
<tr>
<td class="trow1" width="40%"><strong>{$lang->avatar_upload}</strong></td>
<td class="trow1" width="60%">
<form enctype="multipart/form-data" action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="file" name="avatarupload" size="25" class="fileupload" />
{$auto_resize}
</td>
</tr>
<tr>
<td class="trow2" width="40%"><strong>{$lang->avatar_url}</strong></td>
<td class="trow2" width="60%"><input type="text" class="textbox" name="avatarurl" size="45" value="{$avatarurl}" /></td>
</tr>

usercp_changeavatar template remove:
<tr>
<td align="center" class="trow1" width="1%"><input type="radio" class="radio" name="avatar" value="url"{$checked['url']} /></td>
<td class="trow1" width="40%"><strong>{$lang->avatar_url}</strong><br /><span class="smalltext">{$lang->avatar_url_note}</span></td>
<td class="trow1" width="55%"><input type="text" class="textbox" name="avatarurl" size="25" maxlength="100" value="{$avatarurl}" /></td>
</tr>
<tr>
<td align="center" class="trow2" width="1%"><input type="radio" class="radio" name="avatar" value="upload"{$checked['upload']} /></td>
<td class="trow2" width="40%"><strong>{$lang->avatar_upload}</strong><br /><span class="smalltext">{$lang->avatar_upload_note}</span></td>
<td class="trow2" width="55%"><input type="file" name="avatarupload" size="25" value="" class="fileupload" />{$uploadedmsg}</td>
</tr>

edit: matt was faster Toungue
Thanks, will try later and report back.
THANK YOU BOTH, the code works perfect! Big Grin