TinyPortal

Development => Block Codes => Topic started by: -Prismatic- on October 14, 2005, 04:20:45 PM

Title: Teamspeak block!
Post by: -Prismatic- on October 14, 2005, 04:20:45 PM
Ive been using this for a long time on my website and figured a lot of others would benefit from it aswell :)

Directions
Download and unzip Teamspeak.zip to a subfolder in the root of your forum called teamspeak (IE. www.yoursite.com/yourboards/teamspeak/)
Open ts_viewer.php
Find:

Code: [Select]
$ts_viewer->set_Viewer("Prestigious Gaming", "http://lifeisshort.warrency.com/");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("warrency.com", 8767, 51234, "");

See this line >> $ts_viewer->set_Viewer("Prestigious Gaming", "http://lifeisshort.warrency.com/");
Replace Prestigious Gaming with the name of your Teamspeak server, and http://lifeisshort.warrency.com/ with the link to your site

See this line >> $ts_viewer->show_ts_viewer("warrency.com", 8767, 51234, "");
Replace warrency.com with the ip/web address to the teamspeak server. "8767, 51234" are ports I believe... (should be fine with defaults)

To Make it show up on your website
Create a new PHP block. Inside of it place this code >> include ("teamspeak/ts_viewer.php");

That should be it! If it doesn't work post here with the problem and I will try to help you fix it :)

Live Demo: http://lifeisshort.warrency.com - Lower right side.

Please use the attached file in this post for the teamspeak block. It should be error free.
http://www.tinyportal.net/index.php?topic=1021.msg26256#msg26256
Title: Re: Teamspeak block!
Post by: Racenut on October 14, 2005, 04:32:53 PM
I have been waiting for this! Bless you  :)
Title: Re: Teamspeak block!
Post by: -Prismatic- on October 14, 2005, 04:55:21 PM
Np :) It wasn't made by me, but origonally it would cause hell for TP, and the config file was compressed to around 12-15 lines :| What I did was make it function in a TP block with no issues and clean up the config file :)
Title: Re: Teamspeak block!
Post by: Racenut on October 14, 2005, 05:19:06 PM
It worked, however the images do not show. Any idea why?
Title: Re: Teamspeak block!
Post by: Racenut on October 14, 2005, 05:41:13 PM
Ok, I see why the images are not showing. When i right click on where the images are supposed to be, i see the path to the images is wrong. The path it calls for is http://mysite.com/forum/xx.gif. The images are actually at http://www.mysite.com/forum/teamspeak/xx.gif. What is the best way to correct this? Should i just dump the images out in the forum directory or should the code be changed somewhere to make it point to where they are now?

thanks
Title: Re: Teamspeak block!
Post by: -Prismatic- on October 14, 2005, 05:50:14 PM
Aside from editing the code in the config file that would probably be your best bet =X


Edit - let me modify the config file for you hang on..
Title: Re: Teamspeak block!
Post by: Racenut on October 14, 2005, 05:52:56 PM
ok thanks :) but why does it call for the images from the wrong place? Only reason I ask is Im wondering if its just me or if your instructions need to be changed a bit. I just always like to know why the problem occurs so I can learn from it. :)
Title: Re: Teamspeak block!
Post by: -Prismatic- on October 14, 2005, 05:56:11 PM
Here try this config. It looks for the images in the /teamspeak/ folder :)
Title: Re: Teamspeak block!
Post by: Racenut on October 14, 2005, 05:59:05 PM
Worked like a charm  ;)
Title: Re: Teamspeak block!
Post by: -Prismatic- on October 14, 2005, 05:59:45 PM
Cool :D

Edit - And if you are wondering why it was happening. The way the images were being called were the straight images, no directorys, because I assumed that since the ts_viewer and config files were in the folder with them, it would call them correctly, but it appears when you include the php file it acts as if it's right there in the root folder :) so I added "teamspeak/" to the begining of all the files so they get called from the right place.
Title: Re: Teamspeak block!
Post by: c4thecat on November 08, 2005, 07:26:10 PM
I am haveing trouble getting mine to repoet  this is the code i have

Code: [Select]

   $ts_viewer->set_Viewer("EcK Teamspeak", "http://www.elitedominion.com/");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("63.210.145.69", 8793, 51234, "");
   


The port the the ts  is 8793   and im prity sure the query post is right     but all i get it srever offline

you can view this at  www.elitedominion.com/forums/
Title: Re: Teamspeak block!
Post by: IchBin on November 08, 2005, 11:33:58 PM
both ports 8767 and 51234 have to be open to the server I believe.
Title: Re: Teamspeak block!
Post by: c4thecat on November 09, 2005, 01:34:35 PM
I have trying even the IP  and haveing the standerd ports open im begenning to wonder if the query port is being blocked


can someone post there working conig   to allow me to test my setting to see is the web host it allowing it
Title: Re: Teamspeak block!
Post by: Leviathan on November 09, 2005, 04:44:58 PM
Excellent work Prismatic, been looking forward for this for quiet some time!

One minor bug though, but you probably noticed this yourself as well (or is it just me?), but when an users uses a nickname which will make the nickname + flags wrap to the next line, than the status symbol (so the green light for most users) moves down to the 2nd line as well. Same thing happens when the the channel name doesn't fit the block. No big deal though...

Will you be including a feature in the future to enter a username & password to connect with?

@ c4thecat:
have a look at my test forum (http://www.zonewarriors.com/testforum/), that is your TS server and it is working perfectly. All I did was extract the teamspeak.zip file to the forum directory and copy&past your config code posted previously in the ts_viewer.php file. In TPAdmin I added a new phpblock with the code mentioned in Prismatic's origional post. Works great, so must be your hosts blocking some ports :(

@ Prismatic: Look at the "Counter-Strike: Source" channel in c4thecats TS Block on my website and you'll see what I mean.
Title: Re: Teamspeak block!
Post by: c4thecat on November 09, 2005, 04:58:54 PM
Thank you very much for helping me with this   


Now for anouther bit if help   if i should want to be able to run 2  diferent box's on the samne page could i just change the   tsveiwer to maby tsveiwer2  add a command into a box 
include ("teamspeak/ts_viewer2.php"); whould that work?  or do i need to also mess with the config file


BTW Leviathan you where 100% correct   for some reson  my web serer was blocking that port range  Thank you again and if you ever need some help let me know not good with web code but i can set up game servers   and networks ;)



Upadted thet where several places i need to change the neam on the fils but i have it working    now 

Tried it didnt work   am i missing some thing get this error
atal error: Cannot redeclare class ts_viewer in /home/elitedom/public_html/forums/teamspeak/ts_config.inc.php on line 3

i tryed make a copy and naming it ts_config2.php  and linking the ts_viewer2.php to it bit im not sure what the erreo is   when i make 2 difrents php sets  i get this error
atal error: Cannot redeclare class ts_viewer in /home/elitedom/public_html/forums/teamspeak/ts_config.inc2.php on line 3

so it must be linking but not working   hmmm....... /me beats head aginst wall







Title: Re: Teamspeak block!
Post by: IchBin on November 10, 2005, 05:40:16 PM
Best way to do it IMO would be to make another folder and copy those files into it. Then just change your server details and call the tsviewer.php file from that folder. :)
Title: Re: Teamspeak block!
Post by: c4thecat on November 10, 2005, 05:54:05 PM
That would make more sence   :idiot2: :idiot2: :idiot2: :uglystupid2: :uglystupid2: :uglystupid2:
Title: Re: Teamspeak block!
Post by: Leviathan on November 10, 2005, 06:03:16 PM
I just discovered a problem with my own setup. Everything works fine on the forum index (http://www.zonewarriors.com/forum/index.php?action=forum), but as soon as I enter a board index (http://www.zonewarriors.com/forum/index.php/board,20.0.html) the path to the images in the TS block point to a wrong path! (i.e. http://www.zonewarriors.com/forum/index.php/teamspeak/channel.gif instead of the proper http://www.zonewarriors.com/forum/teamspeak/channel.gif location)

Any suggestion on what I'm doing wrong or how to fix this? I followed the instructions in the first post to the best of my knowledge :)

Regarding the fatal error your getting, I'm not sure using separate folders will solve the issue here, because both scripts will still try to declare (initialize) the class 'ts_viewer' twice, which PHP doesn't like. Than again, I'm no PHP guru so don't take my workt for it :)

Just my €2
Title: Re: Teamspeak block!
Post by: c4thecat on November 10, 2005, 10:25:43 PM
Im not sure  i have my forums set up to lose the side bars when you click on the froums butten or enter the forum   

not sure how it was dont one of my other admins were playing when they shoudl have    but he likes it  so i told hin he could leave it
Title: Re: Teamspeak block!
Post by: Leviathan on November 11, 2005, 06:47:09 AM
Well I fixed my problem by harcoding the correct relative path in the ts_config.inc.php file (search & replace teamspeak/ with /forum/teamspeak/). But I would imagine there is some kind of global SMF variable available that contains the forum root path, anyone know what I mean?

As for your 'cannot redeclare' problem, I just had a quick look at it and the easiest solution would be to remove/comment the line require('ts_config.inc.php'); in your ts_viewer2.php file. No need for a ts_config2.inc.php at all, because all the ts_viewer2.php needs is already included by the first block containing the ts_viewer.php code. Have a look at my test forum (http://www.zonewarriors.com/testforum/) to see it in action :)
Title: Re: Teamspeak block!
Post by: IchBin on November 11, 2005, 09:30:45 AM
$scripturl is the global variable I believe for SMF.
Title: Re: Teamspeak block!
Post by: Leviathan on November 11, 2005, 09:54:45 AM
Thx! If I only knew how to access that global var from within the ts_config.inc.php script :)

I'll just leave it hardcoded for now, works for me!
Title: Re: Teamspeak block!
Post by: OIDanTheManIO on November 14, 2005, 08:58:24 AM
Is there a way to make the contents of just one channel displayed?
Title: Re: Teamspeak block!
Post by: OIDanTheManIO on November 14, 2005, 03:14:46 PM
Also, is there any way to add vertical scrollbars to this if it reaches a certain size?
Title: Re: Teamspeak block!
Post by: Leviathan on November 14, 2005, 03:51:00 PM
Don't hold your breath dtm.exe :)

Prismatic only 'hacked' this script into a TinyPortal block and we are not even sure if he is taking feature request :)

As you can see in the header of the ts_viewer.php file, it was written by a German called Mike, there is a nice link to his (clan) website in your TS Block ;)

I just had a quick look at the version I downloaded at his site and it seems to me Prismatic used the latest version :)

How is your German anyway? I noticed Mike is currently hanging around on his own TS server, ask the master himself, he is only 2 clicks away :)
Title: Re: Teamspeak block!
Post by: OIDanTheManIO on November 15, 2005, 02:17:57 PM
I got the channel thing to work :).
Title: Re: Teamspeak block!
Post by: IchBin on November 15, 2005, 02:41:57 PM
Would you please post your code for anyone else that may want this?
Title: Re: Teamspeak block!
Post by: OIDanTheManIO on November 16, 2005, 08:52:42 PM
Would you please post your code for anyone else that may want this?

Sure.  First of all, you have to setup the config normally...with no specified channel.  Once you have the includes added to the PHP block, mouseover your channel and note the ID number.  Open the config and add ("NUMBER") in place of the () next to the channel line.
Title: Re: Teamspeak block!
Post by: Nightstalker on November 18, 2005, 01:57:39 PM
Where can I find this code at ?
Title: Re: Teamspeak block!
Post by: IchBin on November 18, 2005, 02:39:53 PM
In the TS block download at the beginning of this thread.
Title: Re: Teamspeak block!
Post by: Nightstalker on November 18, 2005, 04:02:30 PM
ahhhhhhhh,bloody so small I must of missed it a dozen times. :)

Thanks.
Title: Re: Teamspeak block!
Post by: Nightstalker on November 18, 2005, 04:31:45 PM
Ok followed the install quide a beginning of post and this is what I ended up with.

Server is offline but I know its up,because Im in it.
Title: Re: Teamspeak block!
Post by: IchBin on November 18, 2005, 09:08:11 PM
The server has to have a certain port open, which one I am unsure of though. This can cause the server offline error. I think it's something close to 14534
Title: Re: Teamspeak block!
Post by: Nightstalker on November 18, 2005, 09:45:17 PM
Yep it looks like the TS server is using a query port that I dont know the number of,ie default 51234 must be something else.
Title: Re: Teamspeak block!
Post by: IchBin on November 18, 2005, 09:53:18 PM
There are 3 ports that TS uses. 8767 for the server, 14534 for the web administration, and 51234 on the query port I believe.
Title: Re: Teamspeak block!
Post by: Nightstalker on November 19, 2005, 06:53:05 AM
Can i possibly get some help here,still getting a offline message showing.

Thanks.

/* ---------- Teamspeak-Viewer - Anfang ---------------*/

   $ts_viewer->set_Viewer("Mortal Combat Australia", "http://www.mortalcombataustralia.net");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("59.167.47.107", 8767, 51234, "");
   
/* ---------- Teamspeak-Viewer - Ende ---------------*/
Title: Re: Teamspeak block!
Post by: Nightstalker on November 19, 2005, 09:15:16 AM
Got it working.I didnt port forward the query port.
Title: Re: Teamspeak block!
Post by: Nightstalker on November 19, 2005, 11:05:21 AM
The teamspeak text in the block is a bit bunched up.is there a setting for the width of the text that I can change.Ive had a look and couldnt see anything.Also are the usernames limited to olny 10 characters as my username doesnt show up in full,its missing the last 2 letters.

Thanks.
Title: Re: Teamspeak block!
Post by: IchBin on November 19, 2005, 02:18:04 PM
I'm not sure about character name length, but for font size I think you can change this in your tsviewer.php file where it says font-size:
Code: [Select]
<style type="text/css">
<!--
.smaller {
color: #424274;
font-size: 8pt;
font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular;
}

.smaller1 {
color: #424274;
font-size: 5pt;
font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular;
}

-->
</style>
Title: Re: Teamspeak block!
Post by: Nightstalker on November 19, 2005, 08:30:09 PM
I played with the font size and that didnt help,if anything made thihgs worse.I need to adjust the layout (width and height) of TS in the block,I think this maybe the problem,
Title: Re: Teamspeak block!
Post by: IchBin on November 19, 2005, 11:10:37 PM
Well all the table settings and stuff are in the config.inc.php file. Just look for the html code are start playing with it. I'm not sure exactly what you're looking for or I would be able to do it for you.
Title: Re: Teamspeak block!
Post by: Nightstalker on November 19, 2005, 11:49:04 PM
All the text sits to the left side of the block,if I could some how get the text to expand a bit to the right it might solve the problem Im having.

Cheers.

Update... Its sort of fixed though still missing the last 2 letters of my teamspeak username.

Title: Re: Teamspeak block!
Post by: Nightstalker on November 20, 2005, 12:35:18 PM
OK,sory to be such a pain but now Ive come across another problem with the Teamspeak block.Seems when I only view the topics and posts inside the forum the teamspeak icons are missing,theres only square blank holes.How would I go about fixing this.

Thanks.
Title: Re: Teamspeak block!
Post by: IchBin on November 20, 2005, 02:22:44 PM
Are you looking at the blank images to see where it's looking for them in the path?
Title: Re: Teamspeak block!
Post by: Nightstalker on November 20, 2005, 02:40:40 PM
I seem to be having issues with browsers concerning my forums.With firefox some things dont line up correct,with IE everthing is perfect ?
It seems that the forums/index.php/doesnt contain the images for it to display,I will have a look and see whats happening.

Thanks.

If I click on one of the empty images this is the following line I get

http://mortalcombataustralia.net/forums/index.php/teamspeak/teamspeak.gif
Type- not available
Size not available
created --not available
Mdified not available
Title: Re: Teamspeak block!
Post by: Scooby on December 29, 2005, 06:16:29 AM
Can you help please

i have installed the teamspeak php folder to my site
http://www.scoobydoo.me.uk

but it keeps saying that the server is offline

Title: Re: Teamspeak block!
Post by: IchBin on December 29, 2005, 10:49:00 AM
The server must have the ports opened. There are 3 ports that TS uses. 8767 for the server, 14534 for the web administration, and 51234 on the query port I believe.

The query port is the one that probably is not opened on your TS server.
Title: Re: Teamspeak block!
Post by: Scooby on December 29, 2005, 10:50:52 AM
when looking at my settings it appears that the server port is not 8767 but 8512 does this make a difference?
Title: Re: Teamspeak block!
Post by: IchBin on December 29, 2005, 10:58:55 AM
As long as your port is set in the config file for the teamspeak block.
Title: Re: Teamspeak block!
Post by: Kromel on December 30, 2005, 09:34:11 PM
This TeamSpeak block kicks arse!
Title: Re: Teamspeak block!
Post by: Jaz on January 10, 2006, 12:35:19 PM
Hi,
Being new to this, I finally got the TS block to work. Good stuff  :)

I'm using this in the Helios Theme and the users names being in a dark shade do not show up to well.

Could someone explain to me how and where I can change this colour, I thought Lime Green or Yellow would stand out.

Thanks in advance
Title: Re: Teamspeak block!
Post by: IchBin on January 10, 2006, 12:44:32 PM
Its in the TS files. Open up the ts_veiwer.php file and look for this part and you can change the colors I believe.

Code: [Select]
<style type="text/css">
<!--
        .smaller {
                color: #424274;
                font-size: 8pt;
                font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular;
        }

                .smaller1 {
                color: #424274;
                font-size: 5pt;
                font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular;
        }

-->
</style>
Title: Re: Teamspeak block!
Post by: Jaz on January 10, 2006, 12:54:54 PM
Yep, that worked, thank you  :)  :)
Title: Re: Teamspeak block!
Post by: stigmartyr on January 11, 2006, 01:57:25 AM
WOOHOO!  TP rox my sox!
Title: Re: Teamspeak block!
Post by: core on January 13, 2006, 01:59:16 PM
question:

Great TS block for TP.. very nice works like a charm...

the only thing I am wondering is... is there a way to get either a

1) username field in the user profile of smf wich represents TS name and Password and maybe even server password wich will be then added into the teamspeak:// connect link when you click a channel

or

2) a way to maybe hardcode the connect string to add current username to the string / serverpassword?

connect link is now displayed as:
teamspeak://62.212.xx.xx:8767/?channel=Main Channel?password=

My ts server has a serverpassword (and some registerd members)

I would do it myselve if I knew how to code the username variable in there  :-\
Title: Re: Teamspeak block!
Post by: scope on January 15, 2006, 02:09:22 AM
I am having problems getting this to work.  Maybe someone else can help me.

My TS server is:
ts2.digitalserialkillers.com:9908

ts_viewer has the following code:
/* ---------- Teamspeak-Viewer - Anfang ---------------*/

   $ts_viewer->set_Viewer("Digital Serial Killers", "http://www.digitalserialkillers.com/smf");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("ts2.digitalserialkillers.com",51234,9908, "");
   
/* ---------- Teamspeak-Viewer - Ende ---------------*/

I changed the 8767 port to 9908 since that is the port users have to use to connect.  I assume this is correct. 
Note: Leaving the default setup didn't work either, using the original changes as mentioned.

