ts3admin.class and names of groups

  • I use ts3admin.class and I have a problem with the group for the user . See the number and would like to have the names of groups that have


    Screen : screenSHU - The fastest screen capture ever.

    Code
    echo '<span class="list-group-item active"><b>Nick : </b><font color="">'.$client ['client_nickname'] . '</font></span>';        
            echo '<span class="list-group-item"><b>Version TeamSpeak: </b>'.$client ['client_version'] . '</span>';
                    echo '<span class="list-group-item"><b>Grups: </b>'.$client ['client_servergroups'] . '</span>';



    My English so Bad :S Plz help me (If the wrong forum I'm sorry)

  • Hello,


    The forum is correct :)


    You have to fetch the server group list first and then echo out the server group name from that array with the server group id.


    It is nor tested but should look similar to that:


    Code
    $result = $ts3->servergrouplist();
    if(true === $result['success']) {
    foreach($result['data'] as $group) {
    $server_group[$group['sgid']] = $group['name'];
    }
    }
    echo '<span class="list-group-item active"><b>Nick : </b><font color="">'.$client ['client_nickname'] . '</font></span>';        
            echo '<span class="list-group-item"><b>Version TeamSpeak: </b>'.$client ['client_version'] . '</span>';
                    echo '<span class="list-group-item"><b>Grups: </b>'.$server_groups[$client ['client_servergroups']] . '</span>';


    Of course the class Object has to be called $ts3 and you have to be logged in to the correct server.


    regards Thomas

  • Screen : screenSHU - The fastest screen capture ever.
    allcode :S


    2 Mal editiert, zuletzt von auxi14 ()

  • <p>I dont know exactly what you want. You want to have all Servergroups from a Client?</p>


  • Dieses Thema enthält 14 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.