MyBB Community Forums
[howto] Disable default avatar gallery - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.4 (https://community.mybb.com/forum-80.html)
+------ Forum: MyBB 1.4 General Support (https://community.mybb.com/forum-81.html)
+------ Thread: [howto] Disable default avatar gallery (/thread-42032.html)



[howto] Disable default avatar gallery - xendex - 2008-12-15

How can I disable Default avatar gallery, so that users could only use their own(uploaded) avatars('cause I'm going to use Jfusion integration and their login module doesn't work with default avatars).
P.S. I know I can just remove all the Default avatars, so that users just wouldn't be able to use them, but if there's more rational way to do this...
P.S. Sorry if threre already is such an option in ACP and I missed it(really, I've searched everywhereRolleyes)

Thanks in advance!


RE: [howto] Disable default avatar gallery - Matt - 2008-12-15

IIRC if you just delete the folder from your file manager, they go... ./images/avatars/, delete this folder and the gallery will go.


RE: [howto] Disable default avatar gallery - xendex - 2008-12-15

If I delete .../images/avatars/ folder, then option to choose avatar from the default gallery will still exist, but clicking on it will lead to usercp.php error([function.opendir] failure).
So dont'n mind - I was just wondering if there was such an option by default, but I'll just delete all images from /avatars folder, thereby solving this question.
Anyway thank for reply


RE: [howto] Disable default avatar gallery - Matt - 2008-12-15

That only happens if they click Go, so if you remove that bit from the templates, they won't be able to click it Smile

Or, try this: ACP > Configuration > User Registration and Profile Options > Avatar Directory > blank this out, and see what happens then.


RE: [howto] Disable default avatar gallery - xendex - 2008-12-15

Well, if blank Avatar Directory field, it just make avatar gallery empty(as if I delete all default avatars).
But thanks for the tip with template modify(I wonder why I didn't came to such idea by myselfBlush). So I just deleted a "piece" of code(containing part with Avatar gallery) from usercp_avatar file and now I got what I wanted!

So great thanks to you!
P.S. If anyone will ever be interested in solution of this question, I show a part of the code that has to be deleted(or commented out) from usercp_avatar file of your template - you can find it in ACP->Templates & Style->Templates->Your template(the code below is for default template)->User Control Panel Templates->usercp_avatar.
<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>



RE: [howto] Disable default avatar gallery - rajeshjm - 2009-01-18

Thank you friend the information is very useful.

In my case i need to remove the uploading avatar to the server

I removed this code its working fine for me now

as xendex mentioned

you can find it in ACP->Templates & Style->Templates->Your template(the code below is for default template)->User Control Panel Templates->usercp_avatar.

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