I then changed the port in the ts_config_inc as shown below:
function show_ts_viewer($_16, $_17=9908, $_18=51234, $_19="")
      {
         $this->g_serverAddress=$_16;
         $this->g_serverQueryPort=$_18;
         $this->g_serverUDPPort=$_17;
         $this->g_serverPasswort=$_19;
         $this->_8();
         $this->g_userName="Guest";

Still not working.  Please try and connect to my server and let me know what you think is wrong or if you connect, let me know the changes you made to get it working.

Help is very much appreciated.
Title: Re: Teamspeak block!
Post by: Jaz on January 15, 2006, 03:40:54 AM
Im very new to this, but I think you need to put spaces in between you server/ip name, ports. I also put my TS port number first, try the following

$ts_viewer->show_ts_viewer("ts2.digitalserialkillers.com", 9908, 51234, "");

I hope this is right, but if it's wrong sorry, Im sure someone else will help you get it right

I didnt have to change anything in ts_config_inc file
Title: Re: Teamspeak block!
Post by: insanemustang on January 16, 2006, 04:37:25 PM
I took need to know about how to define a server password for teamspeak into the config files somehow.
Title: Re: Teamspeak block!
Post by: scope on January 16, 2006, 04:45:38 PM
From what I gather, at the end of the ts_viewer.php script, where it has the ports, there are two quotes at the end of that line.  Put the password in there and you should be good to go.

Should look like this
$ts_viewer->show_ts_viewer("warrency.com", 8767, 51234, "PASSWORD_HERE");
Title: Re: Teamspeak block!
Post by: core on January 17, 2006, 11:19:49 AM
nice1 scope!

now next step anybody know how to pickup the SMF username and code it into the "click on channel name" link?
Title: Re: Teamspeak block!
Post by: insanemustang on January 17, 2006, 06:09:33 PM
Yea that would be great 
Title: Re: Teamspeak block!
Post by: scope on January 17, 2006, 08:10:21 PM
nice1 scope!

now next step anybody know how to pickup the SMF username and code it into the "click on channel name" link?

Someone who knows java script could add a string that ask the person what their name is, and then after they hit enter it would fill in the current value of where you see guest in ts_config_inc.php

Sounds simple, but I don't know right off how to do it.

The part you need to change is the value marked guest in ts_config_inc.php.  I will look at a few scripts after I get home tonight and see what I copme up with, if anything.
Title: Re: Teamspeak block!
Post by: insanemustang on January 17, 2006, 08:24:55 PM
sounds good, thanks
Title: Re: Teamspeak block!
Post by: core on January 18, 2006, 01:07:20 AM
I have had someone code in a string to pickup username for my yabb se forum and place it in a TS link... I'll check it out aswell... we'll get there  :laugh:
Title: Re: Teamspeak block!
Post by: scope on January 18, 2006, 09:51:20 PM
Here is the code from another teamspeak monitor:

// Generate javascript for teamspeak hyperlinks
         $jsTeamspeakId = md5($settings["serveraddress"] . ":" . $settings["serverudpport"]);
         echo("<script type=\"text/javascript\"><!--\n");
         echo("function stringOk_" . $jsTeamspeakId . "(string, forbiddenChars) {\n");
         echo("   for(var i = 0; i < string.length; i++) {\n");
         echo("      if (forbiddenChars.indexOf(string.charAt(i)) > -1) {\n");
         echo("         return false;\n");
         echo("      }\n");
         echo("   }\n");
         echo("   return true;\n");
         echo("}\n");
         echo("function enterServer_" . $jsTeamspeakId . "() {\n");
         echo("   enterSubChannel_" . $jsTeamspeakId . "(null, false, null);\n");
         echo("}\n");
         echo("function enterChannel_" . $jsTeamspeakId . "(channelName, channelPassworded) {\n");
         echo("   enterSubChannel_" . $jsTeamspeakId . "(channelName, channelPassworded, null);\n");
         echo("}\n");
         echo("function enterSubChannel_" . $jsTeamspeakId . "(channelName, channelPassworded, subChannelName) {\n");
         echo("   var serveraddress = 'teamspeak://" . $settings["serveraddress"] . ":" . $settings["serverudpport"] . "';\n");
         echo("   var nickname=window.prompt('Enter your nickname', '');\n");
         echo("   if (nickname == null) {\n");
         echo("      return;\n");
         echo("   } else if (! stringOk_" . $jsTeamspeakId . "(nickname, '" . str_replace("'", "\\'", $settings["forbiddennicknamechars"]) . "')) {\n");
         echo("      window.alert('Could not enter the teamspeak server because the nickname you entered contains one or more of these forbidden characters: " . str_replace("'", "\\'", $settings["forbiddennicknamechars"]) . "');\n");
         echo("      return;\n");
         echo("   } else if (nickname == \"\") {\n");
         echo("      window.alert('Could not enter the teamspeak server because you did not enter your nickname');\n");
         echo("      return;\n");
         echo("   }\n");
         echo("   serveraddress = serveraddress + \"/nickname=\" + escape(nickname);\n");
         if ($serverInfo["serverinfo"]["server_password"] == "1") {
            echo("   var password=window.prompt('Enter the teamspeak server password for " . $serverInfo["serverinfo"]["server_name"] . "', '');\n");
            echo("   if (password == null) {\n");
            echo("      return;\n");
            echo("   } else if (password == \"\") {\n");
            echo("      window.alert('Could not enter the teamspeak server because you did not enter a server password');\n");
            echo("      return;\n");
            echo("   }\n");
            echo("   serveraddress = serveraddress + \"?password=\" + escape(password);\n");
         }
         echo("   if (channelName != null) { serveraddress = serveraddress + \"?channel=\" + escape(channelName); }\n");
         echo("   if (channelPassworded) {\n");
         echo("      var channelpassword=window.prompt('Enter the channel password for channel ' + channelName, '');\n");
         echo("      if (channelpassword == null) {\n");
         echo("         return;\n");
         echo("      } else if (channelpassword == \"\") {\n");
         echo("         window.alert('Could not enter the teamspeak server because you did not enter a channel password');\n");
         echo("         return;\n");
         echo("      }\n");
         echo("      serveraddress = serveraddress + \"?channelpassword=\" + escape(channelpassword);\n");
         echo("   }\n");
         echo("   if (subChannelName != null) { serveraddress = serveraddress + \"?subchannel=\" + escape(subChannelName); }\n");
         echo("   window.location=serveraddress;\n");
         echo("}\n");
         echo("//--></script>\n");

If you want to break it down to match the parts of this script. 

I don't want to insult the maker of this teamspeak, so I will not create a link to download the above listed code.  On the otherhand I would like to mention the script by name cause it is a very well made script.(teamspeakdisplay preview 3)

Both scripts are great, but this one offers the name option.  Maybe the creator can use this make it possible or someone here can.
Title: Re: Teamspeak block!
Post by: core on January 19, 2006, 10:33:23 AM
yo scope,

what do I do with this script?
is this a php bloc? do I need to get the new codes somewhere?

cheers,

T
Title: Re: Teamspeak block!
Post by: scope on January 19, 2006, 07:20:16 PM
that was part of teamspeakdisplay(different program) that allows the new person to choose the name to login with to your ts server.

I posted it to see if someone wanted to use it to get this version to use the same option, but code has to be changed to do this.
Title: Re: Teamspeak block!
Post by: core on January 20, 2006, 01:25:18 AM
option1:

-have a teamspeak username and password field in profile
-if fields have not been filled in: use only forum username (unregisterd connection)
-retrieve this info into the connect to room link
-admin area possibilities: configure teamspeak variables, serverip, port, serverpassword

option2:

-hardcode forum username into teamspeak connect to room link

option3:

-upon room name click popup connection form so users can enter their info


myself I am not so keen on option 3, 2 is possible someone did it for me before
have setup various ts thingies with this option. havent tried putting the form into a block yet
but thats a bit of a content overkill tho... just a link would be nice to have "connect to teamspeak"

anybody able to do this for smf/tp????

anybody???


cheers,

.T.


Title: Re: Teamspeak block!
Post by: darthmactis on February 05, 2006, 09:55:13 AM
Cant get this to work at all can i get some help please!!!!!!

http://sw.tgeclan.com/forums/index.php (http://sw.tgeclan.com/forums/index.php)
Title: Re: Teamspeak block!
Post by: IchBin on February 05, 2006, 11:38:44 AM
I do not even see your TS block darthmactis.
Title: Re: Teamspeak block!
Post by: darthmactis on February 05, 2006, 12:01:30 PM
this is the error i get

2: (null)(): Failed opening 'teamspeak/ts_viewer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php')
File: /home/wwwtgec/public_html/sw/forums/Themes/TP_helios_multi11_rc2/TPortal.template.php (eval?)
Line: 1


2: Unknown(teamspeak/ts_viewer.php): failed to open stream: No such file or directory
File: /home/wwwtgec/public_html/sw/forums/Themes/TP_helios_multi11_rc2/TPortal.template.php (eval?)
Line: 1


Its between the Shoutbox and recent
Title: Re: Teamspeak block!
Post by: IchBin on February 05, 2006, 12:12:21 PM
It's telling you that it can't access or find the ts_viewer.php file. Check to make sure it is there, and that permissions are set to at least 666.
Title: Re: Teamspeak block!
Post by: darthmactis on February 05, 2006, 12:16:36 PM
were do i set that permission at? in forums?
Title: Re: Teamspeak block!
Post by: IchBin on February 05, 2006, 12:17:27 PM
on the actual file in your ftp. Right click, chmod file. Set to 755 if you can.
Title: Re: Teamspeak block!
Post by: darthmactis on February 05, 2006, 12:23:28 PM
changed it to 755 still nothing

http://i29.photobucket.com/albums/c288/darthmactis/ts.jpg (http://i29.photobucket.com/albums/c288/darthmactis/ts.jpg)
Title: Re: Teamspeak block!
Post by: IchBin on February 05, 2006, 12:48:57 PM
In that picture you have it set to 644...
Title: Re: Teamspeak block!
Post by: Eponnox on February 05, 2006, 01:51:22 PM
i get this error

Quote
2: Unknown(teamspeak/ts_viewer.php): failed to open stream: No such file or directory
File: /home/eponnox/public_html/forum/Themes/default/TPortal.template.php (eval?)
Line: 1

its hosted on a friends ts

Quote
<?php

/* ---------- Teamspeak-Viewer - Anfang ---------------*/

   $ts_viewer->set_Viewer("Altitude", "http://www.frozenwebhosts.com/");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("209.67.211.75", 8767, 51234, 65456, "");
   
/* ---------- Teamspeak-Viewer - Ende ---------------*/

?>

any help would be nice thanks
Title: Re: Teamspeak block!
Post by: IchBin on February 05, 2006, 02:21:00 PM
2: Unknown(teamspeak/ts_viewer.php): failed to open stream: No such file or directory

This means that it cannot access your ts_viewer.php file. It is either missing, or permissions need to be set to 755 or so.
Title: Re: Teamspeak block!
Post by: Eponnox on February 05, 2006, 02:43:34 PM
Small problem that might effect others

i just fixed mine and guess what it was

include ("teamspeak/ts_viewer.php");
change to
include ("Teamspeak/ts_viewer.php");

AS IN THE DOWNLOAD

its Teamspeak/ts_viewer.php not teamspeak.ts_viewer.php

thank for the help anyway hope that helps someone before they smash there heads into the wall like i did
Title: Re: Teamspeak block!
Post by: tattooedpierre on February 05, 2006, 05:03:42 PM
I'm getting errors all over the shop with this block since updating to the new 0.8.6 TP, and RC2 :( .. it does still work however, but I get errors like:

8: Undefined property: g_channels
File: /home/theinfe/public_html/smf/teamspeak/ts_config.inc.php
Line: 76

8: Undefined variable: _50
File: /home/theinfe/public_html/smf/teamspeak/ts_config.inc.php
Line: 379

8: Undefined offset: 2
File: /home/theinfe/public_html/smf/teamspeak/ts_config.inc.php
Line: 227

