Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Forum tables seem to be broken

    Scheduled Pinned Locked Moved General pfSense Questions
    16 Posts 4 Posters 4.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wallabybob
      last edited by

      I have been trying to add a table to a forum reply. Unfortunately the table and its contents don't appear in a preview. Here is an example in Bulletin Board Code:

      
      [table][tr][td]Column 1[/td] [td]Column2[/td][/tr][/table]
      
      

      and in "non code" form:

      | Column 1 | Column2 |

      In preview there is no table.

      1 Reply Last reply Reply Quote 0
      • W
        wallabybob
        last edited by

        The table doesn't show up once the topic is posted. This is true when I use Firefox and true when I use Google Chrome.

        A chance glance at the display on a different laptop from a different angle (probably about 45o to the screen instead of perpendicular to the screen) showed the table appears as bright white text on a "silver" background! Not very useful. An attempt to change the table text to black by```
        [color]
        [table][tr][td]Column 1[/td] [td]Column2[/td][/tr][/table]
        [/color]

        
        | Column 1 | Column2 |
        
        which is also not very useful.
        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Hmm,
          It appears in the preview for me, however I can't see it unless I select the text as it's white on white!

          Steve

          Edit: Alternate postings appear to be white or very light grey so if you're lucky you can just see it.  ::)

          1 Reply Last reply Reply Quote 0
          • M
            Metu69salemi
            last edited by

            | Testing | with colors |

            And it's not only thing which is broken. because i used only one tr and two td's in this post

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              It's been broken for years… I tried to fix it once, never did find the css responsible, but I didn't have much time to spend on it then. It's something in SMF. Not sure if it's part of the theme or what.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                While reading up on how BBCode tables are supposed to work I stumbled on this forum post.

                It seems to idicate the behaviour of the table tag is at least partially controlled by the subs.php file:

                
                array(
                				'tag' => 'table',
                				'before' => '',
                				'after' => '
                
                ',
                				'trim' => 'inside',
                				'require_children' => array('tr'),
                				'block_level' => true,
                			),
                
                

                So perhaps it's not inheriting the colour for what ever reason. Perhaps it could just be set to black instead.
                Beyond my skills TBH.

                Steve

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  Looks like it is actually inherited, from the main css of the theme…

                  body, td, th , tr
                  {
                          color: #ffffff;
                          font-size: small;
                          font-family: verdana, sans-serif;
                  }
                  

                  Changing that also changes the color of many other areas on the site, like the page number at the bottom of the thread though.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • M
                    Metu69salemi
                    last edited by

                    So recreation of css is next thing

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      @jimp:

                      Changing that also changes the color of many other areas on the site, like the page number at the bottom of the thread though.

                      That would be bad. So why not just change the table tag to not inherit the style:

                      
                                                      'tag' => 'table',
                      				'before' => '',
                      				'after' => '
                      
                      ',
                      				'trim' => 'inside',
                      				'require_children' => array('tr'),
                      				'block_level' => true,
                      
                      

                      Or am I missing something obvious?

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • jimpJ
                        jimp Rebel Alliance Developer Netgate
                        last edited by

                        Tried that (that's how it is now, check the html source) apparently the css takes precedence.

                        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                        Need help fast? Netgate Global Support!

                        Do not Chat/PM for help!

                        1 Reply Last reply Reply Quote 0
                        • jimpJ
                          jimp Rebel Alliance Developer Netgate
                          last edited by

                          aha, the table tag didn't do it, but the td tag did.

                          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                          Need help fast? Netgate Global Support!

                          Do not Chat/PM for help!

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            Excellent!  ;D

                            Of course now this thread is littered with tables.  :D

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • W
                              wallabybob
                              last edited by

                              Thanks Jimp.

                              I have SMF 1.1.4 installed on my home server and it displays tables with black text and usesOf course the page layout looks rather different.

                              Perhaps the real problem is in the pfSense stylesheet.

                              The default style sheet on the SMF 1.1.4 installation includes:```

                              /* By default (td, body..) use verdana in black. */
                              body, td, th , tr
                              {
                              color: #000000;
                              font-size: small;
                              font-family: verdana, sans-serif;
                              }

                              
                              I have only minimal experience with stylesheets so wouldn't suggest that anyone take this speculation very seriously: I wonder about the style sheet snippet Jimp posted earlier. Some parts of the default pfSense theme have white text on a black background (style smalltext?) but other parts have black text on a light background (style post?). Perhaps the style sheet part that generates black text on a light background needs to also do so for "td".
                              1 Reply Last reply Reply Quote 0
                              • W
                                wallabybob
                                last edited by

                                Its broken again. Or maybe I just imagined display of tables was fixed.

                                1 Reply Last reply Reply Quote 0
                                • jimpJ
                                  jimp Rebel Alliance Developer Netgate
                                  last edited by

                                  How about now?

                                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                                  Need help fast? Netgate Global Support!

                                  Do not Chat/PM for help!

                                  1 Reply Last reply Reply Quote 0
                                  • W
                                    wallabybob
                                    last edited by

                                    @jimp:

                                    How about now?

                                    Looks good! Verified in preview and post. Thanks.

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.