Delete Avatar Mass?

Hellboy

Member
Joined
Nov 9, 2015
Messages
27
Reaction score
2
Points
41
Does anyone know the query to delete all avatar from all servers?
 

Janmeiser

New Member
Joined
Apr 14, 2017
Messages
5
Reaction score
0
Points
13
[Not Possible] You can only delete your own Avatar!
Code:
clientupdate client_flag_avatar=
don't write anything to it, only blank!
 

Alligatoras

Administrator
Joined
Mar 31, 2016
Messages
2,570
Solutions
12
Reaction score
2,857
Points
381
Actually it is possible!
You can use your query login with the "Yatqa" program.
After you login and choose your server, in the top menu (right side) where it says miscellaneous click on that and then in the "avatars" in the left side menu.
Then choose all the avatars and delete them.
 

Bluscream

Retired Staff
Contributor
Joined
May 8, 2015
Messages
967
Reaction score
934
Points
211
Does anyone know the query to delete all avatar from all servers?
You could just delete all avatar_* files in your files folder in your teamspeak 3 server folder
 

Kieran

Tag me
Contributor
Joined
Jan 1, 2016
Messages
459
Reaction score
286
Points
122
I would say loop through all users and delete the avatar with for example the TeamSpeak Framework for PHP https://docs.planetteamspeak.com/ts3/php/framework/
@Janmeiser I don't think he is that stupid... He probably hosts a few servers and wants to clean up all the avatar files.
Actually it is possible!
You can use your query login with the "Yatqa" program.
...
Then choose all the avatars and delete them.
I think that is only able to delete the avatars from a specific virtual teamspeak server. I might be wrong but if I'm right, @B1uscr34m 's solution would probably be the easiest.
 

Alligatoras

Administrator
Joined
Mar 31, 2016
Messages
2,570
Solutions
12
Reaction score
2,857
Points
381
I would say loop through all users and delete the avatar with for example the TeamSpeak Framework for PHP https://docs.planetteamspeak.com/ts3/php/framework/
@Janmeiser I don't think he is that stupid... He probably hosts a few servers and wants to clean up all the avatar files.

I think that is only able to delete the avatars from a specific virtual teamspeak server. I might be wrong but if I'm right, @B1uscr34m 's solution would probably be the easiest.
What i am saying is exactly that!
But if he has the serveradmin account he can do it by choosing one by one the servers and deleting the avatars
I am pretty sure Bluscream said the same but with another way.
Avatars are saved to a specific folder for each server and it goes like that:
/your/path/teamspeak3-server_linux_amd64/files/
and then you will find folder names like: virtualserver_1 , virtualserver_2 , virtualserver_3
each of these files at the bottom has the following folder: interval
inside the Interval folder there are the files with the users avatars. (Just delete these files)

I am not saying that Bluscream is wrong - he is right too - i just think my own way is faster ;)
 

Kieran

Tag me
Contributor
Joined
Jan 1, 2016
Messages
459
Reaction score
286
Points
122
@Alligatoras Ah okay, I'm not very familiar with the directory structure so I thought all avatars are in the same folder

Yea your way is probably more comfortable to do
 

Hellboy

Member
Joined
Nov 9, 2015
Messages
27
Reaction score
2
Points
41
Sorry, I was away from these days. No need to delete the images, just unlink them in the database by php to stop errors in logs.

da19ee1c7b1d416ba5e91863252f10d9.png
 

Alligatoras

Administrator
Joined
Mar 31, 2016
Messages
2,570
Solutions
12
Reaction score
2,857
Points
381
Sorry, I was away from these days. No need to delete the images, just unlink them in the database by php to stop errors in logs.

da19ee1c7b1d416ba5e91863252f10d9.png
what do you mean by saying "unlink"?

probably one of your clients had an avatar and you deleted it from the server directly. so the database is looking for a file that doesn't exist anymore!
There are two ways to fix that:
  • Your user will set a new avatar so it will updated in the database so it won't search for missing file.
  • Edit the database file - to remove the avatar file name from the client.
 
Top