.. etc etc.. I have pages and pages and pages of these types of errors :( .. any ideas?! I'm imagining this is somewhat related to my recent upgrades, then..
Title: Re: Teamspeak block!
Post by: darthmactis on February 05, 2006, 06:11:13 PM
Small problem that might effect others

i just fixed mine and guess what it was

include ("teamspeak/ts_viewer.php");
change to
include ("Teamspeak/ts_viewer.php");

AS IN THE DOWNLOAD

its Teamspeak/ts_viewer.php not teamspeak.ts_viewer.php

thank for the help anyway hope that helps someone before they smash there heads into the wall like i did


that was it Thanks very much!!!!!! to point thats out
Title: Re: Teamspeak block!
Post by: darthmactis on February 05, 2006, 07:09:50 PM
I'm getting errors all over the shop with this block since updating to the new 0.8.6 TP, and RC2 :( .. it does still work however, but I get errors like:

8: Undefined property: g_channels
File: /home/theinfe/public_html/smf/teamspeak/ts_config.inc.php
Line: 76

8: Undefined variable: _50
File: /home/theinfe/public_html/smf/teamspeak/ts_config.inc.php
Line: 379

8: Undefined offset: 2
File: /home/theinfe/public_html/smf/teamspeak/ts_config.inc.php
Line: 227

.. etc etc.. I have pages and pages and pages of these types of errors :( .. any ideas?! I'm imagining this is somewhat related to my recent upgrades, then..

Now i get the same thing, after a few clicks around the forums theres like 60 pages of errors and growing
Title: Re: Teamspeak block!
Post by: Jaz on February 10, 2006, 02:04:11 AM
We are getting the same error with TS. I had over 10,000 pages of errors related to the TeamSpeak.

I have disabled the block to stop the errors, but now have a possible new one 

8: Undefined variable: scripturl
File: /usr/local/psa/home/vhosts/tnp-uk.co.uk/httpdocs/forum/Themes/TP_helios_multi11_rc2/Display.template.php (eval?)
Line: 58

8: Undefined variable: scripturl
File: /usr/local/psa/home/vhosts/tnp-uk.co.uk/httpdocs/forum/Themes/TP_helios_multi11_rc2/TPortal.template.php (eval?)
Line: 58

8: Undefined variable: scripturl
File: /usr/local/psa/home/vhosts/tnp-uk.co.uk/httpdocs/forum/Themes/TP_helios_multi11_rc2/MessageIndex.template.php (eval?)
Line: 58

And more all pointing to (whichever).template.php all saying line 58

61 error pages in less than 5 minutes with only a couple of users logged on

Anyone got any idea to its cause.

Thanks
Title: Re: Teamspeak block!
Post by: IchBin on February 10, 2006, 07:37:43 AM
How do you know it's related to the TS block? You have any other custom blocks?
Title: Re: Teamspeak block!
Post by: Jaz on February 10, 2006, 08:04:31 AM
The error with TS produces hundreds of pages of errors, naming TS to be the fault. I can turn the block back on and post some of the errors if you would like to take a look.

The errors I posted above are known to Bloc and he is "fixing" it.
Title: Re: Teamspeak block!
Post by: stigmartyr on February 10, 2006, 03:47:19 PM
... ahhh yes, the case sensitive bugs.  Anyone hosting their website on any unix servers (linux, etc.) should always remember the case is muy importante for everything!
Title: Re: Teamspeak block!
Post by: Arkanthos on February 12, 2006, 09:26:47 PM
OK, I feel like more of a retard than usual...

Pertinant info:
URL: http://www.projmayhem.com

Code: [Select]
   $ts_viewer->set_Viewer("Project Mayhem Alliance", "http://www.projmayhem.com/");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("72.36.227.131", 9494, 51234, "");

The ip and port information is correct. The block loads onto the page, but it constantly says it's offline.

Here's the rub... I had it working before, then did a re-install of TS and now it's messed up. Not sure why.

I've checked everything as far as syntax, capitalization of folders and the like...
Title: Re: Teamspeak block!
Post by: xadio on February 13, 2006, 12:06:45 PM
Thanks a bunch for porting that! However, since its in PHP it doesn't refresh so some of my website users have complained.  Untill I sit down and port it over to JavaScript I made a temporary fix to have it auto refresh.
You can view it at http://www.teamgouranga.com/

To add this:


In ts_config.inc.php
Find:
                echo ("<center><a href=\"http://www.the-targets.de/\"><font size=\"1\">Created by Mike © 2004</font></a><font size=\"1\"><br>
                    Hacked into TinyPortal by <a href='http://www.warrency.com'>Prismatic</a></font>
                  </center>");

Add Before:

                echo ("<center><div id=\"ts-refresh\" class=\"windowbg\" style=\"border: 1px solid black; padding: 2px;\">Auto Refresh</div></center>");


In ts_viewer.php

Find:
</style>

Add After:
<script language="JavaScript">
// CREDITS:
// Additional code residing outside of Section 1 and Section 2 and all tweaks
//   in Section 1 and Section 2 were created by Xadio
//
// Automatic Page Refresher by Peter Gehrig and Urs Dudli www.24fun.com
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at www.hypergfurl.com.
// Configure refresh interval (in seconds)
  var refreshinterval=60;
// Shall the coundown be displayed inside your status bar? Say "yes" or "no" below:
  var displaycountdown="yes";
// Do not edit the code below
  var starttimeVar;
  var nowtime;
  var tempTitle = window.title;
  var reloadseconds=0;
  var timer;
  var offVar = false;
  var secondssinceloaded=0;
 
  var NS6 = (navigator.appName=="Netscape" && (document.getElementById!=undefined));
  var NS4 = (document.layers);
  var IE  = (navigator.appName=="Microsoft Internet Explorer");
  function GetLayer(layername)
  {
     if(IE||NS4) return (NS4) ? FindLayer(layername) : document.all[layername];
     else return document.getElementById(layername);
  }
   
  function FindLayer(layername, obj)
  {
    // recursive function to find the layer
     if(obj == null) return false;
     var i=0;
     var perObj = null;
     var tmpObj = (obj) ? obj.document.layers : document.layers;
     for(i=0;i<tmpObj.length;i++)
     {
       if(tmpObj[i].id==layername) return tmpObj[i];
       perObj = FindLayer(layername, tmpObj[i])
       if(perObj) return perObj;
     }
     return false;
  }
 
 
  function writeToDiv(layername, str)
  {
     obj = GetLayer(layername)
     if(obj == null) return false;

     if(NS4)
     {
         obj.document.write(str)
         obj.document.close()
     }
     if(NS6 || IE)
     {
        obj.innerHTML = str
     }
 
  }

  // Section 1
  function starttime(start) {
    starttimeVar=new Date();
    starttimeVar=starttimeVar.getTime();
    if(start) {
      offVar = false;
      countdown();
    }
  }
 
  //Section 2
  function countdown() {
    if(!offVar) {
      nowtime= new Date();
      nowtime=nowtime.getTime();
      secondssinceloaded=(nowtime-starttimeVar)/1000;
      reloadseconds=Math.round(refreshinterval-secondssinceloaded);
      if (refreshinterval>=secondssinceloaded) {
        var timer=setTimeout("countdown()",1000);
        if (displaycountdown=="yes"){
          writeToDiv("ts-refresh", "Auto refresh in <b>"+reloadseconds+"</b> seconds.<br /><input type=\"button\"value=\"Off\" onClick=\"javascript:off()\" />");
        }
      }
      else {
       clearTimeout(timer);
       window.location.reload(true);
      }
    }
  }

 
  function off() {
    offVar = true;
    clearTimeout(timer);
    writeToDiv("ts-refresh", "Auto refresh is <b>OFF</b><br /><input type=\"button\" value=\"On\" onClick=\"javascript:starttime(true)\" />");
  }
 
  window.onload=new function(){starttime(true);}
</script>

Enjoy

//EDIT NOTE//
I have edited the javascript section of this to clear up a few errors.
Fixed: Null objects being passed.
Fixed: IE required new function for onload calls.
Title: Re: Teamspeak block!
Post by: darthmactis on February 13, 2006, 12:38:57 PM
you aboul to fix the page errors?
Title: Re: Teamspeak block!
Post by: xadio on February 13, 2006, 02:49:49 PM
Yea sorry bout that, I use firefox so I don't see them show up until I open the JavaScript console. I'll fix them and edit the post above.  Thanks for the heads up.
Title: Re: Teamspeak block!
Post by: Yngwiedis on February 13, 2006, 03:29:48 PM
I think darthmatics is talking about that kind of errors which are fill our error log.

Quote
8: Undefined index: 8
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 227

Quote
8: Undefined offset: 7
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 226

Quote
8: Undefined offset: 6
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 225

etc...
Title: Re: Teamspeak block!
Post by: xadio on February 13, 2006, 04:53:50 PM
I think darthmatics is talking about that kind of errors which are fill our error log.

Quote
8: Undefined index: 8
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 227

Quote
8: Undefined offset: 7
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 226

Quote
8: Undefined offset: 6
File: /home/alliance/public_html/teamspeak/ts_config.inc.php
Line: 225

etc...


Oh ok...
I am not getting those errors...
Title: Re: Teamspeak block!
Post by: Arkanthos on February 14, 2006, 05:23:02 PM
He he, well I got mine working, turns out I had changed the TCP update port to something else, so it wouldn't respond on the default port. But now I have a different thought. I'm not sure if those who are in this specific topic know the answer but... I'd like to be able to use the web login URL for Teamspeak in conjunction with the display block.

Information needed: Username from the forum (easy), Password from the forum (harder), Display Name from the forum (easy).

So basically what I'd like to be able to do is have it so someone clicks on a chan in the viewer, the block loads the above information and tosses it into this URL which will launch TS with the information. Thereby allowing people to sign into the server under a registered account. Any ideas?

[the URL] teamspeak://[IP]:[PORT]/nickname=[DISPLAYNAME]?loginname=[USERNAME]?password=[FORUMPASSWORD]

Now, if I knew how to access this information it would be really easy to do right? I mean... just edit the link to include them right?

I'd be quite grateful if anyone can help me with this, I hope that people can see the value of this...
Title: Re: Teamspeak block!
Post by: xadio on February 15, 2006, 12:22:53 AM
He he, well I got mine working, turns out I had changed the TCP update port to something else, so it wouldn't respond on the default port. But now I have a different thought. I'm not sure if those who are in this specific topic know the answer but... I'd like to be able to use the web login URL for Teamspeak in conjunction with the display block.

Information needed: Username from the forum (easy), Password from the forum (harder), Display Name from the forum (easy).

So basically what I'd like to be able to do is have it so someone clicks on a chan in the viewer, the block loads the above information and tosses it into this URL which will launch TS with the information. Thereby allowing people to sign into the server under a registered account. Any ideas?

[the URL] teamspeak://[IP]:[PORT]/nickname=[DISPLAYNAME]?loginname=[USERNAME]?password=[FORUMPASSWORD]

Now, if I knew how to access this information it would be really easy to do right? I mean... just edit the link to include them right?

I'd be quite grateful if anyone can help me with this, I hope that people can see the value of this...


First you will need to look on the goteamspeak.com forums to see how to integrate TS with smf database.  It will probably take some hacking to get it to check the smf db for username and password.  As for the username and password, it can be extracted from the cookie set by SMF.  Then yes it is simple to drop it into TS dynamically.

Things to note:
how are you going to handle guests,
remember that the password in the cookie is encrypted (probably md5) so when making your making your sql command to login to TS (which you'll have to hack) just do a straight compare not a PASSWORD(<password here>) compare.

I would probably suggest a redirection when clicking on the TS link to a new window or something asking the user to reinput his/her username and password.  This would reduce the hacking on the TS part and then you won't have to figure out exactly what the SMF cookie is "holding".
Title: Re: Teamspeak block!
Post by: Arkanthos on February 15, 2006, 08:52:16 PM
True, hmmm. I'll have to take a look at the cookie from the site and see what's in there.

In a perfect world, I was hoping that there was some way of doing like $[usename] or $[password] to let SMF draw it rite out of the DB for me. I guess I could make the call for it, have it snag it from the DB based on the username of the person logged in, should be able to get that from the cookie at the very least.

<<looked at the cookie>>
Yea, it's pretty encrypted...

I'd like at any cost to avoid havint the user input the information needed to login, but if it's the only way then I guess that's how I'll be doing it.
Title: Re: Teamspeak block!
Post by: xadio on February 16, 2006, 01:39:18 AM
You can always post on simplemachines.org and ask what the cookie means... like what parts are what.  I noticed that the %3 looks a little odd as if its a spacer or something... and there is a part thats like %3<random assortment of upper and lowercase letters adn numbers>  Now that random assortment of U and l letters and numbers looks very suspicious as if its a md5 encrypted password.  You can always browse your DB for your password and compare that with the cookie... see if you see any match...

Now that I remember I think on my board I am (by default) storing cookies locally so this might be one problem.

Another thing... I have coppermine bridged with smf and it saves its own cookie (2 particularly one smf001_user and smf001_pass).  These are great! They are exactly what you need, if you can find out how this was gathered then I think you will have found you solution.
Title: Re: Teamspeak block!
Post by: xadio on February 16, 2006, 01:41:14 AM
Just found something... was looking in Login.template.php and saw $context['default_password'] and $context['default_username'].  This could be what your looking for...


Also look in Sources/LogInOut.php and Sources/Subs-Auth.php
Title: Re: Teamspeak block!
Post by: Arkanthos on February 16, 2006, 10:11:18 AM
Code: [Select]
// Load the data up!
$request = db_query("
SELECT passwd, ID_MEMBER, ID_GROUP, lngfile, is_activated, emailAddress, additionalGroups, memberName, passwordSalt
FROM {$db_prefix}members
WHERE memberName = '$_REQUEST[user]'
LIMIT 1", __FILE__, __LINE__);

Ok, this looks like what I needed to see. It's making a query to the database in order to fetch the information to login:

passwd = password?
passwordSalt = ??? Wondering what the heck passwordSalt is...
ID_MEMBER = Login Name?
memberName = Display Name?

The membergroups/lngfile/is_activated/emailAddress/additionalGroups look to be information I can skip without worrying.

But now, looking at your 2nd post, the $context['default_username'] and $context['default_password]

I'm wondering if the forum is passing the hashed PW back through the md5 algorithm (maybe using the passwordSalt as a key?)

Thinking this might be something to talk to the SMF guys about lol, it's getting pretty deep into their login/authentication procedure for the forums.
Title: Re: Teamspeak block!
Post by: xadio on February 16, 2006, 10:24:24 AM
That will be good to get when getting the information but for checking:

I can for sure tell you that you will not *ever* be able to decrypt the encrypted password.  But you can possibly add another parameter to TS so when you input, for example op=ts-block:
?username=<>?password=<md5 encrypted>?op=ts-block
it will just do a straight comparison:
Select membername from smf_users where passwd = $password
not the encrypted comparison (which is default):
Select membername from smf_users where passwd = PASSWORD($password)

Password salt is:
$user_settings['passwordSalt'] = substr(md5(rand()), 0, 4);

I think its just a serial key for your cookie...

But definitely talk to some smf guys about this.
Title: Re: Teamspeak block!
Post by: disisme on February 16, 2006, 10:25:15 AM
Guys, I display a button on my helios theme, in the smf 1.0.6 part (not TP).  I added the buttons to index.template.php and use $context['user']['name'] in the teamspeak string.  Thats after I do an if $context['user']['is_logged').  so if they arent logged in, they dont see the buttons....
Title: Re: Teamspeak block!
Post by: xadio on February 16, 2006, 10:28:56 AM
Guys, I display a button on my helios theme, in the smf 1.0.6 part (not TP).  I added the buttons to index.template.php and use $context['user']['name'] in the teamspeak string.  Thats after I do an if $context['user']['is_logged').  so if they arent logged in, they dont see the buttons....

That's a clean alternative to keep 'unwanted' guests limited, but if he still wants to have passwords then it will still be a problem...
Title: Re: Teamspeak block!
Post by: disisme on February 16, 2006, 10:59:11 AM
yah..trickiness on the passwords... I'd like to do the same thing actually, so my mods can be admins at the teamspeak end after being force fed down the pipe.
Title: Re: Teamspeak block!
Post by: xadio on February 16, 2006, 12:32:27 PM
I just looked at the TS server app and I think the best alternative is just a quick popup that asks the user to reenter his/her password so you can actually work with it.
Title: Re: Teamspeak block!
Post by: Arkanthos on February 16, 2006, 12:56:43 PM
yeah, that might be the best way of doing it. I posted on the SMF site looking for help at accessing=>decrypting a user's password, if they can't or don't want to share that information (who knows, some people are a little more freakish about security than others) then I'll use a popup.
Title: Re: Teamspeak block!
Post by: biffking on February 16, 2006, 01:20:08 PM
I have tried using this block and it always says offline, I can't get the images to show up either. I used the ts_config.inc.php that was redone to show images from folder, but no luck. my site is www.godzchozen.com/smf/index.php

[attachment deleted by admin]
Title: Re: Teamspeak block!
Post by: Arkanthos on February 16, 2006, 02:36:09 PM
k, there are 2 things that are needed in order to get it to show. The correct IP/serverport and the tcpupdate port.

In your case it might be the tcpupdate port that is wrong, most places use 51234, but some use a different port, try some in this range 51230-51239 and see if you can get it to work.
Title: Re: Teamspeak block!
Post by: disisme on February 16, 2006, 03:17:11 PM
Heres my code, within boardindex_template.php for the Helious Multi and premod themes to add a block and get the teamspeak details displayed in it....This actually works with ANY theme, so far....

Immediately BEFORE :

        // "Users online Today"

paste this :
    // Teamspeak users
   echo '
   <tr>
      <td class="titlebg" colspan="2">Users in Voice chat</td>
   </tr>
   <tr>
      <td class="windowbg"></td>
      <td class="windowbg2" width="100%"><iframe frameborder="0" height="150" src="', $GLOBALS['boardurl'], '/teamspeakdisplay/demo.php" style="width: 100%; margin: 0; padding: 0; border: 0; overflow: hidden;" scrolling="no" border="0" allowtransparency="true"></iframe></td>
   </tr>';

I downloaded an applet called teamspeakdisplay and doctored the demo.php file quite considerably to look like this (in total) :
<?php
   //====================== BEGINNING OF CONFIGURATION PART =====================

   // The teamspeak server IP or Hostname: (DO NOT INCLUDE THE PORT NUMBER)
   $serverAddress = "203.208.116.4";

   // The teamspeak server port you use to connect to the teamspeak server using a teamspeak client
   $serverUDPPort = 8767;

   // The teamspeak query port of your server (look in the server.ini of your teamspeak server for
   // this portnumber)
   $serverQueryPort = 51234;

   //====================== END OF CONFIGURATION PART ===========================

   // Is the script improperly configured?
   if ($serverAddress == "") { die("You need to configure this script by setting the serverAddress and eventually the serverUDPPort and serverQueryPort in the sourcecode
\n"); }
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <link href="demo.css" rel="stylesheet" type="text/css">
      <link href="teamspeakdisplay/teamspeakdisplay.css" rel="stylesheet" type="text/css">

   </head>
   <body bgcolor='#505050'>
<?php
   // Display the Teamspeak server
   require("teamspeakdisplay/teamspeakdisplay.php");
   $teamspeakDisplay->displayTeamspeak($serverAddress, $serverUDPPort, $serverQueryPort);

?>
   </body>
</html>
Title: Re: Teamspeak block!
Post by: scope on February 16, 2006, 06:57:01 PM
My problem turned out to be that my website host, doesn't allow outbound calls to another server.  If your TS server is on the same provider they might allow it, but I had to set it up on another provider account I have.  It did work on my p4host.com website, but on my clan website account godaddy.com it isn't allowed.  All ports might be open and available.  Recommend trying app from a different provider.  If I get a change I can swap my settings for yours and see what happens or you can replace youor ip address with ts2.digtalserialkillers.com UDP port 13181, if you change those and still get an offline, you need a different web host for the script to work. IF you have godaddy, don't waste your time it is them.  You have to upgrade to a dedicated server to get it to work on godaddy.

I gave up trying to use the one in this post, mainly because of the login part and it never worked.  It turned out it was because of the above reason.  This mod works great minus the login name option.

The one I use pops up a javascript box and ask for the name to use.  I also added the option to join my forums and/or Teamspeak server in the server, running mani mod.
Title: Re: Teamspeak block!
Post by: biffking on February 16, 2006, 07:25:20 PM
We are using bluehost. They should allow it. I guess we could give them a call
Title: Re: Teamspeak block!
Post by: darthmactis on February 17, 2006, 04:35:18 PM
For all of you needing a TeamSpeak block that works 100%, I have found it!!! All you have to do is go here http://tsviewer.hfd.de/index.php?page=home (http://tsviewer.hfd.de/index.php?page=home) register your TS server(its Free!!), when you server is added to the list, go to you TS server in the list click on it, it will bring you server up and above the server tree is a generate code botton that will generate a HTML code that you can put in a HTML block inTP.

Example Here:http://sw.tgeclan.com/forums/index.php (http://sw.tgeclan.com/forums/index.php)
Title: Re: Teamspeak block!
Post by: biffking on February 17, 2006, 04:46:36 PM
that is what i did last night and it works great
Title: Re: Teamspeak block!
Post by: Arkanthos on February 18, 2006, 06:26:25 PM
lol, yes but I'd prefer not to register my Teamspeak Server on someone's website. And, with the viewer I'm currently using, people are able to join a chan by clicking on it. With the number of chans that I have it's kinda neccessary to me.
Title: Re: Teamspeak block!
Post by: biffking on February 18, 2006, 06:53:30 PM
well my host does not allow it so i have to use what works for me.
Title: Re: Teamspeak block!
Post by: core on February 19, 2006, 03:32:21 AM
Hi there TS lovers,

I have a block setup with teamspeak, when a member clicks the channel name it will connect that member to the corresponding channel with their forum name. I have hardcoded the server password as for me anyone who visits our site may use the teamspeak even tho there is a password on the TSserver.

If anybody wants this forumname pushing TS block, dont ask me about pushing passwords.. let me know

click and connect
Title: Re: Teamspeak block!
Post by: Arkanthos on February 20, 2006, 04:01:19 PM
Hey man, that would be killer! It would definitely give me a jumping off point for when I get the other 1/2 of it figured out. If you could toss it to me in a PM or send it via e-mail to jonathanroth@cox.net I'd be really grateful.
Title: Re: Teamspeak block!
Post by: core on February 22, 2006, 04:49:43 PM
just noticed that the script I edited was the first one posted... need to get those errors out.. when I get this done I will post it here
Title: Re: Teamspeak block!
Post by: core on February 22, 2006, 04:58:32 PM
I just read this thread and see allot of posts about people getting these errors but dont see any posts about a solution...

can someone help me with these errors? I have 35000 pages of them LOL

Code: [Select]

8: Undefined property: g_channels
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 83


8: Use of undefined constant _B - assumed '_B'
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 250


8: Undefined index: 8
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 239


8: Undefined offset: 7
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 238


8: Undefined offset: 6
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 237


8: Undefined index: 5
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 235


8: Undefined offset: 4
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 234


8: Undefined offset: 3
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 233


8: Undefined offset: 2
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 232


8: Undefined offset: 1
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 231


8: Undefined variable: _50
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 384


8: Undefined variable: _50
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 384


8: Undefined variable: _50
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 384


8: Undefined variable: _50
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 384


8: Undefined index: 8
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 239

these errors are generated 4 pages a click! nice! LOL

anyhow.... has anybody solved this?
Title: Re: Teamspeak block!
Post by: xadio on February 22, 2006, 06:22:06 PM
All the errors are now fixed.  I would like to take a second and say that the way the coder coded this is ridiculous!!!!  It takes forever to figure out what his variables are meaning!!!!  How hard is it to name this
Code: [Select]
          $_39=trim($_38[0]);
          $_3A=trim($_38[1]);
          $_3B=trim($_38[2]);
          $_3C=trim($_38[3]);
          $_3D=trim($_38[4]);
          $_3E=trim($_38[5]);
          $_3F=trim($_38[6]);
          $_40=trim($_38[7]);
          $_41=trim($_38[8]);
          $_42=trim($_38[9]);
          $_43=trim($_38[10]);
          $_44=trim($_38[11]);
          $_45=trim($_38[12]);
          $_46=trim($_38[13]);
          $_47=trim($_38[14]);

to

Code: [Select]
                        $TSchannels=explode("    ", $aString);
                        $TSid=trim($TSchannels[0]);
                        $TScodec=trim($TSchannels[1]);
                        $TSparent=trim($TSchannels[2]);
                        $TSorder=trim($TSchannels[3]);
                        $TSmaxusers=trim($TSchannels[4]);
                        $TSname=trim($TSchannels[5]);
                        $TSname=$this->somefuncname($TSname);
                        $TSflags=trim($TSchannels[6]);
                        $TSpassword=trim($TSchannels[7]);
                        $TStopic=trim($TStopic[8]);
                        $TStopic=$this->somefuncname($TStopic);
                        //$_35=$_2C; not neccesary cause now we have a name.... $TSid
That took me all of 2 minutes... and if you started off like that then it would take you all of 0 minutes!

And of course you should at least name the functions to something readable!!!! not _9!!!
Like I said its ridiculous!!

Now to what matters! :) Attachment is below... let me know if you encounter any more issues.
Directions:  Overwrite <smf directory>/teamspeak/ts_config.inc.php with the attached ts_config.inc.php

[attachment deleted by admin]
Title: Re: Teamspeak block!
Post by: IchBin on February 22, 2006, 11:16:26 PM
I took a look at those files some time ago xadio and I totally agree. Commenting and naming things properly sure makes it easier to figure out what is happening.
Title: Re: Teamspeak block!
Post by: core on February 23, 2006, 02:57:42 PM
Xadio,

Sorry to be a noob, but I have a modified version wich I really like as my version connects user directly to my TS server with their username.

Would hate to loose these modifications as I dont think I will be able to reproduce it by myselve.

Could you or someone please tell me in noob language what I need to edit in my ts.config.php?

when I tried above edit I got a:

Code: [Select]
Fatal error: Call to undefined function: somefuncname() in /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php on line 284
Title: Re: Teamspeak block!
Post by: xadio on February 23, 2006, 04:27:25 PM
Ehh.. you copied over the text... :P Let me find the code that I modified and post the directions here... :), for now go and undo what you did...
Title: Re: Teamspeak block!
Post by: xadio on February 23, 2006, 04:38:37 PM
I took a look at those files some time ago xadio and I totally agree. Commenting and naming things properly sure makes it easier to figure out what is happening.

Glad someone agrees with me! :D

For those who have modified their ts_config.inc.php, directions follow:

Open ts_config.inc.php
Find:
Code: [Select]
$_1C=count($this->g_channels);Replace with:
Code: [Select]
  //xadio hack
  $_1C = isset($this->g_channels)?count($this->g_channels):0;

Find:
Code: [Select]
                        while($_2B=fgets($_27, 4096))
{
$_2B=explode(" ", $_2B);
$_2C=trim($_2B[0]);
$_2D=trim($_2B[1]);
$_2E=trim($_2B[2]);
$_2F=trim($_2B[3]);
$_30=trim($_2B[4]);
$_31=trim("$_2B[5]");
$_31=$this->_9($_31);
$_32=trim($_2B[6]);
$_33=trim($_2B[7]);
$_34=trim("$_2B[8]");
$_34=$this->_9($_34);
$_35=$_2C;
if ($_35 > 0)
{
$_10[$_35]=array("channelid" => $_35,"codec" => $_2D,"parent" => $_2E,"order" => $_2F,"maxplayers" => $_30,"channelname" => $_31,"attribute" => $this->_F($_32),"isdefault" => 0,"topic" => $_34);
}
}
}
fclose($_27);
}
usort($_10, array ($this, _B));
return $_10;
}
Replace with:
Code: [Select]
            while($_2B=fgets($_27, 4096)) {
              //xadio hack
        if(strlen($_2B) <= 6) {
        }
        else {
        $_2B=explode(" ", $_2B);
        $_2C=trim($_2B[0]);
        $_2D=trim($_2B[1]);
        $_2E=trim($_2B[2]);
        $_2F=trim($_2B[3]);
        $_30=trim($_2B[4]);
        $_31=trim($_2B[5]);
        $_31=$this->_9($_31);
        $_32=trim($_2B[6]);
        $_33=trim($_2B[7]);
        $_34=trim($_2B[8]);
        $_34=$this->_9($_34);
        $_35=$_2C;
          if ($_35 > 0) {
          $_10[$_35]=array("channelid" => $_35,"codec" => $_2D,"parent" => $_2E,"order" => $_2F,"maxplayers" => $_30,"channelname" => $_31,"attribute" => $this->_F($_32),"isdefault" => 0,"topic" => $_34);
          }
          }
        }
    }
          fclose($_27);
        }
        //xadio hack
      usort($_10, array ($this, "_B"));
      return $_10;
    }

