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 95 of 100 FirstFirst ... 45859394959697 ... LastLast
Results 1,411 to 1,425 of 1498
  1. #1411
    Join Date
    December 2009
    Location
    USA
    Posts
    3
    I keep getting this error "OAS][ MoD Server is reporting the following error connecting to ts48.gameservers.com:9224 ERROR 0x806: invalid file path" when loading viewer. What would I look for to troubleshoot this error?

    EDIT:
    for a little more detail, we use the ts3 framework to display several servers. All work except for the OAS][ MoD Server. Most that we display are from our own hosted ts3 server located on same machine as our web server but there are a few that are hosted elsewhere such as gameserver as well as some lan servers. We use one single file to display each. It depends on the server selected for the ts3 viewer it will display. All ts3 data is kept in a database and queried when needed to show viewer.

    Below is the code we use which is located in www/ts3_fw/examples/apps/viewer/chevys-place.php.


    Code:
    <?php
    
    /**
     * @file
     * TeamSpeak 3 PHP Framework Example :: viewer
     *
     * This program is free software: you can redistribute it and/or modify
     * it under the terms of the GNU General Public License as published by
     * the Free Software Foundation, either version 3 of the License, or
     * (at your option) any later version.
     *
     * This program is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     * GNU General Public License for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program. If not, see <http://www.gnu.org/licenses/>.
     *
     * @package   viewer
     * @author    Sven 'ScP' Paulsen
     * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
     */
    
    /* set error reporting levels */
    error_reporting(E_ALL | E_STRICT);
    
    /* set default timezone */
    date_default_timezone_set("Europe/Berlin");
    
    
    /* load framework library */
    require_once("../../../libraries/TeamSpeak3/TeamSpeak3.php");
    
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
    
    <head>
    
      <title>Chevy's TeamSpeak 3 Status Viewer</title>
    
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <meta http-equiv="cache-control" content="no-cache" />
      <meta http-equiv="pragma" content="no-cache" />
      <meta http-equiv="expires" content="-1" />
    
      <meta name="robots" content="noindex, nofollow" />
      <meta name="generator" content="TeamSpeak 3 PHP Framework <?= TeamSpeak3::LIB_VERSION; ?>" />
      <meta name="resource-type" content="Document" />
    
      <style type="text/css"  media="screen">
      <!--
       body {
          background-color:transparent;
    	  }
    	h1 {
          color: #3D6A95;
          font-size: 8px;
    	  font-color: lightblue;
          margin-bottom: 1em;
          font-weight:normal;
        }
    
        img {
          border: 0px;
        }
    
        a {
          color: #0088B5;
          text-decoration: none;
        }
    
        a:hover {
          color: #FE6400;
          text-decoration: none;
        }
    
        div.footer {
          font-size: 8pt;
          color: #999;
        }
    
    	
        table.ts3_viewer {
    	  font-size: 10pt;
    	  width: 18%;
          border-width: 0px;
    	  border-spacing:2px;
    	  border-style: double;
    	  border-color: #2F4F4F;
    	  border-collapse: separate;
    	  background-color:transparent;
    	  border-radius:10px;
    	  border-top-right-radius: 10px;
           border-top-left-radius: 10px;
           border-bottom-right-radius: 10px;
           border-bottom-left-radius: 10px;
    	   -moz-border-radius:10px;
           -webkit-border-radius:10px;
    	   behavior: url(../../../../pie/PIE.htc);
    	  }
    
        table.ts3_viewer tr.row1 {
          background-color: transparent;
        }
    
        table.ts3_viewer tr.row2 {
          background-color:  transparent;
        }
    
        table.ts3_viewer td {
    	  color:lime;
          white-space: nowrap;
          padding: 0px 0px 1px 0px;
          border: 0px;
    	  }
    
        table.ts3_viewer.server {
          color:lightgreen;
    	  width: 100%;
    	  border: 0px;
    	  border-color: black;
    	  border-style: inset;
        }
    	
    	table.ts3_viewer tr {
    	   border-width: 0px;
           padding: 2px;
           border-style: ridge;
           border-color: black;
           border-radius:10px;
    	   border-top-right-radius: 10px;
           border-top-left-radius: 10px;
           border-bottom-right-radius: 10px;
           border-bottom-left-radius: 10px;
    	   -moz-border-radius:10px;
           -webkit-border-radius:10px;
    	   behavior: url(../../../../pie/PIE.htc);
           font-size: 12px;
           color: lightblue;
    	}
    	
    	table.ts3_viewer td.corpus.server {
          color:lightgreen;
    	  width: 100%;
    	  background-color:transparent;
    	  }
    	
    	table.ts3_viewer td.corpus.client {
          color:lightblue;
    	  width: 100%;
    	  background-color:transparent;
        }
    	
    	table.ts3_viewer td.corpus.channel {
    	  color: yellow;
          background-color:transparent;
    	  width: 100%;
        }
    	
    	table.ts3_viewer td.prefix.channel {
    	 background-color: transparent;
    	}
    	
    	table.ts3_viewer td.suffix.channel {
    	  background-color: transparent;
    	}
    	
        table.ts3_viewer td.query {
          font-style: italic;
          color: #666E73;
        }
    
        table.ts3_viewer td.spacer {
          overflow: hidden;
        }
    
        table.ts3_viewer td.left {
          text-align: left;
        }
    
        table.ts3_viewer td.right {
          text-align: right;
        }
    
        table.ts3_viewer td.center {
          text-align: center;
        }
    
        table.ts3_viewer td.suffix {
          vertical-align: top;
        }
    
        table.ts3_viewer td.suffix img {
          padding-left: 2px;
          vertical-align: top;
    	  }
    
        table.ts3_viewer td.spacer.solidline {
          background: url('../../../images/viewer/spacer_solidline.gif') repeat-x;
        }
    
        table.ts3_viewer td.spacer.dashline {
          background: url('../../../images/viewer/spacer_dashline.gif') repeat-x;
        }
    
        table.ts3_viewer td.spacer.dashdotline {
          background: url('../../../images/viewer/spacer_dashdotline.gif') repeat-x;
        }
    
        table.ts3_viewer td.spacer.dashdotdotline {
          background: url('../../../images/viewer/spacer_dashdotdotline.gif') repeat-x;
        }
    
        table.ts3_viewer td.spacer.dotline {
          background: url('../../../images/viewer/spacer_dotline.gif') repeat-x;
        }
    
        span.success {
          color: #648434;
        }
    
        span.error {
          color: #FFFF00;
        }
    	
    	.bdrdiv {
    	  width:260px;
    	  padding:10px;
    	  border-width: 0px;
    	  border-spacing:10px;
    	  border-style: double;
    	  border-color: black;
    	  border-collapse: separate;
    	  background-color: transparent;
    	  border-radius:0px;
    	  border-top-right-radius: 0px;
          border-top-left-radius: 0px;
          border-bottom-right-radius: 0px;
          border-bottom-left-radius: 0px;
    	  -moz-border-radius:0px;
          -webkit-border-radius:0px;
    	  behavior: url(../../../../pie/PIE.htc);
    	}
    	
    	.ts3div {
    	  width:260px;
    	  padding:10px;
    	  border-width: 0px;
    	  border-spacing:10px;
    	  border-style: double;
    	  border-color: black;
    	  border-collapse: separate;
    	  background-color: transparent;
    	  border-radius:0px;
    	  border-top-right-radius: 0px;
          border-top-left-radius: 0px;
          border-bottom-right-radius: 0px;
          border-bottom-left-radius: 0px;
    	  -moz-border-radius:0px;
          -webkit-border-radius:0px;
    	  behavior: url(../../../../pie/PIE.htc);
    	}
    		
    	p.bdrp {
    	   line-height: .3 em;
    	   font-size: medium;
    	   border-width: 0px;
           padding-top: 2px;
    	   padding-bottom: 0px;
           border-style: inset;
           border-color: black;
           border-radius:10px;
    	   border-top-right-radius: 10px;
           border-top-left-radius: 10px;
           border-bottom-right-radius: 10px;
           border-bottom-left-radius: 10px;
    	   -moz-border-radius:10px;
           -webkit-border-radius:10px;
    	   behavior: url(../../../../pie/PIE.htc);
    	}
    	
        
    
        #wrapper {
    	display: inline-block;
        }	
    	  
    	
    
        -->
    	
      
      </style>
    
    </head>
    
    <body>
    
    
    
    <?php
    
    $file = $_GET['svrname'];
     
    
    //Connect to mysql db
    	$conn = mysql_connect('localhost','xxxxx','xxxxx'); //username and password have been changed from actual data for privacy
    	if(!$conn) die("Failed to connect to database");
    	$status = mysql_select_db('ts3', $conn);
    	if(!$status) die("Failed to select database");
    	
    	$sql = "select * from `lgsl` WHERE `comment` = '$file'";
    		
    $result = mysql_query($sql); 
    $num_rows = mysql_num_rows($result);
    
    
    
    //echo $num_rows;
    while($rows=mysql_fetch_assoc($result)){
    $cfg_svr_name = $file;
    $cfg['host'] = $rows['ip'];
    $cfg['query'] = $rows['q_port'];
    $cfg['voice'] = $rows['c_port'];
    $cfg['user'] = $rows['username'];
    $cfg['pass'] = $rows['password'];
    $channel = $rows['channel'];
    $nick = $rows['nick'];
    
    $cport = $cfg['voice'];
    
    if($cport == '9980')
    {
    	$cfg_connect = "<div align='center' title='" . $cfg["host"] . ":".$cfg["voice"]."'><a href='ts3server://{$rows['ip']}:{$rows['c_port']}'><font size=3>connect</font></a><br />";
    }
    
    else
    {
    	$cfg_connect = "<div align='center' title='" . $cfg["host"] . ":".$cfg["voice"]."'><a href='ts3server://{$rows['ip']}:{$rows['c_port']}?channel=$channel'><font size=3>connect</font></a><br />";
    }
    
    if ($nick == "complimentary server")
    {
    echo "<p style='text-align:center'><font color='lightblue' size=3>TeamSpeak 3</font><br /><font color='white' size=1>$nick</font></p>";
    }
    else
    {
    echo "<p style='text-align:center'><font color='lightblue' size=3>TeamSpeak 3</font></p>";
    }
    
    try
    {
      /* connect to server1, authenticate and get TeamSpeak3_Node_Server object by URI */
      $ts3 = TeamSpeak3::factory("serverquery://" . $cfg["user"] . ":" . $cfg["pass"] . "@" . $cfg["host"] . ":" . $cfg["query"] . "/?server_port=" . $cfg["voice"] . "#no_query_clients");
    
      /* enable new display mode */
      $ts3->setLoadClientlistFirst(TRUE);
    
      /* display viewer for selected TeamSpeak3_Node_Server */
      echo $ts3->getViewer(new TeamSpeak3_Viewer_Html("../../../images/viewer/", "../../../images/flags/", "data:image"));
    
      /* display runtime from adapter profiler */
      //echo "<p> " . $ts3->getAdapter()->getQueryCount() . " queries in " . $ts3->getAdapter()->getQueryRuntime() . " seconds</p>\n";
      //echo "<br />";
      //echo $cfg_connect;
      echo "$cfg_connect<br /></div>";
    }
    catch(Exception $e)
    {
      /* echo error message */
      echo "<p><span class=\"error\"><b><font size=1>$file is reporting the following error connecting to ".$cfg["host"].":".$cfg["voice"]." ---</font><br /><br />ERROR 0x" . dechex($e->getCode()) . "</b>: " . htmlspecialchars($e->getMessage()) . "</span></p>";
    
      echo "$cfg_connect<br /></div>";
    
    }
    }
    mysql_close($conn) ;
    ?>
    
     
    </body>
    
    </html>
    Last edited by Dodgeitorelse; July 9th, 2017 at 05:56 PM.

  2. #1412
    Join Date
    March 2014
    Posts
    9
    I'm wondering if there's a usable / installable php script for a TeamSpeak viewer for those who don't know how to use the API and just want to have a Viewer.

  3. #1413
    Join Date
    September 2017
    Posts
    1

    Problem - Channels order by points ts3 php

    hello
    i want to sort channels by points , sorting is good in website but when i try to modify channels order i can't
    i tried more than one method and all failed

    my code

    PHP Code:
    $sql $mysqlcon->query("SELECT * FROM $dbname.RoomsPoints ORDER BY points DESC");
    $ChannelsArray $sql->fetchAll();
    foreach ( 
    $ChannelsArray as $ke=>$channel ){
        echo 
    $ts3_VirtualServer->channelGetById($channel['cid'])['channel_name'].'<br>';
        
    $change = array("channel_order" => $ts3_VirtualServer->channelGetById($channel['cid'])['channel_order'] );
        
    $ts3_VirtualServer->channelGetById($channel['cid'])->modify($change);

    sorry for my bad English

  4. #1414
    Join Date
    June 2016
    Location
    Finland
    Posts
    11
    Ts3 Admin/mode list Online

    Does anyone have to make such a php script that would be an admin and a mode listing, and any one of the modes or admins will be online or going offline so the name will be getting online or offline.

    for example:
    admin:
    tonimoN - Online (green)
    tonni - Offline (red)

    mod:
    tonimoN - Online (green)
    tonni - Offline (red)

    Thanks for anybody can do or give me one

  5. #1415
    Join Date
    June 2016
    Location
    Finland
    Posts
    11
    How to install TS3 PHP Framework

  6. #1416
    Join Date
    November 2017
    Location
    Germany
    Posts
    1

    [API] TS3 PHP Framework Help Move Clients

    Hi,

    how to move clients from one channel to another channel.

    with TeamSpeak 3 PHP Framework: https://docs.planetteamspeak.com/ts3...functions.html

    move function:
    https://docs.planetteamspeak.com/ts3...303cc3d8d5c0c1

    thanks
    Last edited by dante696; November 11th, 2017 at 10:54 AM. Reason: merged

  7. #1417
    Join Date
    January 2010
    Location
    Germany
    Posts
    252
    Quote Originally Posted by xedom View Post
    Hi,

    how to move clients from one channel to another channel.

    with TeamSpeak 3 PHP Framework: https://docs.planetteamspeak.com/ts3...functions.html

    move function:
    https://docs.planetteamspeak.com/ts3...303cc3d8d5c0c1

    thanks

    try something like this:
    Code:
    $client = $host->serverGetSelected()->clientGetById($client_id);
    if ($client['cid'] <> $channel_id) {
            $client->move($channel_id);
    }

  8. #1418
    Join Date
    January 2010
    Location
    Germany
    Posts
    252
    Hi ScP,

    i think i've found a bug in your code (v1.1.24 - 18 Jun 2016):

    if you connect the framework with parameter #no_query_clients, you'll get the query connects in onClientEnterView (will be triggerd by query logins, regardless of using #no_query_clients). if you try to fetch the client object from that clid you got "invalid client id", and the event onException was triggerd.
    Last edited by faralsimbor; November 15th, 2017 at 04:27 PM.

  9. #1419
    Join Date
    December 2017
    Posts
    16

    icon_id and message server

    Hi,


    I would like to know which command I should use to be able to change the icon of a channel. I made a system where the person creates the room by the site, but wanted to put to come with a standard icon the channel. looks like this:

    PHP Code:
    $sub_cid $ts3_VirtualServer->channelCreate(array(
        
    "channel_name" => "$sub1",
        
    "channel_topic" => "Canal deltado em 7 dias, se ficar sem uso",
        
    "channel_codec"          => TeamSpeak3::CODEC_OPUS_VOICE,
        
    "channel_codec_quality"  => 0x06,    
        
    "channel_flag_permanent" => TRUE,
        
    "channel_password" => "$pass_canal",
        
    "virtualserver_icon_id"            => 1796463909,
        
    "cpid"                  => $top_cid,
    )); 
    Is this what you should use? virtualserver_icon_id

    -------------------------


    I'm also having doubts in sending a message to the server! Was using this:
    PHP Code:
    $ts3_VirtualServer->message("[b]O usuario [color=red]$client[/color] criou o canal [color=red]$nome_canal[/color] em nosso servidor! Crie voce tambem, pelo site"); 

    but it also did not work, what am I doing wrong?

  10. #1420
    Join Date
    February 2014
    Posts
    293
    Quote Originally Posted by Bryan9898 View Post
    Hi,


    I would like to know which command I should use to be able to change the icon of a channel. I made a system where the person creates the room by the site, but wanted to put to come with a standard icon the channel. looks like this:

    PHP Code:
    $sub_cid $ts3_VirtualServer->channelCreate(array(
        
    "channel_name" => "$sub1",
        
    "channel_topic" => "Canal deltado em 7 dias, se ficar sem uso",
        
    "channel_codec"          => TeamSpeak3::CODEC_OPUS_VOICE,
        
    "channel_codec_quality"  => 0x06,    
        
    "channel_flag_permanent" => TRUE,
        
    "channel_password" => "$pass_canal",
        
    "virtualserver_icon_id"            => 1796463909,
        
    "cpid"                  => $top_cid,
    )); 
    Is this what you should use? virtualserver_icon_id

    -------------------------


    I'm also having doubts in sending a message to the server! Was using this:
    PHP Code:
    $ts3_VirtualServer->message("[b]O usuario [color=red]$client[/color] criou o canal [color=red]$nome_canal[/color] em nosso servidor! Crie voce tambem, pelo site"); 

    but it also did not work, what am I doing wrong?
    You should use channel_icon_id not virtualserver_icon_id

  11. #1421
    Join Date
    December 2017
    Location
    Germany
    Posts
    3

    TS3 PHP Framework Offline Message

    Hello Community,

    Can you tell me how to send offline messages with the ts3 php framework?


    Marvin - #Game OS

  12. #1422
    Join Date
    December 2017
    Posts
    16
    Quote Originally Posted by Patrick1164 View Post
    You should use channel_icon_id not virtualserver_icon_id
    has not worked ... there's nothing wrong with the line anymore?

    Edit: parameter error, I tried: " and '
    Last edited by Bryan9898; January 4th, 2018 at 08:12 PM.

  13. #1423
    Join Date
    February 2014
    Posts
    293
    Quote Originally Posted by Bryan9898 View Post
    has not worked ... there's nothing wrong with the line anymore?

    Edit: parameter error, I tried: " and '
    Try it like:

    PHP Code:
    $sub_cid $ts3_VirtualServer->channelCreate(array(
        
    "channel_name" => "$sub1",
        
    "channel_topic" => "Canal deltado em 7 dias, se ficar sem uso",
        
    "channel_codec"          => TeamSpeak3::CODEC_OPUS_VOICE,
        
    "channel_codec_quality"  => 0x06,    
        
    "channel_flag_permanent" => TRUE,
        
    "channel_password" => "$pass_canal",
        
    "channel_icon_id"            => "1796463909",
        
    "cpid"                  => $top_cid,
    )); 

    If that doesn't work maybe you can't set it on creation but can do it with an edit. iirc you can't create a channel with an icon in TeamSpeak, it counts as an edit by creating the channel and then immediately editing it after to set the icon.

  14. #1424
    Join Date
    December 2017
    Posts
    16
    really, I do not think it's possible to put into creation. Would you put a code below for editing?

    Edit: Sorry for the translation ... google translate

  15. #1425
    Join Date
    February 2014
    Posts
    293
    Quote Originally Posted by Bryan9898 View Post
    really, I do not think it's possible to put into creation. Would you put a code below for editing?

    Edit: Sorry for the translation ... google translate
    The way I've done it in the past is:

    PHP Code:
    $ts3_VirtualServer->execute("channeledit cid=" $current_cid " channel_icon_id=" $icon); 

Thread Information

Users Browsing this Thread

There are currently 4 users browsing this thread. (0 members and 4 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
  •