Allerdings nehme ich den PHPTS2 und möchte nun die Serverdaten und alle anderen Einstellungen gerne per ACP vorgeben.
Gelöst habe ich das so :
acp_portal.php
Code: Select all
// <-- START TeamSpeakViewer MOD (1) -->
case 'teamspeak1':
$display_vars = array(
'title' => 'ACP_PORTAL_TEAMSPEAK1_SETTINGS',
'vars' => array(
'legend1' => 'ACP_PORTAL_TEAMSPEAK1_SETTINGS',
'portal_teamspeak1_enabled' => array('lang' => 'PORTAL_TEAMSPEAK1' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_teamspeak1_height' => array('lang' => 'PORTAL_TEAMSPEAK1_HEIGHT' , 'validate' => 'int' , 'type' => 'text:3:3', 'explain' => true),
'legend2' => 'ACP_PORTAL_TEAMSPEAK1_SETTINGSDATA',
'portal_teamspeak1_ip1' => array('lang' => 'PORTAL_TEAMSPEAK1_IP1' , 'validate' => 'string', 'type' => 'text:15:15', 'explain' => true),
'portal_teamspeak1_ip2' => array('lang' => 'PORTAL_TEAMSPEAK1_IP2' , 'validate' => 'string', 'type' => 'text:15:15', 'explain' => true),
'portal_teamspeak1_queryport' => array('lang' => 'PORTAL_TEAMSPEAK1_QUERYPORT' , 'validate' => 'string', 'type' => 'text:5:6', 'explain' => true),
'portal_teamspeak1_udpport' => array('lang' => 'PORTAL_TEAMSPEAK1_UDPPORT' , 'validate' => 'string', 'type' => 'text:5:6', 'explain' => true),
'portal_teamspeak1_dorefresh' => array('lang' => 'PORTAL_TEAMSPEAK1_DOREFRESH' , 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'portal_teamspeak1_refreshtime' => array('lang' => 'PORTAL_TEAMSPEAK1_REFRESHTIME' , 'validate' => 'string', 'type' => 'text:3:3', 'explain' => true),
)
);
break;
// <-- END TeamSpeakViewer MOD -->
Ich habe es in der config.php ausprobiert :
Original
Code: Select all
<?PHP
/*****************************************************
* Connection variables
*****************************************************/
// $ip = "82.149.232.61"; // IP Address to server
// $ip2 = "82.149.232.61"; // IP Address to server of external or the same IP
// $tPort = "51241"; // Server QueryPort number
// $port = "10064"; // Port number to the TS2 server
/*****************************************************
* View selection
*****************************************************/
$tree = true; // true or false
$iframeHeight = 100; // Adjust iframe height - Presenting info from a selected channel
$downlinkyes = false; // true or false for the download link
$downlink = "http://www.goteamspeak.com/index.php?page=downloads"; // Link to the Download
$downlinktext = "Download Teamspeak";
$loginwidth = 210; // Login-Window width defult 210
$loginheight = 290; // Login-Window height defult 290 and without Downloadlink 280
/*****************************************************
* Refresh
*****************************************************/
$RefreshBottom = false; // true or false
$doRefresh = true; // true or false
$reInterval = 60; // Amount of seconds until next refresh
/*****************************************************
* TeamSpeak special colors
*****************************************************/
$bgcolor = "#CADCEB"; // Default is TS2 purple background color
$headerColor = "#5B5B5B"; // Header background color used for "Basic info" and "User info"
$selectColor = "#CECECE"; // Used when click on a channel in tree
?>
Code: Select all
<?PHP
/*****************************************************
* Connection variables
*****************************************************/
$ip = ($portal_config['portal_teamspeak1_ip1']);
$ip2 = ($portal_config['portal_teamspeak1_ip2']);
$tPort = ($portal_config['portal_teamspeak1_queryport']);
$port = ($portal_config['portal_teamspeak1_udpport']);
Rest Code von Oben
?>
ts2.php
Code: Select all
<?php
/*
Copyright (C) 2004 Niklas Håkansson <niklas.hk@telia.com>
Mod by Timo Meyer-Franke <www.forum.meyer-franke.de.vu>
PHPTS2 ver 2.0 is a free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public.
Please leave the copyright image as it is if you using this scripts
*/
include "ts2status.php";
require_once "config.php";
$ip = ($portal_config['portal_teamspeak1_ip1']);
$ip2 = ($portal_config['portal_teamspeak1_ip2']);
$tPort = ($portal_config['portal_teamspeak1_queryport']);
$port = ($portal_config['portal_teamspeak1_udpport']);
?>
<head>
<title>PHPTS2 Viewer</title>
<?if($doRefresh) {?>
<META HTTP-EQUIV="refresh" CONTENT="<?=$reInterval?>; url=ts2.php">
<?}
if($tree) {?>
<script language="javascript">
var selectColor = "<?=$selectColor?>";
var unselectColor = "<?=$bgcolor?>";
</script>
<script src="js/vMenu.js" type="text/javascript"></script>
<?}?>
<link rel="STYLESHEET" type="text/css" href="css/stylesheet.css">
<style>
body {
background-color : <?=$bgcolor?>;
}
</style>
</head>
<body>
................ restcode