MyBB Community Forums

Full Version: Avatar URL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey, I've been searching for almost 4 hours trying to figure out how to do this and I've found nothing. 

When I go to usercp > change avatar. There is no option to add an avatar via an external URL. (such as imgur) 

[Image: vLnV9tQ.png]

I purposely removed the option for users to upload avatars as it resulted in some now banned users uploading shells.

I'm simply trying to allow users to add an avatar using a URL but I have no idea how. I assume I need to edit the 'usercp_avatar' template but I'm not sure what line of code to add. Can anybody help me please?

Current 'usercp_avatar template':

<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->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}" />
		</table>

		<br />
		<div align="center">
			<input type="hidden" name="action" value="do_avatar" />
			<input type="submit" class="button" name="submit" value="{$lang->change_avatar}" />
			{$removeavatar}
		</div>
	</td>
</tr>
</table>
</form>
{$footer}
</body>
</html>
Site URL?
(2015-05-12, 09:45 PM)PhantomD Wrote: [ -> ]Site URL?

I'll send you a PM.  Cool
<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->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}" />
<tr>
				<td class="trow2" width="40%">
					<strong>{$lang->avatar_url}</strong>
					<br /><span class="smalltext">{$lang->avatar_url_note}</span>
				</td>
				<td class="trow2" width="60%">
					<input type="text" class="textbox" name="avatarurl" size="45" value="{$avatarurl}" />
					<br /><span class="smalltext">{$lang->avatar_url_gravatar}</span>
				</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}" />
            {$removeavatar}
        </div>
    </td>
</tr>
</table>
</form>
{$footer}
</body>
</html>