[SOLVED] Embed table within news?

All issues and questions relating to Turbo Tourney should be posted here. Support members, forum moderators and other members can help you with your questions.

[SOLVED] Embed table within news?

Postby viperrwk » Mon Mar 20, 2017 3:07 pm

Long time TT user.

Trying to embed a table within news. Basically I do a report that shows the percentage of possible outcomes that each potential winning bracket covers since this is not a report that TT generates. Here is the code for the table:

Code: Select all
<table class="header" cellspacing="0" align="center" cellpadding="5" width="100%" border="0"><tbody><tr><td valign="center" align="middle"><span class="title">PERCENT CHANCE OF WINNING</span></td></tr></tbody></table>
    <table class="datatable" align="center" width="100%" cellspacing="1" cellpadding="2">
     <tbody><tr><td>
         <table class="datatable" align="center" width="100%" cellspacing="1" cellpadding="2">
           <tbody><tr>
           <th width="20%">Current Place</th>
           <th width="60%">
           Name Last,First
           </th>
           <th width="20%">Percent chance</th>
          </tr>
           <tr>
           <td class="evenrow"> 1</td>
           <td class="evenrow"><a href="http://website/playerpicks1.html">Player 1</a></td>
           <td class="evenrow">27.29%</td>
          </tr>
           <tr>
           <td class="evenrow"> 3</td>
           <td class="evenrow"><a href="http://website/playerpicks2.html">Player 2</a></td>
           <td class="evenrow">10.50%</td>
          </tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>


