Forum

Results 1 to 13 of 13
  1. #1
    Join Date
    April 2012
    Location
    Germany
    Posts
    24

    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
    January 2010
    Location
    Germany
    Posts
    2,029
    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
    April 2012
    Location
    Germany
    Posts
    24
    It means there is no way the recode this randomly Value?...
    Maybe a developer can say something? ^^

  4. #4
    Join Date
    January 2010
    Location
    Germany
    Posts
    2,029
    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
    April 2012
    Location
    Germany
    Posts
    24
    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
    January 2010
    Location
    Germany
    Posts
    2,029
    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
    June 2008
    Posts
    18,394
    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; May 15th, 2012 at 11:08 AM.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  8. #8
    Join Date
    April 2012
    Location
    Germany
    Posts
    24
    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: 1011
Size:  9.1 KB
    Thanks for help!
    need it for PHP

  9. #9
    Join Date
    January 2010
    Location
    Germany
    Posts
    2,029
    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
    April 2012
    Location
    Germany
    Posts
    24
    Thanks a lot!!!

    EDIT:
    When will the avatars reloaded?....
    Last edited by X-Ray; May 15th, 2012 at 09:05 PM.

  11. #11
    Join Date
    June 2008
    Posts
    18,394
    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
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  12. #12
    Join Date
    September 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
    January 2010
    Location
    Germany
    Posts
    2,029
    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 [EN/DE]
    Replies: 2
    Last Post: August 2nd, 2010, 02:34 PM
  2. Set database filename to use?
    By Plasma in forum Server Support
    Replies: 6
    Last Post: February 21st, 2010, 02:38 AM
  3. Avatars DatabaseID vs Filename relation
    By fng.lambik in forum Server Support
    Replies: 2
    Last Post: January 3rd, 2010, 03:08 PM
  4. [Bug] Identity import/export filename extension
    By nobleclem in forum Bug Reports [EN/DE]
    Replies: 1
    Last Post: December 20th, 2009, 08:20 PM
  5. Replies: 1
    Last Post: December 20th, 2009, 08:20 PM

Posting Permissions

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