Find:
Code: [Select]
while($_38=fgets($_27, 4096))
{
$_38=explode(" ", $_38);
$_39=trim($_38[0]);
$_3A=trim($_38[1]);
$_3B=trim($_38[2]);
$_3C=trim($_38[3]);
$_3D=trim($_38[4]);
$_3E=trim($_38[5]);
$_3F=trim($_38[6]);
$_40=trim($_38[7]);
$_41=trim($_38[8]);
$_42=trim($_38[9]);
$_43=trim($_38[10]);
$_44=trim($_38[11]);
$_45=trim($_38[12]);
$_46=trim($_38[13]);
$_47=trim("$_38[14]");
$_47=$this->_9($_47);
$_48=trim("$_38[15]");
$_48=$this->_9($_48);
$_49=$_39;
$_F[$_49]=array("playerid" => $_49,"channelid" => $_3A,"receivedpackets" => $_3D,"receivedbytes" => $_3E,"sentpackets" => $_3B,"sentbytes" => $_3C,"paketlost" => $_3F / 100,"pingtime" => $_40,"totaltime" => $this->_11($_41),"idletime" => $this->_11($_42),"privileg" => $_43,"userstatus" => $_44,"attribute" => $this->_10($_45),"attribute_2" => $_45,"flags" => $this->_E($_44,$_43),"s" => $_46,"playername" => $_47);
}
fclose($_27);
}
usort($_F, array ($this, _D));
return $_F;
}
Replace with:
Code: [Select]
while($_38=fgets($_27, 4096))
{
  //xadio hack
  if(strlen($_38) <= 6) {
  }
  else {
  $_38=explode(" ", $_38);
  $_39=trim($_38[0]);
  $_3A=trim($_38[1]);
  $_3B=trim($_38[2]);
  $_3C=trim($_38[3]);
  $_3D=trim($_38[4]);
  $_3E=trim($_38[5]);
  $_3F=trim($_38[6]);
  $_40=trim($_38[7]);
  $_41=trim($_38[8]);
  $_42=trim($_38[9]);
  $_43=trim($_38[10]);
  $_44=trim($_38[11]);
  $_45=trim($_38[12]);
  $_46=trim($_38[13]);
  $_47=trim($_38[14]);
  $_47=$this->_9($_47);
  $_48=trim($_38[15]);
  $_48=$this->_9($_48);
  $_49=$_39;
  $_F[$_49]=array("playerid" => $_49,"channelid" => $_3A,"receivedpackets" => $_3D,"receivedbytes" => $_3E,"sentpackets" => $_3B,"sentbytes" => $_3C,"paketlost" => $_3F / 100,"pingtime" => $_40,"totaltime" => $this->_11($_41),"idletime" => $this->_11($_42),"privileg" => $_43,"userstatus" => $_44,"attribute" => $this->_10($_45),"attribute_2" => $_45,"flags" => $this->_E($_44,$_43),"s" => $_46,"playername" => $_47);
  }
}
fclose($_27);
}
  //xadio hack
usort($_F, array($this,"_D"));
return $_F;
}

I had to go back and find where I modified the file, so if you get any errors let me know cause I might (not likely) have missed something.
Title: Re: Teamspeak block!
Post by: core on February 24, 2006, 12:39:09 PM
Hi m8,

Just did above edite and thay work!

but... I still have a few errors, I will post them here and add my ts_config.inc.php

Code: [Select]
8: Undefined variable: g_userName
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 44

8: Undefined variable: _4C
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 342

8: Undefined variable: g_userName
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 44

8: Undefined variable: _50
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 395

[attachment deleted by admin]
Title: Re: Teamspeak block!
Post by: core on February 24, 2006, 12:42:35 PM
above  ts_config.inc.php allow users to click the channel name and connect with their forum name,
so if you want to use this file be aware that this script STILL produces errors in the log file!!!
Title: Re: Teamspeak block!
Post by: xadio on February 25, 2006, 05:35:03 PM
above  ts_config.inc.php allow users to click the channel name and connect with their forum name,
so if you want to use this file be aware that this script STILL produces errors in the log file!!!

I may not get the same errors, but I am going to look at the code and try to fix these.  I'll send you copies via PM untill we get a working copy to post.

Edit: Realized that can't have attachments in PM

The following attachment may or may not work... intended for CORE only.
FIXED:
Basically the coder did not declare his variables so in some situations the if case is false (which contains the declaration) so the function is trying to return a memory location that doesn't exist.
Also remember when using data members in a class you must declare it in the class definition.
Code: [Select]
class ts_viewer {
//... class variable declaraitons
var $g_userName="";

//... class methods
}

//ATTACHMENT REMOVED, USE
http://www.tinyportal.net/smf/index.php?topic=1021.msg25718#msg25718
Title: Re: Teamspeak block!
Post by: core on February 26, 2006, 05:13:55 AM
looks like we are getting somewhere, the file did work but with following errors:

Code: [Select]
8: Uninitialized string offset: 9
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 402
 
8: Undefined variable: g_userName
File: /home/resellers/841289/841289/corenation.com/www/smf/teamspeak/ts_config.inc.php
Line: 46

not really sure what you mean with those declarations...

Title: Re: Teamspeak block!
Post by: xadio on February 26, 2006, 09:07:47 AM
not really sure what you mean with those declarations...

Don't worry about it, I am just loging what I am doing incase anyone is curious.
All the errors should be fixed now.

//Edit use file found at:
http://www.tinyportal.net/smf/index.php?topic=1021.msg26161#msg26161
Title: Re: Teamspeak block!
Post by: IchBin on February 26, 2006, 11:51:54 AM
xadio, you are awesome. Thanks for taking care of the teamspeak block. Karma you're way dude!
Title: Re: Teamspeak block!
Post by: xadio on February 26, 2006, 06:14:40 PM
xadio, you are awesome. Thanks for taking care of the teamspeak block. Karma you're way dude!

Thanks a bunch! I am honored to be a member of TinyPortal and to use it.  It is the least I can do ;)
Title: Re: Teamspeak block!
Post by: MentalMuscle on February 28, 2006, 01:40:07 PM
Guys, I display a button on my helios theme, in the smf 1.0.6 part (not TP).  I added the buttons to index.template.php and use $context['user']['name'] in the teamspeak string.  Thats after I do an if $context['user']['is_logged').  so if they arent logged in, they dont see the buttons....

That's a clean alternative to keep 'unwanted' guests limited, but if he still wants to have passwords then it will still be a problem...

Are there any special considerations when using $context['user']['name']?  My ts_config.inc.php file is configured to use this, but I'm not captured the name of the person who is logged in.
Title: Re: Teamspeak block!
Post by: core on February 28, 2006, 04:26:38 PM
whoohoo nice one xadio!


...but ehhh.. I hate to say it... my "connect to teamspeak with my forum username" doesnt work anymore now  :'(

could you please fix my file wich I have attached, as this file WILL connect a member to the TS server with their forum name! after this one is fixed (see errors in my last post) I will wrap it up and link it back here for all TS users...

pleaaaaaaaaaseeeeeeeeeeee

 :-*
core

BE AWARE BELOW FILE WILL GENERATE ERRORS IN YOUR FORUM ERROR LOG!! USE AT OWN RISK!!

[attachment deleted by admin]
Title: Re: Teamspeak block!
Post by: xadio on February 28, 2006, 06:39:43 PM
Are there any special considerations when using $context['user']['name']?  My ts_config.inc.php file is configured to use this, but I'm not captured the name of the person who is logged in.

Thanks, there was an error with the code.

Fixed as of 2/28/2006:
$this->$g_userName=$context['user']['name'];
needed to be:
$this->g_userName=$context['user']['name'];

Username was being over written with "Guest", logged in or not.

//Not sure, but the copywrite information may not show up.  I will determine the root of this and fix it, but for right now this will work.  Let me know of any errors. :)

[attachment deleted by admin]
Title: Re: Teamspeak block!
Post by: xadio on February 28, 2006, 06:56:44 PM
whoohoo nice one xadio!


...but ehhh.. I hate to say it... my "connect to teamspeak with my forum username" doesnt work anymore now  :'(

could you please fix my file wich I have attached, as this file WILL connect a member to the TS server with their forum name! after this one is fixed (see errors in my last post) I will wrap it up and link it back here for all TS users...

pleaaaaaaaaaseeeeeeeeeeee

 :-*
core

BE AWARE BELOW FILE WILL GENERATE ERRORS IN YOUR FORUM ERROR LOG!! USE AT OWN RISK!!

It should work now core! :D check it out.  Enjoy!
Title: Re: Teamspeak block!
Post by: MentalMuscle on February 28, 2006, 08:08:48 PM
Are there any special considerations when using $context['user']['name']?  My ts_config.inc.php file is configured to use this, but I'm not captured the name of the person who is logged in.

Thanks, there was an error with the code.

Fixed as of 2/28/2006:
$this->$g_userName=$context['user']['name'];
needed to be:
$this->g_userName=$context['user']['name'];

Username was being over written with "Guest", logged in or not.

//Not sure, but the copywrite information may not show up.  I will determine the root of this and fix it, but for right now this will work.  Let me know of any errors. :)

You definitely have better eyes then I do.  I looked through the code at least five times, and completely missed that.  Thanks Xadio.
Title: Re: Teamspeak block!
Post by: MentalMuscle on March 01, 2006, 09:40:14 AM
Would you please post your code for anyone else that may want this?

Sure.  First of all, you have to setup the config normally...with no specified channel.  Once you have the includes added to the PHP block, mouseover your channel and note the ID number.  Open the config and add ("NUMBER") in place of the () next to the channel line.

I was interested in this as well so that guests could only see he lobby.  I did the following:

1. Copied all the files in the "teamspeak" folder to a newly created folder called "teamspeak2"
2. configured another phpblock only visible by guests (and admins of course) with include ("teamspeak2/ts_viewer.php");
3. From a command line I telnet to my TS server on port 51234 (query port)
4. And logged in:  slogin superadmin <superadmin password>
5. To find the ID of the channel you want to show type:  cl 8767
6. Replace $ts_viewer->set_Channels(); with $ts_viewer->set_Channels("<channel id>");

More specific channels can be added by deliminating them with a comma.
Title: Re: Teamspeak block!
Post by: xadio on March 01, 2006, 09:54:39 AM
Would you please post your code for anyone else that may want this?

Sure.  First of all, you have to setup the config normally...with no specified channel.  Once you have the includes added to the PHP block, mouseover your channel and note the ID number.  Open the config and add ("NUMBER") in place of the () next to the channel line.

I was interested in this as well so that guests could only see he lobby.  I did the following:

1. Copied all the files in the "teamspeak" folder to a newly created folder called "teamspeak2"
2. configured another phpblock only visible by guests (and admins of course) with include ("teamspeak2/ts_viewer.php");
3. From a command line I telnet to my TS server on port 51234 (query port)
4. And logged in:  slogin superadmin <superadmin password>
5. To find the ID of the channel you want to show type:  cl 8767
6. Replace $ts_viewer->set_Channels(); with $ts_viewer->set_Channels("<channel id>");

More specific channels can be added by deliminating them with a comma.

You don't need to copy teamspeak twice... you can do 1 of two things...
1) Create a copy of ts_viewer.php to something like ts_viewer.guest.php  and then use that for guests. (But you will also have to go into ts_viewer.guest.php and change require('ts_config.inc.php') to require_once('ts_config.inc.php');
2) You can just make a new php block with:
Code: [Select]
  require_once('teamspeak/ts_config.inc.php');
  $ts_viewer = new ts_viewer("");
  $ts_viewer->set_Viewer("<name>", "<website>");
  $ts_viewer->set_Channels("<chan id>");
  $ts_viewer->show_ts_viewer("<ip>", 8767, 51234, "");
Title: Re: Teamspeak block!
Post by: core on March 01, 2006, 02:36:53 PM
thanx xadio works perfect! no errors jeeeeeeeeeeeeeeeeeeeee

about the copyright? oh well :P ps. I think this block has been made zillion of times, or better said ported zillion of times so the truthfull copyrighter I think is even hard to be found.

BELOW ZIP FILE CONTAINS THE TEAMSPEAK BLOCK WICH WILL ALLOW YOUR FORUM MEMBERS TO CONNECT TO THE TS CHANNELS WITH THEIR FORUM NAME BY CLICKING THE CHANNEL NAME!

just upload all files to a folder called Teamspeak in your SMF root directoy and change the ts_viewer.php to match your SITENAME, SITEURL, SERVERIP, SERVERPASS and include it in a block! (also added better TS2 logo)

cheers all and karma for xadio!

[attachment deleted by admin]
Title: Re: Teamspeak block!
Post by: Arkanthos on March 02, 2006, 12:58:17 PM
ok, you guys rock. I've been a little busy as of late, but these new features are kickin chicken. Keep it up xadio and IchBin and the rest of the gang
Title: Re: Teamspeak block!
Post by: Omniverse on March 02, 2006, 05:02:39 PM
Awesome work guys :)

One question:

What if people are registered with the TS server? Can an option be made to allow signing in as your registered name?
Title: Re: Teamspeak block!
Post by: MentalMuscle on March 02, 2006, 06:27:18 PM
The code that ts_config.inc.php file that Xadio and Core have come up with will log a member in with the nickname=<user login name>.  This is the registered name on the website they have logged in with using a server password.

All SMF user accounts have their passwords encrypted, and you would have to mach the hash from the SQL database with the TS password.  Not knowing much about the TS database I can't say how the passwords are stored.  If the TS database stores passwords in MD5 encryption then passing the username and password to the server should be possible.  The TS server would just compare hashes like SMF does.

The only other option is to prompt for authentication, but I don't really see the point in that.
Title: Re: Teamspeak block!
Post by: xadio on March 02, 2006, 11:47:11 PM
The code that ts_config.inc.php file that Xadio and Core have come up with will log a member in with the nickname=<user login name>.  This is the registered name on the website they have logged in with using a server password.

All SMF user accounts have their passwords encrypted, and you would have to mach the hash from the SQL database with the TS password.  Not knowing much about the TS database I can't say how the passwords are stored.  If the TS database stores passwords in MD5 encryption then passing the username and password to the server should be possible.  The TS server would just compare hashes like SMF does.

The only other option is to prompt for authentication, but I don't really see the point in that.

SMF stores passwords in MD5, but were talking about hacking TS to just do a match.  If TS server was written in a non-compiled language I would look at hacking it, but from my research there is no way. Possibly someone could research or suggest to the TS creators a way to pass the MD5 encrypted password through.
Title: Re: Teamspeak block!
Post by: Omniverse on March 03, 2006, 07:38:30 AM
Well, I like the way it works now fine.... I was thinking more along the lines of an added option.

For instance, instead of the Title being a link to the your site (why you need it? you already there), have it a pop up where you could fill in user and pw if you are registered with the server.
Title: Re: Teamspeak block!
Post by: MentalMuscle on March 06, 2006, 07:45:45 AM
There is a script to prompt for username and password, but it would need to be moded to check to see if the user is a registerd TS user.  This could be an additional field added to the profile. A checkbox only admins can see that will allow them to check that the user is registered on TS.

I'll see if I can find the script, and what would be needed for this.
Title: Re: Teamspeak block!
Post by: BCB on March 14, 2006, 10:42:29 AM
Here is some code that is HTML that puts up a button and 3 textboxes for you to fill in for the Nickname, Username and Password, when pushed it will join the Teamspeak that is defined. I am by no means a code wizard or I would implement it myself, but someone of the standards I have seen here can make the 2 work together. 

Also attached is a Screeen shot of the way it looks now on my site, again not a coding wizard that is why there is such a large space in it.

BTW the way I got that to work I just added a block on my TP for HTML and put the code in there. but I would rather have just one block then 2.

Code: [Select]
<table width="112" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="140" height="10"><div align="center">Team Speak</div></td>
</tr>
<tr>
<td width="140" class="leftnavtable" align="center" valign="middle"><form name="testform">

<p>
<input name="NICKNAME" type="text" value="Nickname" size="14">
<input name="LOGINNAME" type="text" value="Login name" size="14">
<input name="PASSWORD" type="password" value="Password" size="14">
</p>
<input name="button" type="button" class="navlinks" onClick="location.href='teamspeak://xxx.xxx.xxx.xxx:8767/nickname=' + testform.NICKNAME.value + '?loginname=' + testform.LOGINNAME.value + '?password=' + testform.PASSWORD.value;" value="Join">
<input name="Clear" type="reset" class="navlinks" id="Join" value="Clear" />
</p>
</form> </tr>
</table>
oooppps forgot to mention that the xxx.xxx.xxx.xxx:8767  is the IP of the server and the port, I am sure you can put in the url if needed.

[attachment deleted by admin]
Title: Re: Teamspeak block!
Post by: nevermore on March 14, 2006, 11:27:27 AM
My forum logs are being spamming with the following messages:

Quote
8: Undefined property: g_channels
File: /home/yorksonl/public_html/tagamers/teamspeak/ts_config.inc.php
Line: 76

