Community Forums Today's Posts     Member List     Archive    
Results 1 to 13 of 13
  1. #1
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    17

    Question Teamspeak 3 Avatar - How accures the filename?

    Hay together,

    i'm german and so my english is not good
    I want to know how the filename of the Avatars on the servers accures.
    The path of the files is /files/internal/avatar_
    But how the alphanumeric key will generated?

    Thanks for help

    Gr33tz

    X-Ray

  2. #2
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    2,042
    I'd suspect it's some random Hash of some randomly generated Value.
    The Hash Part of the Filename is also stored in the Database for each client, which would not be necessary if it would be a hash / value that was generated from the UniqueID for example.

  3. #3
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    17
    It means there is no way the recode this randomly Value?...
    Maybe a developer can say something? ^^

  4. #4
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    2,042
    Quote Originally Posted by X-Ray View Post
    It means there is no way the recode this randomly Value?...
    Since I suspect it's something random I'd guess not.
    Why would you want to do something like that anyway?

  5. #5
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    17
    Quote Originally Posted by SilentStorm View Post
    Since I suspect it's something random I'd guess not.
    Why would you want to do something like that anyway?
    I want to add automaticly the userpictures from our clanpage to the users avatar

  6. #6
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    2,042
    Never actually tested this but you can most likely just use any name, large pseudo random strings just have a lower chance of being a duplicate from an already generated filename.
    You will need to enter them into the Database of course, and I'm afraid it most likely won't show right away, as from my experience TS3 rarely queries the database directly, and might not know the user got an avatar without it being set through the Client. Thus it might only show after the Server was restarted.

    As I said: Never actually tested this, NO Guarantees whatsoever! You should definately backup your Database before playing around with it and only modify the Database without the server running!

  7. #7
    Join Date
    Jun 2008
    Posts
    7,775
    The hash is generated from clients UID (Public and Private key) and the filename for users avatar will be always the same on every server (as long he does use the same Identity).

    edit This thread explaines how such a file is generated and you could use this, to find the avatar files on your server.
    http://forum.teamspeak.com/showthrea...589#post277589
    Last edited by dante696; 15-05-2012 at 10:08.
    ---------------------------------------------------------
    Please don't send me private messages with support questions as long I or someone else from Teamspeak Staff asked for it.
    Seriously > They belong into the forum and maybe other users have these questions/problems too.


    TeamSpeak FAQ || What should i report, when i open a client thread? || Report and upload your Crashdump here
    NPL License (Registration)

  8. #8
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    17
    Is there not an easier way to link a picture with an user... :/

    EDIT:
    Can someone help me? Used the link but i think the base16 works not
    Name:  2012-05-15_1835_001.png
Views: 352
Size:  9.1 KB
    Thanks for help!
    need it for PHP

  9. #9
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    2,042
    PHP Code:
    function ts3_base16($str) {
            
    $convert = array('a''b''c''d''e''f''g''h''i''j''k''l''m''n''o''p');

            
    $ret '';
            for (
    $i 0$i 20$i++) {
                    
    $ch ord(substr($str$i1));

                    
    $ret .= $convert[($ch 0xF0) >> 4];
                    
    $ret .= $convert[$ch 0x0F];
            }
            return 
    $ret;
    }

    // Testing
    $uid = (isset($_GET['uid']) && !empty($_GET['uid'])) ? $_GET['uid'] : '';
    if (!empty(
    $uid)) {
            echo 
    ts3_base16(base64_decode($uid));


  10. #10
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    17
    Thanks a lot!!!

    EDIT:
    When will the avatars reloaded?....
    Last edited by X-Ray; 15-05-2012 at 20:05.

  11. #11
    Join Date
    Jun 2008
    Posts
    7,775
    This how to is no good idea! You better let the user change the avatar for himself! Or backup your database!!!!!!!!!!!!!!!!!!!!!!!!!

    Nobody has ever tried to replace the avatar file directly on the machine.
    I have tried to change the avatar directly and found that way.


    The Avatar does not change, as long you do 1 step and the target user the second step.

    Your step: Open the server Database and edit users avatar MD5 value

    You can find it under
    table client_properties > ident client_flag_avatar > value (This field contains the MD5hash from that avatar)

    There are several tools, that can be found to generate the MD5 hash from the new file.

    Users step:
    He needs to connect/reconnect to the server
    ---------------------------------------------------------
    Please don't send me private messages with support questions as long I or someone else from Teamspeak Staff asked for it.
    Seriously > They belong into the forum and maybe other users have these questions/problems too.


    TeamSpeak FAQ || What should i report, when i open a client thread? || Report and upload your Crashdump here
    NPL License (Registration)

  12. #12
    Join Date
    Sep 2009
    Location
    Champaign, IL USA
    Posts
    15
    Perhaps I've just naive when it comes to production-class database usage, but why in the world would you make a database table where each key/value pair for each user is it's own row? That kind of defeats the purpose of columns. I suppose maybe it helps with efficiency though, so you don't necessarily have to pull whole records just to search through them for one piece of data. Still it seems very un-intuitive.

    I went looking for tables with column names relating to avatars, and of course couldn't find anything, until I came across this thread.

  13. #13
    Join Date
    Jan 2010
    Location
    Germany
    Posts
    2,042
    It is by far better and easier to have a Table with two columns which you don't ever need to change while you can still just add / remove Properties whenever you like. having a column for each possible Flag and then just rows for each client is stupid, slower on updating / selecting, not to mention making the whole table useless since you could just add all those columns to the clients table instead.
    It is also common practice doing it this way.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Avatar: can't delete local avatar copy
    By DaleB in forum Bug Reports
    Replies: 2
    Last Post: 02-08-2010, 13:34
  2. Set database filename to use?
    By Plasma in forum Server Support
    Replies: 6
    Last Post: 21-02-2010, 01:38
  3. Avatars DatabaseID vs Filename relation
    By fng.lambik in forum Server Support
    Replies: 2
    Last Post: 03-01-2010, 14:08
  4. [Bug] Identity import/export filename extension
    By nobleclem in forum Bug Reports
    Replies: 1
    Last Post: 20-12-2009, 19:20
  5. [Bug] Identity import/export filename extension
    By nobleclem in forum Mac OS X
    Replies: 1
    Last Post: 20-12-2009, 19:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •