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

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.

feral

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

BCB

#171
Quote from: xadio on February 13, 2006, 07: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(layernameobj)
  {
    
// 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(layernametmpObj[i])
       if(
perObj) return perObj;
     }
     return 
false;
  }
 
 
  function 
writeToDiv(layernamestr)
  {
     
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 window.onload=new function(){starttime(true);}
and had it changed to
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.

Hawkes

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?

feeble

if you would like to display channels that only have ppl in it.

open up ts_config.inc.php

on line 510
add
$_5C2 = $this->_12($_5D[channelid],$_5D[channelid],$_57);

just after

foreach($this->g_channelList as $_5D)
{


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


just after
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
}
just after
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");

rjackson

what is the most current working verison of TS block is everyone using? can someone post it or attach it?

thanks

copkiller

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


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

copkiller

using "60"  "3600" now and no more errors but ... is it working?
well i still dont know :uglystupid2:

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

Xarcell

I don't understan how to get teh channel ID to add to teh viewer file.

Dazed

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 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.

Thurnok

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.

This website is proudly hosted on Crocweb Cloud Website Hosting.