Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 36
0 members and 36 guests
No Members online
Most users ever online was 611, 03-21-2008 at 11:10 PM.
» .::.
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
The Lyric Archive
Dining Room Furniture

Go Back   Nukemods Forum > PHP-Nuke 7.x > Nuke 7.x - Blocks

Reply
 
LinkBack Thread Tools Display Modes
Old
  (#11 (permalink))
Junior Member
 
Status: Offline
Posts: 9
Join Date: Feb 2005
02-23-2005, 01:11 PM

what do you mean "not work" - what isn't happening?

you are making a new block and select that file from the file list aren't you?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
yea
Old
  (#12 (permalink))
Junior Member
 
Status: Offline
Posts: 28
Join Date: Jan 2005
yea - 02-23-2005, 01:52 PM

yea i am heres my web www.freepgs.com/75thrb its on the bottom left my msn is Zombie_76@hotmail.com and my aol is Zombie18256
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#13 (permalink))
Junior Member
 
Status: Offline
Posts: 9
Join Date: Feb 2005
02-23-2005, 02:01 PM

have you filled in the info at the top of the block?


Code:
// **** settings - to be edited before first use ****

$serverAddress = "";  // can be ip address or url

$serverQueryPort = 51234;  // default 51234, must be accessible and usable. check server.ini

$serverUDPPort = 8767;  // default 8767
you need to put something into $serverAddress (and NOT localhost).

make sure the ports are the ones you are using and that the teamspeak server is actually running
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
yup
Old
  (#14 (permalink))
Junior Member
 
Status: Offline
Posts: 28
Join Date: Jan 2005
yup - 02-23-2005, 02:03 PM

yup
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#15 (permalink))
Junior Member
 
Status: Offline
Posts: 9
Join Date: Feb 2005
02-23-2005, 02:24 PM

dunno then. it works perfectly for me.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
could
Old
  (#16 (permalink))
Junior Member
 
Status: Offline
Posts: 28
Join Date: Jan 2005
could - 02-23-2005, 03:30 PM

could you do it for me?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
hmm
Old
  (#17 (permalink))
Junior Member
 
Status: Offline
Posts: 28
Join Date: Jan 2005
hmm - 02-23-2005, 03:51 PM

i got it to workj butttt its some one elses team speak for some rezen it wont work with mine any ideas?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#18 (permalink))
Junior Member
 
Status: Offline
Posts: 9
Join Date: Feb 2005
02-23-2005, 04:22 PM

No idea. make damn sure that both those ports are open on your teamspeak server and make sure you're using the latest version.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#19 (permalink))
Junior Member
 
Status: Offline
Posts: 1
Join Date: Feb 2005
05-21-2005, 08:21 AM

var $serverURL = "67.15.66.163:9088"; // will be used for the connect link.

Remove the :9088 <----this is not required on this line and will not work with it. This is why you have a line (couple down) for the port number to go.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#20 (permalink))
Junior Member
 
Status: Offline
Posts: 58
Join Date: Jun 2005
Location: Norway
06-06-2005, 04:11 PM

An error connecting to the TeamSpeak server has occured!
Error number:
Error description:

I have made a file called: block-TeamSpeak2.php

Added the block whit this code:

Code:
<?php


// **** settings - to be edited before first use ****

$serverAddress = "82.136.20.53";  // 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-Teamspeak2.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");
}

// answer OK?
function getOK($socket) {
        $result = fread($socket, 2);
        fgets($socket, 128);
        return($result == "OK");
}

// closes the connection to the teamspeak server
function closeSocket($socket) {
        fputs($socket, "quit");
        fclose($socket);
}

// retrieves the next argument in a tabulator-separated string (PHP scanf function bug workaround)
function getNext($evalString) {
        $pos = strpos($evalString, "\t");
        if(is_integer($pos)) {
      return substr($evalString, 0, $pos);
        }
        else {
            return $evalString;
        }
}

// removes the first argument in a tabulator-separated string (PHP scanf function bug workaround)
function chopNext($evalString) {
        $pos = strpos($evalString, "\t");
        if(is_integer($pos)) {
      return substr($evalString, $pos + 1);
        }
        else {
           return "";
        }
}

// MAIN PROGRAM START

// establish connection to teamspeak server
$socket = getSocket($serverAddress, $serverQueryPort, $errno, $errstr, 3);
if($socket == false) {
        $content .= "An error connecting to the TeamSpeak server has occured!
\n";
        $content .= "Error number: ".$errno."
\n";
        $content .= "Error description: ".$errstr."
\n";
        return;
}

// select the one and only running server on port 8767
sendQuery($socket, "sel ".$serverUDPPort);

// retrieve answer "OK"
if(!getOK($socket)) {
   die("Server didn't answer &quot;OK&quot; after last command. Aborting.");
}// end if

// retrieve player list
sendQuery($socket,"pl");

// read player info
$playerList = array();

//Skip the first line. It only contains header labels
fgets($socket);
while (true)
{
   //Read the next line from the socket
   $line = fgets($socket);

   //Break it up on the tab delimiter
   $playerinfo = explode("\t", $line);

   //Bail out if only one element
   if (count($playerinfo) == 1)
   {
      //Only one element means the OK has been encountered.
      //The list is done.
      break;
   }
   
   //Stuff the array values into variables
   list($playerid, $channelid, $receivedpackets, $receivedbytes, $sentpackets, $sentbytes, $d, $d, $totaltime, $idletime, $d, $d, $d, $s, $playername) = $playerinfo;
   
   $playerList[$playerid] = array("playerid" => $playerid,
               "channelid" => $channelid,
               "receivedpackets" => $receivedpackets,
               "receivedbytes" => $receivedbytes,
               "sentpackets" => $sentpackets,
               "sentbytes" => $sentbytes,
               "totaltime" => $totaltime,
               "idletime" => $idletime,
               "playername" => str_replace("\"", "", $playername));
}



// retrieve channel list
sendQuery($socket,"cl");

// read channel info
$channelList = array();
do {
        $channelinfo = "";
        do {
      $input = fread($socket, 1);
      if($input != "\n" && $input != "\r") $channelinfo .= $input;
        } while($input != "\n");

        $channelid = getNext($channelinfo);
        $channelinfo = chopNext($channelinfo);
        $codec = getNext($channelinfo);
        $channelinfo = chopNext($channelinfo);
        $parent = getNext($channelinfo);
        $channelinfo = chopNext($channelinfo);
        $d = getNext($channelinfo);
        $channelinfo = chopNext($channelinfo);
        $maxplayers = getNext($channelinfo);
        $channelinfo = chopNext($channelinfo);
        $channelname = getNext($channelinfo);
        $channelinfo = chopNext($channelinfo);
        $d = getNext($channelinfo);
        $channelinfo = chopNext($channelinfo);
        $d = getNext($channelinfo);
        $channelinfo = chopNext($channelinfo);
        $topic = getNext($channelinfo);

        if($channelid != "OK") {
      if($isdefault == "Default") $isdefault = 1; else $isdefault = 0;

               // determine number of players in channel
               $playercount = 0;
               foreach($playerList as $playerInfo) {
                   if($playerInfo[channelid] == $channelid) $playercount++;
               }

               $channelList[$channelid] = array("channelid" => $channelid,
                                             "codec" => $codec,
                                             "parent" => $parent,
                                             "maxplayers" => $maxplayers,
                                             "channelname" => $channelname,
                                             "isdefault" => $isdefault,
                                             "topic" => $topic,
                                             "currentplayers" => $playercount);
   }
} while($channelid != "OK");

// display channel list
$counter = 0;
foreach($channelList as $channelInfo) {
   // default channel?
        if($channelInfo[isdefault] == 1) {
            $channelname = $channelInfo[channelname];
        } else {
            $channelname = $channelInfo[channelname];
        }

      if ($channelInfo[currentplayers] > 0) {
         $content .= "<img src=\"images/ts_channel.gif\" border=\"0\"> ".$channelname."
";
      }

        $counter++;
        foreach ($playerList as $playerInfo) {
           if ($channelInfo[channelid] == $playerInfo[channelid]) {
              $content .= "<img src=\"images/ts_user.gif\" border=\"0\"> ".$playerInfo[playername]."
\n";
           }
        }
    }

    if($counter == 0) $content .= "No channels\n";

    // close connection to teamspeak server
    closeSocket($socket);



 

$content .= "<form name=\"testform\">";
$content .= "
";
$content .= "<input type=\"text\" name=\"NICKNAME\"> Nickname";
$content .= "
";
$content .= "<input type=\"text\" name=\"LOGINNAME\"> Login Name";
$content .= "
";
$content .= "<input type=\"text\" name=\"PASSWORD\"> Password";
$content .= "
";
$content .= "
";
$content .= "<center><input type=\"button\" value=\"Connect\" onClick=\"location.href='teamspeak://$serverAddress: $serverUDPPort/nickname=' + testform.NICKNAME.value + '?loginname=' + testform.LOGINNAME.value + '?password=' + testform.PASSWORD.value;\"></center>";
$content .= "
";

$content .= "</form>";

?>
I have edited the top
Code:
$serverAddress = "82.136.20.53";  // can be ip address or url

$serverQueryPort = 51234;  // default 51234, must be accessible and usable. check server.ini

$serverUDPPort = 8767;  // default 8767

so its suits oure connections.. still i get the error showed on start of this tread :(

Anyone??

Of someone got any other TS2 block, feel fre to post it here :D
  Send a message via MSN to raiisak  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
teamspeak block for phpnuke romer Open topics 5 01-14-2005 08:50 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31