Quote
8: Use of undefined constant _B - assumed '_B'
File: /home/yorksonl/public_html/tagamers/teamspeak/ts_config.inc.php
Line: 238

Quote
8: Use of undefined constant _D - assumed '_D'
File: /home/yorksonl/public_html/tagamers/teamspeak/ts_config.inc.php
Line: 288

The website is www.tagamers.com (http://www.tagamers.com)

Any ideas what these mesages mean and how I can fix them? They are logging every couple minutes and creating quite the log file.
Title: Re: Teamspeak block!
Post by: BCB on March 14, 2006, 11:37:15 AM
just curious but what all did you change from the original code?
Title: Re: Teamspeak block!
Post by: IchBin on March 14, 2006, 12:19:44 PM
Are you referring the BCB's code, or the teamspeak block code itself?
Title: Re: Teamspeak block!
Post by: xadio on March 14, 2006, 01:07:44 PM
Are you referring the BCB's code, or the teamspeak block code itself?

It would be with the teamspeak block itself.  Due to the nature of the errors....

Nevermore, make sure you are using the most recent TSBlock. Found: http://www.tinyportal.net/smf/index.php?topic=1021.msg26256#msg26256

I have already corrected these problems.  If this is the one that you downloaded then I will recheck it.

Also to a moderator:  Could we add a link on the thread starters post to direct people to the updated TSBlock?
Title: Re: Teamspeak block!
Post by: xadio on March 14, 2006, 01:10:00 PM
There is a script to prompt for username and password, but it would need to be moded to check to see if the user is a registerd TS user.  This could be an additional field added to the profile. A checkbox only admins can see that will allow them to check that the user is registered on TS.

I'll see if I can find the script, and what would be needed for this.

Basically you want your TS block restricted to those that are registered? So those who arn't registered can't see it or can't use the direct links?
Title: Re: Teamspeak block!
Post by: IchBin on March 14, 2006, 01:12:55 PM
Also to a moderator:  Could we add a link on the thread starters post to direct people to the updated TSBlock?

Will do that right now Xadio. Thanks for keeping up on this.
Title: Re: Teamspeak block!
Post by: nevermore on March 15, 2006, 03:41:10 PM
Thanks !! I downloaded the latest TS viewer. That took care of the errors I was getting. Remind me again on the ports ... 51234 is the query port. Yes? Is that a UDP or TCP? I had this working a few weeks ago but lost that forum. Nothing changed in the firewall that I know of but I still show the TS offline.  >:(

I did recently switch hosts. Think that has anything to with it?
Title: Re: Teamspeak block!
Post by: IchBin on March 15, 2006, 05:02:21 PM
They could be blockiing the port themeselves... so that would be yes!
Title: Re: Teamspeak block!
Post by: MentalMuscle on March 15, 2006, 08:56:09 PM
I know the default port 8767 is UDP.  Re-transmits of VoIP traffic is a bad thing.
Title: Re: Teamspeak block!
Post by: nevermore on March 16, 2006, 07:37:34 AM
I just found out it is the host: www.bluehost.com. The do shared IPs for thier domains. That is normally not an issue and is very transparent to the end user. However, anytime something like this needs to be done it becomes an issue. I had to purchase a dedicated IP address so that I could have port control. The cost is acceptable and the static IP address works for up to 6 domains on that account.

Hopefully this info will anyone who might run into this problem inthe future.
Title: Re: Teamspeak block!
Post by: feral on April 02, 2006, 05:03:39 PM
for those interested in an easyer auto refresh script this is the easyest thing to add to your teamspeak block.

open ts_viewer.php in your favorite editor and look for ?> at the botom of the page and right above it paste in this code

Code: [Select]
if (isset($_GET['autorefresh'])) {
$autorefresh = $_GET['autorefresh'];
} else {
$autorefresh = 0;
}
if ($autorefresh == 1) {
echo(" <meta http-equiv=\"refresh\" content=\"60; URL=" . $_SERVER["PHP_SELF"] . "?autorefresh=1\">\n");
}


echo("<br>\n");
if ($autorefresh == 0) {
echo("Autorefresh: Off (<a href=\"" . $_SERVER["PHP_SELF"] . "?autorefresh=1\">Turn on</a>)<br>\n");
} else if ($autorefresh == 1) {
echo("Autorefresh: On (<a href=\"" . $_SERVER["PHP_SELF"] . "?autorefresh=0\">Turn off</a>)<br>\n");
}

you can also set the time it takes between each refresh by finding this part of the code
Code: [Select]
content=\"60;

and change the 60 to what ever you want it.
Title: Re: Teamspeak block!
Post by: nevermore on April 03, 2006, 08:48:30 AM
That's great! What would I need to do to make the font that shows up for the 'autorefresh' toggle a bit smaller?
Title: Re: Teamspeak block!
Post by: rjackson on April 03, 2006, 08:53:51 AM
can some one make a walkthrough for adding TS to my site? seems i cant get it right :(

thanks
Title: Re: Teamspeak block!
Post by: nevermore on April 03, 2006, 08:58:38 AM
What do you mean by 'not getting it right'?
Title: Re: Teamspeak block!
Post by: feral on April 03, 2006, 10:14:29 PM
nevermore, that is a good question, the only thing i can think of is add a class to it that way you can set the size. i didn't write it, it just a generic controlable refresh script that can be use for anything.

the problem i'm having is that when i turn it on it automaticly takes me back to the my home page. if someone more experienced with php could look at it and see if they can firure it out i would be much ablijed.

nvm, for now i just put it into an html block and put it into an iframe.
Title: Re: Teamspeak block!
Post by: core on April 04, 2006, 05:23:36 AM
above refresh solution is not a wise thing to use, It will refresh the whole forum, or page....

idea: link to popup or use iframe

Title: Re: Teamspeak block!
Post by: nevermore on April 04, 2006, 07:40:06 AM
What is an iframe? Sorry for the noob question . . .
Title: Re: Teamspeak block!
Post by: G6Cad on April 04, 2006, 08:16:26 AM
Code: [Select]
<iframe></iframe>
You use that bit of code in an article and put your content between those two tags.
It will open up in the frame, and it will have scrollbars
Title: Re: Teamspeak block!
Post by: feral on April 04, 2006, 11:04:30 AM
Quote
<iframe name="team_speak" src="http://link to your teamspeak block here" width="100%" height="100%" frameborder="0" scrolling = "no"></iframe>


this is a more detailed way to do and iframe with out having a  scroll bar. you can set the hight and width to what you want or make it a % so that it dosn't go over that point.
Title: Re: Teamspeak block!
Post by: rjackson on April 04, 2006, 12:26:11 PM
my teamspeak server is hosted on a friends computer. (12.220.104.127)

my site is hosted on siteground.

All the ports match up and i even had siteground open the query port(51234).

but i still get offline on my website. www.ggod-eve.com

Title: Re: Teamspeak block!
Post by: iowamf on April 04, 2006, 01:44:05 PM
The width can be a percentage ... but unless you get really fancy you have to stick with a fixed number for height (in pixels), ie, height="1000".
Code: [Select]
<iframe name="team_speak" src="http://link to your teamspeak block here" width="100%" height="100%" frameborder="0" scrolling = "no"></iframe>
Title: Re: Teamspeak block!
Post by: nevermore on April 04, 2006, 02:06:59 PM
Does someone have an example they can point me to so I can 'see' it in action?
Title: Re: Teamspeak block!
Post by: feral on April 04, 2006, 02:17:36 PM
Rjackson - make sure that your friend has the query port forwarded using tcp to his computer. since the server is on another server it does not matter if your host has the port open, it is your friend that has to.

nevermore, i am not using the ts_viewer script on my site but if you want to see a ts script in action you can check out my site at here (http://landragon.dynu.com)
Title: Re: Teamspeak block!
Post by: Crip on April 04, 2006, 02:57:28 PM
feral,
would you like a [Forum] botton to match your Daze Theme?
Title: Re: Teamspeak block!
Post by: feral on April 04, 2006, 03:42:28 PM
i'll get around to it i just put the dazed theme up yesterday and havent gotten around to doing all the modifications to it. but thank you for asking.
Title: Re: Teamspeak block!
Post by: rjackson on April 04, 2006, 09:07:53 PM
feral - can you tell me how to set up the port forwarding so i can tell him...

thanks
Title: Re: Teamspeak block!
Post by: feral on April 04, 2006, 10:06:53 PM
No problem, if he is useing a router he will have to log into the router, then go to the forwarding setion and set port 51234 to direct to his computer. also if he is using a firewall he will have to open that port on his firewall too.

if he is not using a router and just has a firewall then he will just have to open the port on the firewall and it should work.

hope that helps
Title: Re: Teamspeak block!
Post by: BCB on April 10, 2006, 07:04:28 AM
Thanks a bunch for porting that! However, since its in PHP it doesn't refresh so some of my website users have complained.  Untill I sit down and port it over to JavaScript I made a temporary fix to have it auto refresh.
You can view it at http://www.teamgouranga.com/

To add this:


In ts_config.inc.php
Find:
                echo ("<center><a href=\"http://www.the-targets.de/\"><font size=\"1\">Created by Mike © 2004</font></a><font size=\"1\"><br>
                    Hacked into TinyPortal by <a href='http://www.warrency.com'>Prismatic</a></font>
                  </center>");

Add Before:

                echo ("<center><div id=\"ts-refresh\" class=\"windowbg\" style=\"border: 1px solid black; padding: 2px;\">Auto Refresh</div></center>");


In ts_viewer.php

Find:
</style>

Add After:
<script language="JavaScript">
// CREDITS:
// Additional code residing outside of Section 1 and Section 2 and all tweaks
//   in Section 1 and Section 2 were created by Xadio
//
// Automatic Page Refresher by Peter Gehrig and Urs Dudli www.24fun.com
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at www.hypergfurl.com.
// Configure refresh interval (in seconds)
  var refreshinterval=60;
// Shall the coundown be displayed inside your status bar? Say "yes" or "no" below:
  var displaycountdown="yes";
// Do not edit the code below
  var starttimeVar;
  var nowtime;
  var tempTitle = window.title;
  var reloadseconds=0;
  var timer;
  var offVar = false;
  var secondssinceloaded=0;
 
  var NS6 = (navigator.appName=="Netscape" && (document.getElementById!=undefined));
  var NS4 = (document.layers);
  var IE  = (navigator.appName=="Microsoft Internet Explorer");
  function GetLayer(layername)
  {
     if(IE||NS4) return (NS4) ? FindLayer(layername) : document.all[layername];
     else return document.getElementById(layername);
  }
   
  function FindLayer(layername, obj)
  {
    // recursive function to find the layer
     if(obj == null) return false;
     var i=0;
     var perObj = null;
     var tmpObj = (obj) ? obj.document.layers : document.layers;
     for(i=0;i<tmpObj.length;i++)
     {
       if(tmpObj[i].id==layername) return tmpObj[i];
       perObj = FindLayer(layername, tmpObj[i])
       if(perObj) return perObj;
     }
     return false;
  }
 
 
  function writeToDiv(layername, str)
  {
     obj = GetLayer(layername)
     if(obj == null) return false;

     if(NS4)
     {
         obj.document.write(str)
         obj.document.close()
     }
     if(NS6 || IE)
     {
        obj.innerHTML = str
     }
 
  }

  // Section 1
  function starttime(start) {
    starttimeVar=new Date();
    starttimeVar=starttimeVar.getTime();
    if(start) {
      offVar = false;
      countdown();
    }
  }
 
  //Section 2
  function countdown() {
    if(!offVar) {
      nowtime= new Date();
      nowtime=nowtime.getTime();
      secondssinceloaded=(nowtime-starttimeVar)/1000;
      reloadseconds=Math.round(refreshinterval-secondssinceloaded);
      if (refreshinterval>=secondssinceloaded) {
        var timer=setTimeout("countdown()",1000);
        if (displaycountdown=="yes"){
          writeToDiv("ts-refresh", "Auto refresh in <b>"+reloadseconds+"</b> seconds.<br /><input type=\"button\"value=\"Off\" onClick=\"javascript:off()\" />");
        }
      }
      else {
       clearTimeout(timer);
       window.location.reload(true);
      }
    }
  }

 
  function off() {
    offVar = true;
    clearTimeout(timer);
    writeToDiv("ts-refresh", "Auto refresh is <b>OFF</b><br /><input type=\"button\" value=\"On\" onClick=\"javascript:starttime(true)\" />");
  }
 
 window.onload=new function(){starttime(true);}
</script>

Enjoy

//EDIT NOTE//
I have edited the javascript section of this to clear up a few errors.
Fixed: Null objects being passed.
Fixed: IE required new function for onload calls.




I had been getting some complaints from some of My Members about errors they get when they come to my forum with IE, well with me not using IE i did notget these errors, it turns out they were from the Auto Refresh, so I got to looking and found that the above with a little bit of change stopped the error.   So I found the bit of code
Code: [Select]
window.onload=new function(){starttime(true);} and had it changed to
Code: [Select]
if(IE) {
    window.onload= function(){starttime(true);}
  } else {
    window.onload=new function(){starttime(true);}
  }
  and all is well now.

I am not the one that figured this part out as I was not the one that was getting the errors I am jjust the person passing it along incase you are getting the same. Error and they have Script Debugging Enabled.
Title: Re: Teamspeak block!
Post by: Hawkes on April 18, 2006, 08:16:42 PM
Hmmm... this is awesome, but I have one question.  How hard would it be to add a field to the member's profile for their TS login name.  Our TS server is used for several outfits and we are required to prefix our nick with our outfit abbreviation.  Can a field be added to the profile or the code hacked to add this to the user name prior to opening TS?
Title: Re: Teamspeak block!
Post by: feeble on May 03, 2006, 07:52:22 PM
if you would like to display channels that only have ppl in it.

open up ts_config.inc.php

on line 510
add
Code: [Select]
$_5C2 = $this->_12($_5D[channelid],$_5D[channelid],$_57);
just after
Code: [Select]
foreach($this->g_channelList as $_5D)
{

and
on line 524
Code: [Select]
if($_5C2 == "")
{
$_5C .= "</tr></table></td></tr>";
}
else{

just after
Code: [Select]
if ($_5D[parent]==$_55)
{
$_5C .= ("<tr class=\"smaller\">\n");
$_5C .= ("<td class=\"smaller\">\n");
$_5C .= ("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"smaller\">\n");
$_5C .= ("<tr class=\"smaller\" title=\"".$_5E." \nID: ".$_5D[channelid]."\">\n");

and
on line 551
add
Code: [Select]
}just after
Code: [Select]
if ($_57==0)
$_5C .= ("<td class=\"smaller\"><small>".$_5D[attribute]."</small></td>\n");
$_5C .= ("</tr>\n");
$_5C .= (" </table>\n");
$_5C .= ("</td>\n");
$_5C .= ("</tr>\n");
Title: Re: Teamspeak block!
Post by: rjackson on June 20, 2006, 10:37:22 AM
what is the most current working verison of TS block is everyone using? can someone post it or attach it?

thanks
Title: Re: Teamspeak block!
Post by: copkiller on June 30, 2006, 09:21:53 AM
hi

iam getting that error message in my logs

2: strftime() expects parameter 2 to be long, string given
Datei: /home/vhosts/5000136905/shadow-souls.de/htdocs/smf/teamspeak/ts_config.inc.php
Line: 462

here is the function and Line 462 is    $_54=strftime("%S seconds", $_53);


Code: [Select]
function _11($_53)
{
$_54="0 seconds";
if ($_53 < 60 )
{
$_54=strftime("%S seconds", $_53);
}
else
{
if ($_53 >= 3600 )
{
$_54=strftime("%H:%M:%S hours", $_53 - 3600);
}
else
{
$_54=strftime("%M:%S minutes", $_53);
}
}
return htmlentities("$_54");
}

maybe some1 can help me. my error log is 350 pages, because of time refresh?!?
well , i dont know.
bye
Title: Re: Teamspeak block!
Post by: copkiller on June 30, 2006, 11:11:45 AM
using "60"  "3600" now and no more errors but ... is it working?
well i still dont know :uglystupid2:

Code: [Select]
function _11($_53)
{
$_54="0 seconds";
if ($_53 < "60" )
{
$_54=strftime("%S seconds", $_53);
}
else
{
if ($_53 >= "3600" )
{
$_54=strftime("%H:%M:%S hours", $_53 - "3600");
}
else
{
$_54=strftime("%M:%S minutes", $_53);
}
}
return htmlentities("$_54");
}
Title: Re: Teamspeak block!
Post by: Xarcell on July 02, 2006, 06:46:49 PM
I don't understan how to get teh channel ID to add to teh viewer file.
Title: Re: Teamspeak block!
Post by: Dazed on July 14, 2006, 05:48:46 PM
I am having a small problem with the viewer. I chose to post here hopeing someone with php experience could figure this out. I have included a thumbnail, hopefully, to show where I am talking about. The problem is in the click to join section. If you right-click on a passworded channel is shows the user name and password. Obviously we dont want to display private info. Is there a way to remove it or block the info?

I will post the site link here. http://grumpyoldmen.us/index.php (http://grumpyoldmen.us/index.php) Right now the TS viewer is a different one  but I want to go back to the one I was using. TP and SMF are up to date, with the patch, etc. applied. (RC2 and the latest SMF I believe)

See if any of you can give me an idea. I can post the raw file if that would help too.
Thanks in advance of a review.
Title: Re: Teamspeak block!
Post by: Thurnok on July 14, 2006, 06:28:37 PM
Are you talking about the Channel password or the Server password?

The only password that should be displayed there is the Server password (if you have one).  This is because clicking the link of any channel on your TS block display needs to add the Server password (again if you have one) in order to pass that to Teamspeak when someone tries to enter your TS server through the TS Block in TinyPortal.
Title: Re: Teamspeak block!
Post by: Dazed on July 14, 2006, 06:40:35 PM
Say when I right click, it shows my name and pass. I am not sure I guess if others can see that or not. I know it needs that info to join but wondered if there is a way to prevent it showing in the right click.
Title: Re: Teamspeak block!
Post by: Thurnok on July 14, 2006, 06:56:53 PM
It should not be showing "your" password, only the Server password.  It always shows your SMF username because it uses that as your TS Nickname when joining by clicking  a channel in the block.

Do you have a Server password?  And if so, is that what you are concerned about?
Title: Re: Teamspeak block!
Post by: Dazed on July 14, 2006, 07:23:37 PM
This is what I get. It was the password and user to join the channel. Server is different.
I guess I would at least feel better if this didn't show up.
And I want to be sure another user cant use it.
Title: Re: Teamspeak block!
Post by: Thurnok on July 14, 2006, 09:48:09 PM
Teamspeak "channels" do not require a User ID.  What you are looking at comes from the ts_viewer.php file.  Those are the User ID of the currently logged in SMF user (you in this case, someone else when someone else looks at it) and the Server Password entered in the line that looks like this:

$ts_viewer->show_ts_viewer("<your_server_address>", 9003, 51234, "<your_server_password>");

Of course your TS TCP port may be different, I see you are not using the default TS Chat port (8767) but the default TS TCP port is 51234.  I think you need to check your ts_viewer.php file and see that line.  If you do not have a server password, you should have a set of emtpy double quotes ("") instead of a password as the last parameter to the show_ts_viewer() function.

If you do not put a server password in that function:
$ts_viewer->show_ts_viewer("<your_server_address>", 9003, 51234, "");

right click properties will still show the same command line except nothing for a password:
teamspeak://69.12.30.131:9003/?channel=Private?password=?nickname=<yourSMFid>

If that is not the case, you are running an extremely different viewer than I am.  You cannot grab channel passwords thru TS TCP without an admin login, so you would have to have supplied that somewhere or your TS is very easily comprimised.

Forgot to mention - you can right click any channel (not just channels with passwords) and see the same info.
Title: Re: Teamspeak block!
Post by: kran1um on August 07, 2006, 08:59:17 PM
I am getting this error for the teamspeak block.

Warning: Unknown(teamspeak/ts_viewer.php): failed to open stream: No such file or directory in /home/content/smf/Sources/Load.php(1040) : eval()'d code(34) : eval()'d code on line 1
Title: Re: Teamspeak block!
Post by: IchBin on August 07, 2006, 11:30:43 PM
Have you tried adjusting the path to your ts_viewer.php file? Try putting the full path and see if that works.
Title: Re: Teamspeak block!
Post by: spookdude on August 08, 2006, 10:06:12 AM
Keeps saying my server is offline, even though it isnt...any help?
http://godwowguild.com
Title: Re: Teamspeak block!
Post by: IchBin on August 08, 2006, 10:29:13 AM
Does your server have the proper ports open?
Title: Re: Teamspeak block!
Post by: kran1um on August 08, 2006, 12:02:18 PM
I put it in every folder so far and still get the same error..in the "Load.php"
Title: Re: Teamspeak block!
Post by: IchBin on August 08, 2006, 12:10:38 PM
I put it in every folder so far and still get the same error..in the "Load.php"
What about the permissions on the file?
Title: Re: Teamspeak block!
Post by: LeeD on August 08, 2006, 12:30:10 PM
for the teampskeak viewer

use ts2 updated version

go here

http://www.tsviewer.com/

fill out the info , they give you proper html here

just upload it to a java/script html box and there ya go
Title: Re: Teamspeak block!
Post by: spookdude on August 08, 2006, 03:11:36 PM
Does your server have the proper ports open?

What ports need to be open? And how exactly do I open them? My TS service is hosted.
Title: Re: Teamspeak block!
Post by: IchBin on August 08, 2006, 11:05:01 PM
It tells you in the first post what ports need to be opened. Ask your provider to do it for you.
Title: Re: Teamspeak block!
Post by: chaotix on September 13, 2006, 06:49:04 AM
Using the block in 0.95/RC3 i just get nothing, tried adding in a simple

echo "helloo";

to see if its doing any of it but doesnt show that either

initially got this error

Quote
Parse error: parse error, unexpected '<' in /home/content/e/z/y/ezymoney/html/Sources/Load.php(1708) : eval()'d code(35) : eval()'d code on line 1

using this in the block:

Code: [Select]
<?php include("ts_viewer.php"); ?>

changed it to

Code: [Select]
include("ts_viewer.php");

No error but doesnt seem to do anything just shows the block title and nothing in the block

used the full path to the file still the same.  Im not too good at php so i didnt want to mess about with the Load.php file yet. Line 1708 of Sources\Load.php is part of a function (template_include) ive pasted that section of the function:

Code: [Select]
// Are we going to use eval?
if (empty($modSettings['disableTemplateEval']))
{
[size=18pt][i][b]$file_found = file_exists($filename) && eval('?' . '>' . rtrim(file_get_contents($filename))) !== false;[/b][/i][/size]
$settings['current_include_filename'] = $filename;
}
else
{
$file_found = file_exists($filename);

if ($once && $file_found)
require_once($filename);
elseif ($file_found)
require($filename);
}

if ($file_found !== true)
{
ob_end_clean();
if (!empty($modSettings['enableCompressedOutput']))
@ob_start('ob_gzhandler');
else
ob_start();

if (isset($_GET['debug']) && !WIRELESS)
header('Content-Type: application/xhtml+xml; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
(Lines 1705 to 1730)

Any help would be greatly appreciated.

PS, as our TS server has no password i removed the word SERVERPASSWORD and just left the "" in ts_viewer.php

PPS Website address is http://thexclan.org
Title: Re: Teamspeak block!
Post by: IchBin on September 13, 2006, 07:03:26 AM
This shouldn't affect your load.php file at all. Only reason would be because your using some code with an error in the block or in the files. You need to check the file you edited (in the TS files) and make sure you have the right code and that you didn't accidentally erase or add something.
Title: Re: Teamspeak block!
Post by: LeeD on September 14, 2006, 01:08:45 PM
heres my recent story

i didnt have control of my team speak it is hosted by my raceserver we use
it is a ts 2 but it isnt up to date so viewer wouldnt work cause it couldnt be queeried

i went and purchased a second ts ... hosted by somebody
long story short i was able to queery the server and get above ts viewer to work
http://www.tsviewer.com/
the host stunk though after 2 months i had been down over 9 times , the viewer site also was sluggish at best .. i axed it back to square one

i found this code , using it in html block

Quote
<div align=center>[img width= height=]http://racingbuds.com/tslogo.jpg[/img]</div><TABLE align=center target=_blank CELLPADDING=0 CELLSPACING=0><form name="ts_login"><TR><TD align="center"><font face="Verdana" size="1">Nick Name
<input type="text" size="15" maxlength="20" name="NICKNAME">
Login <font color=orange>(If Member)</font>
<input type="text" size="15" maxlength="20" name="LOGINNAME">
Password <font color=orange>(If Member)</font>
<input type="password" size="15" maxlength="20" name="PASSWORD">

<input type="button" value="Connect" onClick="location.href='teamspeak://000.000.00.000:0000/nickname=' + ts_login.NICKNAME.value + '?loginname=' + ts_login.LOGINNAME.value + '?password=' + ts_login.PASSWORD.value;"></font></TD></TR></form></TABLE></center></div>

it works well using ie and firefox looks good also
but again i dont have control over the team speak server now im back to square 1 with sort of an out dated ts
is there a way to utilize this code but add something in there to show the channels
and whos on there etc

ty
Title: Re: Teamspeak block!
Post by: feral on September 16, 2006, 03:20:37 PM
buy its not up to date how out of date is it. ts2 v 2.0.32.60   is the current version.

team speak php blocks have been around for some time now. what you need to do is find what version you have. then you can find a viewer for it.

or just ask you host to update to the newest version.
Title: Re: Teamspeak block!
Post by: apo on December 10, 2006, 02:46:23 PM
Hi,
i take the Files from this Package,

add my TS-Server. Now i get this Error:

Parse error: syntax error, unexpected $end in /www/htdocs/v164574/ft/Sources/Load.php(1733) : eval()'d code(35) : eval()'d code on line 1

on SMF 1.1
TP 097

Can anybody help me ?
Title: Re: Teamspeak block!
Post by: zuma13 on February 15, 2007, 09:20:33 PM
Hello.

I've read most of the 2 pages of posts here and followed all the steps. I'm still getting an offline message.

My TS server is also hosted. The ports are opened I think, since TS is running on them?

Any help would be appreciated, thanks.
Title: Re: Teamspeak block!
Post by: IchBin on February 16, 2007, 12:19:11 PM
The only port for TS that has to be open for it to work is 8767 (default). The other ports are for admin and status. You'll need to ask your host if they are allowing these ports.
Title: Re: Teamspeak block!
Post by: zuma13 on February 16, 2007, 12:25:48 PM
The only port for TS that has to be open for it to work is 8767 (default). The other ports are for admin and status. You'll need to ask your host if they are allowing these ports.

Hi.

Thank you, I've talked to my "host" (actually it's a mohaa game community that gave my clan this TS for winning a cup) and they won't open any ports for me :S

The guy says that there's a TS script out there that doesn't need a query port. I doubted but he says he's used it some time in the past. :rolleyes:

Well, does it have any chance to be true? Or the guy is just sick?
Title: Re: Teamspeak block!
Post by: IchBin on February 16, 2007, 12:27:30 PM
Probably something you should look for on the TS site. I've never seen it myself.
Title: Re: Teamspeak block!
Post by: raxavier69 on May 30, 2007, 02:05:17 PM
tried every setting i can think of, 3 servers and they all say offline? any ideas?
ip correct TS port and TCI ports correct
Title: Re: Teamspeak block!
Post by: IchBin on May 30, 2007, 07:43:15 PM
Are the ports forwarded in the router and/or firewall?
Title: Re: Teamspeak block!
Post by: raxavier69 on May 30, 2007, 09:54:33 PM
i tried 3 different teamspeak servers
Title: Re: Teamspeak block!
Post by: IchBin on May 30, 2007, 10:10:27 PM
That doesn't mean it will work. You HAVE TO HAVE the status ports opened on the firewall and/or router for it to work.
Title: Re: Teamspeak block!
Post by: raxavier69 on May 30, 2007, 11:22:37 PM
please explain
i got the 2 ports #'s do i have to ask my friend to allow me to view? because the ts is on another machine
Title: Re: Teamspeak block!
Post by: Thurnok on May 31, 2007, 03:49:13 AM
Are you trying to use the Teamspeak Status php script?

If so, here's the steps you need to take:

1) On the Teamspeak Server (the box running the TS Server software)  go to the directory where the TS Server software is installed.

2) Open the Server.ini file and find the entry TCPQueryPort=.  Note the port being used.  This is the port that you need for the TS Status script to access the TS Server and gather information (who's on, if the server is up, etc.).  The default for this is port 51234.

3) On the router that the Teamspeak Server computer uses to access the internet, you must ensure that the port from step 2 is not blocked (generally, for most routers it needs to be in the port forwarding section).  This is a TCP port, not UDP - make the correct setting on your router.
NOTE: I'm assuming that the TS Server is already working, and therefore not mentioning anything about forwarding the "chat" port (the port that is used for xmitting voice data to/from clients)

4) On the WEB server you wish to place the Status Script, you must ensure that they allow the php function fsockopen().  If your host does not allow this function, you will not be able to use the script.  Some hosts require you to provide them the URL and PORT for use with the fsockopen() function.  They then generally only allow a socket to be opened for that domain and that port.  If it changes, you'll have to contact them again to have them change the domain/port they allow fsockopen() to access.  If your host does not restrict the fsockopen() function at all, then you are in great shape.

5) In the TS Status Script file (ts_viewer.php) make sure the the line that starts like this:
$ts_viewer->show_ts_viewer(
looks like this:
$ts_viewer->show_ts_viewer(<server domain>, <ts chat port>, <ts tcp status port>, <ts server password>)

<server domain> = domain of the Teamspeak Server
<ts chat port> = the UDP port the TS Server and TS Clients use for "chatting" on
<ts tcp status port> = the TCP port from step 2
<ts server password> = the password (if you have one) for your TS Server for a guest to connect with, otherwise use a null string ("")

Example:
$ts_viewer->show_ts_viewer("mytsserver.com", 8767, 51234, "myTSserverPwd")

That's pretty much it.  If you get "Server Offline" in your block from the script and you are sure that the TS Server is running and its router has the TCP Query Port open (from step 2), then the WEB server is unable to use fsockopen() and you must get your Host provider to allow it.
Title: Re: Teamspeak block!
Post by: raxavier69 on May 31, 2007, 02:11:07 PM
yup all done
Title: Re: Teamspeak block!
Post by: raxavier69 on May 31, 2007, 02:11:35 PM
i can even provide the vs_viewer.php for u to check
Title: Re: Teamspeak block!
Post by: raxavier69 on May 31, 2007, 02:37:07 PM
kk had a friend of mine check the server, and sockets werent enabled like promised. thank u
Title: Re: Teamspeak block!
Post by: -Prismatic- on June 20, 2007, 02:49:59 PM
You don't know how great it makes me feel to see that this was taken up :) Sorry I've not been around :(
Title: Re: Teamspeak block!
Post by: asklife on June 21, 2007, 01:28:05 AM
hello i tried this zip folder installing on smf root directory, but it didnt worked, could you just explain how can i install it on smf root directory? txks. in advance for your help.
Title: Re: Teamspeak block!
Post by: iGate on June 25, 2007, 08:24:27 AM
i cant get this to work...odd

it is located at my website.com/forum/teamspeak/ts_viewer.php

i am using a php block with thise code
include ("forum/teamspeak/ts_viewer.php");

any ideas?
Title: Re: Teamspeak block!
Post by: IchBin on June 25, 2007, 10:01:35 AM
Did you read this thread? Do you have the ports open? There's lots of info in this thread you should read up on.
Title: Re: Teamspeak block!
Post by: asklife on June 25, 2007, 10:09:33 AM
yeah i have read the thread, still it didnt get idea, because whenever i try to put the codes i get an error.
Title: Re: Teamspeak block!
Post by: IchBin on June 25, 2007, 12:08:39 PM
Well it might help if you post your error. And it also helps if you answer the questions when asked. :)
Title: Re: Teamspeak block!
Post by: iGate on June 25, 2007, 04:58:45 PM
could some1 give me there directory tree/structure that they used to make this work?
Title: Re: Teamspeak block!
Post by: IchBin on June 25, 2007, 05:43:59 PM
In the very first post it shows that they put a teamspeak folder inside of their forum folder if that helps.
Title: Re: Teamspeak block!
Post by: iGate on June 26, 2007, 05:19:08 PM
no worry's i got it working. i just had to re donwload it and do it again...odd
Title: Re: Teamspeak block!
Post by: dunargo on June 27, 2007, 04:07:22 PM
Ok I have looked through most of the pages here and I did not see anyone else with this issue, at the very initial point of install:

Directions
Download and unzip Teamspeak.zip to a subfolder in the root of your forum called teamspeak (IE. www.yoursite.com/yourboards/teamspeak/)
Open ts_viewer.php


I cannot do this step, thus I cannot go on. If i am reading this right I need to unzip TS onto my server, correct? I cannot unzip it but i can extract the .tar.bz, but then I do not see a ts_viewer.php anywhere... help :D
Title: Re: Teamspeak block!
Post by: IchBin on June 27, 2007, 04:13:20 PM
You using the one in this post?

http://www.tinyportal.net/index.php?topic=1021.msg26256#msg26256

I just checked it and there was a ts_viewer.php file in it.
Title: Re: Teamspeak block!
Post by: dunargo on June 27, 2007, 04:17:30 PM
ok so i guess i am confused, you unzip that file in that post and not the actual TS install zip?
Title: Re: Teamspeak block!
Post by: dunargo on June 27, 2007, 06:14:00 PM
Could I get clarification on whether I am supposed to have an install of TS on my forums somewhere? Or just the file you linked above, I put that in a folder inside the forums, and am running the TS server at a pc at my home,

here is my config portion with the info we are supposed to plugin:

 $ts_viewer->set_Viewer("Orderlxvi.net", "http://www.orderlxvi.net/");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("24.210.24.87", 1024, 51234, "SERVERPASSWORD");

I got the block to show, but it is just an empty block heh.. What am i missing here.. .Thanks again   :uglystupid2:


Edit* I thought that it may be ports being blocked but i am able to put the tsviewer code into my main page, and it shows up fine there. so it cannot be a ports issue can it?
Title: Re: Teamspeak block!
Post by: IchBin on June 27, 2007, 07:29:25 PM
The script picks up the information from your server and displays the status of who is in what channel.
Title: Re: Teamspeak block!
Post by: sysengr on June 27, 2007, 08:02:58 PM
Could I get clarification on whether I am supposed to have an install of TS on my forums somewhere? ........

If you are ever in need of a FREE Teamspeak server.. just drop me a note and I will hook you up. It is not a prbolem.
Title: Re: Teamspeak block!
Post by: dunargo on June 27, 2007, 08:04:48 PM
Since I can't seem to get this to work, dl and unpack the zip from :http://www.tinyportal.net/index.php?topic=1021.msg26256#msg26256 to a subfolder in my forums. Edit the info in the ts_viewer.php to match my info. Then add a new phpblock with:
 include ("teamspeak/ts_viewer.php");

What step am i missing here


sysengr, I have no problem with the hosting of it, just wasnt sure if i needed TS installed on the forum somewheres to be able to get this to show up on the blocks.. Thanks though :D
Title: Re: Teamspeak block!
Post by: sysengr on June 27, 2007, 08:09:05 PM
sysengr, I have no problem with the hosting of it, just wasnt sure if i needed TS installed on the forum somewheres.

Not a problem.  I have a huge Linux server with a twin 100 Mb pipe to the backbone, and it is not doing anything much and throught I would offer.
Title: Re: Teamspeak block!
Post by: IchBin on June 27, 2007, 08:22:28 PM
Since I can't seem to get this to work, dl and unpack the zip from :http://www.tinyportal.net/index.php?topic=1021.msg26256#msg26256 to a subfolder in my forums. Edit the info in the ts_viewer.php to match my info. Then add a new phpblock with:
 include ("teamspeak/ts_viewer.php");

What step am i missing here


sysengr, I have no problem with the hosting of it, just wasnt sure if i needed TS installed on the forum somewheres to be able to get this to show up on the blocks.. Thanks though :D
Did you edit the info in the ts_viewer.php file to point to your Team Speak server? Did you forward the ports on your Team speak server?
Title: Re: Teamspeak block!
Post by: dunargo on June 27, 2007, 08:26:01 PM
Yes I edited the viewer info, as far as the ports no i have not done anything. I cant heh. I may have to call my ISP, my router does not have an interface to login to get stuff shifted around

edit* i just have a modem, there should not be any ports blocked...
Title: Re: Teamspeak block!
Post by: sysengr on June 27, 2007, 08:31:07 PM
I never tried to install this TS Box and thought I would give it a try.  It installed perfectly in about 30 seconds...

You can see it at http://ancientshadows.net/guild/index.php

I downloaded the Php and graphics from: http://www.tinyportal.net/index.php?action=dlattach;topic=1021.0;attach=2384

Then I just unzipped them and uploaded them into my SFM folder on my web site under a folder called "teamspeak"

I then modified the ts_viewer.php to reflect my domain, my IP address and port to my Teamspeak server.  I do not have a password, so I set that to just "".

Next I went into TP and created a right side block names Teamspeak as a PHP box.   Inside for the program I only added:

include ("teamspeak/ts_viewer.php");

and saved the block and activated the block.

When I hit my home page, there it was, all up and running.

All I did was follow the very simple instructions on the first post of this thread.

I spent about 10 times the amount of time just posting this.  But for you, all is worth it.
Title: Re: Teamspeak block!
Post by: dunargo on June 27, 2007, 08:49:11 PM
I did exaclty what ya got up there as well heh. Thought i might have had a duh moment and not activated the block but it is.

$ts_viewer->set_Viewer("OrderLxvi", "http://orderlxvi.net/");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("24.210.24.87", 1024, 51234, "SERVERPASSWORD");

Does that info look correct? Do I need to be pointing to the /teamspeak folder I have created in my SMF folder or ? The IP of my system is correct, as are the ports. Like I said I do not think I have any ports blocked on my end. I am able to get the ts_viewer to work on the main section of my page, doesn't use the same features, about the ports that is.
Title: Re: Teamspeak block!
Post by: dunargo on June 27, 2007, 08:55:30 PM
ahahah man i am such a tard.... ("teamspeak/ts_viewer.php");


I named the folder Teamspeak... so sorry
Title: Re: Teamspeak block!
Post by: sysengr on June 27, 2007, 10:23:36 PM
With WIndows Servers a Cap in a file name is no big deal.. but under UNIX.. that is another file totaly...

Also.. unless your teamspeak server password is equal to SERVERPASSWORD you still need to change SERVERPASSWORD"); to what ever your Server Password is.  If you are like me and do nto have a password to get to your lobby, erase everything between the quotes....  Remove the word SERVERPASSWORD so it just looks like "");
Title: Re: Teamspeak block!
Post by: sysengr on June 27, 2007, 10:25:59 PM
And again, unless you have a fat pipe going into your house, you will be limited to the number of people you can have on your teamspeak server.  The offer still stands.  If you need some more power and are sick of sharing your home connect for your TS server... Drop me a note.. I can set you up with your own server in about 4 minutes.
Title: Re: Teamspeak block!
Post by: dunargo on June 28, 2007, 11:28:46 AM
I do not plan on having more than  5-10 on mine, but if it grows, i will look ya up!

And yea the server is ran off of a UNIX box... heh
Title: Re: Teamspeak block!
Post by: dunargo on June 28, 2007, 03:34:29 PM
nm me... i figured it out  :uglystupid2:
Title: Re: Teamspeak block!
Post by: symco on June 29, 2007, 08:47:53 AM
Well, this block worked for me untill my server did go offline for 2 hours... now its back online, but the block still says its offline...
Title: Re: Teamspeak block!
Post by: IchBin on June 29, 2007, 08:57:58 AM
Perhaps something changed on the server.
Title: Re: Teamspeak block!
Post by: Crip on June 29, 2007, 09:06:22 AM
I thought this Thread said Tennessee block..dang i need some glasses..
Title: Re: Teamspeak block!
Post by: JOSHSKORN on July 20, 2007, 01:51:35 AM
I've got a problem here.  I've switched game hosting companies and have gotten a new webhost.  I've found out recently, like a half hour ago, that my webhost 'doesn't support TeamSpeak'.  This was the response I got when asked about opening ports for TS.  I'm using IXWebhosting.

Any thoughts?  Is there a way to install this block on another server such as geocities and use it from there?
Title: Re: Teamspeak block!
Post by: G6Cad on July 20, 2007, 01:55:45 AM
Please read the posting guides we have in the forum and site.
No support will be given in the block code and snippets board.
I will move this to support
Title: Re: Teamspeak block!
Post by: -Prismatic- on July 20, 2007, 01:54:23 PM
Please read the posting guides we have in the forum and site.
No support will be given in the block code and snippets board.
I will move this to support

Little late to be moving it this thread has been here for 2 years with Admins even joining the discussion.
Title: Re: Teamspeak block!
Post by: IchBin on July 20, 2007, 04:51:05 PM
I've got a problem here.  I've switched game hosting companies and have gotten a new webhost.  I've found out recently, like a half hour ago, that my webhost 'doesn't support TeamSpeak'.  This was the response I got when asked about opening ports for TS.  I'm using IXWebhosting.

Any thoughts?  Is there a way to install this block on another server such as geocities and use it from there?

If the host doesn't open the ports for TeamSpeak then you are out of luck. However, I'm a bit confused as to which host you're talking about. The teamspeak host, or your website host? The website host doesn't need any ports opened, only the teamspeak server host.
Title: Re: Teamspeak block!
Post by: JOSHSKORN on July 20, 2007, 05:40:39 PM
If the host doesn't open the ports for TeamSpeak then you are out of luck. However, I'm a bit confused as to which host you're talking about. The teamspeak host, or your website host? The website host doesn't need any ports opened, only the teamspeak server host.

Basically, I had this website on another host at one time.  The TeamSpeak block worked perfectly there.  It was referencing the same TeamSpeak server and everything.  In fact, I didn't change any settings.  I even checked the permissions and made sure that it said 777 for all files.
Title: Re: Teamspeak block!
Post by: G6Cad on July 21, 2007, 01:22:37 AM
Please read the posting guides we have in the forum and site.
No support will be given in the block code and snippets board.
I will move this to support


Little late to be moving it this thread has been here for 2 years with Admins even joining the discussion.

The rule for "no support in the block code and snippets board" have only been on the site for a short time. So thats why the admins didnt say anything before, and thats the reason i moved it now and asked you to read the guide again. The guide do get updated sometimes ;)
Title: Re: Teamspeak block!
Post by: JOSHSKORN on July 22, 2007, 07:35:42 PM
OK I hope I'm posting in the right forum, this doesn't appear to be the block code and snippets board, the link tree up above says "Forum>Development>Support>Teamspeak block!"

Anyway, I've switched hosts, sort of. I'm on my friend's hosts, who doesn't have the privilege to create an additional database so I'm still using the SMF database off the old host, just have my website on my friend's host.  He's working on resolving this problem.

As I said, my TS block is partially working.  Unfortunately, I now get a bunch of junk above my TS Query, below the title, which says:

Code: [Select]
Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/.hobbes/clansrv/www/thesite/teamspeak/ts_config.inc.php on line 216

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/.hobbes/clansrv/www/thesite/teamspeak/ts_config.inc.php on line 216

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/.hobbes/clansrv/www/thesite/teamspeak/ts_config.inc.php on line 273

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/.hobbes/clansrv/www/thesite/teamspeak/ts_config.inc.php on line 273
I put it inside a code block because I felt it was a lot of text and didn't want to make everyone scroll so much.

Let me know what the problem is, or if I need to post any additional files.  All CHMODs have been set to 777, both the Teamspeak folder and the files inside of it.
Title: Re: Teamspeak block!
Post by: G6Cad on July 23, 2007, 04:46:01 AM
It's just what the line say.
You need to configure the php.ini file on the server you are on to get this to work.
How to do that you need to ask your friend to figure out.
Title: Re: Teamspeak block!
Post by: zuma13 on July 27, 2007, 05:50:52 AM
Hi there!

I'm using this block now, works good, but I need help on 2 things please:

1) Longer channel names mess with the look of it, the channels icons go to the second line. I wanted to get rif of the channel info (aka (RS) (RSD) (RPS) things) to prevent this from happening. Can anybody help me findind wich variable/part of code I should remove? The code isn't commented at all and I'm too noob to find out alone lol.

2) I've read almost all pages of posts and noticed that it has already been discussed, although no one could implement it at that time. I'm talking about being able to login with a registered TS user. I run a script that does it perfectly at http://www.zbase1.com/, but since it's hosted somewhere else it takes an annoying amount of 5 seconds to load the TS info. Basically what it does is show the fields required right in the block (no annoying pop-ups) just like it is in the TS client. It even handles with anonymous users too, like you can see in the following screenshot:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg249.imageshack.us%2Fimg249%2F3881%2Ftsblockcg0.th.jpg&hash=cf941db6369afcc08a37013cf6cf9fe861d1e099) (http://img249.imageshack.us/my.php?image=tsblockcg0.jpg)

Hope someone can help, it'd be perfect for many ppl then.
Title: Re: Teamspeak block!
Post by: biggsy on August 10, 2007, 01:19:09 PM
Hi all, i installed the ts block, awesome piece of kit, created a php block and entered the code as suggested, by on my site where the teamspeak block should be i get this error....

Parse error: syntax error, unexpected '&' in /home/utclan/public_html/Sources/Load.php(1735) : eval()'d code(35) : eval()'d code on line 1

If i type the exact url of the ts_viewer.php it shows fine but just not in my block

Any ideas guy and gals???


Many Many Thanks

bigs
Title: Re: Teamspeak block!
Post by: IchBin on August 10, 2007, 10:38:42 PM
Please do not double post. Please continue in your other thread.
Title: Re: Teamspeak block!
Post by: tomtom9800 on August 12, 2007, 10:06:23 AM
hmmmm I think everything is working, but it looks like to me no image is showing up........just has the block and then blank with no errors......I have my teamspeak folder in www/forum/teamspeak......anysugesstions?
Title: Re: Teamspeak block!
Post by: tomtom9800 on August 12, 2007, 09:20:57 PM
haha ok fixed that problem, seems I had to put it in the themes folder instead of the root folder.......another question and sure it has been asked but I am on dial up so pages take awhile to load and did not want to go through the 26 pages all night lol.....is there anyway to have teamspeak refresh every 15 second or so?
Title: Re: Teamspeak block!
Post by: IchBin on August 12, 2007, 10:46:09 PM
I haven't seen anything that does this. However, keep in mind that if you load the page every 15 seconds you're going to cause a lot of wasted load on your server.
Title: Re: Teamspeak block!
Post by: Sek on August 25, 2007, 11:19:49 PM
Probably a server problem I'm having but the

Code: [Select]
include ("teamspeak/ts_viewer.php");
doesn't seem to be working in my php block.

The viewer it self works as I tested it with http://thelastguild.com/test/forum/teamspeak/ts_viewer.php
However when I add it to the php block it doesn't show up at all.

Anyone have any idea where I can start looking to fix my problem?
Title: Re: Teamspeak block!
Post by: IchBin on August 26, 2007, 12:05:08 AM
Are you sure that is the path to your script?
Title: Re: Teamspeak block!
Post by: Sek on August 26, 2007, 12:45:35 AM
Yeah... click, on the link in my last post it shows what should be showing up in the block.

*Edit* and I have tried it with the full path as well....
Title: Re: Teamspeak block!
Post by: biggsy on August 26, 2007, 03:47:46 AM
ur using speech marks i thin kit should be ' instead of "
Title: Re: Teamspeak block!
Post by: biggsy on August 26, 2007, 03:48:15 AM
include ('teamspeak/ts_viewer.php');
Title: Re: Teamspeak block!
Post by: Sek on August 26, 2007, 06:47:28 PM
Got it to work using the entire path. And as far as the include thing.. all I did was copy the OPs include string. Thanks for the help :)
Title: Re: Teamspeak block!
Post by: jlilly on September 05, 2007, 09:19:16 PM
Are you trying to use the Teamspeak Status php script?

If so, here's the steps you need to take:

1) On the Teamspeak Server (the box running the TS Server software)  go to the directory where the TS Server software is installed.

