[Tip&Trick] Default Groups Avatar
#1
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.
[Image: sig.gif]

Contact me in private only if you need paid help with mybb-related issues. Otherwise, please don''t, unless I invite you to. Thanks Smile
Reply
#2
I think if you changed your table prefix when you installed your forum, you need to change the prefix in the query too.
XThreads App For MyBB: Link Directory, YouTube Gallery & etc - Full List
My Demo Site
Reply
#3
(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
[Image: sig.gif]

Contact me in private only if you need paid help with mybb-related issues. Otherwise, please don''t, unless I invite you to. Thanks Smile
Reply
#4
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';
[Image: 468x602b.png]
Reply
#5
Sorry if this is a stupid question, but...

Will this also work for new registrations or just for existing members?
Reply
#6
(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.
vBulletin/Wordpress/Magento/MyBB
Developer and Designer
Reply
#7
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
Reply
#8
traduzido para pt-br

http://mybboard.com.br/forum/showthread.php?tid=24

abraços
Reply
#9
Awesome, thanks!
Reply
#10
His link does not work, but is is great, already done it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)