• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Cant get html script working

borgqueenx

Active member
#1
Sorry for posting this question here, its not really related to xenforo but last time it got moved here.
I have a teamspeak script, and want to embed it in a html sidebar using widget framework.
I have Tsviewer.com working but i want my own html script to work. For some reason it wont display or work.

Here is the script:
http://www.cupcakethunder.eu/tsstatus/tsstatusgen.php

But when embedding it in my sidebar as html widget i just see the text. not the widget itself.
You can see the not working widget on my site wwww.cupcakethunder.eu

I have put this in the widget:
<link rel="stylesheet" type="text/css" href="/tsstatus/tsstatus.css" />
<script type="text/javascript" src="/tsstatus/tsstatus.js"></script>
i also tried this:
<html>
<head>
<title>TSStatus</title>
<link rel="stylesheet" type="text/css" href="/tsstatus/tsstatus.css" />
<script type="text/javascript" src="/tsstatus/tsstatus.js"></script>
</head>
<body>
<?php
require_once("/home/cct/public_html/tsstatus/tsstatus.php");
$tsstatus = new TSStatus("176.31.15.237", 10011);
$tsstatus->useServerPort(9987);
$tsstatus->imagePath = "/tsstatus/img/";
$tsstatus->timeout = 2;
$tsstatus->hideEmptyChannels = false;
$tsstatus->hideParentChannels = false;
$tsstatus->showNicknameBox = true;
$tsstatus->showPasswordBox = false;
echo $tsstatus->render();
?>
</body>
</html>
no success. never shows anything but plain text in the widget.
 

wang

Well-known member
#2
Can you move the first part of teh code to the page container template? Another thing that I would check is the path, are you sure that it is the right one?
 

borgqueenx

Active member
#3
just tried that, not working. the path is correct. i also tried http direct path but also not working. just keeps displaying text, not html.