2) Open the Server.ini file and find the entry TCPQueryPort=.  Note the port being used.  This is the port that you need for the TS Status script to access the TS Server and gather information (who's on, if the server is up, etc.).  The default for this is port 51234.

3) On the router that the Teamspeak Server computer uses to access the internet, you must ensure that the port from step 2 is not blocked (generally, for most routers it needs to be in the port forwarding section).  This is a TCP port, not UDP - make the correct setting on your router.
NOTE: I'm assuming that the TS Server is already working, and therefore not mentioning anything about forwarding the "chat" port (the port that is used for xmitting voice data to/from clients)

4) On the WEB server you wish to place the Status Script, you must ensure that they allow the php function fsockopen().  If your host does not allow this function, you will not be able to use the script.  Some hosts require you to provide them the URL and PORT for use with the fsockopen() function.  They then generally only allow a socket to be opened for that domain and that port.  If it changes, you'll have to contact them again to have them change the domain/port they allow fsockopen() to access.  If your host does not restrict the fsockopen() function at all, then you are in great shape.

5) In the TS Status Script file (ts_viewer.php) make sure the the line that starts like this:
$ts_viewer->show_ts_viewer(
looks like this:
$ts_viewer->show_ts_viewer(<server domain>, <ts chat port>, <ts tcp status port>, <ts server password>)

<server domain> = domain of the Teamspeak Server
<ts chat port> = the UDP port the TS Server and TS Clients use for "chatting" on
<ts tcp status port> = the TCP port from step 2
<ts server password> = the password (if you have one) for your TS Server for a guest to connect with, otherwise use a null string ("")

Example:
$ts_viewer->show_ts_viewer("mytsserver.com", 8767, 51234, "myTSserverPwd")

That's pretty much it.  If you get "Server Offline" in your block from the script and you are sure that the TS Server is running and its router has the TCP Query Port open (from step 2), then the WEB server is unable to use fsockopen() and you must get your Host provider to allow it.


First off, wow.  This is ver thourough.  However, I am still showing as offline.  I rent a dedicated box from DefConServers.com.   Should I contact them about the fsockopen()? 

This is what I have currently
public_html/smf/teamspeak/

Code: [Select]
/* ---------- Teamspeak-Viewer - Anfang ---------------*/

   $ts_viewer->set_Viewer("BH Clan Gaming", "http://www.bhclangaming.com");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("74.86.11.99", 8767, 51234, "");
   
/* ---------- Teamspeak-Viewer - Ende ---------------*/

Another question, do I need to put anything in the "$ts_viewer->set_Channels();" section?  Just curious.

Thanks in advance.  I have been looking for this mod and I really hope I can get it working.
Title: Re: Teamspeak block!
Post by: biggsy on September 06, 2007, 05:01:34 AM
i had this problem, in the end my host was blocking the port, 90% sure your host / webspace provider will not open the port for you.

I had to move hosts, or maybe u can host the teamspeak viwer files on another server and try using including that from another server, allthough if u do that u cant use a standard php include command, and im not sure how to acheive this but i know it can be done.

I moved my entire hosting becuase of the teamspeak block.

Hope this helps
Title: Re: Teamspeak block!
Post by: jlilly on September 06, 2007, 07:13:38 AM
Just emailed defcon.. they said they do not block any ports to customers.  all is open.  My webhost provider advised it is not either and they allow the php function.  I am not sure how else to proceed here.  Any ideas?
Title: Re: Teamspeak block!
Post by: IchBin on September 06, 2007, 07:25:44 AM
Does it work if you point directly to the file in your browser?
Title: Re: Teamspeak block!
Post by: jlilly on September 06, 2007, 07:33:26 AM
nope still says it is offline.  Hrmmmm
Title: Re: Teamspeak block!
Post by: IchBin on September 06, 2007, 08:04:09 AM
If its offline its usually because either you have the wrong paths or something in your script, or your TeamSpeak server/host server is blocking something. If you'd like to PM me your TeamSpeak info I can try it out on my test site.
Title: Re: Teamspeak block!
Post by: jlilly on September 06, 2007, 08:51:53 PM
hrmm.. took me damn near 30 minutes to read the whole thread... so garbled..

I am wanting to know about the autorefresh (just the TS Viewer)
and
a Login Script that I can place at the bottom of the TS Block.

I couldn't tell what is what and if I should use this or that. 

Thanks again for any help.. if anyone can point out the URL for the d/l's that'd be great.. thanks!
Title: Re: Teamspeak block!
Post by: jlilly on September 08, 2007, 03:25:43 PM
Bump..
Title: Re: Teamspeak block!
Post by: jlilly on September 10, 2007, 09:20:50 AM
bump
Title: Re: Teamspeak block!
Post by: IchBin on September 10, 2007, 04:19:30 PM
Well, I'm not going to go through 28 pages for you, so perhaps you could point to what you are talking about?
Title: Re: Teamspeak block!
Post by: TimUSA on September 11, 2007, 09:13:10 AM
I hope I didn't miss this somewhere, but when I install a custom theme I lose the teamspeak icons. Any solutions?
Title: Re: Teamspeak block!
Post by: Lesmond on September 11, 2007, 09:40:05 AM
You shouldn't lose them they are not part of any theme, they are all in the teamspeak folder, that is if you used the one post in this topic?
Title: Re: Teamspeak block!
Post by: TimUSA on September 11, 2007, 10:05:43 AM
Sorry, wrong block, is actually shout box that is not working with theme. Thank you.

Title: Re: Teamspeak block!
Post by: jlilly on September 11, 2007, 09:08:47 PM
Hi there!

I'm using this block now, works good, but I need help on 2 things please:

1) Longer channel names mess with the look of it, the channels icons go to the second line. I wanted to get rif of the channel info (aka (RS) (RSD) (RPS) things) to prevent this from happening. Can anybody help me findind wich variable/part of code I should remove? The code isn't commented at all and I'm too noob to find out alone lol.

