The Tournament Director Forums

Main => Help Me => Topic started by: oddapokeren on November 09, 2017, 10:24:57 AM

Title: Problems with tournamentstatus.html
Post by: oddapokeren on November 09, 2017, 10:24:57 AM
Hi, I've tried to setup the status updates to send to a HTML page on my site.

I copied all the files from the examples folder to the /status folder on my ftp server. I can even see text, but there is no info about the tournament.

As you can see, the upload is successful, but there is no data in the HTML.

The link is http://www.oddapokeren.com/status/TournamentStatus.html

Can someone please give me some feedback to why it does not work?

Thanks :)
Title: Re: Problems with tournamentstatus.html
Post by: oddapokeren on November 09, 2017, 11:19:18 AM
After adding the tdstatus.txt to the /status folder, I get more info than before, but itīs not relevant, so what am I doing wrong?

Title: Re: Problems with tournamentstatus.html
Post by: efdenny on November 09, 2017, 06:29:48 PM
I ran into this as well... I changed from JSON to Formula Variables, and then everything worked.
Title: Re: Problems with tournamentstatus.html
Post by: Corey Cooper on November 10, 2017, 04:08:54 PM
Most likely the server-side script (statusListener-XXX.yyy, whichever you chose) is not permitted to write to the status file.  You'll have to either give the appropriate permissions to allow that to happen, or modify the statusListener and the TournamentStatus.js files to read/write the tdstatus.txt file in a different location, where permissions are more open.

For example, your server may have a /tmp folder where scripts are free to read/write.  You can modify the statusListener to write the file there.  You might be able to modify TournamentStatus.js to read it from there, but the server will probably not be configured to allow that.  In that case you might have to write another .php or .asp script that simply reads the tdstatus.txt file from the /tmp folder and returns it, like this:

Code: [Select]
<?php
// Read the tdstatus.txt file and output it.
readfile("/tmp/tdstatus.txt");
?>


You could save this script with a name like "reader.php", then change TournamentStatus.js like this:

Code: [Select]
TDStatus = {
  // variables that control various features of the page
  ...
  // URL to the tdstatus.txt file
  URLStatus: "reader.php",
  ...
};

Now statusListener writes to the /tmp folder, where permissions are open.  TournamentStatus.js no longer tries to read the file directly, because client browsers can't load files from /tmp, but instead goes to reader.php, which outputs the file back to the browser.
Title: Re: Problems with tournamentstatus.html
Post by: oddapokeren on November 11, 2017, 03:51:09 AM
Ok, thanks guys, will try this after the main event today :)

BTW, is there anyway I can make sure that the setting below is always off?

"Show system print dialog"

I do not want to have this enabled, everytime I start the application I have to uncheck it.


Thanks againg for superb help :)
Title: Re: Problems with tournamentstatus.html
Post by: Corey Cooper on November 11, 2017, 09:21:57 AM
BTW, is there anyway I can make sure that the setting below is always off?

"Show system print dialog"

I do not want to have this enabled, everytime I start the application I have to uncheck it.

It's a bug.  Thanks for letting me know.  It will be fixed in 3.4.2.
Title: Re: Problems with tournamentstatus.html
Post by: LenardS on November 15, 2017, 01:32:30 AM
Thanks Corey, that fixed it!