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: 447
  • Total: 447

Teamspeak block!

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

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

insanemustang

Yea that would be great 

scope

Quote from: core on January 17, 2006, 06:19:49 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.

insanemustang


core

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:

scope

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.

core

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

scope

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.

core

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.



darthmactis

Cant get this to work at all can i get some help please!!!!!!

http://sw.tgeclan.com/forums/index.php

IchBin

I do not even see your TS block darthmactis.

This website is proudly hosted on Crocweb Cloud Website Hosting.