Jump to the post that solved this thread.
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 4 Years, 1 Month, 3 Weeks ago Disable Avatar by URL
#1
Solved: 4 Years, 1 Month, 3 Weeks ago
Hello I recently installed avatar gallery plugin and I want my users to pick avatar from these galleries only.
So I make users unable to upload an avatar.
But I can't make them unable to get avatar by url.

What should I do ?
Reply
#2
Solved: 4 Years, 1 Month, 3 Weeks ago
(08-16-2015, 11:54 PM)Darkrad Wrote: So I make users unable to upload an avatar.
But I can't make them unable to get avatar by url.

But they are still also able to upload an avatar from their computer, aren't they? When they choose the gallery avatar in anorher way than through UserCP -> Change Avatar you can delete this option by removing the line below from template usercp_nav_profile:

<div><a href="usercp.php?action=avatar" class="usercp_nav_item usercp_nav_avatar">{$lang->ucp_nav_change_avatar}</a></div>
Regards, Ad Bakker (NL)
Reply
#3
Solved: 4 Years, 1 Month, 3 Weeks ago
[Image: AqLvzz.jpg]

I want to disable or remove this part.
I want to make users pick from gallery. No custom avatar, no avatar from computer, no avatar by URL. Everyone should pick avatar from gallery. No custom avatar.
Reply
#4
Solved: 4 Years, 1 Month, 3 Weeks ago
I expect that the template usercp_avatar_upload has been changed by your plugin. Then you could remove the following lines from your template usercp_avatar:
<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>
Regards, Ad Bakker (NL)
Reply
#5
Solved: 4 Years, 1 Month, 3 Weeks ago
I think it worked, thank you!
Reply
#6
Solved: 4 Years, 1 Month, 3 Weeks ago
It seems I need to remove those parts too.

[Image: mzJ5RR.jpg]

There should not be Custom Avatar tab.
and there should not be that Set as avatar button, when you click it gives that error (invalid URL)
Reply
#7
Solved: 4 Years, 1 Month, 3 Weeks ago
Can you show the template usercp_avatar.
Regards, Ad Bakker (NL)
Reply
#8
Solved: 4 Years, 1 Month, 3 Weeks ago
<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>
{$avatargallery}<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>
{$avatarupload}
<br />
</table>
<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>

I want only administrators&moderators having custom avatar option, users should pick from library.
Currently it works okay.

But still users who can not actually get avatar by URL sees " Custom Avatar" and " Set it as my avatar " button.
When one clicks it says you didnt write any URL.
Reply
#9
Solved: 4 Years, 1 Month, 3 Weeks ago
(08-21-2015, 03:04 PM)Darkrad Wrote: I want only administrators&moderators having custom avatar option, users should pick from library.
Currently it works okay.

But still users who can not actually get avatar by URL sees " Custom Avatar" and " Set it as my avatar " button.
When one clicks it says you didnt write any URL.

Is this not a contradiction. First you say that administrators&moderators should have custom avatar options. Then you want all custom avatar options removed from the template.

When you only want to have the two blocks removed that you indicate in res, remove the line:
<td class="tcat" colspan="2"><strong>{$lang->custom_avatar}</strong></td>

from the template and also the line:
    <input type="submit" class="button" name="submit" value="{$lang->change_avatar}" />


Then these 2 blocks disappear.
Regards, Ad Bakker (NL)
Reply
#10
Solved: 4 Years, 1 Month, 3 Weeks ago
Custom Avatar Options :
No one can get avatar by URL.
Only administrators and moderators can get avatar by uploading it.

It works like this right now but Users - who can not get avatar by both url and upload still can see " Custom Avatar " block that was what I meant in first post.

Now its awesome, thank you!
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)