MyBB Community Forums

Full Version: [Tip&Trick] Default Groups Avatar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I came up with this solution on a request made at my forum:

http://www.forumsecurity.eu/showthread.php?tid=82

Go to the phpmyadmin at the cp of your host and then at the db where your forum resides on. Make a backup copy of your mybb_users table and then run the following query at the SQL tab.

UPDATE mybb_users SET avatar = 'images/avatars/image.gif',  avatartype = 'gallery', avatardimensions = '100|100' WHERE usergroup = '4'; 

This will set a default avatar for all the members in the admin group. To do it for other groups, you can add more of Set avatar..... Where usergroups.... statements separated by commas, or run the query individualy by replacing the usergroup = '4' with the other group id''s that you want to hook them with up a default avatar.
I think if you changed your table prefix when you installed your forum, you need to change the prefix in the query too.
(2009-12-07, 10:01 PM)RateU Wrote: [ -> ]I think if you changed your table prefix when you installed your forum, you need to change the prefix in the query too.

Indeed. Thanks for the reminder Smile
I used this query and it worked like a charm.
But I updated some things that I didn't need:
mybb_users SET avatar = 'images/banned.png',  avatartype = 'gallery' WHERE usergroup = '7';
Sorry if this is a stupid question, but...

Will this also work for new registrations or just for existing members?
(2009-12-08, 02:31 AM)AJS Wrote: [ -> ]Sorry if this is a stupid question, but...

Will this also work for new registrations or just for existing members?

There is no stupid question Wink, this is for Existing Members and for existing group members.
will this replace the avatar of those who already have one?
If yes, how to disallow this?

Thanks for the tip. Just tried it Smile
Awesome, thanks!
His link does not work, but is is great, already done it
Pages: 1 2