Author Topic: token use  (Read 745 times)

Mahound

  • Sr. Member
  • ****
  • Posts: 395
  • THE ONLY time i get screwed is when i play poker!
    • View Profile
token use
« on: August 04, 2017, 03:28:27 PM »
sorry about this, i have never managed to get my head around tokens.i have no idea under what they are for, or when or  they could be used for under what circumstance'.s where or when or why they can be used or a
 can some one explain what they are and in what  circumstances the can be used and perhaps show me a few examples thanks in advance for herping me which to you may seem easy to understand.

'
 
« Last Edit: August 06, 2017, 11:45:28 AM by Mahound »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: token use
« Reply #1 on: August 04, 2017, 05:56:27 PM »
Layout tokens are actually pretty easy.

Basically, the TD application will display the "Contents" of a cell - whatever you define that to be.  The Contents are HTML, which means you can dress it up however you like for the most part, but you have to understand a bit about HTML.  Not much, but a little.  For example, the following would display the words "Chip up" in a blue box with white text, with the box having a yellow border that is 1 pixel thick, and provides some padding (empty space) around the text:

<div style="color: white; background-color: blue; border: 1px solid white; padding: 20px">Chip up</div>

If course, much of the Contents of cells is just plain text:

Chip up

... with colors and such handled by the controls the cell dialog provides.  You can use HTML or the controls the cell dialog provides for things like text color, background color, borders, etc.  Those controls are there to make it easier, but you can choose to use HTML styles instead.

Tokens look similar but are there for the TD application to provide current information from your tournament.  For example, if you want the cell to display the current round, you could put:

Round: <round>

In this case, <round> is not HTML, but rather a TD layout token.  Before this is displayed on the screen, the TD will scan that text, see that you've included <round>, and replace the <round> text with the actual round number of the tournament.  So, on the Game window you would see:

Round: 2

The TD provides a ton of these types of tokens so you can design your layout the way you want, and have the application "fill in the blanks" with the current tournament info.  Some tokens are simple, like <round>, and some are much more complex.  But to make it easy, the application has a built-in "Token Builder" dialog.  You simply select the token you want, fill in the values for the attributes it has, and it will build and insert the token for you.

For example, if you edit the "Chips" cell, you'll see Contents like this:

<chips size="60" columns="1" values="right">

If you edit the Contents, and then select all (or even part) of the text, then press the "Insert Token" button, the Token Builder dialog will open.  Further, it will have parsed the above layout token and its parameters, and taken you straight to the "chips" token with the corresponding attributes already selected.  There you can "tweak" the settings to your liking, then press the "OK" button and the Contents of the cell will be updated with the new token settings.

Tokens are not too hard, but I do understand that they can feel complicated.  The application tries to make them easier to deal with, but it still takes a bit of getting used to.