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,970
  • Latest: bynw
Stats
  • Total Posts: 196,034
  • Total Topics: 21,335
  • Online today: 321
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 199
  • Total: 200
  • lurkalot

Error in Teamspeak Bloc

Started by Bluto, July 17, 2008, 12:58:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bluto

Site: http://www.ga-squad.com/
SMF 1/1/5
TP 1.0.5
Theme: Helios Multi_tp
Other errors: A bunch, all having to do with TPAdvance shout, but seemingly not related

Since the TSWebviewer went off line, I installed the Teamspeak block found here in resources.
After entering my server information, I get an error in the block that seems unrelated to the block altogether:
QuoteParse error: syntax error, unexpected '<' in /home/.ewing/gajoker/ga.ga-squad.com/Sources/Load.php(1737) : eval()'d code(52) : eval()'d code on line 1
Now, I am far from knowing much more than the basics of code, but it refers to line 1 in the load.php file, which is,
Quote<?php
How can that line possibly be wrong?
Find attached same file.
It would seem I have more issues than I thought if this block brought up this error.
Thanks for any help in advance.
B-Lute

G6Cad

When you use a PHP block, the php tgs are allready built in.

Remove the tags from the code your putting in the block and the error will go away.

Bluto

#2
Ok, I removed the fisrt and last php tags, and added the code to the block which now looks like this:
Quote/* ---------- Teamspeak-Viewer - Include - Anfang ---------------*/
   require('ts_config.inc.php');
   $ts_viewer = new ts_viewer("");
/* ---------- Teamspeak-Viewer - Include - Ende ---------------*/
   

<style type="text/css">
<!--
   .smaller {
      color: #8378e5;
      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>


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

   $ts_viewer->set_Viewer("GA-Squad", "http://www.ga.ga-squad.com/");
   $ts_viewer->set_Channels();
   $ts_viewer->show_ts_viewer("206.123.70.130", 4009, 51234, "SERVERPASSWORD");
   
/* ---------- Teamspeak-Viewer - Ende ---------------*/

Now I get a different error showing in the bloc.
Quote

Parse error: syntax error, unexpected '<' in /home/.ewing/gajoker/ga.ga-squad.com/Sources/Load.php(1737) : eval()'d code(52) : eval()'d code on line 8
What I don't see is, how is finding the correct path to the ts_config.inc.php file.
The site is mirrored from www.ga-squad.com to a sub domain, www.ga.ga-squad.com.
In admin settings, I have the forum url set to http://www.ga-squad.com
SMF Directory:  /home/.ewing/gajoker/ga.ga-squad.com
Sources Directory:  /home/.ewing/gajoker/ga.ga-squad.com/Sources
I was advised to change my forum url to give the appearance of the original domain address. Could this be messing things up?
Sorry for my amateur attempts at trying to understand code.
The block is set as a php block, which is my understanding of correct installation.
Thanks for your patience.

PS. I have no idea why a foreign language is part of the code.

G6Cad

You need to echo' the html entries

A search in IchBins posts for echo' will lead you to  site where you can read how to echo' inside php, or google should be able to help you to.

Bluto

After reading 33 pages of the Teamspeak block code last night, I left a post to make sure I was getting the correct file, IchBin was the person who replied and said that the zip file attached in the original Teamspeak block was correct, and was all I needed.
Refer to: http://www.tinyportal.net/index.php?topic=25024.0, to the post he answered for me.
I will also refer to posts regarding echo as you advise.
Maybe an update is needed then for the zip file containing the block code, I'm not sure.

IchBin

Instead of putting the code in your block, why aren't you doing what I suggested in that other post and including the file? There's no need to put all the code in a block. Including the file with the include() statement does it all for you.

Bluto

Ah, there's my misunderstanding.
I thought you were saying to include the code in the file.
Sorry for the trouble.

IchBin

No trouble. If you don't understand what I suggest, I have no problem explaining if you just say so. :)

Bluto

OK, now I get this error:
QuoteWarning: 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/.ewing/gajoker/ga.ga-squad.com/Teamspeak/ts_config.inc.php on line 216
I'll look in that file and try to figure that out.

Bluto

I'll have to get back to this later, I don't immediately see where to change it on line 216:
Quote$this->g_playerList=$this->_C($this->g_serverAddress, $this->g_serverQueryPort, $this->g_serverUDPPort);$this->g_channelList=$this->_A($this->g_serverAddress, $this->g_serverQueryPort, $this->g_serverUDPPort);}
         
         function _9($_21,$_22=true)
         {
            $_21=str_replace('\"','"',$_21);
            $_21=str_replace("\'","'",$_21);
            if ($_22)
         {
         if (substr($_21,0,1)=='"')
            $_21=substr($_21,1);
         if (substr($_21,-1)=='"')
            $_21=substr($_21,0,-1);
         }
            $_21=htmlentities("$_21");
         return $_21;
         }
         
         function _A($_23, $_24, $_25)
         {
            $_10=array();
            $_26="cl $_25\nquit\n";
         line 216   $_27=@fsockopen ("$_23", $_24, &$_28, &$_29, 1);
         if (!$_27)

This website is proudly hosted on Crocweb Cloud Website Hosting.