2) I've read almost all pages of posts and noticed that it has already been discussed, although no one could implement it at that time. I'm talking about being able to login with a registered TS user. I run a script that does it perfectly at http://www.zbase1.com/, but since it's hosted somewhere else it takes an annoying amount of 5 seconds to load the TS info. Basically what it does is show the fields required right in the block (no annoying pop-ups) just like it is in the TS client. It even handles with anonymous users too, like you can see in the following screenshot:

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg249.imageshack.us%2Fimg249%2F3881%2Ftsblockcg0.th.jpg&hash=cf941db6369afcc08a37013cf6cf9fe861d1e099) (http://img249.imageshack.us/my.php?image=tsblockcg0.jpg)

Hope someone can help, it'd be perfect for many ppl then.

Right here IchBin.  This is what I want.  But I dont' want to have to go to another host to do it.  Is there an update for this?
Title: Re: Teamspeak block!
Post by: IchBin on September 11, 2007, 09:14:04 PM
You'll probably have to follow the instructions on that site then.
http://www.zbase1.com/
Title: Re: Teamspeak block!
Post by: jlilly on September 11, 2007, 09:31:34 PM
You'll probably have to follow the instructions on that site then.
http://www.zbase1.com/

Guess I will have to.  Man, it is actually very nice.  Fully adjustable.  Looks fantastic on my site.  Thanks for all the help IchBin.  Good Day.
Title: Re: Teamspeak block!
Post by: JOSHSKORN on September 11, 2007, 10:10:26 PM
You'll probably have to follow the instructions on that site then.
http://www.zbase1.com/

I got this script to work on my site.  What I don't like about it, is that there's no Login button, you just basically have to be smart enough to click on a particular channel to join it.

Here's an example of what to put in a scriptbox:

Code: [Select]
<script type="text/javascript" src="http://www.zbase1.com/tswv/display.php?id=996"></script>
Simple as that, small code.  Here's my question.  There's no 'Login' button, as I stated.  Is there a way I can add one after the script?  A join default channel, basically.  Maybe either base it on the forum user's display name, or if you can somehow grab the contents of the Nickname box (which I don't think is possible considering you're not hosting the script and therefore cannot ID the box).
Title: Re: Teamspeak block!
Post by: jlilly on September 13, 2007, 04:36:09 AM
mine is working fine now.. http://www.bhclangaming.com and I just followed the zbase sites instructions.  I hope this helps.
Title: Re: Teamspeak block!
Post by: Selaiah on September 16, 2007, 09:09:32 AM
My TS Block works perfectly but when i Watch any Member on the Forum It says it has logged this error:

2: strftime() expects parameter 2 to be long, string given
Datei: /httpdocs/ts/ts_config.inc.php
Zeile: 462
?action=unread

This Error seems to occur like 100 times a day :D and I don't really understand the message.

Any idea what it could be?
Title: Re: Teamspeak block!
Post by: IchBin on September 16, 2007, 01:19:27 PM
Well, thats an error in the script itself. It tells you exactly what is wrong. :) If you want it fixed, you should seek help from the script author.
Title: Re: Teamspeak block!
Post by: Dazed on September 16, 2007, 02:38:05 PM
An excellent option is this.... http://www.tsviewer.com/

I wish I could find a quality version for Ventrilo. It just can't be found.
Title: Re: Teamspeak block!
Post by: Selaiah on September 17, 2007, 03:43:43 AM
Well, thats an error in the script itself. It tells you exactly what is wrong. :) If you want it fixed, you should seek help from the script author.

Yeah, well I was under the firm belief that this was the Thread of the script author ? :D
Title: Re: Teamspeak block!
Post by: Zetan on September 17, 2007, 04:17:28 AM
Well, thats an error in the script itself. It tells you exactly what is wrong. :) If you want it fixed, you should seek help from the script author.

