MyBB Community Forums

Full Version: Editing "Change Avatar" page.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to remove Uploading Avatar and just have Avatar URL:?
If not, is it possible to edit the page so that I can inform my users only the specifying an URL will work?
ACP>Templates & Style>Your theme templates>User Control Panel Templates;

Open usercp_avatar template.

Find and remove:

<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>

It would be removed now I guess.
I removed the above, and now my "Change Avatar" button doesn't do anything...
-How do I fix it?
-How do I properly remove Upload Avatar?
The Change Avatar button still does not do anything.
Go to: ACP > Templates > User Control Panel Templates > usercp_avatar > and find;
<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>

and Change it to the following;
<tr>
<td class="tcat" colspan="2"><strong>{$lang->custom_avatar}</strong></td>
</tr>
<tr>
<form enctype="multipart/form-data" action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
</td>
</tr>

It should fix the issue.
The Change Avatar button still does not do anything. Sad
Replace all code from usercp_avaar template with the following;
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->change_avatar}</title>
{$headerinclude}
</head>
<body>
{$header}
<table width="100%" border="0" align="center">
<tr>
{$usercpnav}
<td valign="top">
{$avatar_error}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->change_avatar}</strong></td>
</tr>
<tr>
<td class="trow1" colspan="2">
<table cellspacing="0" cellpadding="0" width="100%"><tr>
<td>{$lang->avatar_note}{$avatarmsg}
</td>
{$currentavatar}
</tr></table>
</td>
</tr>
<tr>
<td class="tcat" colspan="2"><strong>{$lang->local_galleries}</strong></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->gallery}</strong></td>
<td class="trow2">
<form method="post" action="usercp.php">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="hidden" name="action" value="avatar" />
<select name="gallery">
{$galleries}
</select>
&nbsp;{$gobutton}
</form>
</td>
</tr>
<tr>
<td class="tcat" colspan="2"><strong>{$lang->custom_avatar}</strong></td>
</tr>
<form enctype="multipart/form-data" action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
</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>
</table>
<br />
<div align="center">
<input type="hidden" name="action" value="do_avatar" />
<input type="submit" class="button" name="submit" value="{$lang->change_avatar}" />
<input type="submit" class="button" name="remove" value="{$lang->remove_avatar}" />
</div>
</td>
</tr>
</table>
</form>
{$footer}
</body>
</html>