Forum

Page 51 of 100 FirstFirst ... 41495051525361 ... LastLast
Results 751 to 765 of 1495
  1. #751
    Join Date
    February 2013
    Posts
    47
    sorry, this is the error

    Code:
    [25-Oct-2013 13:48:23 Europe/Berlin] PHP Fatal error:  Uncaught exception 'TeamSpeak3_Adapter_ServerQuery_Exception' with message 'missing required parameter' in E:\xampp\htdocs\libraries\TeamSpeak3\Adapter\ServerQuery\Reply.php:319
    Stack trace:
    #0 E:\xampp\htdocs\libraries\TeamSpeak3\Adapter\ServerQuery\Reply.php(91): TeamSpeak3_Adapter_ServerQuery_Reply->fetchError(Object(TeamSpeak3_Helper_String))
    #1 E:\xampp\htdocs\libraries\TeamSpeak3\Adapter\ServerQuery.php(141): TeamSpeak3_Adapter_ServerQuery_Reply->__construct(Array, 'channelcreate c...', Object(TeamSpeak3_Node_Host), true)
    #2 E:\xampp\htdocs\libraries\TeamSpeak3\Node\Abstract.php(73): TeamSpeak3_Adapter_ServerQuery->request('channelcreate c...', true)
    #3 E:\xampp\htdocs\libraries\TeamSpeak3\Node\Server.php(90): TeamSpeak3_Node_Abstract->request('channelcreate c...', true)
    #4 E:\xampp\htdocs\libraries\TeamSpeak3\Node\Abstract.php(97): TeamSpeak3_Node_Server->request('channelcreate c...')
    #5 E:\xampp\htdocs\libraries\TeamSpeak3\Node\Server.php(137): TeamSpeak3_Node_Abstract->execute('channelcreate', Array) in E:\xampp\htdocs\libraries\TeamSpeak3\Adapter\ServerQuery\Reply.php on line 319
    I downloaded the new php framework, decompressed, and replaced! but does not work!


    I think the problem is if you do not fill all the fields I receive that error. how can I fix?

    Code:
    <?php
    error_reporting(E_ALL); 
    ini_set( 'display_errors','1');
    
    require_once("libraries/TeamSpeak3/TeamSpeak3.php");
    
    $ts3_VirtualServer = TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=9987&nickname=Channel_Bot");
    
    $nome_canale         = $_POST['ncanale'];
    $desc_canale         = $_POST['dcanale'];
    $pass_canale         = $_POST['pcanale'];
    $nome_subcanalep     = $_POST['subcanalep'];
    $nome_subcanales     = $_POST['subcanales'];
    
    
    // create a top-level channel and get its ID
    $top_cid = $ts3_VirtualServer->channelCreate(array(
      "channel_name"           => "$nome_canale",
      "channel_topic"          => "$desc_canale",
      "channel_codec"          => TeamSpeak3::CODEC_SPEEX_ULTRAWIDEBAND,
      "channel_codec_quality"  => 0x08,
      "channel_flag_permanent" => TRUE,
      "channel_password" => "$pass_canale",
    ));
    // create a sub-level channel and get its ID
    $sub_cid = $ts3_VirtualServer->channelCreate(array(
      "channel_name"           => "$nome_subcanalep",
      "channel_topic"          => "First Sub-channel $nome_canale",
      "channel_codec"          => TeamSpeak3::CODEC_SPEEX_ULTRAWIDEBAND,
      "channel_flag_permanent" => TRUE,
      "channel_password"       => "$pass_canale",
      "cpid"                   => $top_cid,
    ));
    // create a sub-level channel and get its ID
    $sub_cid = $ts3_VirtualServer->channelCreate(array(
      "channel_name"           => "$nome_subcanales",
      "channel_topic"          => "Second Sub-channel $nome_canale",
      "channel_codec"          => TeamSpeak3::CODEC_SPEEX_ULTRAWIDEBAND,
      "channel_flag_permanent" => TRUE,
      "channel_password"       => "$pass_canale",
      "cpid"                   => $top_cid,
    ));
    
    $token = $ts3_VirtualServer->channelGroupGetByName('Channel Admin')->privilegeKeyCreate($top_cid, 'Token auto');
    
    // $key is a TeamSpeak3_Helper_String object, let's print it
    echo $token;
    
       ?>
    Last edited by Death_Balgor; October 25th, 2013 at 05:13 PM.

  2. #752
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,522
    Maybe you're passing an empty value for channel_name.

  3. #753
    Join Date
    February 2013
    Posts
    47
    Quote Originally Posted by ScP View Post
    Maybe you're passing an empty value for channel_name.
    Code:
    <form action='create.php' method='POST' class='form-container'>
          <div class='form-title'>Nome Canale</div>
          <input class='form-field' type='text' name='ncanale' required/><br />
          <div class='form-title'>Descrizione Canale</div>
          <input class='form-field' type='text' name='dcanale' /><br />
          <div class='form-title'>Password</div>
          <input class='form-field' type='password' name='pcanale' required/><br />
          <div class='form-title'>I Sub-Canale</div>
          <input class='form-field' type='text' name='subcanalep' /><br />
          <div class='form-title'>II Sub-Canale</div>
          <input class='form-field' type='text' name='subcanales' /><br />
          
          <div class='submit-container'>
          <input class='submit-button' type='submit' value='Submit' />
    no, when the fields are empty sub-channel

  4. #754
    Join Date
    July 2006
    Posts
    1,600
    The html form itself isn't meaningful at all. You could have made a typo in the backend or anything else and we could sit all day looking at your form.

  5. #755
    Join Date
    January 2010
    Location
    Germany
    Posts
    252
    is it possible to get the client locale (e.g. en_US, de_CH) with the framework ?

  6. #756
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    As far as I remember, no.

  7. #757
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    Hey ScP!

    Another bug to quick correct.

    At TeamSpeak3_Node_Server, iconUpload().

    My website allows people to upload icons to their channel and sometimes I noticed icon hashes are negative (check that big red warning -> http://php.net/manual/en/function.crc32.php).

    Although I already had it implemented to check if an icon existed, I never remembered that the framework it self didn't have.
    Thus when uploading icons, some of them would have negative hash values and the ts3 server wouldn't recognize them.

    This only affects 32bit systems, but the patch doesn't interfere with 64bits.

    The very simple fix, as explained by php.net, is below:

    PHP Code:
    public function iconUpload($data)
      {
        
    $crc   crc32($data); // replace with sprintf('%u', crc32($data));
        
    $size strlen($data);

        
    $upload   $this->transferInitUpload(rand(0x00000xFFFF), 0"/icon_" $crc$size);
        
    $transfer TeamSpeak3::factory("filetransfer://" $upload["host"] . ":" $upload["port"]);

        
    $transfer->upload($upload["ftkey"], $upload["seekpos"], $data);

        return 
    $crc;
      } 

  8. #758
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,522
    Thank you! I'll implement your fix and release an update asap.


  9. #759
    Join Date
    February 2013
    Posts
    47
    you can add, change or remove the icon of a specific channel? If yes, what code should I enter? thanks

  10. #760
    Join Date
    June 2012
    Location
    Portugal
    Posts
    317
    Quote Originally Posted by Death_Balgor View Post
    you can add, change or remove the icon of a specific channel? If yes, what code should I enter? thanks
    You need to use this: $iconId = $ts3->iconUpload($data) where $data is the raw file contents from the file uploaded.
    Then you edit the channel_icon_id property of the channel to $iconId

  11. #761
    Join Date
    February 2013
    Posts
    1
    Bugreport:

    some of our users use nicknames like "101100000010001111" (they've converted their birthday dates into binary numbers).

    In TeamSpeak3\Adapter\ServerQuery\Reply.php -> toArray() the server reply is put into an array and all integer values are checked/converted into integer/float-values (even the supposed-to-be-string-nicknames) and so our ts-viewer shows "funny" floating-point values "1.011000000100011E+17" as nicknames.

    PHP Code:
    $array[$i][$ident->toString()] = $value->isInt() ? $value->toInt() : (!func_num_args() ? $value->unescape() : $value); 
    Quick'n'dirty workaround:

    PHP Code:
    if ($ident->toString() == "client_nickname")
    {
      
    $array[$i][$ident->toString()] = (!func_num_args() ? $value->unescape() : $value);
    }
    else
    {
      
    $array[$i][$ident->toString()] = $value->isInt() ? $value->toInt() : (!func_num_args() ? $value->unescape() : $value);


  12. #762
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,522
    Quote Originally Posted by Rabillo View Post
    some of our users use nicknames like "101100000010001111" (they've converted their birthday dates into binary numbers).
    Well... I never thought that anyone would do someting like this. Thanks for reporting!


  13. #763
    Join Date
    November 2012
    Posts
    8
    Hi all, well Im stuck, how can create a Temp Channel?

    I have this code, but nothing happens.

    Edit: Ok this works if remove this line: "channel_flag_temporary" => TRUE, but the channel disappears quickly.

    now, how I can move the user creator to the channel created?

    Edit2: Solved

    PHP Code:
    $ts3_VirtualServer->clientMove($client['clid'], $top_cid$pass_sala); 
    Sorry for my bad english.
    Last edited by MrRoboto; November 25th, 2013 at 10:28 AM.

  14. #764
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,522
    I've adjusted the download link on planetteamspeak.com so you can grab the file there while the add ons site is offline.

  15. #765
    Join Date
    December 2013
    Posts
    18
    Hi

    I have a cuple question:

    1. Would it be possible to add the url according to the server the server name in the viewer code?

    Like:
    <link toserver>Server name<link>
    - Channel Name
    -- User Name
    2. Would it be also possible to add serveruptime output? So the number (like 95,9%) will be outputed, but please only the number 95,9 without the "%"

    3. And please remove the "align:top" from images and "summary" from viewer, its not html valid and does not effect anything

    Thank you
    Zoker
    Last edited by Zoker; December 13th, 2013 at 12:26 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PHP Framework
    By Multivit4min in forum Permission System
    Replies: 1
    Last Post: June 29th, 2015, 11:28 AM
  2. PHP Framework
    By phil998 in forum Server Support
    Replies: 0
    Last Post: February 25th, 2015, 06:27 PM
  3. TS3 PHP Framework Visualizations
    By Ronin Design in forum Tools / Web Based
    Replies: 2
    Last Post: February 22nd, 2015, 05:04 AM
  4. Extraction using the Framework
    By HarryMW in forum Tools / Web Based
    Replies: 1
    Last Post: August 3rd, 2012, 07:04 PM
  5. Teamspeak, PHP Framework?
    By mario2027 in forum General Questions
    Replies: 1
    Last Post: December 21st, 2010, 09:30 AM

Tags for this Thread

Posting Permissions

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