Advanced search  
Pages: [1]   Go Down

Author Topic: Re: How to include a table in a post  (Read 10123 times)

Robert J Schafish

  • T1
  • *
  • Posts: 11
Re: How to include a table in a post
« on: October 11, 2010, 03:28:33 PM »


Depart Lae Airfield          1   7/2/37 0:00   0   0   0   0   -   -    6°34'11.00"S   46°43'34.00"E   
EA Radio Transmission    2   7/2/37 4:18 4.3     4.3    -      -   -                                        7,000
EA Radio Transmission   2   7/2/37 5:19    5.3     1.0     277     277     52     52    7.3 S   150.7 E    10,000
Logged

Robert J Schafish

  • T1
  • *
  • Posts: 11
Re: How to include a table in a post
« Reply #1 on: October 11, 2010, 03:38:07 PM »

My apologies for the previous post, I was experimenting with copying a table into the forum and apparently hit the GO button without intending to.  Since I have raised the issue anyway, is there a way to copy a table (such as  Excel or Word) into a post.  As you can see from my previous post, what comes across is without much in the way of format.

Cheers, BobS
Logged

Martin X. Moleski, SJ

  • Administrator
  • *
  • Posts: 3006
Re: How to include a table in a post
« Reply #2 on: October 11, 2010, 04:51:34 PM »

Depart Lae Airfield          1   7/2/37 0:00   0   0   0   0   -   -    6°34'11.00"S   46°43'34.00"E   
EA Radio Transmission    2   7/2/37 4:18 4.3     4.3    -      -   -                                        7,000
EA Radio Transmission   2   7/2/37 5:19    5.3     1.0     277     277     52     52    7.3 S   150.7 E    10,000

Depart Lae Airfield17/2/37 0:00
0
0
0
0
-
-
6°34'11.00"S
46°43'34.00"E
EA Radio Transmission 27/2/37 4:18 4.3 4.3
-
-
-
7,000
EA Radio Transmission27/2/37 5:19 5.3 1.0 277 277 52 52
7.3 S
150.7 E
10,000

To see how this table was created and formatted, click on the "quote" button. That will show you the source code for the post.

There doesn't seem to be a way to right-align material by row or column.  I had to go in by hand to do that.  There is also no padding.

It seems as though you are doing a more elaborate version of the transmission timeline that I did on the wiki.  We may be able to work something out so that you can work there, if you'd like; or I can translate your table to wiki format, do a screen shot, and post the results in the forum.
LTM,

           Marty
           TIGHAR #2359A
 
« Last Edit: October 12, 2010, 12:14:51 PM by moleski »
Logged

Martin X. Moleski, SJ

  • Administrator
  • *
  • Posts: 3006
Re: How to include a table in a post
« Reply #3 on: October 11, 2010, 05:02:34 PM »

My apologies for the previous post, I was experimenting with copying a table into the forum and apparently hit the GO button without intending to.

No problem.  It's an interesting question.  I don't have a good answer.

Quote
Since I have raised the issue anyway, is there a way to copy a table (such as  Excel or Word) into a post.  As you can see from my previous post, what comes across is without much in the way of format.

The best thing to do would be to save the table as HTML.  If you look at my post above, it shows that the syntax for the Forum is practically identical to HTML, except for the kind of brackets used to encase tags:
Code: [Select]
<table></table> vs. [table][/table]
<tr></tr> vs. [tr][/tr]
<td></td> vs. [td][/td]

What I mean by "look at my post above" is "click on the quote button in my post to see the source code."

So, once you get your table into HTML, simply search and replace to change the angle brackets.  Then it should drop into a post without too much difficulty.

I'm not seeing a way to format the table with borders.  That may require hacking the .css for the Forum.  Before I go that route, I'll do a little more searching for a simpler solution.

UPDATE #1: Search complete.  Tables inside of posts do not have a special class already picked out in the .css.  I might be able to define the default table tag with borders--although I'm afraid that it might have ill effects on all of the tables used in the layout of the Forum.  If you see strange things happening here, blame BobS.

UPDATE #2: I've modified the code to give tables a collapsed, 1-pixel, gray border.  It worked to make the test table inside your post more legible but, as I feared, it added a lot of extra lines to the layout tables.  It might be possible to create a special .css class for the layout tables and then hack the php code for the forum so that the layout class has no borders but all other tables do.  I'm not gonna play with that tonight.  I've caused enough trouble for today.

UPDATE #3: I've hacked away at the php for displaying posts and gotten rid of a lot of the extraneous borders that I introduced by modifying the .css.  I have signed all of my edits so if there is a huge storm of protest from users, we can revert to the old configuration--with no borders for tables in posts.
LTM,

           Marty
           TIGHAR #2359A
 
« Last Edit: October 12, 2010, 07:55:01 AM by moleski »
Logged

Robert J Schafish

  • T1
  • *
  • Posts: 11
Re: How to include a table in a post
« Reply #4 on: October 12, 2010, 07:16:09 PM »

Hi M.

Thanks for the help with adapting the forum for posting a table.  I will work at putting it in html format as you suggested.  As for strange thinks happening with tables in the forum, I will accept responsibility, but not the blame !!

You are correct in your assessment about my table contents. I reverted to my engineering roots and put the basic flight  info into a table similar to what you did on the wiki (time GMT, elapsed time, distance from Lae, lat and long,  average speed, altitude etc.) I intend to post it and ask members for comment, corrections etc.

Cheers, BobS
Logged

Martin X. Moleski, SJ

  • Administrator
  • *
  • Posts: 3006
Re: How to include a table in a post
« Reply #5 on: October 12, 2010, 09:38:47 PM »

Thanks for the help with adapting the forum for posting a table.  I will work at putting it in html format as you suggested.  As for strange thinks happening with tables in the forum, I will accept responsibility, but not the blame !!

I've cleaned up the worst excesses of the change I made.

But I will have to go dig out the code that actually deals with parsing tags in posts in order to provide padding for the tables in posts.  That's where I should have gone first, but I hoped I wouldn't have to.  Shortcuts rarely are.  :-\

[/quote]
You are correct in your assessment about my table contents. I reverted to my engineering roots and put the basic flight  info into a table similar to what you did on the wiki (time GMT, elapsed time, distance from Lae, lat and long,  average speed, altitude etc.) I intend to post it and ask members for comment, corrections etc.
[/quote]

Marvelous!  I'm looking forward to seeing what you come up with. 
LTM,

           Marty
           TIGHAR #2359A
 
Logged
Pages: [1]   Go Up
 

Copyright 2024 by TIGHAR, a non-profit foundation. No portion of the TIGHAR Website may be reproduced by xerographic, photographic, digital or any other means for any purpose. No portion of the TIGHAR Website may be stored in a retrieval system, copied, transmitted or transferred in any form or by any means, whether electronic, mechanical, digital, photographic, magnetic or otherwise, for any purpose without the express, written permission of TIGHAR. All rights reserved.

Contact us at: info@tighar.org • Phone: 610-467-1937 • Membership formwebmaster@tighar.org

Powered by MySQL SMF 2.0.18 | SMF © 2021, Simple Machines Powered by PHP