Author Topic: Status Update by URL Part Trois  (Read 990 times)

Mesnik44

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Status Update by URL Part Trois
« on: January 30, 2013, 11:09:29 PM »
Hi Corey,

In 3.1.1. is there a way to code the jscript and HTML to show that the Clock is in countdown mode vs actual Tournament Clock mode?

What I mean is, in previous conversations, we have discovered that when the game is running:
Round = Round, and when on Break, Round = On Break. (see screenshot Pic 1)

What I would like to have shown when in countdown, the Clock =  Clock: 1:45:00 COUNTDOWN. (Pic 2)

If it sounds confusing, I'm sorry it's late here for me. I would love to discuss.

Mesnik
« Last Edit: January 30, 2013, 11:15:31 PM by Mesnik44 »

TIMMER

  • Hero Member
  • *****
  • Posts: 557
    • View Profile
Re: Status Update by URL Part Trois
« Reply #1 on: January 30, 2013, 11:53:00 PM »
On the TD you can just edit  it to         <clock>  Count Down         

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5420
    • View Profile
Re: Status Update by URL Part Trois
« Reply #2 on: January 31, 2013, 02:10:52 PM »
The information is there, so yes, it just requires some additional work in the TournamentStatus.js file.

There's a line in there:

var theNewClock = TDStatus.getClockValue(TDStatus.Vars["secondsleft"]) + (TDStatus.Vars["clockpaused"] == 1 ? " (PAUSED)" : "");

You would probably change it like so (sorry, I'm in a hurry and have no time to test this):

var theNewClock = TDStatus.getClockValue(TDStatus.Vars["secondsleft"]) + (TDStatus.Vars["state"] == 2 ? " (In countdown)") + (TDStatus.Vars["clockpaused"] == 1 ? " (PAUSED)" : "");

Of course, you might want to expand it a bit so that if "state" is 4 then you show "Tournament Over" and also prevent "(PAUSED)" at certain times, like after the tournament, etc.