Yeah, well I was under the firm belief that this was the Thread of the script author ? :D

No, this is not the "official" topic of the original author of the script.


Np :) It wasn't made by me, but origonally it would cause hell for TP, and the config file was compressed to around 12-15 lines :| What I did was make it function in a TP block with no issues and clean up the config file :)

But it has been adapted for TP.
Title: Re: Teamspeak block!
Post by: taikat on October 22, 2007, 11:56:53 PM
29 pages ... not bad  O0

we would like to implement the viewer on our page - could someone please link the file into a reply (the link in the first post here is not working)

a really brief howto wouldn't be too bad, but we will get it done somehow in any case - t h x
Title: Re: Teamspeak block!
Post by: Hairy on October 23, 2007, 03:27:54 AM
I just downloaded my folder from my website, reset the values I had changed and zipped it for you.

The instructions are on the very first post.

Worked perfectly for me :)
Title: Re: Teamspeak block!
Post by: Cory on November 15, 2007, 02:39:04 PM
Wheres the download?

I really want this!
Title: Re: Teamspeak block!
Post by: Hairy on November 15, 2007, 02:45:06 PM
http://www.tinyportal.net/index.php?topic=1021.msg159620#msg159620
Title: Re: Teamspeak block!
Post by: Cory on November 15, 2007, 03:11:08 PM
http://www.tinyportal.net/index.php?topic=1021.msg159620#msg159620

Thanks but I don't know how to make a teamspeak block like it says in main post.
Title: Re: Teamspeak block!
Post by: IchBin on November 15, 2007, 04:37:04 PM
You don't know how to follow instructions?
Quote
To Make it show up on your website
Create a new PHP block. Inside of it place this code >> include ("teamspeak/ts_viewer.php");
Title: Re: Teamspeak block!
Post by: Cory on November 15, 2007, 05:41:15 PM
You don't know how to follow instructions?
Quote
To Make it show up on your website
Create a new PHP block. Inside of it place this code >> include ("teamspeak/ts_viewer.php");

Not exactly helpful.. Where do i put that code? Anywhere in the index.php?
Title: Re: Teamspeak block!
Post by: IchBin on November 15, 2007, 06:12:52 PM
Cory, if you read what it says it tells you to create a new php block. Inside that block you put the code highlghted in bold.
Title: Re: Teamspeak block!
Post by: Hairy on November 15, 2007, 07:36:35 PM
Also Cory....This might be a silly question but have you installed TinyPortal?

I ask because it appears you are confused about the "php block" and you also only registered minutes before posting in this thread so I am led to believe you don't have the TinyPortal mod.

A new PHP Block can be easily created in your Admin panel if you have TinyPortal mod installed
Title: Re: Teamspeak block!
Post by: Cory on November 16, 2007, 02:14:07 PM
Also Cory....This might be a silly question but have you installed TinyPortal?

I ask because it appears you are confused about the "php block" and you also only registered minutes before posting in this thread so I am led to believe you don't have the TinyPortal mod.

A new PHP Block can be easily created in your Admin panel if you have TinyPortal mod installed

Ohhhh! Sorry. I thought tinyportal was just the name of the site! I will add tinyportal mod. Thanks!
Title: Re: Teamspeak block!
Post by: Cory on November 25, 2007, 12:20:05 PM
New problem with the teamspeak block.

I Keep getting:

Code: [Select]
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /www/110mb.com/c/o/r/y/_/_/_/_/cory/htdocs/forum/teamspeak/ts_config.inc.php on line 216

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /www/110mb.com/c/o/r/y/_/_/_/_/cory/htdocs/forum/teamspeak/ts_config.inc.php on line 216

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /www/110mb.com/c/o/r/y/_/_/_/_/cory/htdocs/forum/teamspeak/ts_config.inc.php on line 273

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /www/110mb.com/c/o/r/y/_/_/_/_/cory/htdocs/forum/teamspeak/ts_config.inc.php on line 273
Title: Re: Teamspeak block!
Post by: IchBin on November 25, 2007, 04:13:24 PM
Cory, please use the search for errors. I would wager to say that 99% of the time the errors have already been covered.
http://www.tinyportal.net/index.php?topic=18043.msg163285#msg163285
Title: Re: Teamspeak block!
Post by: beardy on December 14, 2007, 11:25:09 PM
2: strftime() expects parameter 2 to be long, string given
Datei: /httpdocs/ts/ts_config.inc.php
Zeile: 462
?action=unread

This Error seems to occur like 100 times a day :D and I don't really understand the message.

Any idea what it could be?

After having read through this whole thread, first to get a somewhat fixed ts_config.inc.php file, that fixed some errors, on page 16 in this thread IIRC, the error that was left, was the same that you (and everyone with the same version and/or configuration of php as we have) have.

The message means quite exactly what it says. It's a warning, that strftime() would like the second parameter to be a long integer, but a string is given to it instead.

Now.. someone said it earlier, and I can not but agree fully, this thing is horribly written, all functions and variables are just named with a number, and as the first post said, it was apparently even worse when he hacked it into fitting into tinyportal.

Anyway Selaiah, find line 462 in your ts_config.inc.php, it looks like this now:

Code: [Select]
$_54=strftime("%S seconds", $_53);

Replace it with the following:

Code: [Select]
$_54=strftime("%S seconds", (int)$_53);

(As you see, just add '(int)' before the $_53 (that noone can know what on earth it is, because of the way this thing is written))

Have a nice day.
Title: Re: Teamspeak block!
Post by: SMOKEY on December 19, 2007, 03:55:11 PM
Anyone know what to edit to get this to work in joomla?
Title: Re: Teamspeak block!
Post by: Smoky on December 19, 2007, 04:08:13 PM
you might want to head back to joomla and ask them on that. unless you have smf/tp, this will not help you.
Title: Re: Teamspeak block!
Post by: SMOKEY on December 19, 2007, 04:24:57 PM
I have 2 sites and this works fine on smf/tp site. Just asking about joomla. Thanks anyway.
Title: Re: Teamspeak block!
Post by: Hairy on December 19, 2007, 05:02:10 PM
I think I'm seeing double  :2funny:
Title: Re: Teamspeak block!
Post by: Lesmond on December 19, 2007, 05:17:06 PM
well I am seeing triple Smoky, SMOKEY, Smokie, ok stand up the real smoky  :o

sorry for being OT
Title: Re: Teamspeak block!
Post by: Smoky on December 19, 2007, 05:18:30 PM
lmao Lesmond, i am pleased to meet you.. have heard many wonderful things about you.. hmm stand up?? kinda hard when im typing  :P :D ;)

hmm now i have a sims racing site too??  :2funny: long as i dont have to pay the bill for it we are fine..  :D
Title: Re: Teamspeak block!
Post by: Hairy on December 19, 2007, 05:21:02 PM
Ha, OK my name is back to normal  :2funny: ^-^
Title: Re: Teamspeak block!
Post by: snowripper1106 on January 23, 2008, 12:22:51 PM
guys can anyone please put an end to my retardedness, I cannot find the Teamspeak.zip anywhere I've been through all pages off this thread for about an hour after no success in spotting the first attachment. Your help would be much appreciated! thank you.
Title: Re: Teamspeak block!
Post by: Hairy on January 23, 2008, 02:53:44 PM
When it disappeared in the move I uploaded a copy here: http://www.tinyportal.net/index.php?topic=1021.msg159620#msg159620

You must have missed that one :)

Ps. you need to be logged in to see attachments, maybe you registered only after reading thread?
Title: Re: Teamspeak block!
Post by: snowripper1106 on January 23, 2008, 04:23:38 PM
Thank you buddy that's exactly what I did, I wasn't logged in. I thort I was going mad! ty again
Title: Re: Teamspeak block!
Post by: ButtkickersKOL on February 08, 2008, 09:56:51 PM
Work like a charm, I was a bit septic at first since its a 3 years old topic, but I did what was told and got it working.

Thx a lot.
Title: Re: Teamspeak block!
Post by: skeletor on March 08, 2008, 04:59:59 PM
I have used this block on a friends wow website that I made for him but it suddenly stopped working.  I think it is because of a php upgrade.

The error is:

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of fsockopen(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. in /home/username/...

on lines 216 and 273.

I don't know if PHP was upgraded or not, but this only just started happening.  Below the error messages it displays the team speak block fine.
Title: Re: Teamspeak block!
Post by: IchBin on March 08, 2008, 10:22:01 PM
The error tells you how you can fix it.
Title: Re: Teamspeak block!
Post by: skeletor on March 09, 2008, 03:59:45 AM
The error tells you how you can fix it.
It tells you how to fix it if your knowledge of PHP is actually good.  My PHP knowledge is beginner. Is there anyway of changing the code as it is on shared hosting and unlikely to be able to change the php.ini.
Title: Re: Teamspeak block!
Post by: Zetan on March 09, 2008, 04:12:45 AM
Contact the host and ask them. There really isn't much we can realistically do.
Title: Re: Teamspeak block!
Post by: skeletor on March 09, 2008, 07:24:36 AM
OK, thank you.
Title: Re: Teamspeak block!
Post by: -Prismatic- on March 23, 2008, 07:05:20 PM
Actually you can modify php ini values at runtime by using ini_set (http://us.php.net/ini_set)

In the script that's throwing the error place the following at the top directly under the opening tag (<?php)

Code: [Select]
ini_set('allow_call_time_pass_reference', true);
I'm not sure if that will work if your host is running php in safe mode, however. Give it a try though.
Title: Re: Teamspeak block!
Post by: Final60 on March 26, 2008, 09:51:50 AM
The download link to the block code files doesnt appear on the first post anymore (unless im blind), anyone mind sharing!
thanks
Title: Re: Teamspeak block!
Post by: IchBin on March 26, 2008, 01:31:57 PM
Pay attention to the URL when that stuff happens. :) As it was an old URL, I've now corrected it.
Title: Re: Teamspeak block!
Post by: snowripper1106 on April 03, 2008, 10:43:05 AM
Hi guys, my host recently switched from PHP4 to PHP5, in doing so my block no longer displays. There's no error or anything just the header with no channels. Can anyone help? What do I need to do?
Title: Re: Teamspeak block!
Post by: IchBin on April 03, 2008, 12:25:57 PM
The script is only made to work on TP. If you're version of PHP doesn't work with the script I would consult with the author of the script. You may also want to read through this entire topic to see if someone else has had the same problem.
Title: Re: Teamspeak block!
Post by: mianosm on May 03, 2008, 11:34:34 AM
Excellent script. It's sad to see some of the responses in this thread though.

I ran into quite a few problems as I have only just recently started adding my own blocks (first a links block, and now the teamspeak one). Most of my problems were issues with correct syntaxes, and I would have to say that a readme would do a world of good for this block.

My personal advice:
1 - Download the zip folder
2 - Extract the contents into a folder called teamspeak
3 - Upload the entire teamspeak to your smf base directory (the directory that hosts your index.php your Sources Folder, and your Themes Folder
4 - Edit the ts_viewer.php file so that your server information is correct.
5 - Now on your website (via your web-browser), go to the Admin Section, and on the left hand side go to your TinyPortal Admin Block, and select Block Manager
6 - On the headers where it says Left Blocks/Right Blocks/ Center Blocks, you will want to choose where you are going to place your teamspeak block, and use the add feature on the same line as the Left/Right/Center/FrontPage Block headlines
7 - Choose phpblock, and then click on save
8 - Next you will be given a box to input your php. In this box only put in: include ("teamspeak/ts_viewer.php");. This is case sensitive and does not need to be preceded or succeeded with the normal
Code: [Select]
<?php /*---*/ ?>.
9 - Choose who will be able to see this block on the right hand side of your input box, and finally choose to save the block now.
10 - Go to your home page/front page and view your new working TeamSpeak block. = )
Title: Re: Teamspeak block!
Post by: massyboy on May 12, 2008, 03:47:51 AM
Ok, I've got this script to work however on the frontpage, everything is fine but on the forum the images don't appear so you just see text. 

Take a look here if you like: http://www.cowclan.co.uk (http://www.cowclan.co.uk)

Any help would be great

Cheers
Title: Re: Teamspeak block!
Post by: Hairy on May 12, 2008, 05:44:19 AM
It doesn't like the way TP 1.0.5 works, when in the forum it's trying to find the images in the folder:
www.yoursite.com/index.php/teamspeak/
instead of
www.yoursite.com/teamspeak/

But on the homepage it looks for the images in:
www.yoursite.com/teamspeak/

Someone here might be able to help off that information, good luck.
Title: Re: Teamspeak block!
Post by: mianosm on May 12, 2008, 07:02:10 AM
Looks like you got it fixed. You just need to ensure that the image links are properly cited.

If you have the images in /Teamspeak, but link to /teamspeak it won't work. : (
Title: Re: Teamspeak block!
Post by: massyboy on May 12, 2008, 05:17:24 PM
Thanks hairy.  Hopefully someone will be able to help me work around this

Mianosm:  It's still not doing it on the forum.  Like I said, frontpage is fine, it's the forum that makes it go weird and I think Hairy has given a sort of explanation.  Your thought about the /Teamspeak and /teamspeak thing may be of help for a different problem as it works ok on some pages so it can't be the casing of the letters otherwise it wouldn't work at all I'm guessing.  Thanks for your help though.  All ideas welcome
Title: Re: Teamspeak block!
Post by: Hairy on May 13, 2008, 07:18:21 AM
You can try this fix for your site:

Open ts_config.inc.php

Find and replace all entries of the following text:
teamspeak/

with:
http://www.cowclan.co.uk/teamspeak/
Title: Re: Teamspeak block!
Post by: massyboy on May 13, 2008, 08:45:53 AM
That's brilliant-thanks for that.  Anyone else trying the same thing though, make sure the first replacement comes out as: <img src=http://www.yourdomain.com/teamspeak/teamspeak.gif otherwise it will produce an error as it will come out as: <img src=\"http://yourdomain.com/teamspeak/teamspeak.gif which as you can see is wrong

Thanks a lot for your help though hairy-all is working well now
Title: Re: Teamspeak block!
Post by: Hairy on May 14, 2008, 03:22:45 AM
No problem massyboy, glad it helped you  :up:
Title: Re: Teamspeak block!
Post by: Teege on June 09, 2008, 12:12:39 PM
Ok new problem I have mine only looking at one channel everything looks and works fine except now when someone dbl clicks from the site instead of using there forum name it uses guest1. Any ideas whats happend?
Title: Re: Teamspeak block!
Post by: Bluto on July 17, 2008, 11:07:02 AM
Actually you can modify php ini values at runtime by using ini_set (http://us.php.net/ini_set)

In the script that's throwing the error place the following at the top directly under the opening tag (<?php)

Code: [Select]
ini_set('allow_call_time_pass_reference', true);
I'm not sure if that will work if your host is running php in safe mode, however. Give it a try though.
Does not work for my host. I sent in a ticket to see if they will change the php.ini settings, but I doubt it.
Any other way around this?
Title: Re: Teamspeak block!
Post by: Final60 on August 02, 2008, 04:21:43 PM
Hey
I'm using these ports in the ts_viewer.php: 8767, 51234, 14534. Everything works fine, but nothing displays, only "Offline". I suspect my webhost ("1and1") have blocked these ports, but are there any other commonly used ports I could try while waiting for a responce from my webhost?

thanks in advance
Title: Re: Teamspeak block!
Post by: IchBin on August 02, 2008, 05:07:11 PM
How would you know if you're host isn't blocking any other ports as well. You're better off making sure your host will open the ports for you.
Title: Re: Teamspeak block!
Post by: Thurnok on August 03, 2008, 12:15:18 AM
1 and 1 isn't just blocking those ports.  They disable the fsockopen() php function.  This means it doesn't matter what ports you try to use, the function will never attempt to open a socket on any port because the function is disabled and is simply being ignored.

You will have to ask them to allow the fsockopen() function.  However, from past experience, they will not.  I have had (and still have) a server with 1and1 and attempted to get them to allow it a couple years back but they were not budging.  It is still worth a shot to see what they say though.
Title: Re: Teamspeak block!
Post by: Final60 on August 03, 2008, 06:16:01 AM
Okay Ill look into that Thurnock, if I get lucky ill let you know.
Title: Re: Teamspeak block!
Post by: Bluto on August 03, 2008, 06:31:57 AM
I've been through this, though with a different host. See thread: http://www.tinyportal.net/index.php?topic=25283.0 (http://www.tinyportal.net/index.php?topic=25283.0)
and see if that works for you.
Title: Re: Teamspeak block!
Post by: BCB on August 04, 2008, 02:20:18 PM
Another thing you can do is go to http://www.tsviewer.com and they can build you a viewer for your server and then you can use a script block on your site and copy your TSviewer info that they provide like below.

Code: [Select]
<iframe name="tsviewer" allowtransparency="true" src="http://www.tsviewer.com/ts_viewer_pur.php?ID=22895&bg=5378AC&type=000000&type_size=11&type_family=1&info=1&channels=1&users=1" width="150" height="500" frameborder="0" style="width: 150px; height: 500px; border:1px solid #000000;" scrolling="auto" ></iframe>
I actually resulted to this after we were overloading our share site, this way TSViewer pulls the info to their server and then you just link to it more less.
Title: Re: Teamspeak block!
Post by: SonicBorg on October 17, 2008, 11:45:43 PM
where is the download that the first post talks about, there is not one on the actual post so it just does not make sense.

thanks
Title: Re: Teamspeak block!
Post by: Hairy on October 18, 2008, 12:55:43 AM
It directs you to http://www.tinyportal.net/index.php/topic,1021.msg26256.html#msg26256 and you needed to be logged to see the attachment, check now. ;)
Title: Re: Teamspeak block!
Post by: SonicBorg on October 18, 2008, 04:06:02 AM
oh mucho thank you :)
Title: Re: Teamspeak block!
Post by: americangothic on March 03, 2009, 06:29:43 PM
Anyone know which page the install instructions are on?
Title: Re: Teamspeak block!
Post by: IchBin on March 03, 2009, 06:53:09 PM
The instructions are in the first post....
Title: Re: Teamspeak block!
Post by: americangothic on March 03, 2009, 07:06:37 PM
I tried using that include but it didn't work. Thanks anyway.
Title: Re: Teamspeak block!
Post by: Renegd98 on March 03, 2009, 07:13:56 PM
Use of scripts like these are server/host dependent... by that I mean some host block ports, have php commands turned off... that the script relies on.
Title: Re: Teamspeak block!
Post by: americangothic on March 03, 2009, 07:21:13 PM
Yeah, I believe that's whats happening. Thanks.
Title: Re: Teamspeak block!
Post by: IchBin on March 04, 2009, 09:27:49 AM
You can always check to see if they are blocking the port you need opened by using telnet.

In windows XP, open up a command prompt by going to start > Run >type cmd and click ok. In the command window that pops up you type the command like this:

Quote
telnet domain.com 3689

3689 is the port number you want to test. If you do not receive a message that your connection is open, the port is most likely closed. At which point, you ask the host to open it for you. :)
Title: Re: Teamspeak block!
Post by: americangothic on March 04, 2009, 11:04:17 AM
Good tip, thanks.
Title: Re: Teamspeak block!
Post by: americangothic on March 04, 2009, 11:10:12 AM
She's definitely closed.