Author Topic: Display different columns in Player Rankings screen during & after tourney  (Read 2154 times)

KanedNUnable

  • Newbie
  • *
  • Posts: 19
    • View Profile
Hi all,

I would like to display the built-in Player Rankings screen both during and after the tourney, but I would like to show some different columns depending whether the tourney is still running or finished - eg during the tourney show 'Chip Count' but not 'Points', but after the tourney hide 'Chip Count' and show 'Points' instead, just as an example.

I was wondering if it was possible to either copy the built-in screen and have two of them with different settings, or make a custom screen virtually identical to the built-in one, though I can't see a way to do that.  Then I was wondering if it was possible to set columns to display conditionally, but I can't see a way to do that either.

Is it possible to do what I'm trying to achieve?

I know I can get something close to what I want using the <rankings> token on a custom screen, but there are a few other columns I want to display on top of those included with the <rankings> token so I don't think that's an option...

Cheers
Jamie

Edit: oops sorry I meant to post this in the Templates, Layouts & Sound forum, apologies...
« Last Edit: May 28, 2012, 08:38:24 AM by KanedNUnable »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Unfortunately, no.  There's only "one" of each of the built-in screens, so you can only configure them one way.  Sorry.

You'll have to make due with the <rankings> token as best you can in order to achieve what you're after.  Doesn't help in the short term, but for the long term you can request additional column support for the token.  I'll see about adding it as soon as I can.

KanedNUnable

  • Newbie
  • *
  • Posts: 19
    • View Profile
Hey Corey, no worries it's hardly the end of the world - we can live with the same set of columns displayed during & after the tourney for now!  It would be awesome in future though if the <rankings> token could maybe be extended a bit to have the same column options as the built in Player Rankings screen...?  Definitely a feature I'd love to see please if you get the chance!  ;D

Cheers
Jamie

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
I doubt I will extend it to have ALL of the columns (but it's possible).  Got any favorites?

KanedNUnable

  • Newbie
  • *
  • Posts: 19
    • View Profile
Hey Corey,

Personally, the 4 columns I'd love to see added to the <rankings> token please are:

#
Chip Count
Rebuys
Add-ons

I only suggested making all the same columns available as the built in Player Rankings page in case other people wanted to do the same as me but with different columns...

And just while I'm in dream-land, a couple of other additions I'd love to see on the <rankings> token if at all possible would be the ability to customise column names (same as the Player Rankings screen), and to customise the rendered table cells - primarily the ability to center-align the cells and change the displayed number format (eg Hits & Points - I never use fractions so would prefer to display them as integers than decimals).

I know you can style cells of a screen using the HTML Styles section, but since the <rankings> token (and Player Rankings screen) are tables rendered inside that screen cell, there's no way to apply HTML Styles to the rendered tables, is there?  I've certainly tried but to no avail so far...

Many thanks!  :D
Jamie

Edit: sorry one other thing I meant to include whilst in dream-land, the ability to reorder the columns in the <rankings> token would also be very desirable - if at all possible...  Thanks again!
« Last Edit: May 29, 2012, 05:50:06 PM by KanedNUnable »

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Hey Corey,

Personally, the 4 columns I'd love to see added to the <rankings> token please are:

#
Chip Count
Rebuys
Add-ons

Added to the to-do list.

And just while I'm in dream-land, a couple of other additions I'd love to see on the <rankings> token if at all possible would be the ability to customise column names (same as the Player Rankings screen), and to customise the rendered table cells - primarily the ability to center-align the cells and change the displayed number format...

This is where things start to get really ... complicated, I guess.  The question is really where to draw the line on how far a particular feature goes.  For example, adding an option to change the alignment of the columns is simple, if it's one option that affects every column.  But is that even helpful?  Adding an option to specify the alignment for each column individually becomes complicated.  I'll have to look into whether or not this would even really be feasible.

(eg Hits & Points - I never use fractions so would prefer to display them as integers than decimals).

This is actually a bug.  It should be using the preference that controls whether or not Hits are displayed as fractions or whole numbers.  I've fixed this for the next version.

I know you can style cells of a screen using the HTML Styles section, but since the <rankings> token (and Player Rankings screen) are tables rendered inside that screen cell, there's no way to apply HTML Styles to the rendered tables, is there?  I've certainly tried but to no avail so far...

A difficult one I've struggled with.  The main problem is that HTML tables (<table> elements) do not inherit font properties, due to a bug in early versions of browsers (back in Netscape 4 and IE 4).  Future versions of the browsers emulated the behavior because it had basically become the standard based on use, so changing it would have broken websites.  This can be overcome now using a simple CSS rule.  Pretty much all browsers support this except for Internet Explorer.  Go figure.  (As I'm writing this I looked it up and happened to stumble across a workaround.  Finally.  Again, go figure.)

Presumably you would like to apply particular styles to different columns, however.  Again, this would fall into the "getting complicated" area.

Many thanks!  :D
Jamie

Edit: sorry one other thing I meant to include whilst in dream-land, the ability to reorder the columns in the <rankings> token would also be very desirable - if at all possible...  Thanks again!

"Complicated".  But I'll look into it.

KanedNUnable

  • Newbie
  • *
  • Posts: 19
    • View Profile
Hi Corey,

Sorry it's taken so long to reply - stupid work got in the way this last fortnight meaning I didn't have any time to spend on much more important things like setting up TD for our next home tourney!  ;D

Thank you for your responses though - very much appreciated.

This is actually a bug.  It should be using the preference that controls whether or not Hits are displayed as fractions or whole numbers.  I've fixed this for the next version.

