Results 46 to 60 of 632
Thread: [API] TS3 PHP Framework
-
06-07-2010, 19:46 #46
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,299
The docs are currently outdated. I'll update them as soon as possible... Anyway, thanks for your good feedback.
-
10-07-2010, 14:30 #47
Hi ScP,
I've got the following error when i try to put the TeamSpeak3_Node_Host object into a session:
errorCode: 0
errorMessage: timer '00000000655dd3af00000000381a09f7' does not exist
how its possible to put your factory into a session variable?
or is it possible to make the TeamSpeak3 class singleton?
b.t.w
your modifed autoload function works great for me.
keep up the good work.Last edited by faralsimbor; 10-07-2010 at 14:49.
-
10-07-2010, 14:51 #48
-= TeamSpeak User =-
- Join Date
- Jul 2010
- Location
- France
- Posts
- 15
Hey.
I worked with my servers with the SID but now, i want to with the port but..
That doesnt work.. What's wrong ?
( Im disconnected from the TS server.. so he's stopped )Code:Error 1035: server got an invalid status for this operation
(No problem with the factory, i worked with that before...)
Edit: Start, Stop work. But cant use delete.Code:$ServerInstance = TeamSpeak3::factory('serverquery://' . self::$ts_config[$instanceID]['user'] . ':' . self::$ts_config[$instanceID]['pass'] . '@' . self::$ts_config[$instanceID]['host'] . ':' . self::$ts_config[$instanceID]['port'] . '/'); $ServerInstance->serverGetByPort($port)->stop(); usleep(1000000); $ServerInstance->serverGetByPort($port)->delete();
Edit: strange... Tried with stop(); then request("serverdelete sid=67") same error message
BUT in telnet
serverstop sid=66
error id=0 msg=ok
serverdelete sid=66
error id=0 msg=ok
Edit: btw, the ID $ServerInstance->serverGetByPort($port)->getId(); is correct. . .
Edit : I finally get the ID .. then used ServerInstance->serverDelete...Last edited by kedal; 10-07-2010 at 16:27.
-
10-07-2010, 15:43 #49
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,299
-
17-07-2010, 20:10 #50
-= TeamSpeak Lover =-
- Join Date
- Dec 2009
- Location
- USA
- Posts
- 78
hey scp..
I finally got around to re-testing blacklisting on the one server. It appears to take a *really* long time to execute the test script. Is there perhaps some kind of time out that causes it to return true?
-
18-07-2010, 13:36 #51
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,299
What is the exact return value?
-
20-07-2010, 02:13 #52
-= TeamSpeak Lover =-
- Join Date
- Dec 2009
- Location
- USA
- Posts
- 78
it always hangs for a bit, then returns false on the debian server (older version of php and its being ran as CGI)..
but on my other linux (ubuntu) server it returns true very quickly.
-
20-07-2010, 21:57 #53
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,299
Did you replace the method with the code I sent you via PM? I need the debug output...
-
21-07-2010, 05:28 #54
-= TeamSpeak Lover =-
- Join Date
- Dec 2009
- Location
- USA
- Posts
- 78
Oh.. yes.. that sorry.
Did that tonight check your PM for the output.
-
21-07-2010, 07:03 #55
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,299
Thx. The issue will be fixed with the next release.
-
21-07-2010, 09:47 #56
Get type of group
Hi!
I love this framework. Everything works fine. Good job ScP!
But...... is it possible to get the type of the group? I wanted to create new tokens and when i list all the groups to get the right id there are also the standard groups. You cant create a token with one of these. I think the type of the group must be 1.
Is there a opportunity to get the type?
I did not found anything
Mhhh, my english is very bad. Sorry!
-
21-07-2010, 13:07 #57
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,299
Thank you for your good feedback. I've defined three class constants for the different group types:
Here's a code snippet to show you how to filter all but regular groups from the servergrouplist output:PHP Code:/**
* TeamSpeak 3 permission group database types.
*/
const GROUP_DBTYPE_TEMPLATE = 0x00; // 0: template group (used for new virtual servers)
const GROUP_DBTYPE_REGULAR = 0x01; // 1: regular group (used for regular clients)
const GROUP_DBTYPE_SERVERQUERY = 0x02; // 2: global query group (used for ServerQuery clients)
For the next release I'll add optional filter parameters to all listing functions to remove unwanted elements.PHP Code:// load list of server groups
$servergroups = $server->serverGroupList();
// remove non-regular groups from array
foreach($servergroups as $sgid => $servergroup)
{
if($servergroup["type"] != TeamSpeak3::GROUP_DBTYPE_REGULAR) unset($servergroups [$sgid]);
}
-
21-07-2010, 13:41 #58
Thanks for your quick reply.
It works fine!
Thank you!
-
24-07-2010, 12:29 #59
-= TeamSpeak Servant =-
- Join Date
- Oct 2003
- Location
- Germany
- Posts
- 2,299
Once again, here's the latest changelog:
The new regexp filters are available for serverList(), clientList(), channelList(), subChannelList(), serverGroupList() and channelGroupList() and will work like this:Code:=== Release 1.0.31-dev - ?? Jul 2010 === + added some new demo scripts to the example pages * fixed TeamSpeak3_Adapter_Blacklist::isBlacklisted() invalid return values when master server is not responding * several node list methods now support additional regexp filter parameters - fixed a stristr() warning in TeamSpeak3_Helper_String::contains() when providing an empty search pattern
If you have any more ideas or feature requests for the upcoming release, please let me know.PHP Code:$filters = array(
"virtualserver_name" => "^TeamSpeak", // find virtual servers starting with "TeamSpeak"
"virtualserver_status" => "online", // find active virtual servers
);
$serverlist = $ts3->serverList($filters);
-
27-07-2010, 17:23 #60
-= TeamSpeak User =-
- Join Date
- Jul 2010
- Location
- France
- Posts
- 15
Hey.
I've again a problem.
MyPHPFile.php
System
|- TeamSpeak2Manager.php
|- TeamSpeak3Manager.php
|- ts2_framework
|- |- The TS2 Framework
|- ts3_framework
|- |- librairies
|- |- |- TeamSpeak3
|- |- |- |- Your Framework
TeamSpeak2Manager.php and TeamSpeak3Manager.php have a static method named createServer which use the frameworks to create servers.
Separated, and called by two differents file ( placed in the same folder as MyPHPFile.php ), the two functions work great ! ( And others too, like removeServer(..) ) I call them by
require('System/TeamSpeak2Manager.php');
TeamSpeak2Manager::createServer($name, $slots);
require('System/TeamSpeak3Manager.php');
TeamSpeak3Manager::createServer($name, $slots);
BUT when I call the both like :
require('System/TeamSpeak2Manager.php');
require('System/TeamSpeak3Manager.php');
TeamSpeak2Manager::createServer($name, $slots);
TeamSpeak3Manager::createServer($name, $slots);
I've this error :
Error 2: Class file /var/www/panel/teamspeak/system/ts2_framework/TeamSpeak3/Helper/Profiler.php was not found.
What's wrong ? I tried to rename one method to another name, same thing. But when I do the inverse :
require('System/TeamSpeak2Manager.php');
require('System/TeamSpeak3Manager.php');
TeamSpeak3Manager::createServer($name, $slots);
TeamSpeak2Manager::createServer($name, $slots);
That works !
But in my soft.. I cant inverse... Do u know what's wrong ? Issue with the class loader ? =S
The class is found when I put a require in TeamSpeak3.php ( framework ) but i'll not write all the requires..
It's Strange
Thanks !
EDIT::TS2 Framework is Absurd and it also use spl autoload ! The methods of autoload of TS2 Framework is in the next page..Last edited by kedal; 27-07-2010 at 19:27.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
TS3 PHP Framework Connection problems
By stheam in forum General QuestionsReplies: 1Last Post: 01-01-2013, 21:03 -
Extraction using the Framework
By HarryMW in forum ToolsReplies: 1Last Post: 03-08-2012, 19:04 -
TeamSpeak 3 PHP Framework
By danger89 in forum General QuestionsReplies: 3Last Post: 11-06-2012, 16:40 -
Teamspeak, PHP Framework?
By mario2027 in forum General QuestionsReplies: 1Last Post: 21-12-2010, 09:30 -
[solved] Problem with Ts3 und Ts3 Php Framework
By m3ntry in forum Bug ReportsReplies: 1Last Post: 14-10-2010, 05:55


Reply With Quote




