TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 570
  • Total: 570

Teamspeak block!

Started by -Prismatic-, October 14, 2005, 11:20:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

core

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]

xadio

#131
Quote from: MentalMuscle on February 28, 2006, 08:40:07 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]

xadio

Quote from: core on February 28, 2006, 11: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!!

It should work now core! :D check it out.  Enjoy!

MentalMuscle

Quote from: xadio on March 01, 2006, 01:39:43 AM
Quote from: MentalMuscle on February 28, 2006, 08:40:07 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.

MentalMuscle

Quote from: dtm.exe on November 17, 2005, 03:52:42 AM
Quote from: IchBinÃ,â,,¢ on November 15, 2005, 09:41:57 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.

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.

xadio

Quote from: MentalMuscle on March 01, 2006, 04:40:14 PM
Quote from: dtm.exe on November 17, 2005, 03:52:42 AM
Quote from: IchBinâ„¢ on November 15, 2005, 09:41:57 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.

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:

  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, "");

core

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]

Arkanthos

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

Omniverse

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?

MentalMuscle

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.