Default User Avatar
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #1
Default User Avatar
When we create a user through ACP, that user is assigned with default avatar which is in .gif format only from the admin/styles/default/images/default_avatar.gif

Can we change this to .png? I tried by just uploading .png as some people said. But it didnt accepted the .png format.

Now, how can we make the acp assign default_avatar.png when we create new user and which file controls the assining of avatar?
11-24-2010 04:56 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: Default User Avatar
(11-24-2010 04:56 AM)1master1 Wrote:  When we create a user through ACP, that user is assigned with default avatar which is in .gif format only from the admin/styles/default/images/default_avatar.gif

Can we change this to .png? I tried by just uploading .png as some people said. But it didnt accepted the .png format.

Now, how can we make the acp assign default_avatar.png when we create new user and which file controls the assining of avatar?

You can find it in ADMIN_DIR/modules/user/users.php file.

But personally, I prefer to "rename" default_avatar.png to default_avatar.gif for this, and replace the old default_avatar.gif (maybe clearing cache needed for this).

11-24-2010 06:14 AM
Find all posts by this user Quote this message in a reply
Skiilz Offline
Member
***
Posts: 198
Joined: Nov 2010
Post: #3
RE: Default User Avatar
You could use the Default Avatar plugin http://community.mybb.com/thread-75735-page-1.html (apply the leefish changes)  or this MySQL query http://community.mybb.com/thread-58756-page-1.html

[Image: 468x602b.png]
11-24-2010 06:43 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Default User Avatar
Oh... I thought he asked about the default avatar in Admin CP only.
Sorry for that misunderstanding.

11-24-2010 06:55 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #5
RE: Default User Avatar
Yes RateU, I nearly gave the same answer as Skillz and then decided he was meaning via ACP as well...lets see what 1master1 has to say Smile

/Lee puts a dollar on RateU Tongue


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 11-24-2010 07:41 AM by leefish.)
11-24-2010 07:40 AM
Visit this user's website Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #6
RE: Default User Avatar
i did as rateu said. i changed the format to default_avatar.gif from the original default_avatar.png.

Well, before that i executed this query to set all users to default_avatar.png

Code:
UPDATE `mybb_users` SET `avatar` = '(link to avatar)' 


Everything is fine but unfortunately the avatar size in memberslist is huge than the original size we defined. This is the line of code for avatar size in memberslist.php

Code:
<img src="{$user['avatar']}" alt="" {$avatar_width_height} /> 


Now, if there any query to set the avatar size for those images in memberlist?

11-24-2010 10:02 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Online
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #7
RE: Default User Avatar
(11-24-2010 10:02 PM)1master1 Wrote:  Now, if there any query to set the avatar size for those images in memberlist?
Please try to use some intuition to figure that out by yourself. (hint, look at the structure of the users table)

My Blog
11-25-2010 08:48 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #8
RE: Default User Avatar
Smile Done
11-25-2010 10:24 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: