Default Avatar
- Stoker
- Site Admin
- Posts: 3536
- Joined: 12 May 2008, 23:26
- BBCodes: 239
- Favourite BBCode: Anipro
- Favourite MOD: PrettyPhoto
- Location: Denmark
- Contact:
Default Avatar
Board rules! No PM support
Re: Default Avatar
Nice one !
-
- I have been banned!
- Posts: 26
- Joined: 29 Apr 2010, 10:38
- Location: Poland
Re: Default Avatar
1. We have chosen an avatar upload to any directory on your server. I suggest that you upload it to the folder in which there are other avatars: /images/avatars/gallery/
2. For this avatar should be access via the link http://www.twojeforum.pl/images/avatars ... avatar.png (of course replace the underlined name of the proper name for our server, and file an avatar
3. Open the file includes/functions_user.php and change the default values:
on
By changing the correct path to the avatar. Remember to include the default size of an avatar. In this case it is 128×128th If your avatar is a different size, enter the correct aspect ratio.
Changing the default avatar on existing users
If you want to set the default avatar of all those who do not have an avatar in general need to perform such a SQL query
By changing the correct path to the avatar. Remember to include the default size of an avatar. In this case it is 128×128th If your avatar is a different size, enter the correct aspect ratio.
This method works "one time" - if the user removes the avatar from the profile it will not show him anything. So it is not forced upon anyone that does not want to have as an avatar is a must use "the default avatar.
///sorry for my bad english
2. For this avatar should be access via the link http://www.twojeforum.pl/images/avatars ... avatar.png (of course replace the underlined name of the proper name for our server, and file an avatar
3. Open the file includes/functions_user.php and change the default values:
Code: Select all
'user_avatar' =>'',
'user_avatar_type' => 0,
'user_avatar_width' => 0,
'user_avatar_height' => 0,
Code: Select all
'user_avatar' => 'http://www.twojeforum.pl/images/avatars/gallery/avatar.png',
'user_avatar_type' => 2,
'user_avatar_width' => 128,
'user_avatar_height' => 128,
Changing the default avatar on existing users
If you want to set the default avatar of all those who do not have an avatar in general need to perform such a SQL query
Code: Select all
UPDATE `phpbb_users` SET `user_avatar` = 'http://www.twojeforum.pl/images/avatars/gallery/avatar.png',
`user_avatar_type` = '2',
`user_avatar_width` = '128',
`user_avatar_height` = '128'
WHERE `user_avatar` = '' ;
This method works "one time" - if the user removes the avatar from the profile it will not show him anything. So it is not forced upon anyone that does not want to have as an avatar is a must use "the default avatar.
///sorry for my bad english
Click Here!
Re: Default Avatar
that is a lot of steps, where as the first post is easier, simpler, and no sql statements!
-
- I have been banned!
- Posts: 26
- Joined: 29 Apr 2010, 10:38
- Location: Poland
Re: Default Avatar
But I just wrote a another way of how you can make a default avatar... You do not need to scream...
Click Here!
Re: Default Avatar
[profile]Stoker[/profile], what's the difference between v1 & v2, i want to chose your version; ¿what you recommend me?Stoker » 06 Apr 2010, 14:23 wrote:Default Avatar
Written by blkjack-21 and Stoker
This snippet will give users a default avatar. Off course only if they haven't chosen one in UCP
First version by blkjack-21 will display the default avatar everywhere on the board, the second version by Stoker will only display default avatar on viewtopic. [...]
[hrc=red]2[/hrc]
what do you mean with "every where on the board" ? Do you mean down at "who's on line" at index??
Last edited by Georgio on 26 May 2010, 20:17, edited 1 time in total.
Re: Default Avatar
it's up to you which one you want, it depends on which one you feel comfortable with, read the description it tells you the difference between the two!
Re: Default Avatar
first one worked better for me
second one didnt work
when i used both the name of user was misplaced then i removed second one thanks
second one didnt work
when i used both the name of user was misplaced then i removed second one thanks
Re: Default Avatar
don't know if you lot are aware or not, but the second ways find does not work in the latest version of phpBB3, instead you need to instead find:
as posted here: http://www.phpbb.com/community/viewtopi ... #p11276755
Code: Select all
if (empty($avatar) || !$avatar_type || (!$config['allow_avatar'] && !$ignore_config))
{
return '';
}