Cool thanks - I hadn't actually noticed the option to display hits as whole numbers or fractions so didn't realise there was a bug.  Would it be easy to provide a similar option to display Points as fractions or whole numbers too?

Regarding the other comments which were all related to customising of the <rankings> token and Player Rankings screen, I probably didn't think them through particularly well from your point of view - especially the <rankings> token.  That would be much harder to customise in the way I was suggesting and almost certainly more pain for you than value for your customers.

What if though... 

The end goal of all those comments was to allow me to change some number formats, text alignment and column order on the Player Rankings screen (which I'd use during the tourney with one set of columns) and something similar (which I'd use at the end of tourneys to display final standings but with slightly different columns).

Column order is already available on the Player Rankings screen, so that's not an issue.

If the next release allows me to display hits (and hopefully points) as whole numbers, then that's not an issue either.

So - what if on the Player Rankings screen you added a third option near the Edit Columns and Edit Column Names buttons, something like Edit Column Alignments - which allowed the user to apply an alignment to each column individually then was rendered in the <td> style tag for that column in every data row?  If that was possible, then the Player Rankings would be 100% perfect for me.  And then going a step further, if it was possible to either conditionally display certain columns based on tourney state, utilise another built-in screen identical to Player Rankings but called Final Standings, or somehow make a copy of Player Rankings myself - that would be my end goal achieved in its entirety!  Well for this particular element anyway I should say...  ;)  Am I still in dreamland or would any of that be easy enough to be considered please?

Thanks again Corey!

Cheers
Jamie

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Quote
Cool thanks - I hadn't actually noticed the option to display hits as whole numbers or fractions so didn't realise there was a bug.  Would it be easy to provide a similar option to display Points as fractions or whole numbers too?

Preferences tab -> Currency / Numbers section -> Points precision.  Set to 0 to display as a whole number.

Quote
If the next release allows me to display hits (and hopefully points) as whole numbers, then that's not an issue either.

Preferences tab -> Currency / Numbers section -> Show hits using whole numbers

Quote
So - what if on the Player Rankings screen you added a third option near the Edit Columns and Edit Column Names buttons, something like Edit Column Alignments - which allowed the user to apply an alignment to each column individually then was rendered in the <td> style tag for that column in every data row?

Possible, sure.  The columns are aligned based on the type of data they display.  Numbers are right-aligned (but this can also be changed on the Preferences tab), other items are left- or center-aligned. I'm not sure there's a whole lot of demand for a feature allowing one to customize the column alignments, but I will look into how difficult it would be to implement.

Quote
And then going a step further, if it was possible to either conditionally display certain columns based on tourney state, utilise another built-in screen identical to Player Rankings but called Final Standings, or somehow make a copy of Player Rankings myself - that would be my end goal achieved in its entirety!

There's a certain amount of balance I've been trying to maintain with regard to the built-in screens (and with the app in general).  Trying to make it as configurable and customizable as possible while keeping it simple and easy to use.  I'd like to do a number of things with the built-in screens, such as allowing them to be opened in separate windows, or have multiple configurations of each screen.  Imagine a multi-monitor setup where the Tournament screen was displayed on one monitor, the Seating chart screen on another, and the Player Rankings on another.  This isn't terribly difficult to do, but the code was architected in without this in mind, which would now mean a lot of changes to make this possible.  It's another "big-ticket" item I'd love to get to, if only I had more time and resources to devote to it.

KanedNUnable

  • Newbie
  • *
  • Posts: 19
    • View Profile
Hey Corey,

Thanks for getting back to me again.

I have managed to get the hits & points displaying as whole numbers using the method you suggested - sorry I just hadn't noticed those options before I guess, but thanks!

Regarding the alignment of columns - I can see the options to left/right align numbers, but this only applies to input fields doesn't it?  Not tables like on the Player Rankings screen?

I get your point about the balance of in-built screens etc, so don't worry I'm more than happy to just have the same setup of Player Rankings screen displayed both during and after the tourney - it was purely a very-nice-to-have...  I like your idea about the multiple screen setup, though from a purely selfish point of view it's likely something I'd never use - since I just run TD off my laptop for a house game with 10 people...

The only thing I'd love to see now is the ability to center-align numeric columns on the built in screens.  In an ideal world, I'd have text all left-aligned, numbers all center-aligned, and table headers all center-aligned too.

If you were able to slip that into a future release, that'd be awesome - but again, just a very-nice-to-have so it's hardly the end of the world!

Cheers
Jamie

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5402
    • View Profile
Regarding the alignment of columns - I can see the options to left/right align numbers, but this only applies to input fields doesn't it?  Not tables like on the Player Rankings screen?

Correct.  The preference refers to inputs only.  Numbers will typically be right-aligned when not in a user input field.

The only thing I'd love to see now is the ability to center-align numeric columns on the built in screens.  In an ideal world, I'd have text all left-aligned, numbers all center-aligned, and table headers all center-aligned too.

I'll look into it, but no promises.  It's actually a little more difficult than it sounds, based on the way it works today.  The Player Rankings page doesn't really know much about the data it displays.  It retrieves the player information from a generic function and when rendering, it aligns the columns based on column name using a generic alignment function.  Changing one place would affect information everywhere.  The alternative is recategorizing every column as numeric or text, which might not be a bad thing to do in general ... but, again, I'll have to look into it.

KanedNUnable

  • Newbie
  • *
  • Posts: 19
    • View Profile
Thanks Corey, no worries on all fronts - like I said, this is just an 'icing on the cake' thing for me.  If you get the chance to do it, sweet - if not, no dramas!!

Thanks for entertaining my whims  ;D

Cheers
Jamie