Forum


Notice to all users

We are migrating towards a new forum system located at community.teamspeak.com, as such this forum will become read-only on January 29, 2020

Page 10 of 100 FirstFirst ... 891011122060 ... LastLast
Results 136 to 150 of 1498
  1. #136
    Join Date
    October 2010
    Location
    -
    Posts
    2
    Quote Originally Posted by ScP View Post
    I've already discovered this issue on 32-bit systems and fixed it with 1.1.0-dev. Here's the TeamSpeak3_Helper_String class that resolves the issue:

    http://pastebin.planetteamspeak.com/...n.php?show=375
    Thanks, now it works perfectly

  2. #137
    Join Date
    March 2006
    Location
    home
    Posts
    3
    will their ever be a joomla module for TS3 ??

    if so when might it appear on site?

  3. #138
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,527
    Quote Originally Posted by james grimes View Post
    will their ever be a joomla module for TS3 ??

    if so when might it appear on site?
    There's one on our addons page but I've not tested it...

    http://addons.teamspeak.com/director...ch/joomla.html

    But back to topic... Here's what I changed with 1.1.0-dev so far:

    Code:
    === Release 1.1.0-beta - ?? Nov 2010 ===
     ! example pages have been replaced with useful example applications
     ! implemented __sleep() and __wakeup() methods for TeamSpeak3_Node_Abstract
       objects which makes it possible to serialize and store them into persistent
       session values
     + added constants for different group name display modes
     + added TeamSpeak3_Helper_Crypt
     + added TeamSpeak3_Exception::prepareCustomMessage()
     * custom messages set with TeamSpeak3_Exception::registerCustomMessage() can
       now be customized with pre-defined signs %code, %mesg, $file and %line to
       provide greater flexibility
     + added TeamSpeak3_Helper_Uri::getUserParam()
     + added TeamSpeak3_Helper_Uri::getHostParam()
     + added TeamSpeak3_Helper_Uri::getSessParam()
     + added TeamSpeak3_Helper_Uri::getHostUri()
     + added TeamSpeak3_Helper_Uri::getBaseUri()
     + added TeamSpeak3_Helper_Uri::stripslashesRecursive()
     + added TeamSpeak3_Adapter_Abstract::syn()
     + added TeamSpeak3_Helper_String::spaceToPercent()
     + added TeamSpeak3_Node_Server::sortGroupList()
     * TeamSpeak3_Node_Server::serverGroupList() now respects i_group_sort_id
     * TeamSpeak3_Node_Server::channelGroupList() now respects i_group_sort_id
     - fixed issue in TeamSpeak3_Helper_String::toInt() where integer overflow did
       not cast as float
    For now, I've added the following example apps:

    • webinterface
    • tsviewer
    • filebrowser

    I'd appreciate your feedback!

    Last edited by ScP; November 1st, 2010 at 01:36 PM.

  4. #139
    Join Date
    February 2010
    Location
    Germany
    Posts
    9
    on the image attached to the last post its says "Your has been benned" ....

    "that's wrong"



    otherwise nothing to complain about so far

  5. #140
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,527
    Quote Originally Posted by Dacen View Post
    on the image attached to the last post its says "Your has been benned" ....
    Good catch mate!


  6. #141
    Join Date
    July 2010
    Location
    Stuttgart
    Posts
    6
    Hi!

    ScP, is it possible to select vservers who are not running? I always get an exception Other webinterfaces can select/edit the server although it is offline.

    factory:
    TeamSpeak3::factory("serverquery://serveradmin:[email protected]:10011/?server_port=9988#no_query_clients");

    exception:
    Message: server is not running
    Class: TeamSpeak3_Adapter_ServerQuery_Exception
    File: ...\lib\vendor\teamspeak3\Adapter\ServerQuery\Repl y.php
    Line: 296
    Code: 1033
    Trace:
    #0 ...\lib\vendor\teamspeak3\Adapter\ServerQuery\Repl y.php(82): TeamSpeak3_Adapter_ServerQuery_Reply->fetchError(Object(TeamSpeak3_Helper_String))
    #1 ...\lib\vendor\teamspeak3\Adapter\ServerQuery.php( 140): TeamSpeak3_Adapter_ServerQuery_Reply->__construct(Array, 'use port=9988', Object(TeamSpeak3_Node_Host))
    #2 ...\lib\vendor\teamspeak3\Node\Abstract.php(67): TeamSpeak3_Adapter_ServerQuery->request('use port=9988')
    #3 ...\lib\vendor\teamspeak3\Node\Abstract.php(91): TeamSpeak3_Node_Abstract->request('use port=9988')
    #4 ...\lib\vendor\teamspeak3\Node\Host.php(170): TeamSpeak3_Node_Abstract->execute('use', Array)
    #5 ...\lib\vendor\teamspeak3\Node\Host.php(242): TeamSpeak3_Node_Host->serverSelectByPort(9988)
    #6 ...\lib\vendor\teamspeak3\TeamSpeak3.php(298): TeamSpeak3_Node_Host->serverGetByPort(9988)
    #7 ...\apps\frontend\modules\teamspeak\actions\action s.class.php(608): TeamSpeak3::factory('serverquery://s...')
    #8 ...\apps\frontend\modules\teamspeak\actions\action s.class.php(143): customerTeamspeakActions->getTeamspeakInstance(1, 2)
    ......

    Ok, reading educates Im sorry.
    Now im using "use_offline_as_virtual" and it works fine!


    /**
    * Factory for TeamSpeak3_Adapter_Abstract classes. $uri must be formatted as
    * "<adapter>://<user>:<pass>@<host>:<port>/<options>#<flags>". All parameters
    * except adapter, host and port are optional.
    *
    * === Supported Options ===
    * - timeout
    * - blocking
    * - nickname
    * - no_query_clients
    * - use_offline_as_virtual
    * - clients_before_channels
    * - server_id|server_uid|server_port|server_name
    * - channel_id|channel_name
    * - client_id|client_uid|client_name
    *
    * === Fupported Flags (only one per $uri) ===
    * - no_query_clients
    * - use_offline_as_virtual
    * - clients_before_channels
    *
    * === URI Examples ===
    * - serverquery://127.0.0.1:10011/
    * - serverquery://127.0.0.1:10011/?server_port=9987&channel_id=1
    * - filetransfer://127.0.0.1:30011/
    * - blacklist
    * - update
    *
    * @param string $uri
    * @return TeamSpeak3_Adapter_Abstract
    * @return TeamSpeak3_Node_Abstract
    */
    Last edited by florian_fr40; March 29th, 2012 at 10:13 AM.

  7. #142
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,527
    Here's a little changelog update:

    Code:
    === Release 1.1.0-beta - ?? Nov 2010 ===
     ! upgrading your servers to 3.0.0-beta30 (build >= 12910) is mandatory
     ! example pages have been replaced with useful example applications
     ! implemented __sleep() and __wakeup() methods for TeamSpeak3_Node_Abstract
       objects which makes it possible to serialize and store them into persistent
       session values
     + added constants for different group name display modes
     + added TeamSpeak3_Helper_Crypt
     + added TeamSpeak3_Exception::prepareCustomMessage()
     * custom messages set with TeamSpeak3_Exception::registerCustomMessage() can
       now be customized with pre-defined signs %code, %mesg, $file and %line to
       provide greater flexibility
     + added TeamSpeak3_Helper_Uri::getUserParam()
     + added TeamSpeak3_Helper_Uri::getHostParam()
     + added TeamSpeak3_Helper_Uri::getSessParam()
     + added TeamSpeak3_Helper_Uri::getHostUri()
     + added TeamSpeak3_Helper_Uri::getBaseUri()
     + added TeamSpeak3_Helper_Uri::stripslashesRecursive()
     + added TeamSpeak3_Adapter_Abstract::syn()
     + added TeamSpeak3_Helper_String::spaceToPercent()
     + added TeamSpeak3_Node_Servergroup::privilegeKeyCreate()
     + added TeamSpeak3_Node_Servergroup::tokenCreate()
     + added TeamSpeak3_Node_Channelgroup::privilegeKeyCreate()
     + added TeamSpeak3_Node_Channelgroup::tokenCreate()
     + added TeamSpeak3_Node_Server::sortGroupList()
     + added TeamSpeak3_Node_Host::selfPermCheck()
     * TeamSpeak3_Node_Server::serverGroupList() now respects i_group_sort_id
     * TeamSpeak3_Node_Server::channelGroupList() now respects i_group_sort_id
     * TeamSpeak3_Node_Server::privilegeKeyList() now supports optional resolve
       parameter to translate token_id1 and token_id2 into the appropriate group
       and/or channel names
     - fixed issue in TeamSpeak3_Helper_String::toInt() where integer overflow
       did not cast as float

  8. #143
    Join Date
    January 2010
    Location
    Germany
    Posts
    252
    Hey ScP,

    If i use your example TS3 Viewer script i'm sometimes missing the custom icons.

    Is it because i've put the $TS3VirtualServer->getViewer(new TeamSpeak3_Viewer_Html()) output into shared memory ?

  9. #144
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,527
    What do you mean by shared memory? The example is downloading the icons on each request and does not cache anything. If you're trying to cache the output of that example page, the custom icon download will not work as the file transfer keys initially generated by the server will no longer be valid.

  10. #145
    Join Date
    January 2010
    Location
    Germany
    Posts
    252
    Quote Originally Posted by ScP View Post
    What do you mean by shared memory? The example is downloading the icons on each request and does not cache anything. If you're trying to cache the output of that example page, the custom icon download will not work as the file transfer keys initially generated by the server will no longer be valid.
    my code looks like:

    master proccess:
    Code:
    private static function write_shm($port, $id, $array) {
     $shmHeaderSize = (PHP_INT_SIZE * 4) + 8;
     $shmVarSize = (((strlen(serialize($array))+ (4 * PHP_INT_SIZE)) /4 ) * 4 ) + 4;
     $memsize = ($shmHeaderSize + $shmVarSize) * 2; 
     $data = shm_attach($port, $memsize);
     shm_put_var($data, $id, $array);
     shm_detach($data);
    }
    
    public function execute(TeamSpeak3_Node_Host $TS3ServerInstance, TeamSpeak3_Node_Server $TS3VirtualServer, $featureConfig, $daemonConfig, $invokerID = NULL, $event = NULL) {
    $dataArray = array('server' => array('name' => $TS3VirtualServer->toString(),
     'maxClients' => $TS3VirtualServer['virtualserver_maxclients'],
     'clientsOnline' => $TS3VirtualServer['virtualserver_clientsonline'],
     'channelsOnline' => $TS3VirtualServer['virtualserver_channelsonline'],
     'queryClientsOnline' => $TS3VirtualServer['virtualserver_queryclientsonline'],
    ), 
    'data' => $TS3VirtualServer->getViewer(new TeamSpeak3_Viewer_Html($featureConfig[self::getConfigSectionName()]['iconPath'], $featureConfig[self::getConfigSectionName()]['flagPath'], $featureConfig[self::getConfigSectionName()]['file_transfer_script'])),
    );
    self::write_shm($featureConfig['BOT-CONFIG']['port'], 1, $dataArray);
    }
    slave proccess:
    Code:
        /* configurable options */
        $port = 9987;
        /* end configurable options */
    
        $data = @shm_attach($port);
        $tmp =  @shm_get_var($data, 1);
        shm_detach($data);
        if ($tmp['server']['name'] != '') {
    	echo "<h1>Virtual Server Viewer - " . $tmp['server']['name'] . "</h1>\n";
    	echo utf8_decode($tmp['data']);
        } else {
    	echo "<font color='ff0000;'><b>TS3PHPBot at port " . $port  . " seems to be offline</b></font>";
        }
    filetransfer script:
    Code:
    /* configurable options */
        $botDirectory = '/opt/ts3phpbot/trunk';
    /* end configurable options */
    
    function get_param($key, $default = null) {
      return (array_key_exists($key, $_GET) && !empty($_GET[$key])) ? preg_replace("/[^[:graph:]]/", "", $_GET[$key]) : $default;
    }
    
    if (substr($botDirectory, strlen($botDirectory), 1) != DIRECTORY_SEPARATOR) {
    	$botDirectory .= DIRECTORY_SEPARATOR;
    }
    
    require_once($botDirectory . "class/TeamSpeak3/TeamSpeak3.php");
    
    $data = get_param("data");
    
    try {
      TeamSpeak3::init();
      
      if(!$data = @unserialize(base64_decode($data))) {
        throw new Exception("unable to decode file transfer data");
      }
      
      $transfer = TeamSpeak3::factory("filetransfer://" . $data["host"] . ":" . $data["port"]);
      
      echo $transfer->download($data["ftkey"], $data["size"]);
    }
    catch(Exception $e) {
      echo file_get_contents("images/icons/group_icon_0.png");
    }

  11. #146
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,527
    I've never used PHP's shared memory functions so I have no idea how they work. Please explain shortly what you intend to do.

    Version 1.1.1-beta is available. Here's the changelog:

    Code:
    === Release 1.1.1-beta - 28 Nov 2010 ===
     ! upgrading your servers to 3.0.0-beta30 (build >= 12910) is mandatory
    ! example pages have been extended with useful example applications
     ! implemented __sleep() and __wakeup() methods for TeamSpeak3_Node_Abstract
       objects which makes it possible to serialize and store them into persistent
       session values
     ! TeamSpeak3_Viewer_Html interface now returns HTML tables instead of div
       elements so please make sure that your existing CSS files get updated too
     * updated TeamSpeak3_Viewer_Text and TeamSpeak3_Viewer_Html classes with new
       customizable output patterns to provide greater flexibility
     * changed visibility of all private class methods and properties to protected
       to allow modifications through inherited classes
     + added constants for different group name display modes
     + added TeamSpeak3_Helper_Crypt
     + added TeamSpeak3_Exception::prepareCustomMessage()
     * custom messages set with TeamSpeak3_Exception::registerCustomMessage() can
       now be customized with pre-defined signs %code, %mesg, $file and %line to
       provide greater flexibility
     * class properties returned by TeamSpeak3_Node_Abstract::getClass() now
       respect channel spacers and ServerQuery clients
     + added TeamSpeak3_Helper_Uri::getUserParam()
     + added TeamSpeak3_Helper_Uri::getHostParam()
     + added TeamSpeak3_Helper_Uri::getSessParam()
     + added TeamSpeak3_Helper_Uri::getHostUri()
     + added TeamSpeak3_Helper_Uri::getBaseUri()
     + added TeamSpeak3_Helper_Uri::stripslashesRecursive()
     + added TeamSpeak3_Adapter_Abstract::syn()
     + added TeamSpeak3_Helper_String::spaceToPercent()
     + added TeamSpeak3_Node_Servergroup::privilegeKeyCreate()
     + added TeamSpeak3_Node_Servergroup::tokenCreate()
     + added TeamSpeak3_Node_Channelgroup::privilegeKeyCreate()
     + added TeamSpeak3_Node_Channelgroup::tokenCreate()
     + added TeamSpeak3_Node_Server::sortGroupList()
     + added TeamSpeak3_Node_Server::isOnline()
     + added TeamSpeak3_Node_Host::selfPermCheck()
     * TeamSpeak3_Node_Server::serverGroupList() now respects i_group_sort_id
     * TeamSpeak3_Node_Server::channelGroupList() now respects i_group_sort_id
     * TeamSpeak3_Node_Server::privilegeKeyList() now supports optional resolve
       parameter to translate token_id1 and token_id2 into the appropriate group
       and/or channel names
     - fixed issue in TeamSpeak3_Helper_String::toInt() where integer overflow
       did not cast as float
    Last edited by florian_fr40; March 29th, 2012 at 10:13 AM.

  12. #147
    Join Date
    January 2010
    Location
    Sweden
    Posts
    32
    Thx m8, Have been waiting for the custome exeption messages for a while now. Great job scp keep it up.

  13. #148
    Join Date
    June 2005
    Location
    Germany
    Posts
    124
    Thank you! What was your motivation to go away from CSS back to tables?

  14. #149
    Join Date
    October 2003
    Location
    Germany
    Posts
    2,527
    Quote Originally Posted by ginger|HFD View Post
    Thank you! What was your motivation to go away from CSS back to tables?
    Two simple reasons:

    1. A table layout is 100% compatible to ALL current browsers since you don't need to float anything around (e.g. to get the right icon alignment).
    2. The table layout is fluid and supports the channel spacers without having to be a CSS guru.



    As you'll see the new HTML interface can be fully customized with the new pattern system I've implemented. For example:

    HTML Code:
    <table id='%0' class='%1'><tr class='%2'><td class='%3'>%4</td><td class='%5' title='%6'>%7 %8</td><td class='%9'>%10%11</td></tr></table>
    The placeholders in this pattern will be replaced with dynamic values in a pre-defined order. So you can also go back to the old <div> tag format if you want.

    I've prepared another hotfix release:

    Code:
    === Release 1.1.2-beta - 03 Dec 2010 ===
     + added TeamSpeak3_Node_Servergroup::copy()
     + added TeamSpeak3_Node_Channelgroup::copy()
     - fixed invalid method call in TeamSpeak3_Node_Servergroup::rename()
     - fixed invalid method call in TeamSpeak3_Node_Servergroup::delete()
     - fixed invalid method call in TeamSpeak3_Node_Channelgroup::rename()
     - fixed invalid method call in TeamSpeak3_Node_Channelgroup::delete()
     - fixed unnecessary error exception when checking a group with no permissions
       assigned in TeamSpeak3_Node_Server::serverGroupGetProfiles()
     - fixed invalid $_GET parameter name on clientinfo example page
     * hotfix release
    Happy testing!

    Last edited by florian_fr40; March 29th, 2012 at 10:13 AM.

  15. #150
    Join Date
    February 2007
    Location
    Poland
    Posts
    18
    How can i install TeamSpeak Web Control Panel ?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. PHP Framework
    By Multivit4min in forum Permission System
    Replies: 1
    Last Post: June 29th, 2015, 12:28 PM
  2. PHP Framework
    By phil998 in forum Server Support
    Replies: 0
    Last Post: February 25th, 2015, 07:27 PM
  3. TS3 PHP Framework Visualizations
    By Ronin Design in forum Tools / Web Based
    Replies: 2
    Last Post: February 22nd, 2015, 06:04 AM
  4. Extraction using the Framework
    By HarryMW in forum Tools / Web Based
    Replies: 1
    Last Post: August 3rd, 2012, 08:04 PM
  5. Teamspeak, PHP Framework?
    By mario2027 in forum General Questions
    Replies: 1
    Last Post: December 21st, 2010, 10: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
  •