I have about 30 table entries that I have created for this. The problem is when I embed this into a news file and then build the website, I get a bunch of <br> between the table header and the table contents. It seems to be inserting a <br> ahead of the table for ever <tr> or <td class> embedded in the file (I haven't counted since there are so many).

I suspect there's something with the stylesheet but I'm worried if I go in there I will do more damage and not necessarily solve the problem.

Is there an easy way I can embed a table within the news file? And second question, can we get a report like the one I'm talking about added to the software?

Thanks in advance.

viperrwk
Last edited by viperrwk on Wed Mar 22, 2017 12:27 pm, edited 1 time in total.
RANDOM_AVATAR
viperrwk
 
{ AUTHOR_TOPIC }
{ USER_STATUS }:
Posts: 12
Joined: Mon Mar 20, 2017 2:49 pm
Location: CT
Old Username: viperrwk

Re: Embed table within news?

Postby Fred » Mon Mar 20, 2017 3:12 pm

Interesting report...mind telling how you compile this information?
User avatar
Fred
 
{ USER_STATUS }:
Posts: 191
Joined: Tue Aug 19, 2014 10:55 am
Location: Los Angeles
Old Username: Fred

Re: Embed table within news?

Postby viperrwk » Tue Mar 21, 2017 5:25 am

Fred wrote:Interesting report...mind telling how you compile this information?


I take the total number of winning combinations for each bracket that still has a shot of winning as reported by TT as a percentage of the sum of all the winning combinations for all the first place brackets. For example I have a bracket that is in 27th place but it covers off 6% of all possible winning scenarios remaining (eighth best). I then take all these winning percentages and put them in a table in the news report for the pool. But for some reason TT doesn't like embedded tables within news.

Heck, if TT could do a two level sort it could be a configurable standings option - best place finish then total combinations to win. It would keep things more interesting between the first and second weekends.

viperrwk
RANDOM_AVATAR
viperrwk
 
{ AUTHOR_TOPIC }
{ USER_STATUS }:
Posts: 12
Joined: Mon Mar 20, 2017 2:49 pm
Location: CT
Old Username: viperrwk

Re: Embed table within news?

Postby Fred » Tue Mar 21, 2017 10:44 am

I'm evidently too slow to understand what you are trying to explain. How are you determining the total number of winning combinations for each bracket that still has a shot of winning? Where does TT report which brackets as a percentage of the sum of all winning combinations. Also, when you refer to brackets, do you mean a player's bracket? Just so I understand, can you list an item by item task so that I can maybe understand it that way?

I am using a 2005 version of TT so perhaps I don't have access to this information?
User avatar
Fred
 
{ USER_STATUS }:
Posts: 191
Joined: Tue Aug 19, 2014 10:55 am
Location: Los Angeles
Old Username: Fred

Re: Embed table within news?

Postby Fred » Tue Mar 21, 2017 11:32 am

Here is a possible way for you to embed a table within your news page. Develop a separate html page and call it whatever you like...the attached example is tt_news.html and is attached as a zip file. Upload it to the server. Then, within your news page call the tt_news.html page wherever you want it to appear. You will have to rename your news page to *.php because when you call the page it will look like this. <?php require("tt_news.html");?> I think it should work the way you want it to.

I wish I could take credit for this, but one of the forum attendees showed me how to do this last year.

Fred

tt_news.zip
(660 Bytes) Downloaded 38 times
User avatar
Fred
 
{ USER_STATUS }:
Posts: 191
Joined: Tue Aug 19, 2014 10:55 am
Location: Los Angeles
Old Username: Fred

Re: Embed table within news?

Postby SamGordon » Wed Mar 22, 2017 5:48 am

Are you using a text file or TT's editor for news?

I use HTML code in my news report, but I do it all in a text file and then point TT to use the text file instead of it's editor. I will say though I clipped out the header and my report line from player scenarios and I have a lot of blank space before the table shows up, but I figured it wasn't worth fighting.
RANDOM_AVATAR
SamGordon
 
{ USER_STATUS }:
Posts: 2219
Images: 1
Joined: Wed Feb 25, 2004 3:28 pm
Old Username: SamG

Re: Embed table within news?

Postby Steve » Wed Mar 22, 2017 9:04 am

viperrwk wrote:Long time TT user.
Trying to embed a table within news. .........

Take out all of the carriage returns in the txt file, for example, your file without carriage returns

Code: Select all
<table class="header" cellspacing="0" align="center" cellpadding="5" width="100%" border="0"><tbody><tr><td valign="center" ign="middle"><span class="title">PERCENT CHANCE OF WINNING</span></td></tr></tbody></table><table class="datatable" align="center" width="100%" cellspacing="1" cellpadding="2"><tbody><tr><td><table class="datatable" align="center" width="100%" cellspacing="1" cellpadding="2"><tbody><tr><th width="20%">Current Place</th><th width="60%">Name Last,First</th><th width="20%">Percent chance</th></tr><tr><td class="evenrow"> 1</td><td class="evenrow"><a href="http://website/playerpicks1.html">Player 1</a></td><td class="evenrow">27.29%</td></tr><tr><td class="evenrow"> 3</td><td class="evenrow"><a href="http://website/playerpicks2.html">Player 2</a></td><td class="evenrow">10.50%</td></tr></tbody></table></td></tr></tbody></table>

screenshot below (using the code in a temp news page)
Image
User avatar
Steve
 
{ USER_STATUS }:
Posts: 108
Joined: Mon Feb 16, 2015 4:24 am
Location: Chicago

Re: Embed table within news?

Postby viperrwk » Wed Mar 22, 2017 12:25 pm

Steve wrote:
viperrwk wrote:Long time TT user.
Trying to embed a table within news. .........

Take out all of the carriage returns in the txt file, for example, your file without carriage returns

Code: Select all
<table class="header" cellspacing="0" align="center" cellpadding="5" width="100%" border="0"><tbody><tr><td valign="center" ign="middle"><span class="title">PERCENT CHANCE OF WINNING</span></td></tr></tbody></table><table class="datatable" align="center" width="100%" cellspacing="1" cellpadding="2"><tbody><tr><td><table class="datatable" align="center" width="100%" cellspacing="1" cellpadding="2"><tbody><tr><th width="20%">Current Place</th><th width="60%">Name Last,First</th><th width="20%">Percent chance</th></tr><tr><td class="evenrow"> 1</td><td class="evenrow"><a href="http://website/playerpicks1.html">Player 1</a></td><td class="evenrow">27.29%</td></tr><tr><td class="evenrow"> 3</td><td class="evenrow"><a href="http://website/playerpicks2.html">Player 2</a></td><td class="evenrow">10.50%</td></tr></tbody></table></td></tr></tbody></table>


Thank you! This solves the problem.

I do not use the TT text editor for news - I use a program called EditPad. In EditPad you can create text files for Mac (CR), Windows (CR/LF) and Unix (LF). I am running TT on a new machine this year and did a new installation of EditPad which defaults to the Windows format for text files. If you convert it to Unix, then the file is parsed without all the extra CRs and the spacing goes away.

Sometimes its the simple things one forgets to check...

Thanks again.

viperrwk
RANDOM_AVATAR
viperrwk
 
{ AUTHOR_TOPIC }
{ USER_STATUS }:
Posts: 12
Joined: Mon Mar 20, 2017 2:49 pm
Location: CT
Old Username: viperrwk

Re: Embed table within news?

Postby viperrwk » Wed Mar 22, 2017 12:46 pm

Fred wrote:I'm evidently too slow to understand what you are trying to explain. How are you determining the total number of winning combinations for each bracket that still has a shot of winning? Where does TT report which brackets as a percentage of the sum of all winning combinations. Also, when you refer to brackets, do you mean a player's bracket? Just so I understand, can you list an item by item task so that I can maybe understand it that way?

I am using a 2005 version of TT so perhaps I don't have access to this information?


I do not know if the 2005 version of TT will generate this information as I started using TT in 2006.

There is a report available in the report package called Player Scenarios. From TT: "The player scenarios will show the best and worst finishes for each player based on the possible outcomes remaining. Use this report to see who has been eliminated and who is still alive."

This report generates, best finish place, worst finish place, best finish points, worst finish points, who to root for and lists the total number of possible combinations that bracket has for its best finish place. At this point in the tournament there are a total of 32768 possible outcomes and the best possible outcome for each bracket covers off a percentage of the total possible outcomes. Brackets that cover off a larger percentage of the outcomes have a greater chance of winning.

It's one of TT most powerful features and shows people that at this stage of the tournament its not about what place you're in but rather how robust your bracket is compared to everyone else's.

viperrwk
RANDOM_AVATAR
viperrwk
 
{ AUTHOR_TOPIC }
{ USER_STATUS }:
Posts: 12
Joined: Mon Mar 20, 2017 2:49 pm
Location: CT
Old Username: viperrwk


Return to Turbo Tourney Support Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron