Author Topic: Status Update by URL  (Read 29368 times)

xtof

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Status Update by URL
« Reply #30 on: October 12, 2012, 05:26:13 AM »
hi

is there a file for aspx pls . my site is aspx so php don't work here . :-s

rg

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Status Update by URL
« Reply #31 on: October 13, 2012, 09:35:30 PM »
Sorry, don't have any ASP version at the moment.  I'll try to put something together at some point but it's not really my area of expertise.

The Meal

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Re: Status Update by URL
« Reply #32 on: November 03, 2012, 01:59:32 PM »
The next step will be to add a lot more data, using a different format (probably JSON).  The current format was easy to implement in a quick fashion, but it's very limited.

What sort of things can we (currently) pass through TDStatus.Vars?  I'm assuming the idea of pulling points from the database and adding current points earned in a live tournament (on a per-player basis) isn't yet available?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Status Update by URL
« Reply #33 on: November 03, 2012, 10:09:35 PM »
What sort of things can we (currently) pass through TDStatus.Vars?  I'm assuming the idea of pulling points from the database and adding current points earned in a live tournament (on a per-player basis) isn't yet available?

No, and I'm sorry to say that may not ever be there.  That's really a horse of a different color.  That would mean sending not only the current tournament information and information on all players in the tournament, but also that the software user would have to run Stats beforehand, so the TD is currently aware of every player's accumulated score/points/etc, and pass that information as well ... every time an update is performed.

mikiewendy

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Status Update by URL
« Reply #34 on: November 09, 2012, 12:23:12 PM »
I am quite intrigued by this new feature as I have been wanting to better implement my realtime updates to the site.  Is there a way to show basic information on individual players as well?  Basically, looking for elimination statistics like when and the player ID of the person that eliminatated them?

Thanks Corey!  I have been holding out for the latest release waiting for this very feature.

Mike

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Status Update by URL
« Reply #35 on: November 09, 2012, 01:10:42 PM »
Not yet, and probably not in 3.2 since it 3.2 has taken way longer than expected and I really want to get it out.  But it is definitely on the short list of features I want to get in as soon as possible.

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Status Update by URL
« Reply #36 on: December 03, 2012, 02:16:35 PM »
Hi Corey,


Is there a way to list who is in the tournament, and who is out?

Also, is there a way to show break, instead of round when a break hits? var theRound = (TDStatus.Vars["isbreak"] == 1) ? "On Break (" + TDStatus.Vars["breaknum"] + ")" : TDStatus.Vars["roundnum"]; does not seem to fire. The break is the same round number previous.

Sorry for the hassle and thanks in advance,
Mesnik44
« Last Edit: December 03, 2012, 03:05:26 PM by Mesnik44 »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Status Update by URL
« Reply #37 on: December 03, 2012, 04:18:35 PM »
Is there a way to list who is in the tournament, and who is out?

Not yet.

Quote
Also, is there a way to show break, instead of round when a break hits? var theRound = (TDStatus.Vars["isbreak"] == 1) ? "On Break (" + TDStatus.Vars["breaknum"] + ")" : TDStatus.Vars["roundnum"]; does not seem to fire. The break is the same round number previous.

Not sure why this isn't working for you.  I just tested it again and it seems to work fine.  When I try it with the sample tournament I get "Round 6" and then when I move to the next level (the first break in the schedule) it changes to "Round: On Break (1)".  What do you see?

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Status Update by URL
« Reply #38 on: December 03, 2012, 06:20:59 PM »
This is what I see;

I am using the files that you had supplied. (BTW HUUUUGE THANKS for that!!)

Mesnik44

PS:
I've just tried it now with a pre-built tournament, and using original files, and it is not updating the breaks.

Perhaps you could share your files that you recently tested with?
« Last Edit: December 03, 2012, 07:53:58 PM by Mesnik44 »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Status Update by URL
« Reply #39 on: December 04, 2012, 10:52:25 AM »
The page/code hasn't changed - I'm using the exact same stuff as I posted earlier in this thread.  I also double-checked the line of code you posted in an earlier response and it is the same.

I have no idea why this isn't working for you.  Are you saying that otherwise the page updates fine and with what appears to be the correct, current information from your running tournament, but that when the tournament moves from a round to a break, the "Round:" value doesn't change?  So, in round 2, it says correctly "Round: 2".  Then in the first break it still says "Round: 2" (incorrectly)?  And after the first break when it moves into round 3 it correctly says "Round: 3"?

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Status Update by URL
« Reply #40 on: December 04, 2012, 10:56:20 AM »
Hi Corey,

Yes that is exactly what I am saying.

Round 1 = Round 1
Round 2 = Round 2
Break 1 = Round 2
Round 3 = Round 3

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Status Update by URL
« Reply #41 on: December 04, 2012, 11:25:05 AM »
OK, then I'll take a wild guess and say that there's an error occurring but the browser is suppressing it (like they pretty much all do now).  Since you're using Chrome, I would suggest using the developer tools to check for an error.

Set up your tournament to post to the status listener, point your Chrome browser to the status page and start your tournament.  Then press F12 to open Chrome's developer tools.  It should open in the bottom half of the browser window.  Near the top of that section will be a set of tab-like buttons.  The last one should be "Console".  Press it.  Then move your tournament to the first break.  Hopefully (?) you'll see an error appear in the console.

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Status Update by URL
« Reply #42 on: December 04, 2012, 11:37:29 AM »
Hi Corey,

I did what you said to try, and nothing showed up in the console, just >

I also tried in IE, and no luck there either.
« Last Edit: December 04, 2012, 11:45:30 AM by Mesnik44 »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Status Update by URL
« Reply #43 on: December 04, 2012, 11:47:51 AM »
Hmm, OK, well the only thing I can think to do is start debugging.  If you want, try the following.

Three lines down from the previously quoted line in TournamentStatus.js, change:

TDStatus.setValue("round", theRound);

to

TDStatus.setValue("round", 'isbreak="' + TDStatus.Vars["isbreak"] + '"; breaknum="' + TDStatus.Vars["breaknum"] + '"');

(please copy/paste to make sure it's updated exactly as above)

In my browser, this changes the "Round:" line to:

Round: isbreak="1"; breaknum="1"

Mesnik44

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Status Update by URL
« Reply #44 on: December 04, 2012, 11:55:51 AM »
I have done what you said;

Round: isbreak="undefined"; breaknum="1" is the response.

http://mobile.hitmenpoker.com is the site, if you wish to see.

In reading the code, it looks like there is no definition for isbreak.

var theChipCount = parseInt(TDStatus.Vars["chipcount"]);
  var thePlayersLeft = parseInt(TDStatus.Vars["playersleft"]);
  var theAvgStack = thePlayersLeft == 0 ? 0 : Math.floor(theChipCount / thePlayersLeft);
  var theRound = (TDStatus.Vars["isbreak"] == 1) ? "On Break (" + TDStatus.Vars["breaknum"] + ")" : TDStatus.Vars["roundnum"];

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

  TDStatus.setValue("clock", theNewClock);
  TDStatus.setValue("round", 'isbreak="' + TDStatus.Vars["isbreak"] + '"; breaknum="' + TDStatus.Vars["breaknum"] + '"');
  TDStatus.setValue("blinds", TDStatus.getChipsString(TDStatus.Vars["bigblind"]) + " / " +

TDStatus.getChipsString(TDStatus.Vars["smallblind"]));
  TDStatus.setValue("ante", TDStatus.getChipsString(TDStatus.Vars["ante"]));
  $("#ante").css({ display: TDStatus.HideZeroAnte ? "none" : "" });
  $("#label_ante").css({ display: TDStatus.HideZeroAnte ? "none" : "" });
  $("#space_ante").css({ display: TDStatus.HideZeroAnte ? "none" : "" });
  TDStatus.setValue("players", thePlayersLeft + " / " + TDStatus.Vars["buyins"]);
  TDStatus.setValue("averagestack", TDStatus.getChipsString(theAvgStack));
  TDStatus.setValue("pot", TDStatus.getMoneyString(TDStatus.Vars["pot"]));
  TDStatus.setValue("lastupdated", "" + new Date(parseInt(TDStatus.Vars["time"]) * 1000));

This is the tdstatus.txt from the server;

roundnum=2
breaknum=1
level=2
isround=0
nextisround=1
state=2
statedesc=inprogress
buyins=21
numberofplayers=21
n=21
defaultbuyinfee=0
defaultbuyinrake=0
defaultbuyinchips=0
totalbuyinsamount=0
totalbuyinsrake=0
totalbuyinschips=0
numberofleaguemembers=0
nm=0
pot=0
prizepool=0
pp=0
playersleft=21
players=21
tablesleft=3
tables=3
secondsleft=585
secondselapsed=15
clockpaused=1
clockpausedseconds=164
timeofday=101700
time=1354645020
lastplayermovetime=1354643661
rebuysallowed=0
rebuysover=0
rebuysleft=0
rebuyssecondsleft=0
defaultrebuyfee=0
defaultrebuyrake=0
defaultrebuychips=0
totalrebuys=0
totalnumberofrebuys=0
tnr=0
totalrebuysamount=0
totalrebuysrake=0
totalrebuyschips=0
addonsallowed=0
addonsover=0
addonsleft=0
addonssecondsleft=0
defaultaddonfee=0
defaultaddonrake=0
defaultaddonchips=0
totaladdons=0
totalnumberofaddons=0
tna=0
totaladdonsamount=0
totaladdonsrake=0
totaladdonschips=0
inthemoneyrank=5
mr=5
totalfixedrake=0
fixedrake=0
ante=0
smallblind=200
bigblind=400
limit1=200
limit2=400
gametype=0
gamename=texas hold em
nextante=0
nextsmallblind=300
nextbigblind=600
nextlimit1=300
nextlimit2=600
nextgamename=texas hold em
nextgametype=2
chipcount=0
guaranteedpot=0
preguaranteedpot=0
houseadds=0
housecontribution=0
« Last Edit: December 04, 2012, 12:23:53 PM by Mesnik44 »