that's a ported version of webpost isn't it?
I was gonna port webpost...but I didn't really like the 5 min refresh time and I found some errors in the flag processing code giving the wrong icon for away etc (in the version I had anyway - which I think was the latest) and couldn't be bothered to edit all of it, so I made my own from the html of the webpost script and some the raw socket connection code in }#{REDRUM's teamspeak block.
D_R_A_G_O_N Nuke Soldier
Joined: Jan 02, 2005
Posts: 31
Location: harrisburg pa
Posted:
Sat Jan 08, 2005 7:25 am
yep sure is .... heavily modifed ... added alot of new code .....but have not had the time or will power to finish it yet
BYTES Nuke Cadet
Joined: Jan 14, 2005
Posts: 2
Posted:
Thu Jan 13, 2005 10:01 pm
I would like to thank jaj and CaptDD for their excellent posts. My other webadmin, Aleister, edited the code to fit inside of a narrower block. The alignment is set to the left, and there are no images which offers a much cleaner look IMHO. He also set the max number of characters to 15, but you can modify the number, as well as the colors, to fit you needs. You are welcome to see it in action on our website http://www.dcwclan.com.
Code:
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi (fbc@mandrakesoft.com) */
/* http://phpnuke.org */
/* */
/* 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 2 of the License. */
/************************************************************************/
/************************************************************************/
/* block-Teamspeak3.php */
/* =========================== */
/* */
/* Copyright (c) 2004 by jaj (jaj@nukecops.com) */
/* http://nukecops.com */
/************************************************************************/
/* Cosmetic changes by CaptDD at webmaster@rapidfireclan.com */
/* http://rapidfireclan.com */
/************************************************************************/
/* Additional Cosmetic changes by Aleister at admin@dcwclan.com */
/* http://www.dcwclan.com */
/************************************************************************/
// **** settings - to be edited before first use ****
$serverAddress = "xxx.xxx.xxx.xxx"; // can be ip address or url
$serverQueryPort = 51234; // default 51234, must be accessible and usable. check server.ini
$serverUDPPort = 8767; // default 8767
// **** end of settings ****
if (eregi("block-Teamspeak3.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
global $user, $cookie;
getusrinfo($user);
cookiedecode($user);
$username = $cookie[1];
// opens a connection to the teamspeak server
function getSocket($host, $port, $errno, $errstr, $timeout) {
global $errno, $errstr;
@$socket = fsockopen($host, $port, $errno, $errstr, $timeout);
if($socket and fread($socket, 4) == "[TS]") {
fgets($socket, 128);
return $socket;
}// end if
return false;
}// end function getSocket(...)
// sends a query to the teamspeak server
function sendQuery($socket, $query) {
fputs($socket, $query."\n");
}
// determine number of players in channel
$playercount = 0;
foreach($playerList as $playerInfo) {
if($playerInfo[channelid] == $channelid) $playercount++;
}
I've been coding a teamspeak block recently where you can get all the player, channel and server data by clicking on names.
Just been cleaning out the code and removing glitches like html tags being processed etc.
the TS block is running on http://www.btb-clan.f2s.com/index.php
it's at the bottom of the page in the middle.
it doesn't use webpost but it does use the database to output the channel and user data.
Tell me if anyone wants the code for it.
I am very interested in this , i love the way it looks and i was wondering if i could have that code from you, and under what terms would i be able to use it.
Cash Nuke Cadet
Joined: Jan 21, 2005
Posts: 1
Posted:
Fri Jan 21, 2005 9:40 am
I'm also very interested, it look great!
And i'm also wondering if I could use it?
JWP1987 Nuke Cadet
Joined: Jan 06, 2005
Posts: 4
Posted:
Sat Jan 22, 2005 8:49 am
ok I'll fix all the bugs I can find then upload it for release
let me know if there are any problems.
sorry about the rushed readme and if u have any trouble installing it, it's
because I didn't really intend to release it
Josh00Si Nuke Cadet
Joined: Dec 27, 2004
Posts: 6
Posted:
Wed Jan 26, 2005 8:45 am
Is there a way to query a teamspeak server with out opening a socket. MY webhost doesn't allow a php script to open a socket.
Bowser Nuke Cadet
Joined: Feb 02, 2005
Posts: 3
Posted:
Wed Feb 02, 2005 9:55 am
Hi I ve tried some of the scripts posted on this site and always get the same connection error number 110 connection timed out.
I am wondering if it is for the reason Josh00Si has said above that my webhost wont allow php to open a socket.I put this question to my webhost but didn’t get an official answer from them this is what they said.
“yes this could be true if it uses a closed port, or it could be the fact that
register_globals are off or simply that we are running php5, but its up to you
m8 to contact the author of the script for support.
we will not open ports that are not normally used and we will not turn on
register_globals, this is a security matter
and both of these are to stop server abuse”
Can someone look at the code (as they all seem to be almost identical I guess you can answer from looking at the code in BYTES post above) and tell me if it is doing one of these things my host has said they don’t allow either:
“we will not open ports that are not normally used”
OR
“we will not turn on register_globals”
Thanks for you help any info on how I should go about it or what i can request off my server host to get it working would also be much appreciated.
Evaders99 Site Admin
Joined: Aug 17, 2003
Posts: 12383
Posted:
Wed Feb 02, 2005 2:21 pm
If they don't allow the port to be opened, then you're outta luck. Get a new host.
is there a block or how can i modify this one to show 2 team speaks in one block. i have 2 team speaks wirh 2 ip's, is there a way to do this?
Quote:
<?php
$usemarquee = 1;
$scrolldirection = "Up";
// **** settings - to be edited before first use ****
$serverAddress = "xxxxxxxxx"; // can be ip address or url
$serverQueryPort = xxxxxxx; // default 51234, must be accessible and usable. check server.ini
$serverUDPPort =xxxx ; // default 8767
// **** end of settings ****
if (eregi("block-TeamspeakV2.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
// opens a connection to the teamspeak server
function getSocket($host, $port, $errno, $errstr, $timeout) {
global $errno, $errstr;
@$socket = fsockopen($host, $port, $errno, $errstr, $timeout);
if($socket and fread($socket, 4) == "[TS]") {
fgets($socket, 128);
return $socket;
}// end if
return false;
}// end function getSocket(...)
// sends a query to the teamspeak server
function sendQuery($socket, $query) {
fputs($socket, $query."\n");
}
// determine number of players in channel
$playercount = 0;
foreach($playerList as $playerInfo) {
if($playerInfo[channelid] == $channelid) $playercount++;
}
I want to install the TS block, but I need a tweak for it. We share a public TS Server with over 100 channels and I only want to show ours.
Please can you tell me which part of the code I need to edit to show our channel and the sub-channels within it.
CaptDD Corporal
Joined: Jan 02, 2005
Posts: 51
Location: Manistee, MI, USA
Posted:
Wed Feb 16, 2005 9:10 am
Trying to update my site by using the teamspeak block from JWP1987. The block installs and partially works. I am not getting any input to the database for ts_user or ts_channel, the table remains empty. The block does show server info such as server name, IP and message. I believe this shows that the connection to the server is being established. However I get an error message in the main area of the block (which should show channels)"Data unavailable.TCPQueryPort may not be open." This I think is due to the data not being placed in the database. Does anyone else have this problem or does anyone know the fix? Does this block need a config.php to access the database?
_________________
Smirnof Nuke Cadet
Joined: Jan 09, 2005
Posts: 1
Posted:
Sun Feb 20, 2005 10:20 pm
I was installing this block on my site and was having some problems working with it. Just trying to figure out what my server settings for my site are so I can update them on the TS settings. So I need to know where to find the server port, and serverUDpport. I looked all througout my ftp and couldn't find a server.ini file.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum