Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Aiheen aloitti: PLAYBOY - lokakuu 20, 2011, 05:20:51 IP

Otsikko: Drop all avatars of a membergroup
Kirjoitti: PLAYBOY - lokakuu 20, 2011, 05:20:51 IP
Can anybody make a mod which will put an option/setting to take down a specific membergroups avatar?

Right now you can prevent people putting avatars. But you cant take down current avatars of a membergroup. I need this option very much. I would appreciate any help.
Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: Matthew K. - lokakuu 20, 2011, 05:43:22 IP
Run this query, replacing 1 with the group id.
UPDATE `smf_members`SET `avatar` = '' WHERE `id_group` = 1
Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: PLAYBOY - lokakuu 20, 2011, 08:21:52 IP
I ran this query with the group = 0

Because i want all the regular members to be effected.
It said "218 rows affected. ( Query took 0.0213 sec )"

But Everybody still have their avatars.

What did i do wrong?
Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: Matthew K. - lokakuu 20, 2011, 08:22:56 IP
Try this...
UPDATE `smf_members`SET `avatar` = '' WHERE `id_group` != 1
Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: PLAYBOY - lokakuu 20, 2011, 08:26:33 IP
When i query UPDATE `smf_members`SET `avatar` = '' WHERE `id_group` = 0
It said "218 rows affected. ( Query took 0.0213 sec )"

But all the avatars are still there. So what did i change with that query?




Is the "0" for all the regular members?
Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: Kays - lokakuu 20, 2011, 08:28:46 IP
I just posted a solution in your other topic which doesn't involve altering the database.
Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: PLAYBOY - lokakuu 21, 2011, 02:45:55 AP
What is the membergroup number for all regular members?
Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: live627 - lokakuu 21, 2011, 02:56:56 AP
0
Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: PLAYBOY - lokakuu 21, 2011, 03:05:11 AP
So i was right.
Well then what did i change with this query?
UPDATE `smf_members`SET `avatar` = '' WHERE `id_group` = 0




Will this one drop all the avatars without any problem for sure?
Lainaus käyttäjältä: Labradoodle-360 - lokakuu 20, 2011, 08:22:56 IP
Try this...
UPDATE `smf_members`SET `avatar` = '' WHERE `id_group` != 1


Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: Kays - lokakuu 21, 2011, 08:08:33 AP
The avatar in the members table only holds the avatar name if it's from an avatar set or a remote avatar. For other avatars, the attachments table is queried.

So that won't clear all of the avatars.
Otsikko: Re: Drop all avatars of a membergroup
Kirjoitti: PLAYBOY - lokakuu 24, 2011, 03:31:54 AP
So there is no way to drop all members avatars???
Can one of the top experts help me out on this please?