MyBB Community Forums

Full Version: Default Avatar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Thank you both!

Nethunter - The Default value was set to images/avatar.png but it is still not added to user's profile after sign up. it Just remains blank. I've attached screens to demonstrate.

Thanks again.

~Marc
Your right. Not working. Another idea. In inc/datahandlers/user.php
Find:
"avatar" => $db->escape_string($user['avatar']),
replace with:
"avatar" => 'images/avatar.png',
			"avatardimensions" => '60|60',
                        "avatartype" = 'gallery',

Its an example. Change to the fit you need.

@querschlaeger
considered Wink
Works perfectly. Thanks a ton, Nethunter!

Below is the exact code I used for those that may come across this thread in the future.

			"avatar" => 'images/avatars/avatar.jpg',
			"avatardimensions" => '100|100',
                        "avatartype" => 'gallery', 

Regards,
Marc
You have to change the column to NOT NULL I believe as well. That way it fills in with the default.
(2010-02-19, 01:38 AM)hybrid001 Wrote: [ -> ]Works perfectly. Thanks a ton, Nethunter!

Below is the exact code I used for those that may come across this thread in the future.

			"avatar" => 'images/avatars/avatar.jpg',
			"avatardimensions" => '100|100',
                        "avatartype" => 'gallery', 

Regards,
Marc

wow thanks just copy and paste this and it works Big Grin
I'm sorry if this is against the rules to necro a thread like this but I just had to ask :/ Will that above code just change the default avatar of all current users even the ones with their custom avatars or just the ones with no avatar yet? If it's the first answer, then how can I make it so it just changes for everyone without avatar?

EDIT: Found my answer here: http://community.mybb.com/thread-90299.html
(2010-01-18, 05:56 PM)NetHunter Wrote: [ -> ]Use this query:
UPDATE mybb_users SET avatar = 'images/noavatar.gif' WHERE avatar = '';

Best regards
NetHunter

Current Query
UPDATE mybb_users SET avatar = 'images/default_avatar.png' WHERE avatar = ''
Pages: 1 2